:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17212b;
  background: #f4f6f4;
  font-synthesis: none;
  --ink: #17212b;
  --muted: #64717d;
  --line: #dfe5e1;
  --surface: #ffffff;
  --surface-soft: #f7f9f7;
  --navy: #101820;
  --orange: #f26a2c;
  --orange-soft: #fff1e9;
  --green: #34745a;
  --shadow: 0 16px 44px rgba(25, 38, 31, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  background: #f4f6f4;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(242, 106, 44, 0.07), transparent 30rem),
    #f4f6f4;
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.app-shell {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 0 32px 36px;
}

.site-header {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(23, 33, 43, 0.09);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--orange);
}

.brand-mark svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.brand-copy {
  display: inline-flex;
  align-items: baseline;
  letter-spacing: -0.04em;
  line-height: 1;
}

.brand-copy strong {
  font-size: 1.3rem;
  font-weight: 800;
}

.brand-copy span {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  margin-left: 2px;
}

.header-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #4d5b65;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 33, 43, 0.08);
  border-radius: 999px;
  padding: 8px 12px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2f8a5e;
  box-shadow: 0 0 0 4px rgba(47, 138, 94, 0.12);
}

main {
  padding-top: 6px;
}

.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 10px;
  min-height: 238px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  font-weight: 800;
  color: var(--orange);
}

.intro h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  font-weight: 830;
}

.hero-tagline {
  display: inline-block;
  margin: 14px 0 0;
  padding-left: 12px;
  border-left: 4px solid var(--orange);
  color: var(--green);
  font-size: clamp(1.3rem, 2vw, 1.65rem);
  font-weight: 900;
  font-style: italic;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.intro-logo-wrap {
  flex: 0 0 min(31vw, 420px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-self: stretch;
}

.intro-logo {
  display: block;
  width: clamp(300px, 28vw, 360px);
  max-width: 100%;
  height: auto;
  object-fit: contain;
  mix-blend-mode: normal;
  image-rendering: auto;
}



.card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.search-card {
  padding: 18px;
  margin-bottom: 18px;
}

.control-heading,
.panel-heading,
.activity-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.control-heading {
  width: 100%;
  margin-bottom: 13px;
}

.control-copy {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
  white-space: nowrap;
}

.control-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.compact-live-status {
  padding: 7px 10px;
  font-size: 0.72rem;
  white-space: nowrap;
}

.control-heading h2,
.panel-heading h2,
.activity-heading h2,
.next-layers h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.mode-switch {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  background: #eef2ef;
  border-radius: 12px;
}

.mode-button {
  border: 0;
  border-radius: 9px;
  padding: 9px 13px;
  color: #65717a;
  background: transparent;
  font-size: 0.84rem;
  font-weight: 750;
}

.mode-button.active {
  background: white;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.search-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  gap: 10px;
}

.search-box {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid #cfd7d2;
  border-radius: 12px;
  background: #fff;
}

.search-box:focus-within {
  border-color: #8ba69b;
  box-shadow: 0 0 0 3px rgba(52, 116, 90, 0.09);
}

.search-icon {
  color: #718078;
  font-size: 1.25rem;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 0.97rem;
}

.search-box input::placeholder {
  color: #929c97;
}

.button {
  min-height: 48px;
  border-radius: 12px;
  padding: 0 17px;
  font-size: 0.88rem;
  font-weight: 800;
  border: 1px solid transparent;
}

.button.primary {
  color: white;
  background: var(--navy);
}

.button.primary:hover {
  background: #1e2c37;
}

.button.secondary {
  background: #fff;
  color: #32404a;
  border-color: #ccd5d0;
}

.button.secondary:hover {
  background: #f7f9f7;
}

.quick-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
  color: #718078;
  font-size: 0.8rem;
}

.quick-place {
  border: 1px solid #dde4df;
  background: #f8faf8;
  color: #435149;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 0.78rem;
  font-weight: 700;
}

.quick-place:hover {
  border-color: #bac7bf;
  background: #fff;
}

.radius-control {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid #edf0ee;
  transition: opacity 150ms ease;
}

.radius-control.disabled {
  opacity: 0.42;
  pointer-events: none;
}

.radius-label-row,
.range-ends {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.radius-label-row {
  margin-bottom: 8px;
  font-size: 0.86rem;
}

.radius-label-row label {
  font-weight: 750;
}

.radius-label-row strong {
  color: var(--orange);
}

#radiusRange {
  width: 100%;
  accent-color: var(--orange);
}

.range-ends {
  margin-top: 2px;
  color: #929c97;
  font-size: 0.72rem;
}

.search-message {
  min-height: 0;
  margin-top: 0;
  color: #5d6b64;
  font-size: 0.82rem;
  transition: margin 120ms ease;
}

.search-message:not(:empty) {
  margin-top: 12px;
}

.search-message.error {
  color: #b53b2d;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(390px, 0.84fr);
  gap: 22px;
  align-items: stretch;
  min-height: 790px;
}

.map-column {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 16px;
  height: auto;
}

.map-panel {
  min-height: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.panel-heading {
  margin-bottom: 14px;
}

.panel-heading .muted {
  margin: 5px 0 0;
}

.muted {
  color: var(--muted);
  font-size: 0.83rem;
}

.round-button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #d5ddd8;
  background: #fff;
  color: #46564d;
  font-weight: 800;
  font-size: 1rem;
}

.round-button:hover {
  background: #f6f8f6;
}

.recenter-control {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  min-width: 76px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  white-space: nowrap;
}

.recenter-icon {
  width: var(--map-action-icon-size);
  height: var(--map-action-icon-size);
  flex: 0 0 var(--map-action-icon-size);
  border-radius: 50%;
  border: 1px solid #d5ddd8;
  background: #fff;
  color: #46564d;
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 800;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.recenter-control:hover .recenter-icon {
  background: #f6f8f6;
  border-color: #bac7bf;
  transform: translateY(-1px);
}

.map-instruction,
.recenter-label {
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.35;
}

.recenter-label {
  color: var(--muted);
}

.map-wrap {
  position: relative;
  flex: 1;
  min-height: 470px;
  overflow: hidden;
  border-radius: 15px;
  border: 1px solid #dbe2de;
  background: #e8ede9;
}

#map {
  height: 100%;
  min-height: 470px;
  width: 100%;
}

.selected-area-title {
  min-width: 0;
}

.selected-area-actions {
  --map-action-icon-size: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-left: auto;
}

.map-instruction {
  max-width: min(430px, 42vw);
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: right;
}

.map-instruction strong {
  color: var(--ink);
}

.map-layer-status {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 500;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(16, 24, 32, 0.12);
  color: #34443b;
  font-size: 0.7rem;
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(8px);
}

.map-layer-status[hidden] {
  display: none;
}

.fire-map-marker {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #cf4a24;
  box-shadow: 0 4px 14px rgba(74, 31, 16, 0.28);
  color: #fff;
  padding: 0;
  cursor: pointer;
  transition: transform 120ms ease;
}

.fire-map-marker span {
  display: block;
  font-size: 1.05rem;
  line-height: 1;
}

.fire-map-marker:hover {
  transform: scale(1.08);
}

.fire-popup {
  display: grid;
  gap: 4px;
  min-width: 180px;
}

.fire-popup strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.fire-popup span {
  color: #66736c;
  font-size: 0.74rem;
  line-height: 1.35;
}

.wildfire-map-note {
  margin-bottom: 8px;
}

.map-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 13px;
  font-size: 0.8rem;
}

.area-legend {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #58665f;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--orange);
  background: rgba(242, 106, 44, 0.18);
}

.text-button {
  border: 0;
  background: transparent;
  color: #2c6b52;
  padding: 4px 0;
  font-size: 0.8rem;
  font-weight: 800;
}

.text-button:hover {
  text-decoration: underline;
}

.insights {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
  min-height: 0;
  height: auto;
  overflow: hidden;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.metric {
  min-height: 116px;
  padding: 14px;
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #6d7973;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric-symbol {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f0f4f1;
  color: #506158;
  font-size: 0.88rem;
}

.metric > strong {
  display: block;
  margin-top: 10px;
  font-size: 1.75rem;
  letter-spacing: -0.045em;
  line-height: 1;
}

.metric > p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.weather-precip {
  font-weight: 800;
  color: #536159 !important;
}

.weather-metric {
  position: relative;
  overflow: hidden;
}

.weather-support {
  padding-top: 11px;
  padding-right: 152px;
}

.weather-high-low {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #536159;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.weather-high-low b {
  display: inline-block;
  margin-right: 2px;
  color: #78847e;
  font-size: 0.66rem;
  letter-spacing: 0.04em;
}

.weather-support > p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

.weather-support > .weather-precip {
  color: #536159;
  font-weight: 800;
}

.weather-current {
  position: absolute;
  top: 36px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 140px;
  height: 58px;
}

.weather-current > strong,
.weather-current-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 58px;
  line-height: 1;
}

.weather-current > strong {
  margin: 0;
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -0.06em;
}

.weather-current-icon {
  width: 58px;
  font-size: 3.1rem;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-variant-emoji: emoji;
}


.forecast-metric {
  overflow: hidden;
}

.forecast-metric-top {
  gap: 8px;
}

.forecast-heading-copy {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.forecast-location-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.forecast-range {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  background: #f0f3f1;
}

.forecast-range-button {
  min-width: 28px;
  min-height: 24px;
  border: 0;
  border-radius: 6px;
  padding: 0 6px;
  background: transparent;
  color: #78847e;
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.forecast-range-button:hover {
  background: rgba(255, 255, 255, 0.62);
}

.forecast-range-button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.08);
}

.forecast-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
  margin-top: 9px;
  min-width: 0;
}

.forecast-grid[data-range="3"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.forecast-grid[data-range="14"] {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  row-gap: 7px;
}

.forecast-day {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 2px;
  text-align: center;
}

.forecast-day-name {
  color: #6d7973;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.forecast-icon {
  font-size: 0.9rem;
  line-height: 1.15;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-variant-emoji: emoji;
}

.forecast-temps {
  display: grid;
  gap: 0;
  font-size: 0.82rem;
  line-height: 1.15;
}

.forecast-temps strong {
  color: var(--ink);
  font-weight: 900;
}

.forecast-temps span {
  color: #8c9691;
  font-weight: 800;
}

.forecast-loading {
  grid-column: 1 / -1;
  align-self: center;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.35;
}

.forecast-grid[data-range="3"] .forecast-day-name {
  font-size: 0.88rem;
}

.forecast-grid[data-range="3"] .forecast-icon {
  font-size: 1.08rem;
}

.forecast-grid[data-range="3"] .forecast-temps {
  font-size: 0.88rem;
}

@media (max-width: 510px) {
  .forecast-day-name {
    font-size: 0.68rem;
  }

  .forecast-icon {
    font-size: 1rem;
  }

  .forecast-temps {
    font-size: 0.70rem;
  }
}


.activity-card {
  padding: 16px;
  min-width: 0;
  min-height: 0;
  height: auto;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.activity-heading {
  flex: 0 0 auto;
  align-items: flex-end;
  padding-bottom: 14px;
  border-bottom: 1px solid #edf0ee;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  background: #f0f3f1;
  border-radius: 10px;
}

.tab {
  border: 0;
  background: transparent;
  color: #6c7872;
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 0.75rem;
  font-weight: 800;
}

.tab.active {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 3px 10px rgba(242, 106, 44, 0.20);
}

.tab.active:hover {
  background: #ff7a3f;
  color: #fff;
}

.feed {
  padding-top: 3px;
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.feed-item {
  padding: 11px 1px;
  border-bottom: 1px solid #eef1ef;
}

.news-feed-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
}

.news-thumb-wrap {
  width: 78px;
  height: 72px;
  overflow: hidden;
  border-radius: 10px;
  background: #f2f5f3;
}

.news-thumb {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.news-thumb-fallback {
  object-fit: contain;
  padding: 10px;
  background: #f2f5f3;
}

.news-feed-copy {
  min-width: 0;
}

.news-feed-item .feed-item-top > div {
  min-width: 0;
}

.feed-item:last-child {
  border-bottom: 0;
}

.feed-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.feed-item h3 {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.35;
}

.feed-item p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.5;
}

.feed-meta {
  flex: 0 0 auto;
  color: #89938e;
  font-size: 0.7rem;
  white-space: nowrap;
}

.feed-badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 5px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #eff4f1;
  color: #4e665a;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.feed-badge.alert {
  background: #fff0ec;
  color: #a4432d;
}

.feed-badge.news {
  background: #eef3f8;
  color: #365d79;
}

.feed-badge.sports {
  background: #eef6f1;
  color: #2f6f50;
}

.feed-badge.event {
  background: #fff3e8;
  color: #a14d21;
}

.story-link {
  color: inherit;
  text-decoration: none;
}

.story-link:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 205px;
  text-align: center;
  color: #77847d;
  font-size: 0.85rem;
  line-height: 1.55;
  padding: 22px;
}

