/* WMO Climatological Standard Normals — Native Client-Side Explorer Styles */

@property --wmo-fade-start {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

@property --wmo-fade-end {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

.wmonormals-interactive-shell {
  max-width: 1220px;
  margin: 1.25rem auto 2rem;
  color: #162432;
}

.wmonormals-interactive-shell [hidden] {
  display: none !important;
}

/* Pointer-focus isolation & keyboard accessibility */
#wmonormals-app:focus-visible:not([data-pointer-focus="true"]),
#wmonormals-app:focus:not([data-pointer-focus="true"]) {
  outline: 3px solid #0b57d0;
  outline-offset: 4px;
  border-radius: 10px;
}

.wmonormals-interactive-shell :is(button, a, input, select, [tabindex="0"]):focus-visible {
  outline: 3px solid #0b57d0;
  outline-offset: 2px;
}

/* Controls card (layout overrides on top of www/native-explorer.css) */
.wmo-controls-card {
  margin-bottom: 0;
}

.wmo-controls-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(240px, 1fr) minmax(280px, 1.45fr);
  gap: 0.85rem 1.15rem;
  align-items: start;
}

.wmo-field {
  min-width: 0;
}

.wmo-hint {
  font-size: 0.78rem;
  color: var(--ce-muted, #425466);
  line-height: 1.35;
}

.wmo-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-top: 0.8rem;
  padding-top: 0.75rem;
  border-top: 1px solid #dce5ec;
}

.wmo-action-buttons,
.wmo-unit-toggle,
.wmo-map-controls,
.wmo-projection-group,
.wmo-basemap-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.wmo-unit-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #324455;
  margin-inline-end: 0.15rem;
}

/* Shared action buttons matching US Weather Grid (never alert red styling) */
.wmonormals-interactive-shell .wmo-btn-neutral {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #d5e0e8;
  border-radius: 8px;
  font-size: 0.83rem;
  font-weight: 600;
  line-height: 1.25;
  min-height: 36px;
  min-block-size: 36px;
  padding: 0.3rem 0.72rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

#wmo-deselect-btn,
#wmo-chip-clear,
#wmo-compare-clear {
  background: #ffffff;
  color: #374151;
  border-color: #cbd5e1;
}

.wmonormals-interactive-shell .wmo-btn-neutral[aria-pressed="true"],
.wmonormals-interactive-shell .wmo-btn-neutral[aria-expanded="true"],
.wmonormals-interactive-shell .wmo-btn-neutral[aria-pressed="true"]:active,
.wmonormals-interactive-shell .wmo-btn-neutral[aria-expanded="true"]:active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}

.wmonormals-interactive-shell .wmo-btn-primary,
.wmonormals-interactive-shell .wmo-btn-primary:active {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #0f172a;
  border-radius: 8px;
  font-size: 0.83rem;
  font-weight: 600;
  line-height: 1.25;
  min-height: 36px;
  min-block-size: 36px;
  padding: 0.3rem 0.85rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.wmonormals-interactive-shell .wmo-btn-primary-soft,
.wmonormals-interactive-shell .wmo-btn-primary-soft:active {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dbeafe;
  color: #0c4a6e;
  border: 1px solid #93c5fd;
  border-radius: 7px;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.25;
  min-height: 32px;
  min-block-size: 32px;
  padding: 0.22rem 0.65rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.wmo-selected-chip .wmo-btn-neutral {
  min-height: 32px;
  min-block-size: 32px;
  padding: 0.22rem 0.6rem;
  border-radius: 7px;
  font-size: 0.8rem;
}

.wmo-toggle-btn {
  border: 1px solid #8ea2b3;
  background: #ffffff;
  color: #162432;
  font-weight: 600;
  min-height: 44px;
  padding: 0.3rem 0.75rem;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.wmo-toggle-btn.is-active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}

@media (hover: hover) {
  .wmonormals-interactive-shell .wmo-btn-neutral:not([aria-pressed="true"]):not([aria-expanded="true"]):hover,
  #wmo-deselect-btn:hover,
  #wmo-chip-clear:hover,
  #wmo-compare-clear:hover {
    background: #f1f5f9;
    border-color: #b9cad7;
    color: #0f172a;
  }
  .wmonormals-interactive-shell .wmo-btn-primary:hover {
    background: #1e293b;
    border-color: #1e293b;
    color: #ffffff;
  }
  .wmonormals-interactive-shell .wmo-btn-primary-soft:hover {
    background: #bfdbfe;
    border-color: #60a5fa;
    color: #082f49;
  }
}

/* Loading & status banner */
.wmo-loading-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  background: #eef6f8;
  border: 1px solid #b8d8df;
  color: #0e4c56;
  font-size: 0.94rem;
}

