/* IMGW-PIB Polish Weather Stations & Open Data Explorer styles — layered on top of /www/native-explorer.css */

#imgw-app {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  width: 100%;
  max-width: 1220px;
  margin: 1.25rem auto 2rem;
  color: #162432;
  min-width: 0;
}

#imgw-app .imgw-res-group {
  flex-wrap: wrap;
  max-width: 100%;
}

#imgw-app .ce-quick-jump-strip {
  flex: 1 1 580px;
}

#imgw-app .ce-search-wrap input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

#imgw-app .ce-search-dropdown:empty,
#imgw-app .ce-search-dropdown[hidden] {
  display: none;
}

#imgw-app .ce-field-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ce-muted);
  margin: 0;
}

#imgw-app .imgw-date-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  width: 100%;
  max-width: 100%;
}

#imgw-app .imgw-date-pair input[type="date"] {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

@media (min-width: 769px) {
  #imgw-app .ce-analysis-bar #imgw-date-field {
    flex: 0 0 auto;
  }

  #imgw-app .ce-analysis-bar .imgw-date-pair {
    width: 268px;
  }
}

#imgw-app .ce-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.32rem 0.75rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  white-space: nowrap;
}

#imgw-app .ce-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

#imgw-app .ce-btn-primary {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

@media (hover: hover) {
  #imgw-app .ce-btn-secondary:hover:not(:disabled) {
    background: #f1f5f9;
  }

  #imgw-app .ce-btn-primary:hover:not(:disabled) {
    background: #1e293b;
    border-color: #1e293b;
  }
}

#imgw-app .ce-btn-sm {
  min-height: 32px;
  padding: 0.22rem 0.65rem;
  font-size: 0.79rem;
}

#imgw-app .ce-btn-xs {
  min-height: 28px;
  padding: 0.16rem 0.52rem;
  font-size: 0.75rem;
}

#imgw-app .ce-btn-neutral {
  background: #ffffff;
  color: #374151;
  border: 1px solid #cbd5e1;
}

@media (hover: hover) {
  #imgw-app .ce-btn-neutral:hover {
    background: #f3f4f6;
    color: #111827;
    border-color: #94a3b8;
  }
}

#imgw-app .ce-btn-neutral:focus-visible {
  background: #f3f4f6;
  color: #111827;
  border-color: #94a3b8;
}

#imgw-app .imgw-lang-group {
  flex: 0 0 auto;
  padding: 2px;
}

#imgw-app .imgw-lang-group .ce-seg-btn {
  min-inline-size: 32px;
  min-block-size: 30px;
  min-height: 30px;
  padding: 0.14rem 0.48rem;
  font-size: 0.76rem;
}

#imgw-app .ce-option-main {
  font-weight: 600;
  color: #0f172a;
}

#imgw-app .ce-option-sub {
  font-size: 0.76rem;
  color: #64748b;
}

#imgw-app .ce-window-notice {
  margin-top: 0.5rem;
  padding: 0.52rem 0.85rem;
  border-radius: 8px;
  background: #eef6f8;
  border: 1px solid #b8d8df;
  color: #0e4c56;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.4;
}

/* Map Frame & Controls */
#imgw-app .ce-map-wrap {
  position: relative;
  width: 100%;
  min-height: 460px;
  height: 540px;
  background: #e6f1f7;
}

#imgw-app .ce-map-canvas {
  width: 100%;
  height: 100%;
}

.imgw-maplibre-popup .maplibregl-popup-content {
  padding: 0.55rem 0.75rem;
  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;
}

#imgw-app .ce-map-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(248, 250, 252, 0.85);
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
}

#imgw-app .ce-map-loading.is-visible {
  opacity: 1;
}

#imgw-app .imgw-chip-text {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#imgw-app .imgw-chip-meta {
  font-size: 0.75rem;
  font-weight: 500;
  color: #475569;
}

#imgw-app .ce-chip-open {
  min-height: 24px;
  padding: 0.1rem 0.55rem;
  font-size: 0.73rem;
}

#imgw-app .ce-chip-clear {
  border: none;
  background: rgba(15, 23, 42, 0.12);
  color: #0f172a;
  border-radius: 999px;
  width: 22px;
  height: 22px;
  line-height: 1;
  cursor: pointer;
  font-weight: 700;
}

#imgw-app #imgw-view-map .ce-map-frame:not(.is-fullscreen) {
  margin-top: 0.85rem;
}