.loading-row {
  min-height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #748078;
  font-size: 0.84rem;
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #d9e0dc;
  border-top-color: var(--orange);
  animation: spin 0.8s linear infinite;
}

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

.layers-card {
  padding: 18px;
}

.layers-copy h2 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.layers-copy p:not(.section-kicker) {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.layer-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.layer-link {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 12px;
  border: 1px solid #dbe2de;
  background: #f7f9f7;
  padding: 10px 11px;
  color: #405049;
  text-align: left;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.layer-link:hover,
.layer-link.active {
  background: #fff;
  border-color: #bfcac4;
  transform: translateY(-1px);
}

.layer-link.active {
  box-shadow: 0 0 0 2px rgba(242, 106, 44, 0.12);
  border-color: rgba(242, 106, 44, 0.48);
}

.layer-link-disabled,
.layer-link:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
}

.layer-link-disabled:hover,
.layer-link:disabled:hover {
  background: #f7f9f7;
  border-color: #dbe2de;
  transform: none;
}

.layer-link span {
  min-width: 0;
  font-size: 0.78rem;
  font-weight: 800;
}

.layer-link small {
  flex: 0 0 auto;
  color: #7b8781;
  font-size: 0.66rem;
  white-space: nowrap;
}

.layer-drawer {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e8ece9;
}

.layer-drawer[hidden] {
  display: none;
}

.layer-drawer-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.layer-drawer-heading h3 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.layer-close {
  width: 32px;
  height: 32px;
  font-size: 1rem;
}

.layer-drawer-body {
  min-height: 72px;
}

.layer-loading {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #748078;
  font-size: 0.8rem;
}

.layer-empty {
  border-radius: 12px;
  border: 1px solid #e3e8e5;
  background: #fafbfa;
  padding: 13px;
  color: #66736c;
  font-size: 0.79rem;
  line-height: 1.5;
}

.layer-empty strong {
  display: block;
  margin-bottom: 4px;
  color: #34443b;
}

.layer-empty p {
  margin: 5px 0 0;
}

.layer-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.layer-stat {
  border-radius: 12px;
  border: 1px solid #e0e6e2;
  background: #fafbfa;
  padding: 11px;
}

.layer-stat > span {
  display: block;
  color: #718078;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.layer-stat > strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.layer-stat > small {
  display: block;
  margin-top: 3px;
  color: #7c8782;
  font-size: 0.68rem;
}

.layer-results {
  display: grid;
}

.layer-result {
  padding: 11px 1px;
  border-bottom: 1px solid #edf0ee;
}

.layer-result:last-child {
  border-bottom: 0;
}

.layer-result-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.layer-result-top strong {
  font-size: 0.8rem;
  line-height: 1.35;
}

.layer-result-top span {
  flex: 0 0 auto;
  color: #7d8883;
  font-size: 0.68rem;
}

.layer-result p {
  margin: 4px 0 0;
  color: #66736c;
  font-size: 0.74rem;
  line-height: 1.45;
}

.layer-source-note {
  margin: 10px 0 0;
  color: #7c8782;
  font-size: 0.68rem;
  line-height: 1.45;
}

.layer-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: #7c8782;
  font-size: 0.68rem;
}

.layer-action {
  display: inline-flex;
  margin-top: 10px;
  color: #2c6b52;
  font-size: 0.74rem;
  font-weight: 800;
  text-decoration: none;
}

.layer-action:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}



.feed-badge.dining {
  background: var(--orange-soft);
  color: #a64820;
}

.dining-pick-badge {
  align-items: flex-start;
  flex-direction: column;
  gap: 2px;
  line-height: 1.15;
}

.dining-pick-badge span {
  display: block;
}

.dining-list-label {
  padding: 10px 1px 8px;
  color: #a64820;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.dining-feed-item {
  padding: 12px 1px;
  border-bottom: 1px solid #eef1ef;
}

.dining-feed-item:last-of-type {
  border-bottom: 0;
}

.dining-feed-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.dining-feed-item h3 {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.35;
}

.dining-feed-item > p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.dining-score {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}

.dining-score strong {
  color: #a64820;
  font-size: 1rem;
  line-height: 1;
}

.dining-score span {
  color: #6f7b75;
  font-size: 0.69rem;
  font-weight: 800;
}

.dining-tip {
  margin: 10px 0 0;
  padding: 9px 10px;
  border-left: 3px solid var(--orange);
  background: #fff8f3;
  color: #52615a;
  font-size: 0.73rem;
  line-height: 1.45;
}

.dining-tip span {
  display: block;
  margin-top: 5px;
  color: #8b9590;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dining-map-link {
  display: inline-block;
  margin-top: 8px;
  color: #2c6b52;
  font-size: 0.72rem;
  font-weight: 800;
  text-decoration: none;
}

.dining-map-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dining-source-note {
  margin: 10px 1px 2px;
  color: #8a948f;
  font-size: 0.64rem;
  line-height: 1.4;
}

.maplibregl-map {
  font-family: inherit;
}

.maplibregl-ctrl-group {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
}

.maplibregl-ctrl-attrib {
  font-size: 9px;
}

.maplibregl-popup-content {
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  font-family: inherit;
  font-size: 0.78rem;
  line-height: 1.45;
}

@media (max-width: 1080px) {
  .site-end {
    margin-top: 20px;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .map-column {
    grid-template-rows: auto auto;
  }

  .map-wrap {
    min-height: 520px;
  }

  #map {
    height: 520px;
    min-height: 520px;
  }
}

@media (max-width: 760px) {
  .news-feed-row {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 9px;
  }

  .news-thumb-wrap {
    width: 58px;
    height: 58px;
    border-radius: 8px;
  }

  .news-thumb-fallback {
    padding: 7px;
  }

  .app-shell {
    padding: 0 16px 24px;
  }

  .site-header {
    min-height: 74px;
  }

  .header-meta {
    font-size: 0;
    padding: 9px;
  }

  .intro {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    gap: 14px;
    margin-bottom: 30px;
  }

  .intro-logo-wrap {
    order: -1;
    display: flex;
    width: 100%;
    flex: 0 0 auto;
    align-items: flex-start;
    justify-content: flex-start;
    align-self: stretch;
    padding: 0;
  }

  .intro-logo {
    width: clamp(187.5px, 52.5vw, 240px);
    max-width: 100%;
  }

  main {
    padding-top: 32px;
  }

  .control-heading,
  .activity-heading {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
  }

  .control-actions {
    width: 100%;
    justify-content: space-between;
  }

  .compact-live-status {
    display: none;
  }

  .mode-switch {
    width: 100%;
  }

  .mode-button {
    flex: 1;
  }

  .search-row {
    grid-template-columns: 1fr 1fr;
  }

  .search-box {
    grid-column: 1 / -1;
  }

  .metrics {
    grid-template-columns: 1fr 1fr;
  }

  .activity-heading {
    gap: 12px;
  }

  .tabs {
    width: 100%;
  }

  .tab {
    flex: 1;
  }

  #map {
    height: 450px;
  }

  .discover-heading,
  .dining-card {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .discover-heading {
    flex-direction: column;
    gap: 4px;
  }

  .dining-action {
    width: 100%;
    min-width: 0;
  }

  .dining-button {
    width: 100%;
    min-width: 0;
  }

  .dining-action small {
    max-width: none;
    text-align: left;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 510px) {
  .brand-copy strong {
    font-size: 1.08rem;
  }

  .search-row,
  .metrics {
    grid-template-columns: 1fr;
  }

  .search-box {
    grid-column: auto;
  }

  .button {
    width: 100%;
  }

  .quick-row span {
    width: 100%;
  }

  #map {
    height: 410px;
  }

  .map-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .metric {
    min-height: 132px;
  }

  .layer-list,
  .layer-stat-grid {
    grid-template-columns: 1fr;
  }

  .layer-footer-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 1180px) {
  .control-copy {
    white-space: normal;
  }
}

.roadwork-map-marker {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 2px solid #ffffff;
  border-radius: 5px;
  background: #f59a23;
  box-shadow: 0 4px 14px rgba(81, 49, 10, 0.28);
  color: #17212b;
  padding: 0;
  transform: rotate(45deg);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.roadwork-map-marker span {
  display: block;
  transform: rotate(-45deg);
  font-size: 1rem;
  line-height: 1;
}

.roadwork-map-marker:hover {
  transform: rotate(45deg) scale(1.08);
  box-shadow: 0 6px 18px rgba(81, 49, 10, 0.34);
}

.roadwork-popup {
  display: grid;
  gap: 5px;
  min-width: 210px;
}

.roadwork-popup strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.roadwork-popup span {
  color: #6f7b75;
  font-size: 0.7rem;
  line-height: 1.35;
}

.roadwork-popup p {
  margin: 2px 0 0;
  color: #536159;
  font-size: 0.76rem;
  line-height: 1.45;
}

.roadwork-map-note {
  margin-bottom: 8px;
}

.feed-tabs {
  flex: 0 0 auto;
}

.feed-tab {
  min-width: 76px;
  text-align: center;
}

@media (max-width: 760px) {
  .feed-tabs {
    width: 100%;
  }

  .feed-tab {
    min-width: 0;
  }
}

.feed-subnav {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 53px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 0 8px;
  border-bottom: 1px solid #edf0ee;
  scrollbar-width: none;
}

.feed-subnav::-webkit-scrollbar {
  display: none;
}

.feed-subnav.sports-subnav-open {
  display: block;
  min-height: 106px;
  padding: 0;
  overflow: visible;
}

.feed-subnav-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 53px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 0 8px;
  scrollbar-width: none;
}

.feed-subnav-row::-webkit-scrollbar {
  display: none;
}

.feed-subnav-row + .feed-subnav-row {
  border-top: 1px solid #edf0ee;
}

.feed-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid #dfe6e2;
  border-radius: 999px;
  background: #fff;
  color: #68766f;
  padding: 0 10px;
  font-size: 0.69rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.feed-pill:hover {
  background: #f5f8f6;
}

.feed-pill.active,
.feed-pill[aria-pressed="true"] {
  border-color: var(--orange);
  background: var(--orange);
  color: #fff;
  box-shadow: 0 3px 10px rgba(242, 106, 44, 0.18);
}

