:root {
  color-scheme: dark;
  --bg: #07100f;
  --panel: rgba(16, 28, 27, 0.82);
  --panel-solid: #101c1b;
  --panel-2: #142321;
  --text: #f4f7ef;
  --muted: #a8b7aa;
  --line: rgba(213, 230, 210, 0.14);
  --green: #74d680;
  --yellow: #f4bd4f;
  --red: #ff6a5e;
  --cyan: #67d7d1;
  --violet: #b59cff;
  --river: #1c7895;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(160deg, rgba(16, 45, 38, 0.76), rgba(7, 16, 15, 0.96) 44%),
    radial-gradient(circle at 70% 0%, rgba(103, 215, 209, 0.16), transparent 34%),
    #07100f;
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

#windCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.36;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 16, 15, 0.72);
  backdrop-filter: blur(18px);
}

.nav,
.page-shell {
  width: min(1480px, calc(100% - 32px));
  margin-inline: auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

.brand,
.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand {
  text-decoration: none;
  font-weight: 760;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(116, 214, 128, 0.42);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(116, 214, 128, 0.22), rgba(103, 215, 209, 0.1));
  color: #daf7d6;
  font-size: 0.76rem;
}

.icon-link {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.icon-link:hover {
  transform: translateY(-1px);
  border-color: rgba(103, 215, 209, 0.5);
  background: rgba(103, 215, 209, 0.1);
}

.icon-link svg {
  width: 18px;
  height: 18px;
}

.page-shell {
  position: relative;
  z-index: 1;
  padding: 34px 0 56px;
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
  gap: 24px;
  align-items: end;
  min-height: 150px;
  padding: 28px 0 24px;
}

.eyebrow,
.label {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 720;
  text-transform: uppercase;
}

.hero-band h1 {
  max-width: 900px;
  margin: 10px 0 0;
  font-size: clamp(2.25rem, 6vw, 6.5rem);
  line-height: 0.95;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  box-shadow: var(--shadow);
}

.hero-tools {
  display: grid;
  gap: 10px;
}

.status-strip div {
  min-width: 0;
  padding: 16px;
  background: rgba(13, 24, 23, 0.86);
}

.status-strip strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 0.96rem;
}

.summary-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-tile,
.area-card,
.site-card,
.safety-card,
.event-card,
.alert-card,
.trip-panel,
.trip-card,
.section-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metric-tile {
  position: relative;
  overflow: hidden;
  min-height: 188px;
  padding: 18px;
  animation: riseIn 520ms ease both;
}

.area-card {
  display: grid;
  gap: 14px;
  min-height: 210px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(116, 214, 128, 0.08), transparent 45%),
    var(--panel-solid);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  animation: riseIn 560ms ease both;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.area-card:hover,
.area-card.active {
  transform: translateY(-1px);
  border-color: rgba(103, 215, 209, 0.52);
  background:
    linear-gradient(145deg, rgba(103, 215, 209, 0.12), transparent 48%),
    var(--panel-solid);
}

.area-card.active {
  box-shadow:
    0 0 0 1px rgba(103, 215, 209, 0.16),
    0 18px 58px rgba(0, 0, 0, 0.35);
}

.area-card h2 {
  margin: 3px 0 0;
  font-size: 1.24rem;
}

.area-card-mid {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.decision-strip {
  display: grid;
}

.decision-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(103, 215, 209, 0.26);
  border-radius: var(--radius);
  background:
    linear-gradient(120deg, rgba(103, 215, 209, 0.11), transparent 42%),
    linear-gradient(180deg, rgba(7, 16, 15, 0.3), rgba(7, 16, 15, 0.64)),
    var(--panel-solid);
  box-shadow: var(--shadow);
  animation: riseIn 520ms ease both;
}

.decision-main,
.decision-window {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.decision-main h2 {
  margin: 3px 0;
  font-size: clamp(1.28rem, 2vw, 1.9rem);
}

.decision-main span:not(.source-badge),
.decision-window .label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
  text-transform: uppercase;
}

.decision-window {
  padding-top: 12px;
  border-top: 1px solid rgba(213, 230, 210, 0.12);
}

.decision-window strong {
  display: block;
  margin-top: 4px;
  font-size: clamp(1rem, 1.8vw, 1.35rem);
}