#imgw-app #imgw-map-panel.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 1060;
  margin: 0;
  border-radius: 0;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  padding: max(0.75rem, env(safe-area-inset-top, 0px)) max(0.9rem, env(safe-area-inset-right, 0px)) max(0.75rem, env(safe-area-inset-bottom, 0px)) max(0.9rem, env(safe-area-inset-left, 0px));
}

#imgw-app #imgw-map-panel.is-fullscreen .ce-map-wrap {
  flex: 1 1 auto;
  height: auto;
  min-height: 240px;
}

#imgw-app #imgw-map-panel.is-fullscreen .ce-map-canvas {
  height: 100%;
}

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

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

#imgw-app .imgw-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);
}

#imgw-app .imgw-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);
}

#imgw-app .imgw-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);
}

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

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

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

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

#imgw-app .imgw-swatch-synop {
  background: #7c3aed;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.35);
  width: 12px;
  height: 12px;
}

#imgw-app .imgw-swatch-klimat {
  background: #0d9488;
}

#imgw-app .imgw-swatch-hist {
  background: #64748b;
}

#imgw-app .imgw-swatch-selected {
  background: #f59e0b;
  border: 2px solid #0f172a;
  width: 11px;
  height: 11px;
}

#imgw-app .ce-ad-anchor {
  min-height: 0;
}

/* Primary Tabs Shell */
@media (min-width: 641px) {
  #imgw-app .ce-finder-grid {
    grid-template-columns: minmax(260px, 1fr) auto;
  }
}

#imgw-app .ce-tabs-shell {
  padding: var(--ce-tabs-shell-padding, 1rem 1.1rem);
  background: var(--ce-tabs-shell-bg, var(--ce-surface, #ffffff));
  border: var(--ce-tabs-shell-border, 1px solid var(--ce-border, #e2e8f0));
  border-radius: var(--ce-tabs-shell-radius, 12px);
  box-shadow: var(--ce-tabs-shell-shadow, none);
}

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

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

/* Dashboard & Data Table Status Banners + Accessible Progress Bar */
#imgw-app #imgw-status-banner,
#imgw-app #imgw-data-status-banner {
  margin-top: 0.85rem;
}

#imgw-app #imgw-status-banner.is-error,
#imgw-app #imgw-data-status-banner.is-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

#imgw-app .ce-loading-banner.imgw-status-has-progress:not([hidden]),
#imgw-app #imgw-status-banner.imgw-status-has-progress:not([hidden]),
#imgw-app #imgw-data-status-banner.imgw-status-has-progress:not([hidden]) {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.48rem;
}

#imgw-app .imgw-status-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 0.85rem;
  min-width: 0;
}

#imgw-app .imgw-status-msg,
#imgw-app .imgw-status-text {
  min-width: 0;
  font-weight: 500;
  line-height: 1.4;
}

#imgw-app .imgw-status-pct {
  flex: 0 0 auto;
  font-size: 0.84rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: #0e4c56;
}

#imgw-app .imgw-progress-track {
  position: relative;
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: rgba(14, 76, 86, 0.14);
  overflow: hidden;
}

#imgw-app .imgw-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0e7490 0%, #0d9488 100%);
  transition: width 0.16s ease-out;
}

#imgw-app .imgw-progress-track.is-indeterminate .imgw-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 38%;
  will-change: transform;
  animation: imgw-progress-indeterminate 1.25s ease-in-out infinite;
}

@keyframes imgw-progress-indeterminate {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(300%);
  }
}

/* High-Contrast Soft-Purple Provenance Banner & Badges */
#imgw-app .realtime-banner-purple {
  display: block;
  padding: 0.65rem 0.95rem;
  margin-top: 0.85rem;
  border-radius: 10px;
  border: 1px solid #d8b4fe;
  background: #faf5ff;
  color: #2e1065;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.45;
}

#imgw-app .realtime-banner-purple[hidden] {
  display: none;
}

#imgw-app .realtime-banner-purple strong {
  color: #1e1b4b;
}

#imgw-app .badge-purple-soft {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.24rem 0.65rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  background: #f5f3ff;
  color: #2e1065;
  border: 1px solid #d8b4fe;
}

#imgw-app .imgw-clock-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.24rem 0.62rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  background: #eff6ff;
  color: #1e3a8a;
  border: 1px solid #bfdbfe;
}

#imgw-app .imgw-heading-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.9rem;
}

#imgw-station-heading,
#imgw-station-header h2,
#imgw-station-header h3 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  color: #0f172a;
  border-bottom: none;
  padding-bottom: 0;
}

#imgw-app .ce-banner-meta {
  font-size: 0.83rem;
  color: #475569;
  margin: 0.15rem 0 0;
}