.wmo-loading-banner.is-error {
  background: #fdf2f2;
  border-color: #e6b8b8;
  color: #7c1f1f;
}

/* Single-row accessible tabs (modern-web-guidance: tabs) */
.wmo-tabs-bar {
  display: flex;
  gap: 0.2rem;
  overflow-x: auto;
  max-width: 100%;
  min-width: 0;
  border-bottom: 2px solid #d5e0e8;
  margin-bottom: 0.9rem;
  scrollbar-width: thin;
  scroll-margin-top: 76px;
}

#wmo-charts-section,
#wmo-multiperiod-section,
#wmo-matrix-section,
#wmo-station-dashboard {
  scroll-margin-top: 76px;
}

.wmo-tab-btn {
  position: relative;
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: #425466;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  min-height: 40px;
  padding: 0.45rem 0.95rem;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease;
}

@media (hover: hover) {
  .wmo-tab-btn:hover {
    color: #0f172a;
    background: #f4f8fa;
  }
}

.wmo-tab-btn[aria-selected="true"] {
  color: #0f172a;
}

.wmo-tab-btn[aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset-inline: 0.35rem;
  inset-block-end: -2px;
  border-block-end: 3px solid #0f172a;
}

/* Inner wrapper handles visual card styles (not [role="tabpanel"]) */
.wmo-panel-inner {
  background: #ffffff;
  border: 1px solid #d5e0e8;
  border-radius: 12px;
  padding: 1.15rem 1.25rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  margin-bottom: 1.25rem;
}

/* Map View */
.wmo-map-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem 1rem;
  margin-bottom: 0.85rem;
}

.wmo-map-summary h3 {
  margin: 0 0 0.2rem;
  font-size: 1.18rem;
  color: #102030;
}

.wmo-map-subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: #425466;
}

.wmo-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.25rem 0.6rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  font-size: 0.88rem;
  font-weight: 600;
  color: #162432;
  cursor: pointer;
}

.wmo-checkbox-label input {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.wmo-map-stage {
  border: 1px solid #b9ccd9;
  border-radius: 12px;
  overflow: hidden;
  background: #eaf2f6;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

.wmo-map-chrome {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  padding: 0.65rem 0.85rem;
  background: #eaf2f6;
  border-bottom: 1px solid #c5d6e2;
}

.wmo-map-layer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  width: 100%;
  min-width: 0;
}

.wmo-map-chrome-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0.24rem 0.58rem;
  border-radius: 999px;
  background: #dbeafe;
  border: 1px solid #93c5fd;
  color: #0c4a6e;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.wmo-inline-field {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  flex: 1 1 200px;
  min-width: 0;
}

.wmo-map-layer-bar .wmo-inline-field:first-of-type {
  flex: 1.45 1 240px;
}

.wmo-map-layer-bar .wmo-inline-field:last-of-type {
  flex: 0.85 1 160px;
}

.wmo-map-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.48rem;
  padding-top: 0.55rem;
  border-top: 1px solid #d1dfe8;
  position: relative;
}

.wmo-control-group {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  min-width: 0;
}

.wmo-control-group-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #324b5d;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.wmo-map-controls .wmo-control-group {
  gap: 0.28rem;
}

.wmo-map-controls .wmo-control-group-label {
  font-size: 0.71rem;
}