.work-window-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.window-chip {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid rgba(213, 230, 210, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
  text-transform: uppercase;
}

.window-chip strong {
  color: var(--text);
}

.window-chip.green {
  border-color: rgba(116, 214, 128, 0.28);
  background: rgba(116, 214, 128, 0.1);
  color: #bff4c3;
}

.window-chip.yellow {
  border-color: rgba(244, 189, 79, 0.28);
  background: rgba(244, 189, 79, 0.11);
  color: #ffe0a0;
}

.window-chip.red {
  border-color: rgba(255, 106, 94, 0.3);
  background: rgba(255, 106, 94, 0.12);
  color: #ffbbb5;
}

.metric-tile::after {
  position: absolute;
  right: -30px;
  bottom: -60px;
  width: 160px;
  height: 160px;
  content: "";
  border: 1px solid rgba(103, 215, 209, 0.24);
  border-radius: 50%;
  opacity: 0.5;
}

.tile-top,
.tile-mid,
.tile-bottom,
.risk-row,
.model-row,
.event-top,
.alert-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tile-mid {
  align-items: end;
  margin: 18px 0 16px;
}

.temp,
.wind-readout {
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  font-weight: 820;
  line-height: 0.88;
}

.wind-readout {
  font-size: clamp(2.2rem, 4.2vw, 3.6rem);
}

.condition {
  max-width: 160px;
  color: var(--muted);
  text-align: right;
}

.small-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.small-stat {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.small-stat span,
.model-row span,
.event-card span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.small-stat strong,
.model-row strong {
  display: block;
  margin-top: 4px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 16px;
  margin-top: 16px;
}

body[data-section-filter="events"] .content-grid,
body[data-section-filter="safety"] .content-grid {
  grid-template-columns: minmax(0, 1fr);
}

.primary-column,
.side-column {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
}

.section-block {
  min-width: 0;
  padding: 18px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-heading > div:first-child {
  min-width: 0;
}

.section-content {
  display: grid;
  gap: 0;
}

.section-content[hidden] {
  display: none;
}

.section-toggle {
  min-height: 32px;
  margin-left: auto;
  padding: 5px 10px;
  border: 1px solid rgba(103, 215, 209, 0.28);
  border-radius: 8px;
  background: rgba(103, 215, 209, 0.07);
  color: var(--cyan);
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 820;
  text-transform: uppercase;
}

.section-toggle:hover {
  border-color: rgba(103, 215, 209, 0.5);
}

.section-block[data-collapsed="true"] .section-heading {
  margin-bottom: 0;
}

.section-heading.compact {
  margin-bottom: 12px;
}

.section-heading h2 {
  margin: 3px 0 0;
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.section-freshness {
  display: flex;
  justify-content: flex-end;
  margin: -6px 0 10px;
}

.heading-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.heading-controls > * {
  min-width: 0;
  max-width: 100%;
}

select {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b1716;
  color: var(--text);
}

select {
  padding: 0 34px 0 10px;
}

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

.weekly-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.safety-grid,
.safety-card-grid {
  display: grid;
  gap: 12px;
}

.safety-grid {
  grid-template-columns: 1fr;
  margin-top: 14px;
}

.safety-column {
  display: grid;
  align-content: start;
  gap: 12px;
}

.site-card,
.weekly-card,
.safety-card {
  min-height: 258px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(116, 214, 128, 0.08), transparent 45%),
    var(--panel-solid);
  animation: riseIn 560ms ease both;
}

#forecast.section-block {
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(103, 215, 209, 0.075), transparent 240px),
    linear-gradient(145deg, rgba(116, 214, 128, 0.055), rgba(20, 35, 33, 0.72)),
    var(--panel);
}

#forecast .section-heading {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(213, 230, 210, 0.12);
}

#forecast .section-content {
  gap: 14px;
}

#forecast.section-block[data-collapsed="true"] .section-heading {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

#forecast .forecast-key {
  background: rgba(103, 215, 209, 0.07);
  color: #c9e7e3;
  overflow-wrap: anywhere;
  white-space: normal;
}

#forecast .weekly-card {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  border-color: rgba(213, 230, 210, 0.16);
  background:
    linear-gradient(180deg, rgba(7, 16, 15, 0.18), rgba(7, 16, 15, 0.42)),
    #0d1817;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.32);
}

#forecast .weekly-card > .risk-row {
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(213, 230, 210, 0.12);
  background:
    linear-gradient(90deg, rgba(103, 215, 209, 0.1), transparent 58%),
    rgba(255, 255, 255, 0.018);
}

#forecast .weekly-card h3 {
  margin-top: 4px;
  font-size: clamp(1.45rem, 2vw, 2rem);
}

#forecast .source-badge {
  border: 1px solid rgba(103, 215, 209, 0.28);
  background: rgba(103, 215, 209, 0.1);
  color: #bff5ef;
}