#imgw-app .imgw-narrative-card {
  margin: 0 0 0.85rem;
}

/* KPIs & Charts (NEVER override .ce-kpi-card background/border here) */
#imgw-app .ce-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 1rem;
}

#imgw-app .ce-kpi-sub {
  margin-top: 0.18rem;
  font-size: 0.76rem;
  color: #475569;
}

#imgw-app .ce-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem;
}

#imgw-app .ce-chart-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  padding: var(--ce-chart-card-padding, 0.85rem);
  min-width: 0;
}

#imgw-app .ce-chart-card-wide,
#imgw-app .ce-chart-card--wide {
  grid-column: 1 / -1;
}

#imgw-app .ce-chart-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  flex-wrap: wrap;
  min-width: 0;
}

#imgw-app .ce-chart-card-head h3,
#imgw-app .ce-chart-card-head h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

#imgw-app .imgw-chart-note {
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.45;
}

#imgw-app .ce-plot-host {
  width: 100%;
  min-height: 300px;
  height: 320px;
}

#imgw-app .ce-windrose-host {
  width: 100%;
  min-height: 300px;
}

#imgw-app .ce-windrose-readout {
  font-size: 0.81rem;
  font-weight: 600;
  color: #1e293b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  margin-bottom: 0.4rem;
}

#imgw-app .ce-windrose-svg {
  width: 100%;
  height: auto;
  max-height: 300px;
  display: block;
}

#imgw-app .ce-windrose-wedge {
  cursor: pointer;
  transition: opacity 0.12s ease;
}

#imgw-app .ce-windrose-wedge:hover,
#imgw-app .ce-windrose-wedge:focus {
  opacity: 0.84;
  outline: none;
}

#imgw-app .imgw-homogeneity-note {
  margin-top: 1rem;
  padding: 0.78rem 0.95rem;
  border-radius: 10px;
  border: 1px solid #d8b4fe;
  background: #faf5ff;
  color: #2e1065;
  font-size: 0.84rem;
  line-height: 1.5;
}

#imgw-app .imgw-homogeneity-note a {
  color: #1e1b4b;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#imgw-app .imgw-attribution-footer {
  margin-top: 0.85rem;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  font-size: 0.79rem;
  line-height: 1.45;
}

/* Tables, Sorting & Pagination */
#imgw-app .ce-table-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

#imgw-app .ce-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

#imgw-app .ce-data-table th,
#imgw-app .ce-data-table td {
  padding: 0.45rem 0.58rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  white-space: nowrap;
}

#imgw-app .ce-data-table thead th {
  background: #f8fafc;
  color: #0f172a;
  font-weight: 700;
}

#imgw-app .ce-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: inherit;
  cursor: pointer;
}

#imgw-app .imgw-sort-ind {
  font-size: 0.72rem;
  color: #64748b;
}

#imgw-app .ce-sort-btn.is-sorted .imgw-sort-ind {
  color: #0f172a;
}

#imgw-app .imgw-panel-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.85rem;
  margin-bottom: 0.75rem;
}

#imgw-app .imgw-section-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  border-bottom: none;
  padding-bottom: 0;
}

#imgw-app .imgw-section-sub {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: #475569;
}

#imgw-app .ce-muted {
  color: #475569;
}

#imgw-app .ce-table-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.83rem;
  color: #475569;
  margin-bottom: 0.55rem;
}

#imgw-app .ce-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.7rem;
}

#imgw-app .ce-stations-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.85rem;
  margin-bottom: 0.7rem;
}

#imgw-app .ce-stations-toolbar input[type="search"] {
  flex: 1 1 260px;
  max-width: 440px;
}

/* Station Info & Crosswalk Cards */
#imgw-app .ce-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.85rem;
  margin-top: 0.95rem;
}

#imgw-app .ce-info-card {
  padding: 0.9rem 1rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  min-width: 0;
}

#imgw-app .ce-info-card h3 {
  margin: 0 0 0.55rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  border-bottom: none;
  padding-bottom: 0;
}

#imgw-app .ce-kv-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.42rem;
  font-size: 0.85rem;
}

#imgw-app .ce-kv-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px dashed #f1f5f9;
  padding-bottom: 0.25rem;
}

#imgw-app .ce-kv-label {
  color: #64748b;
  font-weight: 600;
}

#imgw-app .ce-kv-val {
  color: #0f172a;
  font-weight: 600;
  text-align: right;
  min-width: 0;
  overflow-wrap: anywhere;
}

#imgw-app .ce-crosswalk-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.55rem;
  margin-top: 0.35rem;
}