.wmo-segmented-group {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: #d7e5ee;
  border: 1px solid #b5cad7;
  border-radius: 8px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.wmo-segmented-group .wmo-seg-btn {
  min-inline-size: 38px;
  min-block-size: 34px;
  min-height: 34px;
  padding: 0.18rem 0.56rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #1d3648;
  font-size: 0.79rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
}

.wmo-map-controls .wmo-segmented-group .wmo-seg-btn {
  min-inline-size: 32px;
  min-block-size: 32px;
  min-height: 32px;
  padding: 0.14rem 0.44rem;
  font-size: 0.74rem;
}

.wmo-segmented-group .wmo-seg-btn[aria-pressed="true"] {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.24);
}

.wmo-toolbar-sep {
  align-self: stretch;
  inline-size: 0;
  min-block-size: 22px;
  margin-block: 4px;
  border-inline-start: 1px solid #b5cad7;
}

.wmo-tools-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

.wmo-map-controls .wmo-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-block-size: 38px;
  min-height: 38px;
  padding: 0.16rem 0.44rem;
  border: 1px solid #b9cad7;
  border-radius: 7px;
  background: #ffffff;
  font-size: 0.74rem;
  font-weight: 600;
  color: #162432;
  cursor: pointer;
  white-space: nowrap;
  margin: 0;
}

.wmo-map-controls .wmo-checkbox-label input {
  width: 15px;
  height: 15px;
  cursor: pointer;
  margin: 0;
}