.site-card h3,
.weekly-card h3,
.safety-card h3,
.event-card h3 {
  margin: 0;
  font-size: 1.12rem;
}

.safety-card {
  min-height: 0;
}

.safety-overview,
.safety-detail {
  border: 1px solid rgba(213, 230, 210, 0.13);
  border-radius: var(--radius);
  background: rgba(7, 16, 15, 0.34);
}

.safety-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 16px;
}

.safety-overview h3 {
  margin: 3px 0 6px;
}

.safety-overview p {
  margin: 0;
  color: var(--muted);
}

.safety-detail {
  overflow: hidden;
}

.safety-detail summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.safety-detail summary::-webkit-details-marker {
  display: none;
}

.safety-detail summary::after {
  content: "+";
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(103, 215, 209, 0.28);
  border-radius: 8px;
  color: var(--cyan);
  font-weight: 800;
}

.safety-detail[open] summary::after {
  content: "-";
}

.safety-detail summary span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.safety-detail summary svg {
  width: 17px;
  height: 17px;
  color: var(--cyan);
}

.safety-detail .safety-card-grid {
  padding: 0 12px 12px;
}

.safety-card p {
  margin: 0;
  color: var(--muted);
}

.safety-readout {
  display: grid;
  gap: 4px;
  margin: 14px 0;
}

.safety-readout strong {
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 0.9;
}

.safety-readout span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
  text-transform: uppercase;
}

.forecast-key {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 720;
}

.risk-badge,
.confidence-badge,
.source-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 760;
  text-transform: uppercase;
}

.risk-badge.green,
.confidence-badge.high {
  background: rgba(116, 214, 128, 0.14);
  color: #aff4b5;
}

.risk-badge.yellow,
.confidence-badge.medium {
  background: rgba(244, 189, 79, 0.16);
  color: #ffdc85;
}

.risk-badge.red,
.confidence-badge.low {
  background: rgba(255, 106, 94, 0.18);
  color: #ffaaa3;
}

.site-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.model-stack {
  display: grid;
  gap: 8px;
}

.model-stack.compact {
  gap: 0;
}

.model-row {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.model-stack.compact .model-row {
  padding: 7px 0;
}

.model-row:last-child {
  border-bottom: 0;
}

.daily-wind-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

#forecast .daily-wind-list {
  margin: 0;
  padding: 14px;
}