#imgw-app .ce-crosswalk-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.62rem;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0369a1;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.25;
}

@media (hover: hover) {
  #imgw-app .ce-crosswalk-link:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #0c4a6e;
    text-decoration: underline;
    text-underline-offset: 2px;
  }
}

#imgw-app .ce-empty-state {
  padding: 2rem 1rem;
  text-align: center;
  color: #475569;
  font-size: 0.9rem;
}

#imgw-app .imgw-empty-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  border-bottom: none;
  padding-bottom: 0;
}

#imgw-app .imgw-empty-card p {
  margin: 0 auto;
  max-width: 66ch;
}

/* SEO Snapshot & Presets */
#imgw-app .ce-seo-snapshot {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  background: #f8fafc;
}

#imgw-app .ce-seo-snapshot summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: #334155;
}

#imgw-app .ce-seo-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0.6rem 0;
}

#imgw-app .ce-seo-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.2;
  color: #334155;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

@media (hover: hover) {
  #imgw-app .ce-seo-chip:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
  }
}

#imgw-app .ce-seo-chip.is-active,
#imgw-app .ce-seo-chip[aria-pressed="true"] {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}

#imgw-app .ce-seo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-top: 0.5rem;
}

#imgw-app .ce-seo-table th,
#imgw-app .ce-seo-table td {
  padding: 0.38rem 0.5rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

#imgw-app .ce-preset-pill.is-active,
#imgw-app .ce-preset-pill[aria-pressed="true"] {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.imgw-crosslinks-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  margin: 0.25rem auto 1.1rem;
  max-width: 1220px;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  border: 1px solid #d7e1ec;
  background: #f8fafc;
  font-size: 0.86rem;
  color: #425466;
}

.imgw-crosslinks-bar a {
  color: #0369a1;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 900px) {
  #imgw-app .ce-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }
}

@media (max-width: 768px) {
  #imgw-app .ce-charts-grid {
    grid-template-columns: 1fr;
  }

  #imgw-app .ce-map-wrap {
    height: 360px;
    min-height: 320px;
  }

  #imgw-app .ce-plot-host {
    min-height: 260px;
    height: 270px;
  }
}

@media (max-width: 480px) {
  #imgw-app .imgw-date-pair input[type="date"] {
    padding-inline: 0.35rem;
  }
}

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

@media (hover: hover) and (min-width: 769px) {
  #imgw-app .js-plotly-plot .modebar--hover > :not(.watermark) {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
  }

  #imgw-app .js-plotly-plot:hover .modebar--hover > :not(.watermark),
  #imgw-app .js-plotly-plot:focus-within .modebar--hover > :not(.watermark) {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (pointer: coarse) {
  #imgw-app .ce-seg-btn,
  #imgw-app .ce-preset-pill,
  #imgw-app .ce-seo-chip,
  #imgw-app .ce-btn,
  #imgw-app .ce-tab-btn,
  #imgw-app .ce-tool-btn,
  #imgw-app .ce-jump-pill {
    min-height: 44px;
    min-block-size: 44px;
  }

  #imgw-app .ce-seo-chip {
    padding: 0.4rem 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  #imgw-app *,
  #imgw-app *::before,
  #imgw-app *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }

  #imgw-app .imgw-progress-track.is-indeterminate .imgw-progress-fill {
    position: static;
    width: 100%;
    opacity: 0.45;
    transform: none;
    animation: none;
  }
}

@media (forced-colors: active) {
  #imgw-app .ce-btn,
  #imgw-app .ce-seg-btn,
  #imgw-app .ce-preset-pill,
  #imgw-app .ce-seo-chip,
  #imgw-app .ce-tab-btn,
  #imgw-app .ce-chart-card,
  #imgw-app .ce-info-card,
  #imgw-app .badge-purple-soft,
  #imgw-app .realtime-banner-purple,
  #imgw-app .imgw-clock-badge,
  #imgw-app .ce-crosswalk-link,
  #imgw-app .imgw-legend-toggle,
  #imgw-app .imgw-legend-card,
  #imgw-app .imgw-progress-track {
    border: 1px solid CanvasText;
  }

  #imgw-app .imgw-progress-track {
    background: Canvas;
    border: 1px solid ButtonText;
  }

  #imgw-app .imgw-progress-fill {
    background: Highlight;
    forced-color-adjust: none;
  }

  #imgw-app .ce-seo-chip[aria-pressed="true"] {
    border: 2px solid Highlight;
  }
}

@media (max-width: 330px) {
  #imgw-app .ce-kpi-grid {
    grid-template-columns: 1fr;
  }
}