.wmo-tool-btn {
  min-block-size: 38px;
  min-height: 38px;
  padding: 0.16rem 0.48rem;
  border: 1px solid #b9cad7;
  border-radius: 7px;
  background: #ffffff;
  color: #1e293b;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.wmo-tool-btn[aria-pressed="true"] {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}

.wmo-segmented-group .wmo-seg-btn:focus-visible,
.wmo-map-controls .wmo-checkbox-label:has(input:focus-visible),
.wmo-tool-btn:focus-visible {
  outline: 2px solid #0b57d0;
  outline-offset: 2px;
}

@media (hover: hover) {
  .wmo-segmented-group .wmo-seg-btn:not([aria-pressed="true"]):hover {
    background: rgba(255, 255, 255, 0.72);
    color: #0f172a;
  }
  .wmo-tool-btn:not([aria-pressed="true"]):hover,
  .wmo-map-controls .wmo-checkbox-label:hover {
    background: #f8fafc;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .wmo-segmented-group .wmo-seg-btn,
  .wmo-tool-btn {
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  }
}

.wmo-inline-field label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #324b5d;
  letter-spacing: 0.02em;
  white-space: nowrap;
  margin: 0;
}

.wmo-map-select {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  min-height: 38px;
  min-block-size: 38px;
  padding: 0.18rem 2rem 0.18rem 0.6rem;
  min-width: 0;
  flex: 1 1 auto;
  border-color: #b9cad7;
  border-radius: 7px;
  color: #162432;
  background-color: #ffffff;
}

.wmo-map-wrap {
  position: relative;
  width: 100%;
  border-radius: 0;
  overflow: hidden;
  border: 0;
  background: #e6f1f7;
}

.wmo-map-wrap.is-globe {
  background: radial-gradient(circle at 50% 45%, #edf4f9 0%, #d8e5f0 68%, #c7d7e6 100%);
}

.wmo-map-wrap.is-globe.is-sentinel {
  background: radial-gradient(circle at 50% 45%, #162338 0%, #0b1322 75%, #060b14 100%);
}

.wmo-maplibre-canvas {
  display: block;
  width: 100%;
  height: 540px;
  position: relative;
}

.wmo-selected-chip {
  flex-shrink: 0;
}

.wmo-maplibre-popup .maplibregl-popup-content {
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #102030;
  box-shadow: 0 4px 14px rgba(16, 32, 48, 0.16);
  border: 1px solid #cbd5e1;
}

.wmo-maplibre-popup .maplibregl-popup-tip {
  border-top-color: #ffffff;
}

.wmo-map-legend {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0;
  padding: 0.7rem 0.95rem 0.75rem;
  background: #f2f7fa;
  border: 0;
  border-top: 1px solid #c5d6e2;
  border-radius: 0;
  font-size: 0.82rem;
  color: #324455;
}

.wmo-colorbar-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 0.75rem;
}

.wmo-legend-title {
  font-weight: 700;
  font-size: 0.86rem;
  color: #102030;
}

.wmo-legend-meta {
  display: inline-flex;
  align-items: center;
  background: #e4eef4;
  border: 1px solid #cadbe6;
  border-radius: 999px;
  padding: 0.12rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #2b4458;
}

.wmo-colorbar {
  width: 100%;
  --wmo-tail-w: 22px;
}

.wmo-colorbar-track {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 16px;
  filter: drop-shadow(0 1px 2px rgba(16, 32, 48, 0.12));
}

.wmo-colorbar-seg {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  border-top: 1px solid rgba(16, 32, 48, 0.26);
  border-bottom: 1px solid rgba(16, 32, 48, 0.26);
  border-left: 1px solid rgba(16, 32, 48, 0.16);
  transition: transform 0.14s ease;
}

.wmo-colorbar-seg:hover {
  transform: scaleY(1.18);
  z-index: 2;
}

.wmo-colorbar-seg.is-closed-left {
  border-left-color: rgba(16, 32, 48, 0.28);
  border-radius: 5px 0 0 5px;
}

.wmo-colorbar-seg.is-closed-right {
  border-right: 1px solid rgba(16, 32, 48, 0.28);
  border-radius: 0 5px 5px 0;
}

.wmo-colorbar-seg.is-tail-left,
.wmo-colorbar-seg.is-tail-right {
  flex: 0 0 var(--wmo-tail-w);
  width: var(--wmo-tail-w);
  border: 0;
  background: transparent;
}

.wmo-colorbar-tail-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.wmo-colorbar-ticks {
  position: relative;
  width: 100%;
  height: 22px;
  margin-top: 2px;
}

.wmo-colorbar-tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.wmo-colorbar-tick.is-edge-start {
  transform: translateX(0);
  align-items: flex-start;
}

.wmo-colorbar-tick.is-edge-end {
  transform: translateX(-100%);
  align-items: flex-end;
}

.wmo-colorbar-tick-mark {
  width: 1.5px;
  height: 4px;
  border-radius: 1px;
  background: rgba(29, 50, 69, 0.4);
  margin-bottom: 3px;
}

.wmo-colorbar-tick-label {
  font-size: 0.74rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: #1d3245;
  white-space: nowrap;
}

/* Dashboard View */
.wmo-empty-card {
  padding: 1.5rem 1.25rem;
  text-align: center;
  background: #f8fbfc;
  border: 1px dashed #b8cad6;
  border-radius: 10px;
}

.wmo-empty-card h3 {
  margin: 0 0 0.5rem;
  color: #102030;
}

.wmo-empty-card p {
  margin: 0 auto;
  max-width: 660px;
  color: #324455;
}

.wmo-station-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.9rem 1.25rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #dce5ec;
  min-width: 0;
  max-width: 100%;
}

.wmo-station-header > * {
  min-width: 0;
  max-width: 100%;
}

.wmo-station-eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: #0e5a66;
  overflow-wrap: anywhere;
}

.wmo-station-header h3 {
  margin: 0 0 0.45rem;
  font-size: 1.48rem;
  line-height: 1.2;
  color: #102030;
}

.wmo-period-pills {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: #d7e5ee;
  border: 1px solid #b5cad7;
  border-radius: 8px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.wmo-period-pills:empty {
  display: none;
}

.wmo-period-pill {
  min-inline-size: 38px;
  min-block-size: 32px;
  min-height: 32px;
  padding: 0.16rem 0.62rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #1d3648;
  font-size: 0.79rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.wmo-period-pill.is-active,
.wmo-period-pill[aria-pressed="true"] {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.24);
}

@media (hover: hover) {
  .wmo-period-pill:not(.is-active):not([aria-pressed="true"]):hover {
    background: rgba(255, 255, 255, 0.72);
    color: #0f172a;
  }
}

.wmo-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.wmo-compare-drawer {
  background: #f6f9fb;
  border: 1px solid #d5e0e8;
  border-radius: 12px;
  padding: 0.95rem 1.1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  margin-bottom: 1.15rem;
}

.wmo-compare-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}