.daily-wind-row {
  display: block;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(213, 230, 210, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 56%),
    rgba(7, 16, 15, 0.44);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.daily-wind-row:last-child {
  border-bottom: 1px solid rgba(213, 230, 210, 0.12);
}

.daily-wind-row:hover {
  border-color: rgba(103, 215, 209, 0.26);
  background:
    linear-gradient(135deg, rgba(103, 215, 209, 0.07), transparent 58%),
    rgba(7, 16, 15, 0.5);
}

.daily-wind-row[open] {
  border-color: rgba(103, 215, 209, 0.38);
  background:
    linear-gradient(135deg, rgba(103, 215, 209, 0.09), transparent 54%),
    rgba(7, 16, 15, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.daily-wind-row summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(132px, auto) 30px;
  gap: 14px;
  align-items: center;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}

.daily-wind-row summary > div {
  min-width: 0;
}

.daily-wind-row summary::-webkit-details-marker {
  display: none;
}

.daily-wind-row summary::after {
  content: "+";
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(103, 215, 209, 0.3);
  border-radius: 8px;
  background: rgba(103, 215, 209, 0.06);
  color: var(--cyan);
  font-weight: 800;
  grid-column: 3;
}

.daily-wind-row[open] summary::after {
  content: "-";
}

.daily-wind-row span,
.daily-wind-value span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.daily-wind-row summary > div:first-child > strong {
  display: block;
  font-size: 1.02rem;
}

.daily-wind-row summary > div:first-child > span {
  margin-top: 3px;
  color: #bbcabd;
  font-weight: 700;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.daily-weather-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}

.daily-weather-line span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid rgba(213, 230, 210, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #c6d3c9;
  font-size: 0.72rem;
  font-weight: 760;
  text-transform: uppercase;
}

.daily-wind-value {
  display: grid;
  justify-items: end;
  gap: 7px;
}

.daily-wind-value > strong {
  font-size: 1.32rem;
  line-height: 1;
  white-space: nowrap;
}

.hourly-empty {
  margin: 0 14px 14px;
}

.gust-timeline {
  display: grid;
  gap: 6px;
  margin: 0 14px 10px;
  padding: 12px;
  border: 1px solid rgba(213, 230, 210, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(7, 16, 15, 0.52), rgba(7, 16, 15, 0.72)),
    rgba(255, 255, 255, 0.025);
}

.gust-timeline-row {
  display: grid;
  grid-template-columns: 62px minmax(130px, 1fr) 70px 46px 46px 46px;
  gap: 10px;
  align-items: center;
  min-height: 30px;
  padding: 3px 6px;
  border-radius: 7px;
}

.gust-timeline-row > * {
  min-width: 0;
}

.gust-timeline-row:hover {
  background: rgba(255, 255, 255, 0.035);
}

.gust-time,
.gust-timeline-row span,
.gust-timeline-row strong {
  min-width: 0;
  color: var(--muted);
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.gust-timeline-row strong {
  color: var(--text);
  text-align: right;
}

.gust-bar-track {
  position: relative;
  overflow: hidden;
  height: 14px;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      rgba(116, 214, 128, 0.12) 0%,
      rgba(116, 214, 128, 0.12) 44%,
      rgba(244, 189, 79, 0.13) 44%,
      rgba(244, 189, 79, 0.13) 83%,
      rgba(255, 106, 94, 0.14) 83%,
      rgba(255, 106, 94, 0.14) 100%
    ),
    rgba(255, 255, 255, 0.075);
}

.gust-bar {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  box-shadow:
    0 0 16px currentColor,
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.gust-bar.green {
  background: linear-gradient(90deg, rgba(116, 214, 128, 0.48), rgba(116, 214, 128, 0.95));
  color: rgba(116, 214, 128, 0.44);
}

.gust-bar.yellow {
  background: linear-gradient(90deg, rgba(244, 189, 79, 0.42), rgba(244, 189, 79, 0.95));
  color: rgba(244, 189, 79, 0.44);
}

.gust-bar.red {
  background: linear-gradient(90deg, rgba(255, 106, 94, 0.42), rgba(255, 106, 94, 0.95));
  color: rgba(255, 106, 94, 0.44);
}

.gust-threshold-key {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0 14px 14px;
  padding: 0 2px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 760;
  text-transform: uppercase;
}

.gust-threshold-key span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.key-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.key-dot.green {
  background: var(--green);
}

.key-dot.yellow {
  background: var(--yellow);
}

.key-dot.red {
  background: var(--red);
}

.chart-frame {
  height: 330px;
  min-height: 0;
}

.route-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.route-panel,
.trip-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.route-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.route-heading h3 {
  margin: 3px 0 0;
  font-size: 1.24rem;
}

.route-section {
  display: grid;
  gap: 10px;
}

.route-section.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.route-detail {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(213, 230, 210, 0.12);
  border-radius: 8px;
  background: rgba(7, 16, 15, 0.28);
}

.route-detail > summary {
  min-height: 42px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}

.route-detail > summary::-webkit-details-marker {
  display: none;
}

.route-detail > summary::after {
  margin-left: auto;
  color: var(--cyan);
  content: "+";
  font-size: 1rem;
  font-weight: 900;
}

.route-detail[open] > summary::after {
  content: "-";
}

.route-detail > .trip-list,
.route-detail > .camera-grid {
  padding: 0 10px 10px;
}

.route-subdetails {
  gap: 10px;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.panel-title svg {
  width: 18px;
  height: 18px;
  color: var(--yellow);
}

.panel-title h3,
.panel-title h4,
.trip-card h4 {
  margin: 0;
}

.trip-list {
  display: grid;
  gap: 10px;
}

.trip-card {
  display: grid;
  gap: 9px;
  padding: 12px;
  background: rgba(7, 16, 15, 0.45);
  box-shadow: none;
}

.trip-card p {
  margin: 0;
  color: var(--muted);
}

.trip-card-top,
.trip-meta,
.event-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.trip-card-top span:last-child,
.trip-meta span,
.trip-meta strong {
  color: var(--muted);
  font-size: 0.78rem;
}

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

.trip-facts span {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

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

.camera-card {
  display: grid;
  gap: 8px;
  overflow: hidden;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 16, 15, 0.45);
  text-decoration: none;
}

.camera-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  background: #0b1716;
  object-fit: cover;
}

.camera-card strong,
.camera-card span {
  display: block;
}

.camera-card span {
  color: var(--muted);
  font-size: 0.76rem;
}

.dms-message {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(244, 189, 79, 0.28);
  border-radius: 8px;
  background: rgba(244, 189, 79, 0.08);
}

.dms-message strong,
.dms-message span {
  color: #ffdc85;
  letter-spacing: 0;
  text-transform: uppercase;
}

.filter-tabs,
.view-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.view-switcher {
  justify-content: flex-end;
}

.route-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tab,
.route-tab,
.view-tab {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  transition:
    background 180ms ease,
    color 180ms ease,
    border-color 180ms ease;
}

.tab.active,
.tab:hover,
.route-tab.active,
.route-tab:hover,
.view-tab.active,
.view-tab:hover {
  border-color: rgba(103, 215, 209, 0.48);
  background: rgba(103, 215, 209, 0.12);
  color: var(--text);
}

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

.event-card {
  display: grid;
  gap: 12px;
  grid-template-rows: 126px auto auto auto 1fr auto;
  min-height: 330px;
  padding: 15px;
  overflow: hidden;
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.event-card:hover {
  transform: translateY(-2px);
  border-color: rgba(244, 189, 79, 0.44);
  background: rgba(27, 40, 36, 0.9);
}

.event-card p,
.soft-note,
.alert-card p {
  margin: 0;
  color: var(--muted);
}

.event-image {
  min-height: 126px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-position: center;
  background-size: cover;
}

.event-image.placeholder {
  display: grid;
  place-items: center;
  background:
    linear-gradient(145deg, rgba(244, 189, 79, 0.15), rgba(103, 215, 209, 0.1)),
    #0b1716;
  color: var(--yellow);
}

.event-image svg {
  width: 30px;
  height: 30px;
}

.event-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.event-meta strong {
  color: var(--cyan);
}

.event-arrow {
  align-self: end;
  color: var(--yellow);
  font-weight: 800;
}

.alerts-list,
.source-list {
  display: grid;
  gap: 10px;
}

.source-toggle {
  border: 1px solid rgba(213, 230, 210, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.source-toggle summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 780;
  list-style: none;
  text-transform: uppercase;
}

.source-toggle summary::-webkit-details-marker {
  display: none;
}

.source-toggle summary::after {
  content: "+";
  color: var(--cyan);
  font-size: 1rem;
  font-weight: 900;
}

.source-toggle[open] summary::after {
  content: "-";
}

.source-toggle .source-list {
  padding: 0 10px 10px;
}

.alert-card {
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.alert-card.warning {
  border-color: rgba(244, 189, 79, 0.42);
}

.alert-card.danger {
  border-color: rgba(255, 106, 94, 0.46);
}

.source-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  text-decoration: none;
}

.source-list a::after {
  content: "Open";
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 760;
  text-transform: uppercase;
}

.loading {
  position: relative;
  overflow: hidden;
}

.loading::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.6s ease infinite;
}

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .side-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-column .section-block:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .hero-band,
  .summary-row,
  .site-grid,
  .weekly-grid,
  .safety-grid,
  .event-grid,
  .side-column {
    grid-template-columns: 1fr;
  }

  .hero-band h1 {
    font-size: clamp(2.6rem, 15vw, 4.4rem);
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .route-grid,
  .route-section.two-up,
  .camera-grid {
    grid-template-columns: 1fr;
  }

  .filter-tabs,
  .view-switcher,
  .heading-controls,
  .route-tabs,
  select {
    width: 100%;
  }

  .heading-controls {
    justify-content: stretch;
  }

  .view-switcher {
    justify-content: stretch;
  }

  .view-tab,
  .tab,
  .route-tab {
    flex: 1 1 auto;
  }

  .gust-timeline-row {
    grid-template-columns: 58px minmax(96px, 1fr) 64px 42px;
  }

  .gust-timeline-row > span:nth-last-child(-n + 2) {
    display: none;
  }
}

@media (max-width: 560px) {
  .nav,
  .page-shell {
    width: min(100% - 20px, 1480px);
  }

  .brand span:last-child {
    display: none;
  }

  .status-strip,
  .site-stats,
  .trip-facts,
  .small-stat-grid {
    grid-template-columns: 1fr;
  }

  .daily-wind-row summary {
    grid-template-columns: minmax(0, 1fr) 30px;
    gap: 10px;
  }

  .daily-wind-value {
    justify-items: start;
    margin-top: 8px;
  }

  .daily-wind-row summary::after {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .daily-wind-row summary .daily-wind-value {
    grid-column: 1;
  }

  .gust-timeline {
    margin-inline: 10px;
    padding: 9px;
  }

  .gust-timeline-row {
    grid-template-columns: 50px minmax(82px, 1fr) 58px;
    gap: 7px;
    padding-inline: 2px;
  }

  .gust-timeline-row > span:not(.gust-time) {
    display: none;
  }

  .gust-threshold-key {
    margin-inline: 10px;
  }

  .hero-band {
    min-height: 130px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
