/* WMO CLIMAT Monthly Observations — Native Client-Side Explorer Styles */

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

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

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

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

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

.wmoclimate-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) */
.wmoc-controls-card {
  margin-bottom: 0;
}

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

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

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

.wmoc-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;
}

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

/* Neutral action buttons (never alert red for non-destructive clear/deselect) */
.wmoclimate-interactive-shell .wmoc-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;
}

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

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

.wmoclimate-interactive-shell .wmoc-btn-primary,
.wmoclimate-interactive-shell .wmoc-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;
}

.wmoclimate-interactive-shell .wmoc-btn-primary-soft,
.wmoclimate-interactive-shell .wmoc-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;
}

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

.wmoc-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;
}

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

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

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

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

/* Single-row accessible tabs */
.wmoclimate-interactive-shell .ce-tabs-head {
  margin-bottom: 0.5rem;
}

.wmoc-tabs-bar {
  display: flex;
  gap: 0.2rem;
  overflow-x: auto;
  max-width: 100%;
  min-width: 0;
  border-bottom: 2px solid #d5e0e8;
  margin-bottom: 0.5rem;
  scrollbar-width: thin;
  scroll-margin-top: 76px;
}

.ce-tabs-head > .wmoc-tabs-bar {
  border-bottom: none;
  margin-bottom: -2px;
  padding-bottom: 2px;
}

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

.wmoc-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) {
  .wmoc-tab-btn:hover {
    color: #0f172a;
    background: #f4f8fa;
  }
}

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

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

.ce-tabs-head .wmoc-tab-btn[aria-selected="true"]::after {
  inset-block-end: 0;
}

/* Inner wrapper handles visual card styles */
.wmoc-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: 0.5rem;
}

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

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

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

.wmoc-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;
}

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

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

.wmoc-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;
}

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

.wmoc-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;
}

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

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

.wmoc-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;
}

.wmoc-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;
}

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

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

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

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

.wmoc-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;
}

.wmoc-segmented-group .wmoc-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;
}

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

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

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

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

.wmoc-map-controls .wmoc-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;
}

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

.wmoc-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;
}

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

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

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

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

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

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

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

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

.wmoc-map-card.is-fullscreen .wmoc-maplibre-canvas {
  height: 100%;
}

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

.wmoc-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;
}

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

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

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

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

.wmoc-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%;
}

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

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

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

.wmoc-station-meta-line {
  margin: 0;
  font-size: 0.85rem;
  color: #425466;
}

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

#wmoclimate-app .wmoc-narrative-card {
  margin: 0 0 1rem;
}

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

.wmoc-kpi-sub {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.76rem;
  color: #425466;
  line-height: 1.3;
}

.wmoc-dash-jumpbar {
  margin: 0 0 1rem;
}

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

.wmoc-range-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  margin-bottom: 1rem;
}

/* Charts grid */
.wmoc-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
  margin-bottom: 1.25rem;
}

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

.wmoc-chart-title {
  margin: 0 0 0.25rem;
  font-size: 1.04rem;
  color: #102030;
}

.wmoc-chart-sub {
  margin: 0 0 0.6rem;
  font-size: 0.84rem;
  color: #425466;
}

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

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

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

/* Data & Stations Tables */
.wmoc-panel-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.95rem;
}

.wmoc-panel-toolbar h3 {
  margin: 0 0 0.25rem;
  font-size: 1.18rem;
  color: #102030;
}

.wmoc-data-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 0.75rem 1rem;
  margin-bottom: 0.95rem;
}

.wmoc-catalog-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.95rem;
}

.wmoc-catalog-controls .wmoc-field {
  flex: 1 1 280px;
  max-width: 440px;
}

.wmoc-catalog-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: #425466;
}

.wmoc-table-wrap,
.wmoclimate-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;
}

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

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

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

.wmoc-data-table thead th,
.wmoc-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;
}

.wmoc-data-table thead th:first-child,
.wmoc-data-table tbody th,
.wmoc-matrix-table thead th:first-child,
.wmoc-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;
}

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

.wmoc-data-table tbody td.wmoc-text-cell,
.wmoc-data-table thead th.wmoc-text-cell {
  text-align: left;
}

.wmoc-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
}

.wmoc-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-top: 0.9rem;
  font-size: 0.85rem;
  color: #425466;
}

.wmoc-page-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Benchmarks & Featured SEO Snapshot */
.wmoc-seo-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  margin-bottom: 0.35rem;
}

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

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

.wmoc-benchmarks-section,
.wmoc-seo-snapshot {
  background: var(--ce-surface, #ffffff);
  border: 1px solid var(--ce-border, #d5e0e8);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  margin-top: 1.15rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

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

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

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

.wmoc-benchmarks-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.wmoclimate-interactive-shell .wmoc-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) {
  .wmoclimate-interactive-shell .wmoc-benchmark-btn:hover {
    background: var(--ce-surface-alt, #f1f5f9);
    border-color: #94a3b8;
    color: var(--ce-ink, #0f172a);
  }
}

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

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

@media (max-width: 960px) {
  .wmoc-charts-grid {
    grid-template-columns: 1fr;
  }
  .wmoc-table-scroll-hint {
    display: block;
  }
  .wmoc-data-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

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

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

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

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

#wmoclimate-app .wmoc-map-legend-wrap {
  position: absolute;
  bottom: 12px;
  left: 10px;
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  max-width: calc(100% - 68px);
}

#wmoclimate-app .wmoc-legend-toggle {
  min-height: 28px;
  min-block-size: 28px;
  border: 1px solid #d7e1ec;
  background: rgba(255, 255, 255, 0.96);
  color: #162133;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 6px;
  padding: 0.2rem 0.55rem;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.14);
}

#wmoclimate-app .wmoc-legend-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #d7e1ec;
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.16);
}

#wmoclimate-app .wmoc-legend-title {
  font-size: 0.73rem;
  font-weight: 700;
  color: #162133;
  margin-bottom: 0.25rem;
}

#wmoclimate-app .wmoc-legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #425466;
}

#wmoclimate-app .wmoc-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  white-space: nowrap;
}

#wmoclimate-app .wmoc-legend-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.25);
  flex-shrink: 0;
}

#wmoclimate-app .wmoc-swatch-full {
  background: #0f766e;
}

#wmoclimate-app .wmoc-swatch-partial {
  background: #2563eb;
}

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

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