.wmo-compare-controls .wmo-field {
  flex: 1 1 280px;
}

/* KPI Strip */
.wmo-kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 165px), 1fr));
  gap: 0.7rem;
  margin-bottom: 1.15rem;
}

.wmo-dash-jumpbar {
  margin: 0 0 1.15rem;
}

.wmo-jump-pill--map {
  margin-inline-start: auto;
}

/* Featured Preview Header & Scroll Hint */
.wmo-seo-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  margin-bottom: 0.35rem;
}

.wmo-seo-head h3 {
  margin: 0;
}

.wmo-table-scroll-hint {
  display: none;
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #3b5568;
}

/* Climatogram grid */
.wmo-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
  margin-bottom: 1.5rem;
}

.wmo-chart-card {
  background: #ffffff;
  border: 1px solid #dce5ec;
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  min-width: 0;
  overflow: hidden;
}

.wmo-chart-card.is-wide {
  grid-column: 1 / -1;
}

.wmo-plot-canvas {
  width: 100%;
  max-width: 100%;
  min-height: 320px;
  min-width: 0;
}

@media (hover: hover) and (min-width: 769px) {
  #wmonormals-app .js-plotly-plot .plotly .modebar--hover > :not(.watermark) {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
  }
  #wmonormals-app .js-plotly-plot .plotly:hover .modebar--hover > :not(.watermark),
  #wmonormals-app .js-plotly-plot .plotly:focus-within .modebar--hover > :not(.watermark) {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (hover: none), (pointer: coarse), (max-width: 768px) {
  #wmonormals-app .js-plotly-plot .modebar-container,
  #wmonormals-app .js-plotly-plot .modebar {
    display: none !important;
  }
}

.wmo-multiperiod-section,
.wmo-matrix-section,
.wmo-benchmarks-section,
.wmo-seo-snapshot {
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid #dce5ec;
}

.wmo-section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.wmo-section-head .wmo-field {
  min-width: min(100%, 240px);
}

.wmo-section-head h3,
.wmo-matrix-section h3,
.wmo-benchmarks-section h3,
.wmo-seo-snapshot h3 {
  margin: 0 0 0.35rem;
  font-size: 1.16rem;
  color: #102030;
}

.wmo-section-sub,
.wmo-seo-meta {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: #425466;
}

/* Sticky horizontal scroll table (modern-web-guidance: responsive-table + scrollability-affordance-hints) */
.wmonormals-interactive-shell .table-scroll-region {
  overflow: auto;
  max-inline-size: 100%;
  border: 1px solid #d5e0e8;
  border-radius: 8px;
  background:
    linear-gradient(to right, #ffffff 30%, transparent) left center / 2rem 100% no-repeat local,
    linear-gradient(to left, #ffffff 30%, transparent) right center / 2rem 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(16, 32, 48, 0.14), transparent) left center / 0.75rem 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(16, 32, 48, 0.14), transparent) right center / 0.75rem 100% no-repeat scroll,
    #ffffff;
}

.wmo-matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  margin: 0;
}

.wmo-matrix-table caption {
  caption-side: top;
  text-align: left;
  padding: 0.55rem 0.75rem;
  font-size: 0.86rem;
  color: #425466;
  background: #f8fbfc;
  border-bottom: 1px solid #dce5ec;
}

.wmo-matrix-table th,
.wmo-matrix-table td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: right;
  white-space: nowrap;
}

.wmo-matrix-table thead th {
  position: sticky;
  inset-block-start: 0;
  z-index: 2;
  background: #f1f5f9;
  color: #102030;
  font-weight: 700;
  border-bottom: 2px solid #cbd5e1;
}