.feed-pill.active:hover,
.feed-pill[aria-pressed="true"]:hover {
  border-color: #ff7a3f;
  background: #ff7a3f;
  color: #fff;
}

.score-section + .score-section {
  margin-top: 10px;
}

.score-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 1px 7px;
}

.score-section-heading h3 {
  margin: 0;
  color: #536159;
  font-size: 0.73rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.score-section-heading span {
  color: #98a19c;
  font-size: 0.68rem;
  font-weight: 800;
}

.score-card {
  padding: 10px 1px;
  border-top: 1px solid #eef1ef;
}

.score-card-top,
.score-card-bottom,
.score-team-row,
.score-team-name {
  display: flex;
  align-items: center;
}

.score-card-top,
.score-card-bottom,
.score-team-row {
  justify-content: space-between;
}

.score-card-top {
  margin-bottom: 5px;
}

.score-sport {
  color: #6b7871;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.score-status {
  color: #7f8984;
  font-size: 0.66rem;
  font-weight: 900;
}
.score-status.upcoming-time {
  color: #111;
  font-weight: 900;
  text-align: right;
  justify-self: end;
  white-space: nowrap;
}


.score-status.live {
  color: #b54b2c;
}

.score-team-row {
  min-height: 36px;
  gap: 10px;
}

.score-team-name {
  min-width: 0;
  gap: 8px;
}

.score-team-name > div {
  min-width: 0;
  display: grid;
}

.score-team-name strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-team-name span {
  margin-top: 1px;
  color: #8b9590;
  font-size: 0.62rem;
}

.score-team-logo {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  object-fit: contain;
}

.score-team-fallback {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef2ef;
  color: #64726b;
  font-size: 0.56rem;
  font-weight: 900;
}

.score-value {
  min-width: 30px;
  color: #34443b;
  text-align: right;
  font-size: 0.98rem;
}

.score-team-row.winner .score-team-name strong,
.score-team-row.winner .score-value {
  font-weight: 900;
}

.score-card-bottom {
  gap: 12px;
  margin-top: 4px;
  color: #939c97;
  font-size: 0.61rem;
}

.score-card-bottom span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-section-empty {
  padding: 18px 4px 20px;
  border-top: 1px solid #eef1ef;
  color: #87918c;
  font-size: 0.76rem;
  line-height: 1.45;
}

@media (max-width: 510px) {
  .feed-subnav {
    margin-right: -2px;
  }

  .feed-pill {
    padding: 7px 10px;
  }
}


.score-date {
  margin-bottom: 6px;
  color: #34443b;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.2;
}

/* Keep scoreboards inside narrow mobile cards. */
.activity-card,
.feed,
.score-section,
.score-card {
  min-width: 0;
  max-width: 100%;
}

.activity-card {
  overflow: hidden;
}

.score-card-top,
.score-team-row {
  width: 100%;
}

.score-team-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.score-team-name {
  overflow: hidden;
}

.score-value,
.score-status {
  flex: 0 0 auto;
  justify-self: end;
  white-space: nowrap;
}

.score-card-bottom {
  min-width: 0;
}

.score-card-bottom span {
  min-width: 0;
}

@media (max-width: 510px) {
  .activity-card {
    padding-left: 14px;
    padding-right: 14px;
  }

  .score-card {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  .score-card-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .score-team-row {
    gap: 8px;
  }

  .score-card-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
  }

  .score-card-bottom span:last-child {
    text-align: right;
  }
}

@media (max-width: 1080px) {
  .workspace {
    height: auto;
  }

  .insights {
    display: flex;
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  .activity-card {
    flex: 0 0 520px;
    height: 520px;
    min-height: 520px;
    max-height: 520px;
    overflow: hidden;
  }

  .activity-card .feed {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
}

.feed-item p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  line-height: 1.4;
}

@media (max-width: 760px) {
  .feed-subnav {
    gap: 8px;
    padding-left: 2px;
    padding-right: 2px;
    scroll-padding-inline: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .feed-pill {
    flex: 0 0 auto;
    width: max-content;
    min-width: 76px;
    height: 34px;
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.69rem;
    line-height: 1;
  }
}



.site-end {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  margin-top: 82px;
  padding: 20px 24px;
  min-height: 112px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.site-end-logo {
  grid-column: 1;
  display: block;
  width: 88px;
  height: auto;
  max-width: 88px;
  max-height: 88px;
  object-fit: contain;
  justify-self: start;
}

.site-end-contact {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  font-size: 0.92rem;
}

.site-end-heading {
  margin-bottom: 1px;
  color: var(--green);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-end-contact a {
  color: var(--navy);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.site-end-contact a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-end-message {
  grid-column: 3;
  justify-self: end;
  max-width: 330px;
  text-align: right;
}

.site-end-message strong,
.site-end-message span {
  display: block;
}

.site-end-message strong {
  color: var(--navy);
  font-size: 0.9rem;
  line-height: 1.35;
}

.site-end-message span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

@media (max-width: 1080px) {
  .site-end {
    margin-top: 20px;
  }
}

@media (max-width: 600px) {
  .selected-area-actions {
    gap: 8px;
  }

  .map-instruction {
    max-width: 175px;
    font-size: 0.65rem;
  }

  .recenter-control {
    min-width: 72px;
    gap: 2px;
  }

  .map-instruction,
  .recenter-label {
    font-size: 0.65rem;
    line-height: 1.35;
  }

  .site-end {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 16px;
    margin-top: 18px;
    padding: 18px;
    min-height: 0;
    border-radius: 18px;
  }

  .site-end-logo {
    grid-column: 1;
    width: 68px;
    max-width: 68px;
    max-height: 68px;
  }

  .site-end-contact {
    grid-column: 2;
    font-size: 0.9rem;
  }

  .site-end-message {
    grid-column: 1 / -1;
    justify-self: stretch;
    max-width: none;
    padding-top: 14px;
    border-top: 1px solid #edf0ee;
    text-align: left;
  }
}


/* Footer contact alignment and link affordance */
.site-end-contact {
  justify-self: center;
  align-items: center;
  text-align: center;
}

.site-end-contact a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

@media (max-width: 600px) {
  .site-end-contact {
    justify-self: center;
    align-items: center;
    text-align: center;
  }
}


.site-end-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px 10px;
  margin-top: 8px;
}
.site-end-links a {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
@media (max-width: 600px) {
  .site-end-links { justify-content: flex-start; }
}

.route-about {
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
}
.route-about summary {
  cursor: pointer;
  list-style: none;
  padding: 13px 16px;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.route-about summary::-webkit-details-marker { display: none; }
.route-about summary::after {
  content: "+";
  float: right;
  color: var(--muted);
}
.route-about[open] summary::after { content: "−"; }
.route-about > div {
  padding: 0 16px 14px;
  max-width: 920px;
}
.route-about p {
  margin: 0 0 9px;
  font-size: 0.78rem;
  line-height: 1.55;
}
.route-about p:last-child { margin-bottom: 0; }


/* Mobile news thumbnails: keep article rows compact and prevent hero-image expansion. */
@media (max-width: 760px) {
  .news-feed-item .news-feed-row {
    display: grid !important;
    grid-template-columns: 54px minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 9px !important;
  }

  .news-feed-item .news-thumb-wrap {
    width: 54px !important;
    height: 54px !important;
    max-width: 54px !important;
    max-height: 54px !important;
    min-width: 54px !important;
    min-height: 54px !important;
    overflow: hidden !important;
    border-radius: 8px;
  }

  .news-feed-item .news-thumb {
    width: 54px !important;
    height: 54px !important;
    max-width: 54px !important;
    max-height: 54px !important;
    display: block !important;
    object-fit: cover !important;
  }

  .news-feed-item .news-thumb-fallback {
    object-fit: contain !important;
    padding: 7px !important;
  }

  .news-feed-item .news-feed-copy {
    min-width: 0 !important;
  }
}


/* Simplified footer layout: brand/contact + message, with navigation spanning the full footer. */
.site-end {
  grid-template-columns: 140px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 28px;
  row-gap: 16px;
}

.site-end-brand {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  justify-items: start;
  align-content: center;
}

.site-end-logo {
  grid-column: auto;
  grid-row: auto;
  align-self: center;
}

.site-end-message {
  grid-column: 2;
  grid-row: 1;
  justify-self: stretch;
  align-self: center;
  max-width: none;
  text-align: right;
}

.site-end-links {
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  margin-top: 0;
  padding-top: 14px;
  border-top: 1px solid #edf0ee;
  justify-content: space-between;
  gap: 8px 18px;
}

.site-end-links a {
  font-size: 0.72rem;
}

@media (max-width: 760px) {
  .site-end {
    grid-template-columns: 76px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 14px 16px;
  }

  .site-end-brand {
    grid-column: 1;
    grid-row: 1;
  }

  .site-end-message {
    grid-column: 2;
    grid-row: 1;
    justify-self: stretch;
    align-self: center;
    padding-top: 0;
    border-top: 0;
    text-align: left;
  }

  .site-end-links {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    gap: 7px 14px;
    padding-top: 14px;
  }
}


/* Desktop workspace expansion: larger map, metrics, and activity feed while preserving mobile/tablet. */
@media (min-width: 1081px) {
  .workspace {
    min-height: 960px;
  }

  .map-wrap,
  #map {
    min-height: 600px;
  }

  .metric {
    min-height: 148px;
    padding: 18px;
  }

  .activity-card {
    min-height: 600px;
  }
}

/* Statewide map framing and header instruction refinement */
@media (min-width: 1081px) {
  .workspace {
    min-height: 1080px;
  }

  .map-wrap,
  #map {
    min-height: 700px;
  }
}

.map-instruction {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  max-width: 330px;
  margin-right: 10px;
}

.map-instruction-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.map-pin-badge {
  width: var(--map-action-icon-size);
  height: var(--map-action-icon-size);
  flex: 0 0 var(--map-action-icon-size);
  border-radius: 50%;
  border: 1px solid #d5ddd8;
  background: #fff;
  color: #46564d;
  display: grid;
  place-items: center;
}

.map-pin-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-instruction > span {
  margin-top: 2px;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .map-instruction {
    max-width: 190px;
    margin-right: 0;
  }

  .map-instruction > span {
    white-space: normal;
  }
}

/* Selected-area header: center the pin instruction in the open space */
@media (min-width: 761px) {
  .map-panel .panel-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr) auto;
    align-items: center;
    column-gap: 18px;
  }

  .map-panel .selected-area-actions {
    display: contents;
  }

  .map-panel .map-instruction {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    align-self: end;
    width: max-content;
    max-width: 100%;
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.4;
    text-align: left;
  }

  .map-panel .recenter-label {
    font-size: 0.82rem;
    line-height: 1.4;
  }

  .map-panel .map-instruction-title {
    font-size: 0.88rem;
  }

  .map-panel #centerButton {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: end;
  }
}

/* Fine-tune selected-area instruction position */
@media (min-width: 761px) {
  .map-panel .map-instruction {
    transform: translateX(-70px);
  }
}

/* Compact desktop weather layout: stack current temperature above icon when the page narrows */
@media (min-width: 761px) and (max-width: 1180px) {
  .weather-support {
    padding-right: 94px;
  }

  .weather-current {
    top: 28px;
    right: 10px;
    width: 76px;
    min-width: 76px;
    height: auto;
    flex-direction: column;
    gap: 1px;
    justify-content: flex-start;
  }

  .weather-current > strong {
    height: auto;
    font-size: 2.65rem;
  }

  .weather-current-icon {
    width: 48px;
    height: 48px;
    font-size: 2.55rem;
  }
}


/* Weather / alerts / forecast layout */
.weather-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
  align-items: stretch;
}

.weather-layout .weather-metric,
.weather-layout .alerts-metric {
  min-height: 166px;
}

.weather-layout .forecast-metric {
  grid-column: 1 / -1;
  min-height: 178px;
  padding: 18px 20px;
}

.weather-metric {
  padding: 18px;
}

.weather-support {
  padding-top: 10px;
  padding-right: 190px;
}

.weather-stats {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 8px;
}

.weather-stats > p {
  margin: 0;
  color: #536159;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.2;
}

.weather-air strong {
  font: inherit;
  color: inherit;
}

.weather-air-detail {
  display: none;
}

.weather-current {
  top: 38px;
  right: 18px;
  min-width: 176px;
  height: 78px;
  gap: 10px;
}

.weather-current > strong,
.weather-current-icon {
  height: 78px;
}

.weather-current > strong {
  font-size: 4rem;
}

.weather-current-icon {
  width: 76px;
  font-size: 3.8rem;
}

.alerts-metric {
  padding: 18px;
}

.alerts-metric > strong {
  margin-top: 20px;
  font-size: 2.35rem;
}

.alerts-metric > p {
  margin-top: 8px;
  font-size: 0.8rem;
}

.forecast-metric-top {
  align-items: center;
}

.forecast-range-button {
  min-width: 34px;
  min-height: 28px;
  font-size: 0.72rem;
}

.forecast-grid {
  gap: 10px;
  margin-top: 16px;
}

.forecast-grid[data-range="3"] {
  gap: 18px;
}

.forecast-grid[data-range="14"] {
  row-gap: 12px;
}

.forecast-day {
  gap: 4px;
}

.forecast-day-name {
  font-size: 0.84rem;
}

.forecast-icon {
  font-size: 1.75rem;
}

.forecast-temps {
  font-size: 0.88rem;
  line-height: 1.2;
}

.forecast-grid[data-range="3"] .forecast-day-name {
  font-size: 0.90rem;
}

.forecast-grid[data-range="3"] .forecast-icon {
  font-size: 1.90rem;
}

.forecast-grid[data-range="3"] .forecast-temps {
  font-size: 0.92rem;
}

@media (min-width: 761px) and (max-width: 1180px) {
  .weather-layout {
    grid-template-columns: minmax(0, 1.1fr) minmax(190px, 0.9fr);
  }

  .weather-support {
    padding-right: 120px;
  }

  .weather-current {
    top: 32px;
    right: 12px;
    width: 98px;
    min-width: 98px;
    height: auto;
    flex-direction: column;
    gap: 0;
    justify-content: flex-start;
  }

  .weather-current > strong {
    height: auto;
    font-size: 3.15rem;
  }

  .weather-current-icon {
    width: 54px;
    height: 54px;
    font-size: 2.9rem;
  }

  .weather-stats {
    gap: 14px;
  }
}

@media (max-width: 760px) {
  .weather-layout {
    grid-template-columns: 1fr;
  }

  .weather-layout .weather-metric,
  .weather-layout .alerts-metric,
  .weather-layout .forecast-metric {
    grid-column: 1;
    min-height: 0;
  }

  .weather-layout .weather-metric {
    min-height: 164px;
    padding: 16px;
  }

  .weather-support {
    padding-right: 150px;
  }

  .weather-current {
    top: 36px;
    right: 14px;
    min-width: 136px;
    height: 70px;
    flex-direction: row;
    gap: 6px;
  }

  .weather-current > strong,
  .weather-current-icon {
    height: 70px;
  }

  .weather-current > strong {
    font-size: 3.25rem;
  }

  .weather-current-icon {
    width: 62px;
    font-size: 3.1rem;
  }

  .weather-stats {
    gap: 14px;
  }

  .weather-layout .alerts-metric {
    min-height: 128px;
  }

  .weather-layout .forecast-metric {
    min-height: 176px;
    padding: 16px;
  }

  .forecast-grid {
    gap: 6px;
    margin-top: 14px;
  }

  .forecast-day-name {
    font-size: 0.62rem;
  }

  .forecast-icon {
    font-size: 1.18rem;
  }

  .forecast-temps {
    font-size: 0.66rem;
  }

  /* Keep 7D and 14D forecast items the same visual height as 3D on mobile. */
  .forecast-grid[data-range="7"] .forecast-day-name,
  .forecast-grid[data-range="14"] .forecast-day-name {
    font-size: 0.90rem;
  }

  .forecast-grid[data-range="7"] .forecast-icon,
  .forecast-grid[data-range="14"] .forecast-icon {
    font-size: 1.90rem;
  }

  .forecast-grid[data-range="7"] .forecast-temps,
  .forecast-grid[data-range="14"] .forecast-temps {
    font-size: 0.92rem;
  }
}

@media (max-width: 510px) {
  .weather-support {
    padding-right: 130px;
  }

  .weather-current {
    right: 10px;
    min-width: 120px;
  }

  .weather-current > strong {
    font-size: 3rem;
  }

  .weather-current-icon {
    width: 54px;
    font-size: 2.8rem;
  }

  .weather-stats {
    gap: 12px;
  }

  .forecast-grid {
    gap: 3px;
  }

  .forecast-day-name {
    font-size: 0.58rem;
  }

  .forecast-icon {
    font-size: 1.08rem;
  }

  .forecast-temps {
    font-size: 0.61rem;
  }

  .forecast-grid[data-range="7"] .forecast-day-name,
  .forecast-grid[data-range="14"] .forecast-day-name {
    font-size: 0.90rem;
  }

  .forecast-grid[data-range="7"] .forecast-icon,
  .forecast-grid[data-range="14"] .forecast-icon {
    font-size: 1.90rem;
  }

  .forecast-grid[data-range="7"] .forecast-temps,
  .forecast-grid[data-range="14"] .forecast-temps {
    font-size: 0.92rem;
  }
}


/* Mobile weather card spacing */
@media (max-width: 760px) {
  .weather-layout .weather-metric {
    min-height: 184px;
  }

  .weather-support {
    padding-top: 18px;
  }

  .weather-high-low {
    margin-top: 2px;
  }

  .weather-support > p {
    margin-top: 12px;
  }

  .weather-stats {
    margin-top: 16px;
  }

  .weather-current {
    top: 46px;
  }
}

@media (max-width: 510px) {
  .weather-support {
    padding-top: 18px;
  }

  .weather-current {
    top: 46px;
  }
}


/* Use available mobile weather-card space for a larger current reading */
@media (max-width: 760px) {
  .weather-current {
    top: 42px;
    right: 12px;
    min-width: 176px;
    height: 92px;
    gap: 8px;
  }

  .weather-current > strong,
  .weather-current-icon {
    height: 92px;
  }

  .weather-current > strong {
    font-size: 4.15rem;
  }

  .weather-current-icon {
    width: 78px;
    font-size: 3.85rem;
  }
}

@media (max-width: 510px) {
  .weather-current {
    top: 44px;
    right: 8px;
    min-width: 158px;
    height: 86px;
    gap: 6px;
  }

  .weather-current > strong,
  .weather-current-icon {
    height: 86px;
  }

  .weather-current > strong {
    font-size: 3.8rem;
  }

  .weather-current-icon {
    width: 70px;
    font-size: 3.5rem;
  }
}


/* Improve mobile weather detail readability */
@media (max-width: 760px) {
  .weather-high-low {
    font-size: 0.96rem;
    gap: 14px;
  }

  .weather-high-low b {
    font-size: 0.76rem;
  }

  .weather-support > p {
    font-size: 0.9rem;
    line-height: 1.35;
  }

  .weather-stats > p {
    font-size: 0.9rem;
  }

  .weather-stats {
    gap: 18px;
  }
}

@media (max-width: 510px) {
  .weather-high-low {
    font-size: 0.92rem;
    gap: 12px;
  }

  .weather-high-low b {
    font-size: 0.72rem;
  }

  .weather-support > p {
    font-size: 0.86rem;
  }

  .weather-stats > p {
    font-size: 0.86rem;
  }

  .weather-stats {
    gap: 16px;
  }
}


/* Balanced footer: logo left, contact prompt center, brand signoff right */
.site-end {
  grid-template-columns: minmax(120px, 0.8fr) minmax(280px, 1.4fr) minmax(190px, 0.9fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 34px;
  row-gap: 18px;
}

.site-end-brand {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
}

.site-end-message {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  align-self: center;
  max-width: 360px;
  text-align: center;
}

.site-end-message strong {
  font-size: 0.98rem;
}

.site-end-message span {
  font-size: 0.8rem;
}

.site-end-signoff {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  align-self: center;
  text-align: right;
}

.site-end-signoff strong,
.site-end-signoff span {
  display: block;
}

.site-end-signoff strong {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.site-end-signoff span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  font-style: italic;
}

.site-end-links {
  grid-column: 1 / -1;
  grid-row: 2;
}

@media (max-width: 900px) {
  .site-end {
    grid-template-columns: 90px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    gap: 14px 18px;
  }

  .site-end-brand {
    grid-column: 1;
    grid-row: 1;
  }

  .site-end-message {
    grid-column: 2;
    grid-row: 1;
    justify-self: stretch;
    max-width: none;
    text-align: left;
  }

  .site-end-signoff {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
    text-align: left;
    padding-top: 2px;
  }

  .site-end-links {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}

@media (max-width: 510px) {
  .site-end {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px 14px;
  }

  .site-end-message strong {
    font-size: 0.9rem;
  }

  .site-end-message span,
  .site-end-signoff span {
    font-size: 0.74rem;
  }

  .site-end-signoff strong {
    font-size: 0.74rem;
  }
}


.camera-map-note {
  margin-bottom: 8px;
}

.camera-card {
  display: grid;
  gap: 10px;
}

.camera-meta {
  display: grid;
  gap: 3px;
}

.camera-meta strong {
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.35;
}

.camera-meta span {
  color: #59675f;
  font-size: 0.76rem;
  line-height: 1.4;
}

.camera-meta small {
  color: #7b8781;
  font-size: 0.68rem;
  line-height: 1.35;
}

.camera-view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.camera-view-button {
  border: 1px solid #d8dfdb;
  border-radius: 999px;
  background: #f7f9f7;
  padding: 6px 9px;
  color: #47564e;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
}

.camera-view-button:hover,
.camera-view-button.active {
  border-color: rgba(242, 106, 44, 0.55);
  background: rgba(242, 106, 44, 0.09);
  color: #25342d;
}

.camera-snapshot-frame {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  border: 1px solid #dde4df;
  border-radius: 12px;
  background: #eef2ef;
}

.camera-snapshot-image {
  display: block;
  width: 100%;
  height: auto;
  min-height: 190px;
  object-fit: contain;
  background: #e8eeea;
}

.camera-snapshot-placeholder {
  min-height: 190px;
  display: grid;
  place-items: center;
  padding: 18px;
  color: #6e7b74;
  font-size: 0.76rem;
  line-height: 1.45;
  text-align: center;
}

.camera-snapshot-placeholder[hidden],
.camera-snapshot-image[hidden] {
  display: none;
}

.camera-refresh-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #77837d;
  font-size: 0.66rem;
  line-height: 1.4;
}

.camera-refresh-row span:last-child {
  flex: 0 0 auto;
  font-weight: 800;
}

.camera-source-note {
  margin: 0;
  color: #66736c;
  font-size: 0.7rem;
  line-height: 1.5;
}

.camera-source-link {
  width: fit-content;
}

@media (max-width: 600px) {
  .camera-refresh-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .camera-snapshot-frame,
  .camera-snapshot-image,
  .camera-snapshot-placeholder {
    min-height: 165px;
  }
}


.camera-scope-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 2px;
}

.camera-scope-controls > span {
  margin-left: auto;
  color: #748078;
  font-size: 0.68rem;
  line-height: 1.35;
}

@media (max-width: 600px) {
  .camera-scope-controls > span {
    width: 100%;
    margin-left: 0;
  }
}


.camera-filter-group {
  display: grid;
  gap: 5px;
  margin-top: 10px;
}

.camera-filter-label {
  color: #44524b;
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}


/* Preview only: See Idaho differently editorial CTA variants. */
.hero-stories-cta {
  width: min(620px, 100%);
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(16, 24, 32, 0.10);
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, border-color 150ms ease;
}

.hero-stories-cta:hover,
.hero-stories-cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(16, 24, 32, 0.15);
}