.wmo-matrix-table thead th:first-child,
.wmo-matrix-table tbody th {
  text-align: left;
  position: sticky;
  inset-inline-start: 0;
  z-index: 1;
  background: #f8fafc;
  color: #102030;
  font-weight: 700;
  border-right: 2px solid #cbd5e1;
}

.wmo-matrix-table thead th:first-child {
  z-index: 3;
  background: #e2e8f0;
}

.wmo-matrix-table .wmo-annual-col,
.wmo-matrix-table .wmo-annual-cell {
  font-weight: 700;
  color: #0056b3;
  border-left: 2px solid #cbd5e1;
  background: #f8fbff;
}

/* Benchmarks & Featured SEO Snapshot (off-screen paint deferral) */
.wmo-benchmarks-section,
.wmo-seo-snapshot {
  background: var(--ce-surface, #ffffff);
  border: 1px solid var(--ce-border, #d5e0e8);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.wmo-seo-snapshot {
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}

.wmo-benchmarks-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.6rem;
}

.wmonormals-interactive-shell .wmo-benchmark-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  white-space: normal;
  gap: 0.1rem;
  padding: 0.42rem 0.78rem;
  min-height: 44px;
  background: var(--ce-surface, #ffffff);
  border: 1px solid var(--ce-border, #d5e0e8);
  border-radius: 10px;
  color: var(--ce-ink, #0f172a);
}

@media (hover: hover) {
  .wmonormals-interactive-shell .wmo-benchmark-btn:hover {
    background: var(--ce-surface-alt, #f1f5f9);
    border-color: #94a3b8;
    color: var(--ce-ink, #0f172a);
  }
}

.wmo-bench-name {
  font-weight: 700;
  font-size: 0.88rem;
}

.wmo-bench-tag {
  font-size: 0.76rem;
  color: var(--ce-muted, #425466);
}

@media (max-width: 960px) {
  .wmo-controls-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem 0.8rem;
  }
  .wmo-field-station {
    grid-column: 1 / -1;
  }
  .wmo-charts-grid {
    grid-template-columns: 1fr;
  }
  .wmo-table-scroll-hint {
    display: block;
  }
}

@media (max-width: 768px) {
  .wmo-map-chrome-badge,
  .wmo-jump-pill {
    border-radius: 10px;
  }
}

@media (max-width: 640px) {
  .wmo-controls-card {
    padding: 0.75rem;
  }
  .wmo-controls-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem 0.6rem;
  }
  .wmo-field-station {
    grid-column: 1 / -1;
  }
  .wmo-toolbar-row {
    margin-top: 0.65rem;
    padding-top: 0.6rem;
    gap: 0.5rem;
  }
  .wmo-panel-inner,
  .wmo-benchmarks-section,
  .wmo-seo-snapshot {
    padding: 0.85rem;
  }
  .wmo-map-chrome {
    padding: 0.6rem 0.65rem;
  }
  .wmo-map-layer-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem 0.55rem;
    flex: 1 1 100%;
  }
  .wmo-map-controls {
    gap: 0.5rem 0.65rem;
  }
  .wmo-toolbar-sep {
    opacity: 0;
    position: absolute;
    pointer-events: none;
    inline-size: 0;
    min-block-size: 0;
    margin: 0;
  }
  .wmo-control-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.24rem;
    max-width: 100%;
  }
  .wmo-units-group {
    flex-direction: row;
    align-items: center;
  }
  .wmo-segmented-group .wmo-seg-btn {
    padding: 0.16rem 0.45rem;
    font-size: 0.75rem;
  }
  .wmo-map-controls .wmo-segmented-group .wmo-seg-btn {
    padding: 0.14rem 0.42rem;
    font-size: 0.73rem;
  }
  .wmo-map-chrome-badge {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .wmo-inline-field {
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    flex: 1 1 auto;
  }
  .wmo-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }
  .wmo-kpi-box {
    padding: 0.55rem 0.65rem;
  }
  .wmo-kpi-box:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  .wmo-dash-jumpbar {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 2rem;
    padding-bottom: 0.35rem;
  }
  .wmo-jump-pill {
    scroll-snap-align: start;
  }
  .wmo-jump-pill--map {
    margin-inline-start: 0;
  }
  .wmo-benchmarks-grid {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 2.25rem;
    padding-bottom: 0.4rem;
  }
  .wmo-benchmark-btn {
    flex: 0 0 auto;
    scroll-snap-align: start;
    max-width: 245px;
  }
  @supports (animation-timeline: scroll()) {
    :is(.wmo-benchmarks-grid, .wmo-dash-jumpbar) {
      --wmo-fade-size: 2.25rem;
      mask:
        linear-gradient(black, black) no-clip subtract,
        linear-gradient(to right, black, transparent) 0 0 / var(--wmo-fade-start) 100% no-repeat no-clip,
        linear-gradient(to right, transparent, black) 100% 0 / var(--wmo-fade-end) 100% no-repeat no-clip;
      animation: wmo-reveal-fade-start linear both, wmo-hide-fade-end linear both;
      animation-timeline: scroll(self inline);
      animation-range: 0 var(--wmo-fade-size), calc(100% - var(--wmo-fade-size)) 100%;
    }
  }
  .wmo-colorbar {
    --wmo-tail-w: 16px;
  }
  .wmo-colorbar-track {
    height: 14px;
  }
  .wmo-colorbar-tick.is-minor .wmo-colorbar-tick-label {
    display: none;
  }
  .wmo-colorbar-tick-label {
    font-size: 0.7rem;
  }
  .wmo-maplibre-canvas {
    height: 390px;
  }
}

@media (max-width: 359px) {
  .wmo-controls-grid,
  .wmo-map-layer-bar {
    grid-template-columns: 1fr;
  }
}

@keyframes wmo-reveal-fade-start {
  to {
    --wmo-fade-start: var(--wmo-fade-size);
  }
}

@keyframes wmo-hide-fade-end {
  from {
    --wmo-fade-end: var(--wmo-fade-size);
  }
}

@media (pointer: coarse) {
  .wmo-field select,
  .wmo-field input[type="search"],
  .wmo-map-select,
  .wmonormals-interactive-shell :is(button, .wmo-btn-link),
  .wmo-jump-pill,
  .wmo-checkbox-label,
  .wmo-map-controls .wmo-checkbox-label,
  .wmo-tool-btn {
    min-height: 44px;
    min-block-size: 44px;
  }
  .wmo-field .form-control,
  .wmo-field .form-select,
  .wmo-map-select {
    font-size: max(1rem, 1em);
  }
  .wmo-segmented-group .wmo-seg-btn,
  .wmo-map-controls .wmo-segmented-group .wmo-seg-btn,
  .wmo-period-pills .wmo-period-pill {
    min-height: 40px;
    min-block-size: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wmo-btn-neutral,
  .wmo-btn-primary,
  .wmo-btn-primary-soft,
  .wmo-toggle-btn,
  .wmo-period-pill,
  .wmo-tab-btn,
  .wmo-jump-pill,
  .wmo-benchmark-btn,
  .wmo-colorbar-seg,
  .wmo-segmented-group .wmo-seg-btn,
  .wmo-tool-btn,
  #wmonormals-app .js-plotly-plot .plotly .modebar--hover > :not(.watermark) {
    transition: none;
  }
}

@media (forced-colors: active) {
  .wmo-tab-btn[aria-selected="true"]::after {
    border-block-end-color: Highlight;
  }
  .wmo-toggle-btn.is-active,
  .wmo-segmented-group .wmo-seg-btn[aria-pressed="true"],
  .wmo-tool-btn[aria-pressed="true"],
  .wmo-btn-primary,
  .wmonormals-interactive-shell .wmo-btn-neutral[aria-pressed="true"],
  .wmonormals-interactive-shell .wmo-btn-neutral[aria-expanded="true"],
  .wmo-period-pill.is-active,
  .wmo-period-pill[aria-pressed="true"] {
    border: 2px solid Highlight;
  }
  .wmo-segmented-group,
  .wmo-period-pills {
    border-color: ButtonText;
  }
  .wmo-toolbar-sep {
    border-inline-start-color: ButtonText;
  }
}