.hero-stories-cta:focus-visible {
  outline: 3px solid rgba(242, 106, 44, 0.35);
  outline-offset: 3px;
}

.hero-stories-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-stories-copy small {
  font-size: 0.64rem;
  line-height: 1.2;
  letter-spacing: 0.14em;
  font-weight: 900;
}

.hero-stories-copy strong {
  font-size: clamp(1.08rem, 1.6vw, 1.28rem);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.025em;
}

.hero-stories-copy > span {
  margin-top: 2px;
  font-size: 0.78rem;
  line-height: 1.35;
  font-weight: 650;
}

.hero-stories-arrow {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 1.2rem;
  font-weight: 900;
}

.hero-stories-cta.cta-forest {
  background: var(--green);
  color: #fff;
}
.hero-stories-cta.cta-forest small { color: #f6c1a8; }
.hero-stories-cta.cta-forest .hero-stories-copy > span { color: rgba(255,255,255,.84); }
.hero-stories-cta.cta-forest .hero-stories-arrow { background: rgba(255,255,255,.14); color: #fff; }

.hero-stories-cta.cta-light {
  background: rgba(255,255,255,.92);
  color: var(--green);
  border-color: rgba(47,91,73,.22);
  border-left: 5px solid var(--orange);
  box-shadow: 0 8px 24px rgba(16,24,32,.08);
}
.hero-stories-cta.cta-light small { color: var(--orange); }
.hero-stories-cta.cta-light .hero-stories-copy > span { color: var(--muted); }
.hero-stories-cta.cta-light .hero-stories-arrow { background: rgba(47,91,73,.10); color: var(--green); }

.hero-stories-cta.cta-orange {
  background: var(--orange);
  color: #fff;
}
.hero-stories-cta.cta-orange small { color: rgba(255,255,255,.78); }
.hero-stories-cta.cta-orange .hero-stories-copy > span { color: rgba(255,255,255,.90); }
.hero-stories-cta.cta-orange .hero-stories-arrow { background: rgba(255,255,255,.18); color: #fff; }

.hero-stories-cta.cta-navy {
  background: #101820;
  color: #fff;
  border-color: rgba(255,255,255,.08);
}
.hero-stories-cta.cta-navy small { color: #f26a2c; }
.hero-stories-cta.cta-navy .hero-stories-copy > span { color: rgba(255,255,255,.76); }
.hero-stories-cta.cta-navy .hero-stories-arrow { background: #f26a2c; color: #fff; }

.cta-preview-toolbar {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(16,24,32,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 12px 35px rgba(16,24,32,.18);
  backdrop-filter: blur(12px);
}
.cta-preview-toolbar > span {
  padding: 0 6px;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.cta-preview-toolbar button {
  border: 0;
  border-radius: 999px;
  background: #edf1ee;
  color: var(--ink);
  padding: 8px 10px;
  font: inherit;
  font-size: .72rem;
  font-weight: 850;
  cursor: pointer;
}
.cta-preview-toolbar button.active {
  background: #101820;
  color: #fff;
}

@media (max-width: 760px) {
  .hero-stories-cta {
    width: 100%;
    max-width: none;
    margin-top: 13px;
    padding: 13px 14px;
    border-radius: 14px;
  }
  .hero-stories-copy strong {
    font-size: 1.06rem;
  }
  .hero-stories-copy > span {
    font-size: .74rem;
  }
  .cta-preview-toolbar {
    right: 8px;
    bottom: 8px;
    left: 8px;
    justify-content: center;
    overflow-x: auto;
    border-radius: 14px;
  }
  .cta-preview-toolbar > span {
    display: none;
  }
  .cta-preview-toolbar button {
    flex: 1 0 auto;
  }
}

.cta-preview-toolbar i {
  width: 1px;
  height: 24px;
  background: rgba(16,24,32,.14);
  margin: 0 2px;
}
@media (max-width: 760px) {
  .cta-preview-toolbar i { display: none; }
  .cta-preview-toolbar span { display: none; }
}

/* v3 preferred light CTA treatment */
.hero-stories-cta.cta-light {
  background: rgba(255,255,255,.96);
  color: #101820;
  border-color: rgba(16,24,32,.14);
  border-left: 5px solid var(--orange);
  box-shadow: 0 8px 24px rgba(16,24,32,.08);
}
.hero-stories-cta.cta-light .hero-stories-copy strong {
  color: #101820;
}
.hero-stories-cta.cta-light .hero-stories-copy > span {
  color: var(--muted);
}
.hero-stories-cta.cta-light .hero-stories-arrow {
  background: var(--orange);
  color: #fff;
}

/* Preferred v4 CTA refinements: matching orange rails and inset outlined arrow. */
.hero-stories-cta.cta-light {
  border-left: 5px solid var(--orange);
  border-right: 5px solid var(--orange);
}
.hero-stories-cta.cta-light .hero-stories-arrow {
  margin-right: 10px;
  background: var(--orange);
  color: #fff;
  border: 2px solid #101820;
  box-shadow: 0 0 0 1px rgba(16,24,32,.08);
}
@media (max-width: 760px) {
  .hero-stories-cta.cta-light .hero-stories-arrow {
    margin-right: 6px;
  }
}

/* v5 optical alignment requested after thumbnail review */
.hero-stories-cta.cta-light {
  grid-template-columns: minmax(0, 1fr) 82px;
  column-gap: 8px;
}
.hero-stories-cta.cta-light .hero-stories-arrow {
  width: 42px;
  height: 42px;
  margin-right: 0;
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding-bottom: 2px;
  font-size: 1.32rem;
  line-height: 1;
  border: 2px solid #101820;
}
@media (max-width: 760px) {
  .hero-stories-cta.cta-light {
    grid-template-columns: minmax(0, 1fr) 72px;
    column-gap: 6px;
  }
  .hero-stories-cta.cta-light .hero-stories-arrow {
    width: 40px;
    height: 40px;
    margin-right: 0;
  }
}

/* v5b: tie CTA headline to dominant IdahoLens logo blue */
.hero-stories-cta.cta-light .hero-stories-copy strong {
  color: #003662;
}


/* v6 action-option preview. Card styling is intentionally locked. */
.hero-stories-cta.cta-light {
  grid-template-columns: minmax(0, 1fr) 126px;
  column-gap: 10px;
}

.hero-stories-action {
  align-self: stretch;
  justify-self: stretch;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #101820;
}

/* Option 1: clear, high-affordance Explore pill. */
.action-explore-pill {
  min-width: 104px;
  height: 44px;
  padding: 0 15px 0 17px;
  border: 2px solid #101820;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-sizing: border-box;
  box-shadow: 0 3px 0 rgba(16,24,32,.10);
}
.action-explore-pill span {
  font-size: .84rem;
  font-weight: 900;
  letter-spacing: .01em;
}
.action-explore-pill b {
  font-size: 1.18rem;
  line-height: 1;
  transform: translateY(-1px);
}

/* Option 2: extended directional mark, designed to consume the whitespace. */
.action-arrow-track {
  width: 102px;
  height: 42px;
  border: 2px solid #101820;
  border-radius: 13px;
  background: #fff;
  display: grid;
  grid-template-columns: 1fr 37px;
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
}
.action-arrow-track > span {
  height: 4px;
  margin-left: 15px;
  background: var(--orange);
  border-radius: 999px 0 0 999px;
}
.action-arrow-track b {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--orange);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  padding-bottom: 2px;
  box-sizing: border-box;
}

/* Option 3: lens/compass hybrid to reinforce IdahoLens branding. */
.action-lens-mark {
  position: relative;
  width: 70px;
  height: 58px;
  display: block;
}
.action-lens-mark .lens-ring {
  position: absolute;
  width: 43px;
  height: 43px;
  left: 6px;
  top: 2px;
  border: 5px solid var(--orange);
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px #101820, 0 0 0 2px #101820;
  background: #fff;
  box-sizing: border-box;
}
.action-lens-mark .lens-handle {
  position: absolute;
  width: 27px;
  height: 8px;
  left: 40px;
  top: 39px;
  border: 2px solid #101820;
  border-radius: 999px;
  background: var(--orange);
  transform: rotate(42deg);
  transform-origin: left center;
  box-sizing: border-box;
}
.action-lens-mark b {
  position: absolute;
  left: 17px;
  top: 11px;
  color: #003662;
  font-size: 1.15rem;
  line-height: 1;
}

/* Option 4: Idaho silhouette with directional cue. */
.action-idaho-mark {
  width: 88px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.action-idaho-mark svg {
  width: 34px;
  height: 51px;
  overflow: visible;
}
.action-idaho-mark path {
  fill: var(--orange);
  stroke: #101820;
  stroke-width: 2.2;
  stroke-linejoin: round;
}
.action-idaho-mark b {
  color: #003662;
  font-size: 1.45rem;
  line-height: 1;
  transform: translateY(-1px);
}

/* Remove legacy action-circle styling from the frozen light design. */
.hero-stories-cta.cta-light .hero-stories-action {
  margin: 0;
}

@media (max-width: 760px) {
  .hero-stories-cta.cta-light {
    grid-template-columns: minmax(0, 1fr) 108px;
    column-gap: 5px;
  }
  .action-explore-pill {
    min-width: 94px;
    height: 42px;
    padding-left: 13px;
    padding-right: 12px;
    gap: 7px;
  }
  .action-explore-pill span { font-size: .78rem; }
  .action-arrow-track { width: 92px; }
  .action-lens-mark { transform: scale(.93); }
  .action-idaho-mark { transform: scale(.94); }
}


/* v7 desktop hierarchy test: Explore locked, stronger readability and spacing. */
@media (min-width: 900px) {
  .intro > div:first-child {
    min-width: 0;
    flex: 1 1 auto;
  }

  .intro h1 {
    max-width: none;
    white-space: nowrap;
    font-size: clamp(2.35rem, 3.8vw, 2.75rem);
    line-height: 1.02;
    letter-spacing: -0.045em;
  }

  .hero-stories-cta {
    width: min(660px, 100%);
    margin-top: 24px;
    padding: 18px 18px;
    border-radius: 17px;
  }

  .hero-stories-cta.cta-light {
    grid-template-columns: minmax(0, 1fr) 132px;
    column-gap: 12px;
  }

  .hero-stories-copy {
    gap: 4px;
  }

  .hero-stories-copy strong,
  .hero-stories-cta.cta-light .hero-stories-copy strong {
    font-size: clamp(1.38rem, 2vw, 1.55rem);
    line-height: 1.12;
  }

  .hero-stories-copy > span,
  .hero-stories-cta.cta-light .hero-stories-copy > span {
    margin-top: 3px;
    font-size: .96rem;
    line-height: 1.4;
    font-weight: 650;
  }

  .action-explore-pill {
    min-width: 110px;
    height: 46px;
    padding-left: 18px;
    padding-right: 16px;
  }

  .action-explore-pill span {
    font-size: .88rem;
  }
}


/* v8 desktop hero headline: larger, shorter, and given more horizontal room. */
@media (min-width: 900px) {
  .intro {
    gap: 22px;
  }

  .intro > div:first-child {
    flex: 1 1 auto;
    min-width: 0;
  }

  .intro-logo-wrap {
    flex: 0 0 min(29vw, 390px);
  }

  .intro h1 {
    max-width: none;
    white-space: nowrap;
    font-size: clamp(2.6rem, 3.85vw, 3.15rem);
    line-height: 1;
    letter-spacing: -0.047em;
  }
}


/* v9: widen the editorial CTA while reducing its visual height. */
@media (min-width: 900px) {
  .hero-stories-cta {
    width: min(760px, 100%);
    margin-top: 20px;
    padding: 12px 18px;
    border-radius: 16px;
  }

  .hero-stories-cta.cta-light {
    grid-template-columns: minmax(0, 1fr) 122px;
    column-gap: 14px;
  }

  .hero-stories-copy {
    gap: 1px;
  }

  .hero-stories-copy strong,
  .hero-stories-cta.cta-light .hero-stories-copy strong {
    font-size: 1.42rem;
    line-height: 1.08;
  }

  .hero-stories-copy > span,
  .hero-stories-cta.cta-light .hero-stories-copy > span {
    margin-top: 3px;
    font-size: .93rem;
    line-height: 1.3;
    white-space: nowrap;
  }

  .action-explore-pill {
    min-width: 108px;
    height: 42px;
  }
}

/* v9-preview-ready */


/* v10: keep v9 height; shorten card so its right edge aligns with the H1 text. */
@media (min-width: 900px) {
  .hero-stories-cta {
    width: min(720px, 100%);
  }
}


/* v11: move the approved editorial CTA into the footer. */
.site-end {
  grid-template-columns: minmax(120px, 1fr) minmax(280px, 1fr);
  grid-template-rows: auto auto auto;
  align-items: center;
  column-gap: 34px;
  row-gap: 18px;
}

.site-end-brand {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
}

.site-end-message {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: center;
  max-width: 360px;
  text-align: right;
}

.site-end-signoff {
  display: none;
}

.site-end .footer-stories-cta {
  grid-column: 1 / -1;
  grid-row: 2;
  justify-self: center;
  margin-top: 2px;
  margin-bottom: 2px;
}

.site-end-links {
  grid-column: 1 / -1;
  grid-row: 3;
}

@media (max-width: 900px) {
  .site-end {
    grid-template-columns: 90px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    gap: 14px 18px;
  }

  .site-end-brand {
    grid-column: 1;
    grid-row: 1;
  }

  .site-end-message {
    grid-column: 2;
    grid-row: 1;
    justify-self: stretch;
    max-width: none;
    text-align: right;
  }

  .site-end .footer-stories-cta {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    max-width: none;
    margin-top: 2px;
  }

  .site-end-links {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}

@media (max-width: 510px) {
  .site-end {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px 14px;
  }
}


/* v12 footer alignment: logo left, contact far right, centered editorial CTA. */
.site-end {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto;
  align-items: center;
  width: 100%;
}

.site-end > .site-end-brand {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
}

.site-end > .site-end-message {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  max-width: none;
  text-align: right;
}

.site-end > .footer-stories-cta {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  justify-self: center !important;
  width: min(900px, calc(100% - 80px)) !important;
  max-width: 900px !important;
  margin: 4px auto 2px !important;
  box-sizing: border-box;
}

.site-end > .footer-stories-cta .hero-stories-copy > span {
  white-space: nowrap;
}

.site-end > .site-end-links {
  grid-column: 1 / -1;
  grid-row: 3;
}

@media (max-width: 900px) {
  .site-end {
    grid-template-columns: 90px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
  }

  .site-end > .site-end-brand {
    grid-column: 1;
    grid-row: 1;
  }

  .site-end > .site-end-message {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    text-align: right;
  }

  .site-end > .footer-stories-cta {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 2px 0 !important;
  }

  .site-end > .footer-stories-cta .hero-stories-copy > span {
    white-space: normal;
  }

  .site-end > .site-end-links {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}

@media (max-width: 510px) {
  .site-end {
    grid-template-columns: 70px minmax(0, 1fr);
  }
}


/* v13 footer: align logo, editorial CTA, and contact prompt on one row. */
.site-end {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(620px, 760px) minmax(280px, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 28px;
  row-gap: 18px;
}

.site-end > .site-end-brand {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  align-self: center;
}

.site-end > .footer-stories-cta {
  grid-column: 2 !important;
  grid-row: 1 !important;
  justify-self: center !important;
  align-self: center !important;
  width: 100% !important;
  max-width: 760px !important;
  margin: 0 !important;
}

.site-end > .footer-stories-cta .hero-stories-copy > span {
  white-space: nowrap;
}

.site-end > .site-end-message {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  align-self: center;
  max-width: none;
  text-align: right;
}

.site-end > .site-end-links {
  grid-column: 1 / -1;
  grid-row: 2;
}

@media (max-width: 1180px) {
  .site-end {
    grid-template-columns: 100px minmax(520px, 1fr) minmax(240px, 0.8fr);
    column-gap: 20px;
  }

  .site-end > .footer-stories-cta {
    max-width: 680px !important;
  }

  .site-end > .footer-stories-cta .hero-stories-copy > span {
    white-space: normal;
  }
}

@media (max-width: 900px) {
  .site-end {
    grid-template-columns: 90px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    gap: 14px 18px;
  }

  .site-end > .site-end-brand {
    grid-column: 1;
    grid-row: 1;
  }

  .site-end > .site-end-message {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    text-align: right;
  }

  .site-end > .footer-stories-cta {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 2px 0 !important;
  }

  .site-end > .site-end-links {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}


/* v14 footer: remove redundant logo and anchor editorial CTA left. */
.site-end {
  display: grid;
  grid-template-columns: minmax(620px, 760px) minmax(280px, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 40px;
  row-gap: 18px;
}

.site-end > .footer-stories-cta {
  grid-column: 1 !important;
  grid-row: 1 !important;
  justify-self: start !important;
  align-self: center !important;
  width: 100% !important;
  max-width: 760px !important;
  margin: 0 !important;
}

.site-end > .site-end-message {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: center;
  max-width: none;
  text-align: right;
}

.site-end > .site-end-links {
  grid-column: 1 / -1;
  grid-row: 2;
}

@media (max-width: 1180px) {
  .site-end {
    grid-template-columns: minmax(520px, 1fr) minmax(240px, .8fr);
    column-gap: 24px;
  }

  .site-end > .footer-stories-cta {
    max-width: 680px !important;
  }
}

@media (max-width: 900px) {
  .site-end {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 14px;
  }

  .site-end > .site-end-message {
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
    text-align: right;
  }

  .site-end > .footer-stories-cta {
    grid-column: 1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }

  .site-end > .site-end-links {
    grid-column: 1;
    grid-row: 3;
  }
}


/* v15: restore logo and centered editorial CTA. */
.site-end {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(620px, 760px) minmax(280px, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 28px;
  row-gap: 18px;
}

.site-end > .site-end-brand {
  display: block;
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  align-self: center;
}

.site-end > .footer-stories-cta {
  grid-column: 2 !important;
  grid-row: 1 !important;
  justify-self: center !important;
  align-self: center !important;
  width: 100% !important;
  max-width: 760px !important;
  margin: 0 !important;
}

.site-end > .site-end-message {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  align-self: center;
  max-width: none;
  text-align: right;
}

.site-end > .site-end-links {
  grid-column: 1 / -1;
  grid-row: 2;
}

@media (max-width: 1180px) {
  .site-end {
    grid-template-columns: 100px minmax(520px, 1fr) minmax(240px, .8fr);
    column-gap: 20px;
  }

  .site-end > .footer-stories-cta {
    max-width: 680px !important;
  }

  .site-end > .footer-stories-cta .hero-stories-copy > span {
    white-space: normal;
  }
}

@media (max-width: 900px) {
  .site-end {
    grid-template-columns: 90px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    gap: 14px 18px;
  }

  .site-end > .site-end-brand {
    grid-column: 1;
    grid-row: 1;
  }

  .site-end > .site-end-message {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    text-align: right;
  }

  .site-end > .footer-stories-cta {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 2px 0 !important;
  }

  .site-end > .site-end-links {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}

@media (max-width: 510px) {
  .site-end {
    grid-template-columns: 70px minmax(0, 1fr);
  }
}


/* v16 desktop hero: maximize headline while preserving a single line and logo spacing. */
@media (min-width: 900px) {
  .intro {
    gap: 44px;
  }

  .intro > div:first-child {
    flex: 1 1 auto;
    min-width: 0;
  }

  .intro h1 {
    max-width: none;
    white-space: nowrap;
    font-size: clamp(3.2rem, 4.75vw, 4.6rem);
    line-height: .96;
    letter-spacing: -0.052em;
  }

  .intro-logo-wrap {
    flex: 0 0 min(25vw, 350px);
  }

  .intro-logo {
    width: clamp(300px, 24vw, 350px);
  }
}




/* IdahoLens system dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    color: #edf3f0;
    background: #0f1513;
    --ink: #edf3f0;
    --muted: #a8b4ae;
    --line: #334039;
    --surface: #17211d;
    --surface-soft: #1d2924;
    --navy: #0b1117;
    --orange: #f26a2c;
    --orange-soft: #3b241b;
    --green: #72b594;
    --shadow: 0 16px 44px rgba(0, 0, 0, 0.28);
  }

  html {
    background: #0f1513;
  }

  body {
    background:
      radial-gradient(circle at top right, rgba(242, 106, 44, 0.10), transparent 30rem),
      #0f1513;
    color: var(--ink);
  }

  .site-header,
  .radius-control,
  .activity-heading,
  .feed-subnav,
  .feed-item,
  .layer-result,
  .dining-feed-item,
  .score-card,
  .score-section-empty,
  .site-end-message,
  .site-end-links {
    border-color: #2c3933;
  }

  .card {
    background: rgba(23, 33, 29, 0.96);
    border-color: var(--line);
  }

  .header-meta,
  .map-layer-status {
    color: #c0ccc6;
    background: rgba(23, 33, 29, 0.92);
    border-color: rgba(237, 243, 240, 0.12);
  }

  .mode-switch,
  .forecast-range,
  .tabs {
    background: #202c27;
  }

  .mode-button,
  .forecast-range-button,
  .tab {
    color: #a7b3ad;
  }

  /* Use one consistent orange selected state across interactive controls. */
  .mode-button.active,
  .forecast-range-button.active,
  .tab.active,
  .quick-place.active,
  .camera-view-button.active {
    background: var(--orange);
    border-color: #ff9a6d;
    color: #ffffff;
    box-shadow:
      0 0 0 1px rgba(242, 106, 44, 0.22),
      0 4px 12px rgba(0, 0, 0, 0.28);
  }

  .mode-button.active:hover,
  .forecast-range-button.active:hover,
  .tab.active:hover,
  .quick-place.active:hover,
  .camera-view-button.active:hover {
    background: #ff7a3f;
    border-color: #ffad88;
    color: #ffffff;
  }

  .search-box,
  .button.secondary,
  .quick-place,
  .round-button,
  .feed-pill,
  .camera-view-button {
    background: #1a2520;
    border-color: #3a4942;
    color: #d5ded9;
  }

  .button.secondary:hover,
  .quick-place:hover,
  .feed-pill:hover,
  .camera-view-button:hover {
    background: #24312b;
    border-color: #53665d;
  }

  /* Keep the selected feed filter clearly visible in dark mode.
     This also overrides the light-theme .feed-pill.active background on first render. */
  .feed-pill.active,
  .feed-pill[aria-pressed="true"] {
    background: var(--orange);
    border-color: #ff9a6d;
    color: #ffffff;
    box-shadow:
      0 0 0 1px rgba(242, 106, 44, 0.22),
      0 4px 12px rgba(0, 0, 0, 0.28);
  }

  .feed-pill.active:hover,
  .feed-pill[aria-pressed="true"]:hover {
    background: #ff7a3f;
    border-color: #ffad88;
    color: #ffffff;
  }

  .search-box:focus-within {
    border-color: #72b594;
    box-shadow: 0 0 0 3px rgba(114, 181, 148, 0.14);
  }

  .search-icon,
  .quick-row,
  .range-ends,
  .metric-top,
  .weather-high-low,
  .weather-high-low b,
  .weather-precip,
  .weather-support > .weather-precip,
  .forecast-day-name,
  .loading-row,
  .layer-link small,
  .layer-loading,
  .layer-stat > span,
  .layer-result p,
  .dining-score span,
  .dining-tip span,
  .roadwork-popup span,
  .roadwork-popup p,
  .score-section-heading h3,
  .score-team-name span,
  .score-value,
  .score-section-empty,
  .score-date,
  .weather-stats > p,
  .camera-meta small,
  .camera-source-note,
  .camera-scope-controls > span,
  .fire-popup span {
    color: #a8b4ae !important;
  }

  /* Timestamps must stay legible against dark cards. */
  .feed-meta,
  .score-status.upcoming-time {
    color: #ffffff !important;
  }

  /* Sports level headings use the primary IdahoLens action orange in dark mode. */
  .score-section-heading h3 {
    color: var(--action-primary) !important;
    font-weight: 900;
  }

  .recenter-icon,
  .map-pin-badge {
    background: #1a2520;
    border-color: #3a4942;
    color: #edf3f0;
  }

  .recenter-control:hover .recenter-icon {
    background: #24312b;
    border-color: #53665d;
  }

  .recenter-label {
    color: #c0ccc6;
  }

  .search-box input::placeholder {
    color: #7f8d86;
  }

  .map-wrap {
    border-color: #334039;
    background: #111916;
  }

  .maplibregl-popup-content {
    background: #17211d;
    color: var(--ink);
    border: 1px solid #3a4942;
  }

  .maplibregl-popup-anchor-top .maplibregl-popup-tip {
    border-bottom-color: #17211d;
  }

  .maplibregl-popup-anchor-bottom .maplibregl-popup-tip {
    border-top-color: #17211d;
  }

  .maplibregl-popup-anchor-left .maplibregl-popup-tip {
    border-right-color: #17211d;
  }

  .maplibregl-popup-anchor-right .maplibregl-popup-tip {
    border-left-color: #17211d;
  }

  .maplibregl-popup-close-button {
    color: #d8e2dd;
  }

  .news-thumb-wrap,
  .news-thumb-fallback,
  .camera-snapshot-frame,
  .score-team-fallback {
    background: #202c27;
  }

  .layer-link,
  .layer-link-disabled:hover,
  .layer-link:disabled:hover,
  .layer-empty,
  .layer-stat {
    background: #1a2520;
    border-color: #35433c;
    color: #d5ded9;
  }

  .layer-link:hover {
    background: #24312b;
    border-color: #53665d;
  }

  .layer-link.active {
    background: var(--orange);
    border-color: #ff9a6d;
    color: #ffffff;
    box-shadow:
      0 0 0 1px rgba(242, 106, 44, 0.22),
      0 4px 12px rgba(0, 0, 0, 0.28);
  }

  .layer-link.active small {
    color: rgba(255, 255, 255, 0.88) !important;
  }

  .layer-link.active:hover {
    background: #ff7a3f;
    border-color: #ffad88;
    color: #ffffff;
  }

  .layer-empty strong {
    color: var(--ink);
  }

  .dining-tip {
    background: #2b211b;
    color: #c9d3ce;
  }

  .feed-badge.alert {
    background: #40231f;
    color: #ff9c83;
  }

  .feed-badge.event {
    background: #3c2a1d;
    color: #f2aa72;
  }

  .hero-stories-cta.cta-light {
    background: rgba(23, 33, 29, 0.98);
    color: var(--ink);
    border-color: rgba(237, 243, 240, 0.14);
    border-left-color: var(--orange);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
  }

  .hero-stories-cta.cta-light .hero-stories-copy strong,
  .hero-stories-action {
    color: var(--ink);
  }

  .hero-stories-cta.cta-light .hero-stories-arrow,
  .action-explore-pill,
  .action-arrow-track,
  .action-lens-mark .lens-ring,
  .action-lens-mark .lens-handle,
  .action-idaho-mark path {
    border-color: #dce6e1;
  }

  .action-arrow-track,
  .action-lens-mark .lens-ring {
    background: #1a2520;
    color: var(--ink);
  }

  .action-idaho-mark path {
    stroke: #dce6e1;
  }
}


/* Fix footer system dark mode */
@media (prefers-color-scheme: dark) {
  .site-end {
    background: rgba(23, 33, 29, 0.96);
    border-color: var(--line);
    box-shadow: var(--shadow);
  }

  .site-end-message strong {
    color: var(--ink);
  }

  .site-end-message span,
  .site-end-links a {
    color: var(--muted);
  }
}


/* IdahoLens interaction design system
   Primary actions and selected controls use IdahoLens orange by default.
   Neutral/secondary/utility controls stay subdued until selected. */
:root {
  --action-primary: #f26a2c;
  --action-primary-hover: #ff7a3f;
  --action-primary-border: #ff9a6d;
  --action-primary-text: #ffffff;
  --action-primary-shadow:
    0 0 0 1px rgba(242, 106, 44, 0.22),
    0 4px 12px rgba(0, 0, 0, 0.18);
}

.button.primary,
.action-primary {
  background: var(--action-primary);
  border-color: var(--action-primary-border);
  color: var(--action-primary-text);
  box-shadow: var(--action-primary-shadow);
}

.button.primary:hover,
.action-primary:hover {
  background: var(--action-primary-hover);
  border-color: #ffad88;
  color: var(--action-primary-text);
}

/* Future selectable buttons inherit the same selected-state language
   when they use .active, aria-pressed=true, or aria-selected=true. */
button.active,
button[aria-pressed="true"],
button[aria-selected="true"] {
  background: var(--action-primary);
  border-color: var(--action-primary-border);
  color: var(--action-primary-text);
  box-shadow: var(--action-primary-shadow);
}

button.active:hover,
button[aria-pressed="true"]:hover,
button[aria-selected="true"]:hover {
  background: var(--action-primary-hover);
  border-color: #ffad88;
  color: var(--action-primary-text);
}

.layer-link.active small {
  color: rgba(255, 255, 255, 0.88) !important;
}


/* Event cards: separate date/time from venue so metadata does not crowd the title. */
.event-meta-stack {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  max-width: 46%;
  text-align: right;
}

.event-meta-stack .feed-meta {
  white-space: nowrap;
}

.event-venue {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.25;
  white-space: normal;
}

@media (max-width: 760px) {
  .news-feed-item .feed-item-top {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .event-meta-stack {
    width: 100%;
    max-width: none;
    align-items: flex-start;
    text-align: left;
    gap: 2px;
  }

  .event-meta-stack .feed-meta,
  .event-venue {
    white-space: normal;
  }
}


/* Dark-mode weather emphasis only. */
@media (prefers-color-scheme: dark) {
  .weather-layout .metric-top {
    color: var(--orange) !important;
    font-weight: 900;
  }

  .weather-layout .weather-high-low {
    color: #ffffff !important;
    font-weight: 900;
  }

  .weather-layout .weather-high-low b {
    color: #ffffff !important;
    font-weight: 900;
  }

  .weather-layout .weather-stats > p,
  .weather-layout .weather-air strong,
  .weather-layout .weather-precip {
    color: #ffffff !important;
    font-weight: 900;
  }
}


/* Preview v2: homepage weather, discovery card, and hourly forecast. */
.weather-layout {
  grid-template-columns: 1fr;
}

.weather-layout .weather-metric,
.weather-layout .forecast-metric,
.weather-layout .discovery-metric,
.weather-layout .nws-alert-strip {
  grid-column: 1 / -1;
}

.weather-layout .weather-metric {
  min-height: 166px;
}

.weather-layout .forecast-metric {
  min-height: 0;
  padding: 18px 20px;
}

.nws-alert-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 64px;
  padding: 12px 16px;
  border-color: rgba(242, 106, 44, 0.42);
  background: rgba(242, 106, 44, 0.07);
}

.nws-alert-strip[hidden] {
  display: none;
}

.nws-alert-copy {
  min-width: 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.nws-alert-label {
  color: var(--orange);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.nws-alert-copy strong {
  min-width: 0;
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.35;
}

.nws-alert-count {
  flex: 0 0 auto;
  min-width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
}

.discovery-metric {
  min-height: 0;
  padding: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.discovery-link {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 18px 20px;
  color: inherit;
  text-decoration: none;
  transition: background 140ms ease, transform 140ms ease;
}

.discovery-link + .discovery-link {
  border-left: 1px solid var(--line);
}

.discovery-link:hover {
  background: rgba(242, 106, 44, 0.06);
}

.discovery-about {
  cursor: default;
}

.discovery-about:hover {
  background: transparent;
}

.discovery-title {
  color: var(--orange);
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.discovery-copy {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.discovery-action {
  align-self: flex-start;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 0.73rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 5px 14px rgba(242, 106, 44, 0.18);
  transition: transform 140ms ease, filter 140ms ease, box-shadow 140ms ease;
}

.discovery-action b {
  font-size: 0.9em;
  line-height: 1;
}

.discovery-link:hover .discovery-action {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 7px 16px rgba(242, 106, 44, 0.24);
}

.forecast-range-button[data-forecast-days="hourly"] {
  min-width: 56px;
}

.forecast-grid[data-range="hourly"] {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px 6px;
  margin-top: 16px;
}

.forecast-hour {
  min-width: 0;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  text-align: center;
}

.forecast-hour-time {
  color: #6d7973;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.forecast-hour-temp {
  color: var(--ink);
  font-size: 0.90rem;
  font-weight: 900;
  line-height: 1.05;
}

.forecast-hour-icon {
  font-size: 1.45rem;
  line-height: 1.1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-variant-emoji: emoji;
}

@media (max-width: 760px) {
  .weather-layout .weather-metric,
  .weather-layout .forecast-metric,
  .weather-layout .discovery-metric,
  .weather-layout .nws-alert-strip {
    grid-column: 1;
  }

  .weather-layout .forecast-metric {
    min-height: 0;
  }

  .forecast-grid[data-range="hourly"] {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px 4px;
  }

  .forecast-hour-time {
    font-size: 0.68rem;
  }

  .forecast-hour-temp {
    font-size: 0.86rem;
  }

  .forecast-hour-icon {
    font-size: 1.28rem;
  }

  .discovery-link {
    padding: 16px 14px;
  }

  .discovery-title {
    font-size: 0.78rem;
  }

  .discovery-copy {
    font-size: 0.72rem;
    line-height: 1.4;
  }

  .discovery-action {
    font-size: 0.69rem;
  }
}

@media (max-width: 510px) {
  .forecast-range {
    gap: 1px;
    padding: 2px;
  }

  .forecast-range-button {
    min-width: 30px;
    padding: 0 5px;
  }

  .forecast-range-button[data-forecast-days="hourly"] {
    min-width: 52px;
  }

  .forecast-grid[data-range="hourly"] {
    gap: 12px 2px;
  }

  .forecast-hour-time {
    font-size: 0.62rem;
  }

  .forecast-hour-temp {
    font-size: 0.82rem;
  }

  .forecast-hour-icon {
    font-size: 1.18rem;
  }

  .discovery-link {
    padding: 15px 12px;
  }

  .discovery-title {
    font-size: 0.72rem;
    letter-spacing: 0.045em;
  }

  .discovery-copy {
    font-size: 0.68rem;
  }

  .discovery-action {
    font-size: 0.66rem;
  }

  .nws-alert-strip {
    align-items: flex-start;
    padding: 11px 13px;
  }

  .nws-alert-copy {
    display: grid;
    gap: 3px;
  }
}

@media (prefers-color-scheme: dark) {
  .nws-alert-strip {
    background: rgba(242, 106, 44, 0.10);
    border-color: rgba(242, 106, 44, 0.48);
  }

  .nws-alert-copy strong,
  .forecast-hour-temp {
    color: #ffffff;
  }

  .discovery-action {
    color: #ffffff;
  }

  .discovery-link + .discovery-link {
    border-left-color: #334039;
  }

  .discovery-link:hover {
    background: rgba(242, 106, 44, 0.10);
  }

  .discovery-about:hover {
    background: transparent;
  }

  .discovery-copy,
  .forecast-hour-time {
    color: #a8b4ae;
  }
}


/* Preview: stacked sunrise / sunset beneath the current weather reading */
.weather-current {
  top: 14px;
  height: auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.weather-current-main {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 176px;
  height: 78px;
}

.weather-current-main > strong,
.weather-current-main .weather-current-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 78px;
  line-height: 1;
}

.weather-current-main > strong {
  margin: 0;
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: -0.06em;
}

.weather-current-main .weather-current-icon {
  width: 76px;
  font-size: 3.8rem;
}

.weather-sun-times {
  width: 176px;
  display: grid;
  justify-items: end;
  gap: 2px;
  color: #536159;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.weather-sun-times strong {
  color: inherit;
  font: inherit;
  font-weight: 900;
}

@media (min-width: 761px) and (max-width: 1180px) {
  .weather-current {
    top: 8px;
    right: 12px;
    width: 112px;
    min-width: 112px;
    align-items: center;
  }

  .weather-current-main {
    min-width: 98px;
    height: auto;
    flex-direction: column;
    align-self: center;
    gap: 0;
  }

  .weather-current-main > strong {
    height: auto;
    font-size: 3.15rem;
  }

  .weather-current-main .weather-current-icon {
    width: 54px;
    height: 54px;
    font-size: 2.9rem;
  }

  .weather-sun-times {
    width: 112px;
    justify-items: center;
    gap: 2px;
    font-size: 0.76rem;
  }
}

@media (max-width: 760px) {
  .weather-current {
    top: 18px;
    right: 12px;
    width: 176px;
    min-width: 176px;
    height: auto;
    align-items: flex-end;
    gap: 1px;
  }

  .weather-current-main {
    min-width: 176px;
    height: 92px;
    flex-direction: row;
    gap: 8px;
  }

  .weather-current-main > strong,
  .weather-current-main .weather-current-icon {
    height: 92px;
  }

  .weather-current-main > strong {
    font-size: 4.15rem;
  }

  .weather-current-main .weather-current-icon {
    width: 78px;
    font-size: 3.85rem;
  }

  .weather-sun-times {
    width: 176px;
    justify-items: end;
    gap: 2px;
    font-size: 0.9rem;
  }
}

@media (max-width: 510px) {
  .weather-current {
    top: 24px;
    right: 8px;
    width: 158px;
    min-width: 158px;
  }

  .weather-current-main {
    min-width: 158px;
    height: 86px;
    gap: 6px;
  }

  .weather-current-main > strong,
  .weather-current-main .weather-current-icon {
    height: 86px;
  }

  .weather-current-main > strong {
    font-size: 3.8rem;
  }

  .weather-current-main .weather-current-icon {
    width: 70px;
    font-size: 3.5rem;
  }

  .weather-sun-times {
    width: 158px;
    justify-items: end;
    gap: 2px;
    font-size: 0.86rem;
  }
}

@media (prefers-color-scheme: dark) {
  .weather-sun-times {
    color: #ffffff;
  }
}


/* Preview: stack precipitation and AQI to mirror sunrise / sunset */
.weather-stats {
  display: grid;
  align-items: start;
  justify-items: start;
  gap: 2px;
}

@media (max-width: 760px) {
  .weather-stats {
    gap: 2px;
  }
}

@media (max-width: 510px) {
  .weather-stats {
    gap: 2px;
  }
}


/* Published animated map actions */
.mobile-pin-copy-line {
  display: inline;
}

.recenter-description {
  display: none;
}

.map-panel .map-pin-badge,
.map-panel .recenter-icon {
  border: 0 !important;
  background: transparent !important;
  color: var(--orange) !important;
  box-shadow: none !important;
}

.map-panel .recenter-control:hover .recenter-icon {
  background: transparent !important;
  border-color: transparent !important;
  transform: none;
}

.map-panel .recenter-label {
  color: var(--ink) !important;
  font-weight: 800 !important;
}

.map-panel .map-pin-badge {
  perspective: 110px;
}

.map-panel .map-pin-icon {
  transform-box: fill-box;
  transform-origin: center;
  transform-style: preserve-3d;
  backface-visibility: visible;
  animation: idaholens-pin-globe-spin 8s linear infinite;
}

@keyframes idaholens-pin-globe-spin {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(360deg); }
}

.map-panel .recenter-icon {
  position: relative;
  overflow: hidden;
}

.map-panel .recenter-funnel {
  width: 25px;
  height: 25px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
}

.map-panel .recenter-funnel-ring {
  transform-box: fill-box;
  transform-origin: center;
  stroke-dasharray: 9 5;
  opacity: .18;
  animation: idaholens-funnel-ring 2.8s linear infinite;
}

.map-panel .recenter-funnel-ring--outer { animation-delay: 0s; }
.map-panel .recenter-funnel-ring--mid { animation-delay: .32s; }
.map-panel .recenter-funnel-ring--inner { animation-delay: .64s; }

.map-panel .recenter-funnel-core {
  fill: currentColor;
  stroke: none;
  transform-box: fill-box;
  transform-origin: center;
  animation: idaholens-funnel-core 2.8s ease-in-out infinite .92s;
}

@keyframes idaholens-funnel-ring {
  0% {
    opacity: .14;
    transform: rotate(0deg) scale(1);
    stroke-dashoffset: 0;
  }
  22% { opacity: .92; }
  55% {
    opacity: .34;
    transform: rotate(180deg) scale(.78);
    stroke-dashoffset: -7;
  }
  82% {
    opacity: .08;
    transform: rotate(310deg) scale(.52);
    stroke-dashoffset: -13;
  }
  100% {
    opacity: 0;
    transform: rotate(360deg) scale(.34);
    stroke-dashoffset: -17;
  }
}

@keyframes idaholens-funnel-core {
  0%, 55% { transform: scale(.6); opacity: .25; }
  72% { transform: scale(1.35); opacity: .95; }
  100% { transform: scale(.6); opacity: .25; }
}

.map-panel .recenter-control:hover .recenter-funnel-ring,
.map-panel .recenter-control:hover .recenter-funnel-core {
  animation-duration: 1.9s;
}

@media (prefers-reduced-motion: reduce) {
  .map-panel .map-pin-icon,
  .map-panel .recenter-funnel-ring,
  .map-panel .recenter-funnel-core {
    animation: none !important;
  }

  .map-panel .recenter-funnel-ring {
    opacity: .58;
    transform: none;
  }

  .map-panel .recenter-funnel-core {
    opacity: .8;
  }
}

/* Published mobile map action layout */
@media (max-width: 760px) {
  .map-panel .panel-heading {
    align-items: flex-start;
  }

  .map-panel .selected-area-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    justify-content: stretch;
    gap: 14px;
    flex: 1 1 auto;
    min-width: 0;
    margin-left: 12px;
  }

  .map-panel .map-instruction,
  .map-panel .recenter-control {
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0;
    align-items: stretch;
    justify-content: flex-start;
    text-align: left;
    white-space: normal;
  }

  .map-panel .map-instruction-title {
    width: max-content;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    align-self: center;
    gap: 5px;
    margin: 0;
  }

  .map-panel .recenter-control {
    width: calc(100% - 6px);
    margin-left: 6px;
    flex-direction: column;
    gap: 5px;
  }

  .map-panel .recenter-title-stack {
    width: max-content;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
  }

  .map-panel .map-pin-badge,
  .map-panel .recenter-icon {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
  }

  .map-panel .map-instruction-title strong,
  .map-panel .recenter-label {
    display: block;
    width: auto;
    color: var(--ink) !important;
    font-size: 0.65rem;
    font-weight: 800 !important;
    line-height: 1.35;
    white-space: nowrap;
  }

  .map-panel .map-instruction-title strong {
    text-align: center;
  }

  .map-panel .recenter-label {
    text-align: left;
  }

  .map-panel .map-instruction > span,
  .map-panel .recenter-description {
    display: block;
    width: 100%;
    max-width: none;
    margin-top: 6px;
    color: var(--muted);
    font-family: inherit;
    font-size: 0.65rem;
    font-weight: 400;
    line-height: 1.35;
    text-align: left;
    white-space: normal;
    overflow-wrap: normal;
  }

  .map-panel .mobile-pin-copy-line {
    display: block;
    white-space: nowrap;
  }
}


/* Published desktop map action layout */
.desktop-pin-copy {
  display: block;
}

.mobile-pin-copy {
  display: none;
}

@media (min-width: 761px) {
  .map-panel .panel-heading {
    grid-template-columns: minmax(180px, 1fr) minmax(240px, auto) minmax(220px, auto);
    align-items: start;
    column-gap: 28px;
  }

  .map-panel .map-instruction {
    grid-column: 2;
    grid-row: 1;
    width: 260px;
    max-width: 100%;
    margin: 0;
    transform: none;
    justify-self: center;
    align-self: start;
    text-align: left;
  }

  .map-panel .map-instruction-title {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 7px;
    width: auto;
    margin: 0;
  }

  .map-panel .map-pin-badge,
  .map-panel .recenter-icon {
    margin-top: 0;
    transform: translateY(-7px) !important;
  }

  .map-panel .desktop-pin-copy {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.4;
    white-space: normal;
  }

  .map-panel .desktop-pin-copy > span {
    display: block;
    white-space: nowrap;
  }

  .map-panel #centerButton {
    grid-column: 3;
    grid-row: 1;
    width: 220px;
    min-width: 0;
    margin: 0;
    padding: 0;
    justify-self: end;
    align-self: start;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    text-align: left;
    white-space: normal;
  }

  .map-panel .recenter-title-stack {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 7px;
  }

  .map-panel .recenter-label {
    font-size: 0.82rem;
    line-height: 1.4;
    font-weight: 800 !important;
  }

  .map-panel .recenter-description {
    display: block;
    width: 100%;
    margin-top: 6px;
    color: var(--muted);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    white-space: normal;
  }
}

@media (max-width: 760px) {
  .map-panel .desktop-pin-copy {
    display: none;
  }

  .map-panel .mobile-pin-copy {
    display: block;
  }
}
