/*
 * Wskaźnik Awariomierza lives in the existing graph slot. The public view
 * follows the supplied prototype: a quiet paper-colour panel, one primary
 * reading, and one compact switch between the reading and its history.
 */
.awm-chart-host.awm-index-active > :not(.awm-index-view):not(.awm-history-toolbar) { display: none !important; }
.awm-chart-host.awm-history-active > .awm-index-view { display: block !important; margin-bottom: 18px; padding-bottom: 0; border-bottom: 0; }
.awm-chart-host.awm-history-active > .awm-index-view > .awm-index-body { display: none !important; }
.awm-chart-host.awm-history-active .national-status-heading,
.awm-chart-host.awm-history-active .national-status-header,
.awm-chart-host.awm-history-active .group-chart-title { display: none !important; }
.awm-chart-host [data-awm-index-managed-legacy="1"] { display: none !important; }
.awm-chart-host.awm-history-active > .awm-history-toolbar { display: none !important; }
.awm-chart-host.awm-index-active { overflow: hidden; }
.awm-chart-host .awm-index-view,
.awm-chart-host .awm-history-toolbar { box-sizing: border-box; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }

.awm-index-view {
  --awm-paper: #f7f3eb;
  --awm-ink: #171717;
  --awm-muted: #777777;
  --awm-rule: #dedbd4;
  --awm-border: #f4ad29;
  --awm-green: #11b97f;
  --awm-amber: #f5a313;
  --awm-orange: #f4741f;
  --awm-red: #ee3156;
  --awm-accent: var(--awm-green);
  width: 100%;
  min-width: 0;
  padding: clamp(27px, 4.5vw, 60px) clamp(22px, 5vw, 76px) clamp(30px, 4vw, 52px);
  color: var(--awm-ink);
  background: var(--awm-paper);
  border: 2px solid var(--awm-border);
  overflow: hidden;
}
.awm-index-body { min-width: 0; }
.awm-index-view.ok { --awm-accent: var(--awm-green); }
.awm-index-view.warning { --awm-accent: var(--awm-amber); }
.awm-index-view.high { --awm-accent: var(--awm-orange); }
.awm-index-view.critical { --awm-accent: var(--awm-red); }

.awm-index-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; padding-bottom: 27px; border-bottom: 1px solid var(--awm-rule); }
.awm-title-block { min-width: 0; }
.awm-kicker { margin: 0 0 9px; color: #5c9fe8; font-size: 12px; line-height: 1.2; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.awm-index-title { margin: 0; color: var(--awm-ink); font-size: clamp(32px, 4.4vw, 52px); line-height: .98; letter-spacing: -.055em; font-weight: 850; text-transform: none; }
.awm-index-subtitle { margin: 9px 0 0; color: var(--awm-muted); font-size: 15px; line-height: 1.35; font-weight: 550; }
.awm-index-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.awm-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 15px; border: 1px solid #bfc0bf; border-radius: 0; background: transparent; color: var(--awm-ink); font: inherit; font-size: 13px; font-weight: 800; letter-spacing: .01em; cursor: pointer; }
.awm-button:hover, .awm-button:focus-visible { border-color: var(--awm-ink); background: var(--awm-ink); color: var(--awm-paper); outline: none; }
.awm-button-primary { border-color: #5c9fe8; background: #2f6fe7; color: #fff; }
.awm-view-switcher { display: inline-flex; align-items: stretch; gap: 0; padding: 7px; border: 1px solid #d0cfcb; background: rgba(255, 255, 255, .38); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.awm-switch-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 10px 15px; border: 0; background: transparent; color: #606060; font: inherit; font-size: 15px; font-weight: 750; letter-spacing: -.01em; cursor: pointer; white-space: nowrap; }
.awm-switch-button:hover, .awm-switch-button:focus-visible { color: var(--awm-ink); outline: none; }
.awm-switch-button.is-active { background: #171717; color: #fff; }
.awm-switch-icon { width: 19px; height: 19px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.awm-help-button { min-height: 42px; padding-inline: 14px; }

.awm-index-main { display: grid; grid-template-columns: minmax(240px, 37%) minmax(0, 1fr); align-items: center; gap: clamp(35px, 7vw, 105px); padding: clamp(58px, 8vw, 100px) clamp(1px, 5vw, 67px) clamp(52px, 7vw, 87px); }
.awm-gauge-column { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.awm-gauge { position: relative; width: min(100%, 310px); margin: 0 auto; text-align: center; }
.awm-gauge svg { display: block; width: 100%; height: auto; overflow: visible; }
.awm-gauge-track, .awm-gauge-progress { fill: none; stroke-linecap: round; }
.awm-gauge-track { stroke: #dce1df; stroke-width: 9; }
.awm-gauge-progress { stroke: var(--awm-accent); stroke-width: 10; transition: stroke-dasharray .7s ease, stroke .2s ease; }
.awm-gauge-progress.warning { stroke: var(--awm-amber); }
.awm-gauge-progress.high { stroke: var(--awm-orange); }
.awm-gauge-progress.critical { stroke: var(--awm-red); }
.awm-gauge-pip { fill: var(--awm-paper); stroke: var(--awm-accent); stroke-width: 3; }
.awm-gauge-pip.warning { stroke: var(--awm-amber); }
.awm-gauge-pip.high { stroke: var(--awm-orange); }
.awm-gauge-pip.critical { stroke: var(--awm-red); }
.awm-gauge-pip-core { fill: var(--awm-accent); }
.awm-gauge-score { position: absolute; inset: 0 0 6%; display: flex; align-items: center; justify-content: center; color: var(--awm-ink); font-size: clamp(66px, 9vw, 96px); line-height: 1; font-weight: 900; letter-spacing: -.08em; pointer-events: none; }
.awm-status-badge { display: inline-flex; align-items: center; justify-content: center; max-width: 100%; margin-top: -1px; padding: 11px 18px; border: 0; background: var(--awm-accent); color: #fff; font-size: clamp(13px, 1.65vw, 17px); line-height: 1.15; font-weight: 850; letter-spacing: .07em; text-align: center; text-transform: uppercase; }
.awm-status-badge.warning { background: var(--awm-amber); }
.awm-status-badge.high { background: var(--awm-orange); }
.awm-status-badge.critical { background: var(--awm-red); }
.awm-status-badge::before { content: none; }

.awm-reading { min-width: 0; }
.awm-reading-kicker { margin: 0 0 15px; color: var(--awm-muted); font-size: clamp(14px, 1.65vw, 18px); line-height: 1.2; font-weight: 650; letter-spacing: .02em; text-transform: uppercase; }
.awm-trend-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; color: var(--awm-muted); font-size: clamp(17px, 2vw, 24px); line-height: 1.25; }
.awm-trend-line strong { color: var(--awm-ink); font-size: clamp(22px, 2.6vw, 31px); font-weight: 820; }
.awm-trend-arrow { display: inline-flex; align-items: center; justify-content: center; width: 25px; height: 25px; font-size: 31px; line-height: 1; font-weight: 600; }
.awm-trend-arrow.rising { color: var(--awm-red); }
.awm-trend-arrow.falling { color: var(--awm-green); }
.awm-trend-arrow.steady { color: var(--awm-muted); }
.awm-trend-separator { color: #a1a1a1; }
.awm-status-copy { max-width: 760px; margin: 42px 0 0; color: var(--awm-ink); font-size: clamp(19px, 2.45vw, 30px); line-height: 1.38; font-weight: 470; letter-spacing: -.02em; }
.awm-report-button { display: inline-flex; align-items: center; gap: 11px; margin-top: 36px; padding: 13px 20px; border: 2px solid var(--awm-ink); background: transparent; color: var(--awm-ink); font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; }
.awm-report-button:hover, .awm-report-button:focus-visible { background: var(--awm-ink); color: var(--awm-paper); outline: none; }
.awm-report-icon { display: inline-grid; place-items: center; width: 19px; height: 19px; border: 2px solid currentColor; border-radius: 50%; font-size: 13px; font-weight: 900; line-height: 1; }

.awm-location-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; padding-top: 24px; border-top: 1px solid var(--awm-rule); }
.awm-location-filters label { display: grid; gap: 7px; min-width: 0; color: var(--awm-muted); font-size: 10px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.awm-location-filters select { width: 100%; min-width: 0; box-sizing: border-box; padding: 11px 28px 11px 12px; border: 1px solid #c9c7c1; border-radius: 0; background: var(--awm-paper); color: var(--awm-ink); font: inherit; font-size: 14px; font-weight: 700; appearance: auto; }
.awm-location-filters select:focus-visible { border-color: var(--awm-ink); outline: 2px solid rgba(23, 23, 23, .18); outline-offset: 1px; }

.awm-subservices { margin-top: 28px; padding-top: 23px; border-top: 1px solid var(--awm-rule); }
.awm-subservices h3 { margin: 0 0 12px; color: var(--awm-muted); font-size: 11px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.awm-subservice-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.awm-subservice { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #cbc8c0; background: rgba(255, 255, 255, .28); }
.awm-subservice-name { min-width: 0; color: var(--awm-ink); font-size: 14px; font-weight: 750; }
.awm-subservice-name small { display: block; margin-top: 3px; color: var(--awm-muted); font-size: 11px; font-weight: 500; }
.awm-subservice-score { color: var(--awm-green); font-size: 20px; font-weight: 900; }
.awm-subservice-score.warning { color: var(--awm-amber); }
.awm-subservice-score.high { color: var(--awm-orange); }
.awm-subservice-score.critical { color: var(--awm-red); }
.awm-index-summary { margin-top: 28px; padding-top: 27px; border-top: 1px solid var(--awm-rule); }
.awm-index-summary p { margin: 0; color: var(--awm-ink); font-size: clamp(16px, 1.8vw, 23px); line-height: 1.45; font-weight: 450; }
.awm-index-note { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--awm-rule); }
.awm-index-note p { margin: 0; color: var(--awm-muted); font-size: 14px; line-height: 1.5; font-weight: 500; }

/* Kept for backwards compatibility with cached pages from the previous
   release. New pages use the shared header inside .awm-index-view. */
.awm-history-toolbar { --awm-ink: #171717; --awm-paper: #f7f3eb; display: none; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; padding: 13px 16px; border: 1px solid #d0cfcb; background: var(--awm-paper); color: #5d5d5d; font-size: 14px; }
.awm-history-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 9px; }
.awm-history-heading strong { color: #171717; font-size: 16px; }
.awm-history-heading span { color: #777; }
.awm-history-toolbar .awm-button { min-height: 38px; padding-block: 8px; }

/* Explanatory dialog intentionally remains a high-contrast overlay. */
.awm-help-backdrop { position: fixed; inset: 0; z-index: 2147482000; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(2, 6, 23, .78); }
.awm-help-backdrop.is-open { display: flex; }
.awm-help-dialog { width: min(820px, 100%); max-height: min(88vh, 820px); overflow: auto; border: 1px solid #526784; background: #0f172a; color: #f8fafc; box-shadow: 0 18px 44px rgba(0, 0, 0, .3); }
.awm-help-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 25px 28px 21px; border-bottom: 1px solid #263650; }
.awm-help-head .awm-kicker { margin-bottom: 10px; }
.awm-help-title { margin: 0; font-size: clamp(24px, 4vw, 34px); line-height: 1; letter-spacing: -.04em; }
.awm-help-close { flex: 0 0 auto; border: 0; background: transparent; color: #91a2bd; font-size: 30px; line-height: 1; cursor: pointer; }
.awm-help-body { padding: 25px 28px 28px; }
.awm-help-body p { margin: 0 0 18px; color: #c7d2e3; font-size: 16px; line-height: 1.6; }
.awm-help-callout { margin: 20px 0 26px; padding: 18px 20px; border: 1px solid #67aaff; background: rgba(33, 105, 212, .12); }
.awm-help-callout strong { display: block; margin-bottom: 7px; color: #9bc8ff; font-size: 18px; }
.awm-help-callout p { margin: 0; }
.awm-help-section-title { margin: 26px 0 12px; font-size: 18px; letter-spacing: .08em; text-transform: uppercase; }
.awm-help-factors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.awm-help-factors li { padding: 14px; border: 1px solid #263650; background: #020617; }
.awm-help-factors strong { display: block; margin-bottom: 4px; font-size: 14px; }
.awm-help-factors span { color: #91a2bd; font-size: 13px; line-height: 1.45; }
.awm-help-ranges { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; margin-top: 12px; }
.awm-help-range { padding: 11px; border-top: 4px solid #10c58b; background: #020617; }
.awm-help-range:nth-child(2) { border-color: #f5a313; }
.awm-help-range:nth-child(3) { border-color: #ff7621; }
.awm-help-range:nth-child(4) { border-color: #f23d61; }
.awm-help-range:nth-child(5) { border-color: #d91648; }
.awm-help-range strong, .awm-help-range span { display: block; }
.awm-help-range strong { font-size: 12px; }
.awm-help-range span { margin-top: 5px; color: #91a2bd; font-size: 11px; line-height: 1.35; }
.awm-help-foot { display: flex; justify-content: flex-end; margin-top: 24px; }

/* Admin additions inherit the existing dark admin surface. */
.awm-admin-panel { --awm-ink: #f8fafc; --awm-paper: #020617; max-width: 1180px; margin: 24px auto; padding: 24px; border: 1px solid #334155; background: #0f172a; color: #f8fafc; font-family: inherit; }
.awm-admin-panel h2 { margin: 0; font-size: 24px; }
.awm-admin-panel h3 { margin: 24px 0 10px; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
.awm-admin-panel p { color: #94a3b8; font-size: 13px; line-height: 1.5; }
.awm-admin-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.awm-admin-field { display: grid; gap: 5px; color: #cbd5e1; font-size: 12px; font-weight: 800; }
.awm-admin-field input, .awm-admin-field select { width: 100%; box-sizing: border-box; padding: 9px 10px; border: 1px solid #475569; background: #020617; color: #f8fafc; font: inherit; }
.awm-admin-field input[type="checkbox"] { width: auto; }
.awm-admin-check { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: #f8fafc; font-size: 14px; font-weight: 900; }
.awm-admin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.awm-admin-status { color: #34d399; font-size: 12px; font-weight: 800; }
.awm-admin-status.error { color: #fb7185; }
.awm-admin-route-note { display: grid; gap: 6px; margin-top: 24px; padding: 14px 16px; border: 1px solid #334155; background: #020617; color: #cbd5e1; }
.awm-admin-route-note strong { color: #67aaff; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.awm-admin-route-note span { color: #94a3b8; font-size: 13px; line-height: 1.5; }

@media (max-width: 900px) {
  .awm-index-head { flex-direction: column; }
  .awm-index-actions { width: 100%; justify-content: flex-start; }
  .awm-view-switcher { width: 100%; }
  .awm-switch-button { flex: 1 1 0; }
  .awm-help-button { align-self: flex-start; }
  .awm-index-main { grid-template-columns: minmax(190px, 34%) minmax(0, 1fr); gap: 28px; padding-inline: 0; }
  .awm-status-copy { margin-top: 30px; }
  .awm-report-button { margin-top: 26px; }
}
@media (max-width: 680px) {
  .awm-index-view { padding: 24px 18px 29px; }
  .awm-index-head { gap: 21px; padding-bottom: 22px; }
  .awm-index-title { font-size: 38px; }
  .awm-index-actions { display: grid; grid-template-columns: 1fr; }
  .awm-view-switcher { width: 100%; padding: 5px; }
  .awm-switch-button { min-height: 39px; padding: 9px 7px; font-size: 12px; gap: 5px; }
  .awm-switch-icon { width: 16px; height: 16px; }
  .awm-help-button { width: fit-content; }
  .awm-index-main { grid-template-columns: 1fr; gap: 28px; padding: 42px 0 38px; }
  .awm-gauge { max-width: 275px; }
  .awm-gauge-score { font-size: 76px; }
  .awm-status-badge { max-width: 90%; }
  .awm-reading-kicker { margin-bottom: 12px; }
  .awm-status-copy { margin-top: 25px; font-size: 21px; }
  .awm-location-filters { grid-template-columns: 1fr; gap: 10px; padding-top: 20px; }
  .awm-subservice-list { grid-template-columns: 1fr; }
  .awm-index-summary { margin-top: 22px; padding-top: 21px; }
  .awm-history-toolbar { align-items: stretch; flex-direction: column; }
  .awm-history-toolbar .awm-button { align-self: flex-start; }
  .awm-help-factors, .awm-help-ranges { grid-template-columns: 1fr; }
  .awm-admin-grid { grid-template-columns: 1fr; }
}

/* Both tabs are states of one framed module. The parent owns the frame in
   history mode so the graph cannot fall back to a second, unrelated card. */
.awm-chart-host.awm-history-active {
  box-sizing: border-box !important;
  padding: 22px !important;
  border: 2px solid var(--awm-border, #f4ad29) !important;
  background: var(--awm-paper, #f7f3eb) !important;
  color: var(--awm-ink, #171717) !important;
}
.awm-chart-host.awm-history-active > .awm-index-view {
  margin: 0 0 17px !important;
  padding: 0 0 17px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--awm-rule, #dedbd4) !important;
  background: transparent !important;
}
.awm-chart-host.awm-history-active > .awm-index-view .awm-index-head {
  padding-bottom: 0 !important;
  border-bottom: 0 !important;
}
.awm-chart-host.awm-history-active > .awm-index-view .awm-index-title { font-size: clamp(25px, 3.2vw, 38px) !important; }
.awm-chart-host.awm-history-active > .national-status-meta {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 10px !important;
  color: var(--awm-muted, #777) !important;
  font-size: 13px !important;
}
.awm-chart-host.awm-history-active > .national-status-meta strong { color: var(--awm-red, #ee3156) !important; }
.awm-chart-host.awm-history-active > .graph-watermark-wrap,
.awm-chart-host.awm-history-active > .awm-ssr-history,
.awm-chart-host.awm-history-active .group-chart-main,
.awm-chart-host.awm-history-active .section-heading { margin-top: 0 !important; }
.awm-ssr-history { min-width: 0; color: var(--awm-ink, #171717); }
.awm-history-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 9px; color: var(--awm-muted, #777); font-size: 13px; font-weight: 700; }
.awm-history-meta span { text-transform: uppercase; letter-spacing: .12em; }
.awm-history-meta strong { color: var(--awm-red, #ee3156); white-space: nowrap; }
.awm-history-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 10px; color: var(--awm-muted, #777); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.awm-history-legend span { display: inline-flex; align-items: center; gap: 7px; }
.awm-history-legend i { display: inline-block; width: 20px; height: 3px; background: var(--awm-red, #ee3156); }
.awm-history-legend b { display: inline-block; width: 20px; border-top: 2px dashed var(--awm-muted, #777); }
.awm-ssr-history-chart { margin: 0 !important; }
.awm-ssr-history-svg { min-height: 240px; }
.awm-history-axis { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px 0; color: var(--awm-muted, #777); font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
.awm-history-axis strong { color: var(--awm-ink, #171717); }

html.dark .awm-chart-host.awm-history-active,
html[data-awariomierz-theme="dark"] .awm-chart-host.awm-history-active,
.dark .awm-chart-host.awm-history-active { --awm-paper: #0f172a; --awm-ink: #f8fafc; --awm-muted: #94a3b8; --awm-rule: #263650; --awm-border: #334155; }
html.dark .awm-chart-host.awm-history-active .chart,
html[data-awariomierz-theme="dark"] .awm-chart-host.awm-history-active .chart,
.dark .awm-chart-host.awm-history-active .chart { background: #020617 !important; border-color: #1e293b !important; }
html.light .awm-chart-host.awm-history-active,
html[data-awariomierz-theme="light"] .awm-chart-host.awm-history-active { --awm-paper: #f7f3eb; --awm-ink: #171717; --awm-muted: #777; --awm-rule: #dedbd4; --awm-border: #f4ad29; }
@media (max-width: 420px) {
  .awm-switch-button span { overflow: hidden; text-overflow: ellipsis; }
  .awm-index-title { font-size: 33px; }
  .awm-trend-line { gap: 5px; font-size: 16px; }
  .awm-trend-line strong { font-size: 21px; }
  .awm-status-copy { font-size: 19px; }
}

/* The graph mode uses the same compact segmented control as the index mode.
   The graph itself remains the existing source of historical detail. */
.awm-chart-host.awm-index-active > .awm-history-toolbar { display: none !important; }
.awm-history-toolbar { align-items: center; justify-content: space-between; }
.awm-history-switcher { padding: 4px; box-shadow: none; }
.awm-history-switcher .awm-switch-button { min-height: 34px; padding: 7px 10px; font-size: 12px; }
.awm-history-status[hidden] { display: none !important; }
.awm-history-status { flex: 0 0 auto; }

body.dark .awm-index-view,
body[data-awariomierz-theme="dark"] .awm-index-view,
body[data-theme="dark"] .awm-index-view { --awm-paper: #0f172a; --awm-ink: #f8fafc; --awm-muted: #94a3b8; --awm-rule: #263650; --awm-border: #334155; }
body.dark .awm-gauge-track,
body[data-awariomierz-theme="dark"] .awm-gauge-track,
body[data-theme="dark"] .awm-gauge-track { stroke: #263650; }
body.dark .awm-view-switcher,
body[data-awariomierz-theme="dark"] .awm-view-switcher,
body[data-theme="dark"] .awm-view-switcher { border-color: #334155; background: rgba(2, 6, 23, .55); box-shadow: none; }
body.dark .awm-switch-button,
body[data-awariomierz-theme="dark"] .awm-switch-button,
body[data-theme="dark"] .awm-switch-button { color: #cbd5e1; }
body.dark .awm-switch-button.is-active,
body[data-awariomierz-theme="dark"] .awm-switch-button.is-active,
body[data-theme="dark"] .awm-switch-button.is-active { background: #f8fafc; color: #0f172a; }
body.dark .awm-history-toolbar,
body[data-awariomierz-theme="dark"] .awm-history-toolbar,
body[data-theme="dark"] .awm-history-toolbar { --awm-paper: #0f172a; --awm-ink: #f8fafc; border-color: #334155; background: #0f172a; color: #cbd5e1; }
body.dark .awm-history-switcher,
body[data-awariomierz-theme="dark"] .awm-history-switcher,
body[data-theme="dark"] .awm-history-switcher { border-color: #334155; background: rgba(2, 6, 23, .55); }
body.dark .awm-history-heading strong,
body[data-awariomierz-theme="dark"] .awm-history-heading strong,
body[data-theme="dark"] .awm-history-heading strong { color: #f8fafc; }

/* The modal receives an explicit theme class from JavaScript. This keeps it
   correct even when the host application uses a non-standard theme marker. */
.awm-help-backdrop.is-dark-theme { background: rgba(2, 6, 23, .82) !important; }
.awm-help-backdrop.is-dark-theme .awm-help-dialog { border-color: #526784 !important; background: #0f172a !important; color: #f8fafc !important; box-shadow: 0 18px 44px rgba(0, 0, 0, .42) !important; }
.awm-help-backdrop.is-dark-theme .awm-help-head { border-color: #263650 !important; }
.awm-help-backdrop.is-dark-theme .awm-help-close { color: #91a2bd !important; }
.awm-help-backdrop.is-dark-theme .awm-help-body p { color: #c7d2e3 !important; }
.awm-help-backdrop.is-dark-theme .awm-help-callout { border-color: #67aaff !important; background: rgba(33, 105, 212, .12) !important; }
.awm-help-backdrop.is-dark-theme .awm-help-callout strong { color: #9bc8ff !important; }
.awm-help-backdrop.is-dark-theme .awm-help-factors li,
.awm-help-backdrop.is-dark-theme .awm-help-range { border-color: #263650 !important; background: #020617 !important; }
.awm-help-backdrop.is-dark-theme .awm-help-factors span,
.awm-help-backdrop.is-dark-theme .awm-help-range span { color: #91a2bd !important; }
.awm-help-backdrop.is-dark-theme .awm-help-range:nth-child(1) { border-top-color: #10c58b !important; }
.awm-help-backdrop.is-dark-theme .awm-help-range:nth-child(2) { border-top-color: #f5a313 !important; }
.awm-help-backdrop.is-dark-theme .awm-help-range:nth-child(3) { border-top-color: #ff7621 !important; }
.awm-help-backdrop.is-dark-theme .awm-help-range:nth-child(4) { border-top-color: #f23d61 !important; }
.awm-help-backdrop.is-dark-theme .awm-help-range:nth-child(5) { border-top-color: #d91648 !important; }
.awm-help-backdrop.is-light-theme { background: rgba(15, 23, 42, .34) !important; }
.awm-help-backdrop.is-light-theme .awm-help-dialog { border-color: #cbd5e1 !important; background: #fff !important; color: #0f172a !important; box-shadow: 0 18px 44px rgba(15, 23, 42, .22) !important; }
.awm-help-backdrop.is-light-theme .awm-help-head { border-color: #e2e8f0 !important; }
.awm-help-backdrop.is-light-theme .awm-help-close { color: #64748b !important; }
.awm-help-backdrop.is-light-theme .awm-help-body p { color: #334155 !important; }
.awm-help-backdrop.is-light-theme .awm-help-callout { border-color: #2563eb !important; background: #eff6ff !important; }
.awm-help-backdrop.is-light-theme .awm-help-callout strong { color: #1d4ed8 !important; }
.awm-help-backdrop.is-light-theme .awm-help-factors li,
.awm-help-backdrop.is-light-theme .awm-help-range { border-color: #e2e8f0 !important; background: #f8fafc !important; }
.awm-help-backdrop.is-light-theme .awm-help-factors span,
.awm-help-backdrop.is-light-theme .awm-help-range span { color: #64748b !important; }
.awm-help-backdrop.is-light-theme .awm-help-range:nth-child(1) { border-top-color: #10a878 !important; }
.awm-help-backdrop.is-light-theme .awm-help-range:nth-child(2) { border-top-color: #e29a0a !important; }
.awm-help-backdrop.is-light-theme .awm-help-range:nth-child(3) { border-top-color: #ed671f !important; }
.awm-help-backdrop.is-light-theme .awm-help-range:nth-child(4) { border-top-color: #e83b5e !important; }
.awm-help-backdrop.is-light-theme .awm-help-range:nth-child(5) { border-top-color: #c91645 !important; }

/* Cover the concrete legacy status wrappers used by the public templates as
   well as the data attributes used by newer cards. */
body.awm-hide-legacy-home .national-status-heading > .national-status-badge,
body.awm-hide-legacy-home .national-status-header .national-status-badge,
body.awm-hide-legacy-home [data-awariomierz-legacy-visibility-managed="1"],
body.awm-hide-legacy-category .group-chart-title .group-chart-status,
body.awm-hide-legacy-category .category-summary-status,
body.awm-hide-legacy-region .regional-status-badge,
body.awm-hide-legacy-city .city-status-badge,
body.awm-hide-legacy-district .district-status-badge,
body.awm-hide-legacy-service .service-status,
body.awm-hide-legacy-service .service-header-status,
body.awm-hide-legacy-cards .status-badge,
body.awm-hide-legacy-cards .status-chip { display: none !important; }

@media (max-width: 680px) {
  .awm-history-toolbar { align-items: stretch; flex-direction: column; }
  .awm-history-switcher { width: 100%; }
  .awm-history-switcher .awm-switch-button { flex: 1 1 0; }
  .awm-history-status { align-self: flex-start; }
}

/* National view refinements: one clear national reading, with the explainer
   anchored to the tile instead of competing with the primary view switch. */
.awm-index-view.is-national .awm-index-title,
.awm-index-title-national { font-size: clamp(25px, 3vw, 38px); letter-spacing: -.045em; }
.awm-index-footer-actions { display: flex; justify-content: flex-end; margin-top: 18px; }
.awm-index-footer-actions .awm-help-button { min-height: 38px; }

/* The prototype has a light paper surface, while the application also has a
   dark mode. Keep the same layout and hierarchy, but let the surface inherit
   the active application theme. */
html.dark .awm-index-view,
html[data-awariomierz-theme="dark"] .awm-index-view,
.dark .awm-index-view {
  --awm-paper: #0f172a;
  --awm-ink: #f8fafc;
  --awm-muted: #94a3b8;
  --awm-rule: #263650;
  --awm-border: #334155;
}
html.dark .awm-gauge-track,
html[data-awariomierz-theme="dark"] .awm-gauge-track,
.dark .awm-gauge-track { stroke: #263650; }
html.dark .awm-button,
html[data-awariomierz-theme="dark"] .awm-button,
.dark .awm-button { border-color: #475569; color: #f8fafc; }
html.dark .awm-button:hover,
html.dark .awm-button:focus-visible,
html[data-awariomierz-theme="dark"] .awm-button:hover,
html[data-awariomierz-theme="dark"] .awm-button:focus-visible,
.dark .awm-button:hover,
.dark .awm-button:focus-visible { border-color: #f8fafc; background: #f8fafc; color: #0f172a; }
html.dark .awm-view-switcher,
html[data-awariomierz-theme="dark"] .awm-view-switcher,
.dark .awm-view-switcher { border-color: #334155; background: rgba(2, 6, 23, .55); box-shadow: none; }
html.dark .awm-switch-button,
html[data-awariomierz-theme="dark"] .awm-switch-button,
.dark .awm-switch-button { color: #cbd5e1; }
html.dark .awm-switch-button.is-active,
html[data-awariomierz-theme="dark"] .awm-switch-button.is-active,
.dark .awm-switch-button.is-active { background: #f8fafc; color: #0f172a; }
html.dark .awm-location-filters select,
html[data-awariomierz-theme="dark"] .awm-location-filters select,
.dark .awm-location-filters select { border-color: #475569; background: #0f172a; color: #f8fafc; }
html.dark .awm-subservice,
html[data-awariomierz-theme="dark"] .awm-subservice,
.dark .awm-subservice { border-color: #334155; background: rgba(2, 6, 23, .5); }
html.dark .awm-history-toolbar,
html[data-awariomierz-theme="dark"] .awm-history-toolbar,
.dark .awm-history-toolbar { --awm-paper: #0f172a; --awm-ink: #f8fafc; border-color: #334155; background: #0f172a; color: #cbd5e1; }
html.dark .awm-history-heading strong,
html[data-awariomierz-theme="dark"] .awm-history-heading strong,
.dark .awm-history-heading strong { color: #f8fafc; }
html.dark .awm-history-heading span,
html[data-awariomierz-theme="dark"] .awm-history-heading span,
.dark .awm-history-heading span { color: #94a3b8; }

html.light .awm-help-backdrop,
html[data-awariomierz-theme="light"] .awm-help-backdrop { background: rgba(15, 23, 42, .34); }
html.light .awm-help-dialog,
html[data-awariomierz-theme="light"] .awm-help-dialog { border-color: #cbd5e1; background: #fff; color: #0f172a; box-shadow: 0 18px 44px rgba(15, 23, 42, .22); }
html.light .awm-help-head,
html[data-awariomierz-theme="light"] .awm-help-head { border-color: #e2e8f0; }
html.light .awm-help-close,
html[data-awariomierz-theme="light"] .awm-help-close { color: #64748b; }
html.light .awm-help-body p,
html[data-awariomierz-theme="light"] .awm-help-body p { color: #334155; }
html.light .awm-help-callout,
html[data-awariomierz-theme="light"] .awm-help-callout { border-color: #2563eb; background: #eff6ff; }
html.light .awm-help-callout strong,
html[data-awariomierz-theme="light"] .awm-help-callout strong { color: #1d4ed8; }
html.light .awm-help-factors li,
html[data-awariomierz-theme="light"] .awm-help-factors li,
html.light .awm-help-range,
html[data-awariomierz-theme="light"] .awm-help-range { border-color: #e2e8f0; background: #f8fafc; }
html.light .awm-help-factors span,
html[data-awariomierz-theme="light"] .awm-help-factors span,
html.light .awm-help-range span,
html[data-awariomierz-theme="light"] .awm-help-range span { color: #64748b; }

/* Compact presentation: keep the prototype hierarchy, but make the index
   fit beside the rest of the public site without forcing a long scroll. */
.awm-index-view { padding: 28px clamp(18px, 3.5vw, 48px) 30px; }
.awm-index-head { gap: 18px; padding-bottom: 18px; }
.awm-index-title { font-size: clamp(25px, 3.2vw, 38px); }
.awm-index-subtitle { margin-top: 6px; font-size: 13px; }
.awm-index-actions { gap: 7px; }
.awm-view-switcher { padding: 4px; }
.awm-switch-button { min-height: 34px; padding: 7px 10px; gap: 6px; font-size: 12px; }
.awm-switch-icon { width: 16px; height: 16px; }
.awm-help-button { min-height: 34px; padding: 7px 10px; font-size: 12px; }
.awm-index-main { grid-template-columns: minmax(190px, 30%) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); padding: 32px clamp(1px, 2.5vw, 30px) 28px; }
.awm-gauge { width: min(100%, 250px); }
.awm-gauge-score { font-size: clamp(54px, 7vw, 76px); }
.awm-status-badge { padding: 8px 13px; font-size: clamp(11px, 1.3vw, 14px); }
.awm-reading-kicker { margin-bottom: 10px; font-size: clamp(12px, 1.3vw, 15px); }
.awm-trend-line { gap: 6px; font-size: clamp(15px, 1.7vw, 20px); }
.awm-trend-line strong { font-size: clamp(19px, 2.2vw, 26px); }
.awm-trend-arrow { width: 21px; height: 21px; font-size: 25px; }
.awm-status-copy, .awm-index-summary { display: none !important; }
.awm-report-button { margin-top: 22px; padding: 10px 14px; font-size: 13px; }
.awm-location-filters { padding-top: 17px; gap: 10px; }
.awm-location-filters select { padding: 9px 25px 9px 10px; font-size: 13px; }
.awm-subservices { margin-top: 20px; padding-top: 17px; }
.awm-subservice { padding: 9px 11px; }
.awm-index-note { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 19px; padding-top: 17px; }
.awm-index-note p { flex: 1 1 auto; font-size: 12px; line-height: 1.4; }
.awm-index-footer-actions { display: contents; }
.awm-index-footer-actions .awm-help-button { flex: 0 0 auto; min-height: 32px; white-space: nowrap; }
.awm-history-toolbar { margin-bottom: 12px; padding: 9px 12px; font-size: 12px; }
.awm-history-heading { gap: 8px; }
.awm-history-heading strong { font-size: 14px; }
.awm-history-toolbar .awm-button { min-height: 32px; padding: 6px 9px; font-size: 12px; }
.awm-history-status { display: inline-flex; align-items: center; gap: 5px; color: #08a878; font-size: 11px; font-weight: 850; }
.awm-history-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.awm-history-status.warning { color: #d98b00; }
.awm-history-status.high { color: #ea5b12; }
.awm-history-status.critical { color: #d91648; }

/* The explainer is dark when the application is dark, even when the app
   stores its theme marker on body instead of html. */
body.dark .awm-help-backdrop,
body[data-awariomierz-theme="dark"] .awm-help-backdrop,
body[data-theme="dark"] .awm-help-backdrop,
html.dark .awm-help-backdrop,
html[data-awariomierz-theme="dark"] .awm-help-backdrop,
.dark .awm-help-backdrop { background: rgba(2, 6, 23, .82); }
body.dark .awm-help-dialog,
body[data-awariomierz-theme="dark"] .awm-help-dialog,
body[data-theme="dark"] .awm-help-dialog,
html.dark .awm-help-dialog,
html[data-awariomierz-theme="dark"] .awm-help-dialog,
.dark .awm-help-dialog { border-color: #526784; background: #0f172a; color: #f8fafc; box-shadow: 0 18px 44px rgba(0, 0, 0, .42); }
body.dark .awm-help-head,
body[data-awariomierz-theme="dark"] .awm-help-head,
body[data-theme="dark"] .awm-help-head,
html.dark .awm-help-head,
html[data-awariomierz-theme="dark"] .awm-help-head,
.dark .awm-help-head { border-color: #263650; }
body.dark .awm-help-close,
body[data-awariomierz-theme="dark"] .awm-help-close,
body[data-theme="dark"] .awm-help-close,
html.dark .awm-help-close,
html[data-awariomierz-theme="dark"] .awm-help-close,
.dark .awm-help-close { color: #91a2bd; }
body.dark .awm-help-body p,
body[data-awariomierz-theme="dark"] .awm-help-body p,
body[data-theme="dark"] .awm-help-body p,
html.dark .awm-help-body p,
html[data-awariomierz-theme="dark"] .awm-help-body p,
.dark .awm-help-body p { color: #c7d2e3; }
body.dark .awm-help-factors li,
body[data-awariomierz-theme="dark"] .awm-help-factors li,
body[data-theme="dark"] .awm-help-factors li,
html.dark .awm-help-factors li,
html[data-awariomierz-theme="dark"] .awm-help-factors li,
.dark .awm-help-factors li,
body.dark .awm-help-range,
body[data-awariomierz-theme="dark"] .awm-help-range,
body[data-theme="dark"] .awm-help-range,
html.dark .awm-help-range,
html[data-awariomierz-theme="dark"] .awm-help-range,
.dark .awm-help-range { border-color: #263650; background: #020617; }

/* Explicit light markers are used instead of the old “no dark class” rule;
   that rule made a dark body inherit a light dialog. */
body.light .awm-help-backdrop,
body[data-awariomierz-theme="light"] .awm-help-backdrop,
body[data-theme="light"] .awm-help-backdrop,
html.light .awm-help-backdrop,
html[data-awariomierz-theme="light"] .awm-help-backdrop { background: rgba(15, 23, 42, .34); }
body.light .awm-help-dialog,
body[data-awariomierz-theme="light"] .awm-help-dialog,
body[data-theme="light"] .awm-help-dialog,
html.light .awm-help-dialog,
html[data-awariomierz-theme="light"] .awm-help-dialog { border-color: #cbd5e1; background: #fff; color: #0f172a; box-shadow: 0 18px 44px rgba(15, 23, 42, .22); }
body.light .awm-help-head,
body[data-awariomierz-theme="light"] .awm-help-head,
body[data-theme="light"] .awm-help-head,
html.light .awm-help-head,
html[data-awariomierz-theme="light"] .awm-help-head { border-color: #e2e8f0; }
body.light .awm-help-close,
body[data-awariomierz-theme="light"] .awm-help-close,
body[data-theme="light"] .awm-help-close,
html.light .awm-help-close,
html[data-awariomierz-theme="light"] .awm-help-close { color: #64748b; }
body.light .awm-help-body p,
body[data-awariomierz-theme="light"] .awm-help-body p,
body[data-theme="light"] .awm-help-body p,
html.light .awm-help-body p,
html[data-awariomierz-theme="light"] .awm-help-body p { color: #334155; }
body.light .awm-help-factors li,
body[data-awariomierz-theme="light"] .awm-help-factors li,
body[data-theme="light"] .awm-help-factors li,
html.light .awm-help-factors li,
html[data-awariomierz-theme="light"] .awm-help-factors li,
body.light .awm-help-range,
body[data-awariomierz-theme="light"] .awm-help-range,
body[data-theme="light"] .awm-help-range,
html.light .awm-help-range,
html[data-awariomierz-theme="light"] .awm-help-range { border-color: #e2e8f0; background: #f8fafc; }
body.light .awm-help-range:nth-child(1), body[data-awariomierz-theme="light"] .awm-help-range:nth-child(1), html.light .awm-help-range:nth-child(1) { border-top-color: #10a878; }
body.light .awm-help-range:nth-child(2), body[data-awariomierz-theme="light"] .awm-help-range:nth-child(2), html.light .awm-help-range:nth-child(2) { border-top-color: #e29a0a; }
body.light .awm-help-range:nth-child(3), body[data-awariomierz-theme="light"] .awm-help-range:nth-child(3), html.light .awm-help-range:nth-child(3) { border-top-color: #ed671f; }
body.light .awm-help-range:nth-child(4), body[data-awariomierz-theme="light"] .awm-help-range:nth-child(4), html.light .awm-help-range:nth-child(4) { border-top-color: #e83b5e; }
body.light .awm-help-range:nth-child(5), body[data-awariomierz-theme="light"] .awm-help-range:nth-child(5), html.light .awm-help-range:nth-child(5) { border-top-color: #c91645; }

body.dark .awm-help-range:nth-child(1), body[data-awariomierz-theme="dark"] .awm-help-range:nth-child(1), html.dark .awm-help-range:nth-child(1), .dark .awm-help-range:nth-child(1) { border-top-color: #10c58b !important; }
body.dark .awm-help-range:nth-child(2), body[data-awariomierz-theme="dark"] .awm-help-range:nth-child(2), html.dark .awm-help-range:nth-child(2), .dark .awm-help-range:nth-child(2) { border-top-color: #f5a313 !important; }
body.dark .awm-help-range:nth-child(3), body[data-awariomierz-theme="dark"] .awm-help-range:nth-child(3), html.dark .awm-help-range:nth-child(3), .dark .awm-help-range:nth-child(3) { border-top-color: #ff7621 !important; }
body.dark .awm-help-range:nth-child(4), body[data-awariomierz-theme="dark"] .awm-help-range:nth-child(4), html.dark .awm-help-range:nth-child(4), .dark .awm-help-range:nth-child(4) { border-top-color: #f23d61 !important; }
body.dark .awm-help-range:nth-child(5), body[data-awariomierz-theme="dark"] .awm-help-range:nth-child(5), html.dark .awm-help-range:nth-child(5), .dark .awm-help-range:nth-child(5) { border-top-color: #d91648 !important; }

/* Placement-level sunsetting controls. These selectors deliberately target
   existing status nodes only; the Awariomierz index and graph remain. */
body.awm-hide-legacy-home .national-status-badge,
body.awm-hide-legacy-home .home-stat-reports,
body.awm-hide-legacy-home .home-stat-active,
body.awm-hide-legacy-home .home-summary-reports,
body.awm-hide-legacy-home .home-summary-outages,
body.awm-hide-legacy-home .home-service [data-awariomierz-status],
body.awm-hide-legacy-home .critical-service [data-awariomierz-status],
body.awm-hide-legacy-category [data-awariomierz-summary-status],
body.awm-hide-legacy-category .group-chart-status,
body.awm-hide-legacy-category .category-service-card > header > strong,
body.awm-hide-legacy-region [data-awariomierz-summary-status],
body.awm-hide-legacy-region .location-summary-status > strong,
body.awm-hide-legacy-region .regional-status-dot,
body.awm-hide-legacy-region .public-hero > .status,
body.awm-hide-legacy-city [data-awariomierz-summary-status],
body.awm-hide-legacy-city .public-hero > .status,
body.awm-hide-legacy-district [data-awariomierz-summary-status],
body.awm-hide-legacy-district .public-hero > .status,
body.awm-hide-legacy-service .service-status-badge,
body.awm-hide-legacy-service .service-server-actions .status,
body.awm-hide-legacy-service .service-page-status,
body.awm-hide-legacy-cards .national-status-badge,
body.awm-hide-legacy-cards [data-awariomierz-summary-status],
body.awm-hide-legacy-cards .home-summary small,
body.awm-hide-legacy-cards .home-service [data-awariomierz-status],
body.awm-hide-legacy-cards .critical-service [data-awariomierz-status],
body.awm-hide-legacy-cards .regional-status-dot { display: none !important; }

@media (max-width: 680px) {
  .awm-index-view { padding: 22px 17px 25px; }
  .awm-index-main { grid-template-columns: 1fr; gap: 22px; padding: 27px 0 24px; }
  .awm-gauge { max-width: 220px; }
  .awm-index-note { align-items: flex-start; flex-direction: column; gap: 10px; }
  .awm-index-footer-actions { display: flex; align-self: flex-end; margin-top: 0; }
  .awm-help-button { width: fit-content; }
  .awm-history-heading { flex-wrap: wrap; }
}

/* Release 20260913-18: the public module is one compact frame. The previous
   attempt put a large minimum height on the React host, which left an empty
   paper area below both tabs. Let the content own its height and use only a
   modest shared minimum so the two states feel like one component. */
.awm-chart-host.awm-index-active,
.awm-chart-host.awm-history-active {
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
}
.awm-chart-host.awm-index-active {
  padding: 20px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.awm-chart-host.awm-index-active > .awm-index-view {
  min-height: clamp(500px, 38vw, 620px);
}
.awm-chart-host.awm-history-active {
  /* The index view owns 40–46px of outer padding around its inner frame.
     Match that same outer height in history so switching views does not
     resize the tile or create a second visual language. */
  min-height: calc(clamp(500px, 38vw, 620px) + 46px) !important;
  padding: 22px !important;
  border: 2px solid var(--awm-border, #f4ad29) !important;
  background: var(--awm-paper, #f7f3eb) !important;
  box-shadow: none !important;
}
.awm-chart-host.awm-history-active > .awm-index-view {
  min-height: 0 !important;
}
.awm-chart-host.awm-history-active > .mt-4,
.awm-chart-host.awm-history-active > .awm-ssr-history,
.awm-chart-host.awm-history-active > .graph-watermark-wrap {
  margin-top: 0 !important;
}
.awm-chart-host.awm-index-active > .national-status-heading,
.awm-chart-host.awm-index-active > .national-status-meta,
.awm-chart-host.awm-history-active > .national-status-heading,
.awm-chart-host.awm-history-active > .national-status-meta,
.awm-chart-host.awm-history-active > .group-chart-title {
  display: none !important;
}

.awm-index-main.has-index-ad {
  grid-template-columns: 250px minmax(220px, 1fr) minmax(260px, 1.1fr);
  gap: clamp(22px, 3vw, 54px);
  align-items: center;
}
.awm-index-ad-slot {
  width: 250px;
  min-width: 250px;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #d9dee7;
  background: #fff;
  color: #111827;
}
.awm-index-ad-slot[hidden] { display: none !important; }
.awm-index-ad-slot iframe { display: block; width: 250px; height: 250px; border: 0; }
.awm-index-ad-html { width: 100%; min-height: 250px; display: flex; align-items: center; justify-content: center; }
.awm-chart-host.awm-history-active .group-chart-layout,
.awm-chart-host.awm-history-active .group-chart-main,
.awm-chart-host.awm-history-active .awm-ssr-history { min-width: 0; }
.awm-chart-host.awm-history-active .group-chart-layout > .group-chart-ad,
.awm-chart-host.awm-history-active [data-awm-history-ad] { align-self: end !important; }

@media (max-width: 1100px) {
  .awm-index-main.has-index-ad { grid-template-columns: 220px minmax(190px, 1fr) minmax(220px, 1fr); gap: 20px; }
  .awm-index-ad-slot { width: 220px; min-width: 220px; }
  .awm-index-ad-slot iframe { width: 220px; }
}
@media (max-width: 820px) {
  .awm-index-main.has-index-ad { grid-template-columns: 1fr 1fr; }
  .awm-index-main.has-index-ad .awm-index-ad-slot { grid-column: 1 / -1; justify-self: center; }
}
@media (max-width: 680px) {
  .awm-chart-host.awm-index-active { padding: 12px !important; }
  .awm-chart-host.awm-history-active { padding: 14px !important; }
  .awm-chart-host.awm-index-active > .awm-index-view,
  .awm-chart-host.awm-history-active { min-height: 0 !important; }
  .awm-index-main.has-index-ad { grid-template-columns: 1fr; }
  .awm-index-main.has-index-ad .awm-index-ad-slot { grid-column: auto; grid-row: 1; justify-self: center; }
}

/* Release 20260913-18: index and history are two contents of one public
   module. Keep the frame, header, title, and switch geometry identical; only
   the gauge body or historical chart is allowed to change. */
.awm-chart-host.awm-index-active,
.awm-chart-host.awm-history-active {
  box-sizing: border-box !important;
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
  padding: 22px !important;
  border: 2px solid var(--awm-border, #f4ad29) !important;
  background: var(--awm-paper, #f7f3eb) !important;
  color: var(--awm-ink, #171717) !important;
  box-shadow: none !important;
}
.awm-chart-host.awm-index-active > .awm-index-view,
.awm-chart-host.awm-history-active > .awm-index-view {
  box-sizing: border-box !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
.awm-chart-host.awm-index-active > .awm-index-view .awm-index-head,
.awm-chart-host.awm-history-active > .awm-index-view .awm-index-head {
  padding-bottom: 18px !important;
  border-bottom: 1px solid var(--awm-rule) !important;
}
.awm-chart-host.awm-index-active > .awm-index-view .awm-index-title,
.awm-chart-host.awm-history-active > .awm-index-view .awm-index-title {
  font-size: clamp(25px, 3.2vw, 38px) !important;
  letter-spacing: -.045em !important;
}
.awm-chart-host.awm-index-active > .awm-index-view .awm-view-switcher,
.awm-chart-host.awm-history-active > .awm-index-view .awm-view-switcher {
  width: 348px !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
.awm-chart-host.awm-index-active > .awm-index-view .awm-view-switcher .awm-switch-button,
.awm-chart-host.awm-history-active > .awm-index-view .awm-view-switcher .awm-switch-button {
  flex: 1 1 0 !important;
}
.awm-chart-host.awm-index-active > .awm-index-view .awm-index-body {
  display: block !important;
}
.awm-chart-host.awm-history-active > .awm-index-view .awm-index-body {
  display: none !important;
}
.awm-chart-host.awm-index-active > .awm-index-view .awm-index-main {
  padding: clamp(34px, 5vw, 60px) clamp(1px, 2.5vw, 30px) clamp(28px, 4vw, 44px) !important;
}
.awm-chart-host.awm-index-active > .awm-index-view .awm-index-note {
  margin-top: 0 !important;
  padding-top: 17px !important;
}
.awm-chart-host.awm-index-active > .awm-index-view .awm-index-footer-actions {
  margin-top: 0 !important;
}
.awm-chart-host.awm-history-active > .awm-index-view {
  margin-bottom: 18px !important;
  padding-bottom: 18px !important;
  border-bottom: 0 !important;
}
.awm-chart-host.awm-history-active > .awm-index-view > .awm-index-note { display: none !important; }
.awm-service-hero-detached .awm-service-graph-block { display: none !important; }
.awm-chart-host.awm-index-active > .awm-service-filter-host,
.awm-chart-host.awm-history-active > .awm-service-filter-host {
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  margin-top: 18px !important;
}
.awm-chart-host.awm-history-active > .awm-index-view .awm-index-actions {
  justify-content: flex-end;
}
.awm-chart-host.awm-index-active > .national-status-heading,
.awm-chart-host.awm-index-active > .national-status-header,
.awm-chart-host.awm-index-active > .national-status-meta,
.awm-chart-host.awm-index-active > .group-chart-title,
.awm-chart-host.awm-history-active > .national-status-heading,
.awm-chart-host.awm-history-active > .national-status-header,
.awm-chart-host.awm-history-active > .national-status-meta,
.awm-chart-host.awm-history-active > .group-chart-title {
  display: none !important;
}
.awm-chart-host.awm-history-active > .mt-4,
.awm-chart-host.awm-history-active > .awm-ssr-history,
.awm-chart-host.awm-history-active > .graph-watermark-wrap,
.awm-chart-host.awm-history-active .group-chart-main,
.awm-chart-host.awm-history-active .section-heading {
  margin-top: 0 !important;
}
.awm-chart-host.awm-history-active .awm-ssr-history-chart,
.awm-chart-host.awm-history-active .awm-ssr-history-svg,
.awm-chart-host.awm-history-active .chart,
.awm-chart-host.awm-history-active .national-chart,
.awm-chart-host.awm-history-active .group-chart-svg {
  min-height: 0 !important;
  height: clamp(255px, 24vw, 303px) !important;
}
.awm-chart-host.awm-history-active .awm-ssr-history-svg,
.awm-chart-host.awm-history-active .chart,
.awm-chart-host.awm-history-active .national-chart,
.awm-chart-host.awm-history-active .group-chart-svg {
  height: clamp(255px, 24vw, 303px) !important;
}
.awm-chart-host.awm-history-active .group-chart-layout,
.awm-chart-host.awm-history-active .group-chart-main,
.awm-chart-host.awm-history-active .awm-ssr-history {
  min-width: 0 !important;
}
.awm-chart-host.awm-history-active .group-chart-layout > .group-chart-ad,
.awm-chart-host.awm-history-active [data-awm-history-ad] {
  align-self: end !important;
}

/* Explicit light selectors come last so a stale dark class cannot repaint a
   light-mode frame during the theme switch. */
html.dark .awm-chart-host.awm-index-active,
html.dark .awm-chart-host.awm-history-active,
html.dark .awm-chart-host.awm-data-only,
html[data-awariomierz-theme="dark"] .awm-chart-host.awm-index-active,
html[data-awariomierz-theme="dark"] .awm-chart-host.awm-history-active,
html[data-awariomierz-theme="dark"] .awm-chart-host.awm-data-only,
body.dark .awm-chart-host.awm-index-active,
body.dark .awm-chart-host.awm-history-active,
body.dark .awm-chart-host.awm-data-only,
body[data-awariomierz-theme="dark"] .awm-chart-host.awm-index-active,
body[data-awariomierz-theme="dark"] .awm-chart-host.awm-history-active,
body[data-awariomierz-theme="dark"] .awm-chart-host.awm-data-only,
.dark .awm-chart-host.awm-index-active,
.dark .awm-chart-host.awm-history-active,
.dark .awm-chart-host.awm-data-only {
  --awm-paper: #0f172a !important;
  --awm-ink: #f8fafc !important;
  --awm-muted: #94a3b8 !important;
  --awm-rule: #263650 !important;
  --awm-border: #334155 !important;
  background: #0f172a !important;
  color: #f8fafc !important;
}
html[data-awariomierz-theme="light"] .awm-chart-host.awm-index-active,
html[data-awariomierz-theme="light"] .awm-chart-host.awm-history-active,
html[data-awariomierz-theme="light"] .awm-chart-host.awm-data-only,
body[data-awariomierz-theme="light"] .awm-chart-host.awm-index-active,
body[data-awariomierz-theme="light"] .awm-chart-host.awm-history-active,
body[data-awariomierz-theme="light"] .awm-chart-host.awm-data-only,
html.light .awm-chart-host.awm-index-active,
html.light .awm-chart-host.awm-history-active,
html.light .awm-chart-host.awm-data-only,
body.light .awm-chart-host.awm-index-active,
body.light .awm-chart-host.awm-history-active,
body.light .awm-chart-host.awm-data-only {
  --awm-paper: #f7f3eb !important;
  --awm-ink: #171717 !important;
  --awm-muted: #777777 !important;
  --awm-rule: #dedbd4 !important;
  --awm-border: #f4ad29 !important;
  background: #f7f3eb !important;
  color: #171717 !important;
}
html[data-awariomierz-theme="light"] .awm-index-view,
body[data-awariomierz-theme="light"] .awm-index-view,
html.light .awm-index-view,
body.light .awm-index-view {
  --awm-paper: #f7f3eb !important;
  --awm-ink: #171717 !important;
  --awm-muted: #777777 !important;
  --awm-rule: #dedbd4 !important;
  --awm-border: #f4ad29 !important;
  background: transparent !important;
  color: #171717 !important;
}
html[data-awariomierz-theme="light"] .awm-gauge-track,
body[data-awariomierz-theme="light"] .awm-gauge-track,
html.light .awm-gauge-track,
body.light .awm-gauge-track { stroke: #dce1df !important; }
html[data-awariomierz-theme="light"] .awm-view-switcher,
body[data-awariomierz-theme="light"] .awm-view-switcher,
html.light .awm-view-switcher,
body.light .awm-view-switcher { border-color: #d0cfcb !important; background: rgba(255,255,255,.38) !important; }
html[data-awariomierz-theme="light"] .awm-switch-button,
body[data-awariomierz-theme="light"] .awm-switch-button,
html.light .awm-switch-button,
body.light .awm-switch-button { color: #606060 !important; }
html[data-awariomierz-theme="light"] .awm-switch-button.is-active,
body[data-awariomierz-theme="light"] .awm-switch-button.is-active,
html.light .awm-switch-button.is-active,
body.light .awm-switch-button.is-active { background: #171717 !important; color: #fff !important; }
html[data-awariomierz-theme="light"] .awm-help-dialog,
body[data-awariomierz-theme="light"] .awm-help-dialog,
html.light .awm-help-dialog,
body.light .awm-help-dialog { background: #fff !important; color: #0f172a !important; }

html.dark .awm-index-ad-slot,
html[data-awariomierz-theme="dark"] .awm-index-ad-slot,
body.dark .awm-index-ad-slot,
body[data-awariomierz-theme="dark"] .awm-index-ad-slot,
.dark .awm-index-ad-slot { border-color: #334155 !important; background: #020617 !important; color: #f8fafc !important; }
html[data-awariomierz-theme="light"] .awm-index-ad-slot,
body[data-awariomierz-theme="light"] .awm-index-ad-slot,
html.light .awm-index-ad-slot,
body.light .awm-index-ad-slot { border-color: #d9dee7 !important; background: #fff !important; color: #111827 !important; }

@media (max-width: 680px) {
  .awm-chart-host.awm-index-active,
  .awm-chart-host.awm-history-active { padding: 14px !important; }
  .awm-chart-host.awm-index-active > .awm-index-view .awm-index-head,
  .awm-chart-host.awm-history-active > .awm-index-view .awm-index-head { padding-bottom: 16px !important; }
  .awm-chart-host.awm-index-active > .awm-index-view .awm-view-switcher,
  .awm-chart-host.awm-history-active > .awm-index-view .awm-view-switcher { width: 100% !important; }
  .awm-chart-host.awm-index-active > .awm-index-view .awm-index-main { padding: 30px 0 26px !important; }
  .awm-chart-host.awm-history-active > .awm-index-view { margin-bottom: 14px !important; padding-bottom: 14px !important; }
}

/* Regional React pages nest the legacy graph inside the hero card. Once the
   host is moved beside that card, the index tab owns its own paper frame just
   like the category-page host; history mode keeps the shared parent frame. */
.awm-chart-host.awm-regional-detached.awm-index-active {
  box-sizing: border-box !important;
  margin-top: 18px !important;
  padding: 22px !important;
  border: 2px solid var(--awm-border, #f4ad29) !important;
  background: var(--awm-paper, #f7f3eb) !important;
  color: var(--awm-ink, #171717) !important;
}
.awm-chart-host.awm-regional-detached.awm-history-active {
  margin-top: 18px !important;
}
.awm-regional-hero-detached > .awm-chart-host.regional-index-host {
  display: none !important;
}
@media (max-width: 680px) {
  .awm-chart-host.awm-regional-detached.awm-index-active { padding: 14px !important; }
}

/* Service pages keep the native location selector as the shared filter dock
   for both tabs. The first release hid every non-index direct child in index
   mode; repeat that selector here with the same specificity so the dock is
   visible in either state and remains a single desktop row. */
.awm-chart-host.awm-index-active > :not(.awm-index-view):not(.awm-history-toolbar).awm-service-filter-host,
.awm-chart-host.awm-history-active > :not(.awm-index-view):not(.awm-history-toolbar).awm-service-filter-host {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
  align-items: end !important;
  box-sizing: border-box !important;
  width: 100% !important;
  margin: 18px 0 0 !important;
  padding: 12px !important;
  border: 1px solid var(--awm-rule, #dedbd4) !important;
  background: transparent !important;
}
.awm-chart-host.awm-index-active > :not(.awm-index-view):not(.awm-history-toolbar).awm-service-filter-host > label,
.awm-chart-host.awm-history-active > :not(.awm-index-view):not(.awm-history-toolbar).awm-service-filter-host > label {
  display: grid !important;
  gap: 5px !important;
  min-width: 0 !important;
  color: var(--awm-muted, #777) !important;
  font-size: 10px !important;
  font-weight: 850 !important;
  letter-spacing: .13em !important;
  line-height: 1.2 !important;
  text-transform: uppercase !important;
}
.awm-chart-host.awm-index-active > :not(.awm-index-view):not(.awm-history-toolbar).awm-service-filter-host > label > div,
.awm-chart-host.awm-history-active > :not(.awm-index-view):not(.awm-history-toolbar).awm-service-filter-host > label > div {
  width: 100% !important;
  min-width: 0 !important;
  margin-top: 0 !important;
}
.awm-chart-host.awm-index-active > :not(.awm-index-view):not(.awm-history-toolbar).awm-service-filter-host select,
.awm-chart-host.awm-history-active > :not(.awm-index-view):not(.awm-history-toolbar).awm-service-filter-host select {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  min-height: 39px !important;
  padding: 9px 28px 9px 10px !important;
  border: 1px solid #c9c7c1 !important;
  border-radius: 0 !important;
  background: var(--awm-paper, #f7f3eb) !important;
  color: var(--awm-ink, #171717) !important;
  font: inherit !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}
@media (max-width: 680px) {
  .awm-chart-host.awm-index-active > :not(.awm-index-view):not(.awm-history-toolbar).awm-service-filter-host,
  .awm-chart-host.awm-history-active > :not(.awm-index-view):not(.awm-history-toolbar).awm-service-filter-host {
    grid-template-columns: 1fr !important;
  }
}

/* When the indicator is disabled, service pages keep the history/data frame
   but render only the native graph. Remove the React utility margin so the
   graph begins at the same inset as the existing Dane awariomierza view. */
.awm-chart-host.awm-data-only > .awm-service-graph-block,
.awm-chart-host.awm-data-only > .mt-6,
.awm-chart-host.awm-data-only > .mt-4 {
  margin-top: 0 !important;
}
.awm-chart-host.awm-data-only {
  margin-top: 18px !important;
}

/* Theme state is mirrored onto each graph host by awariomierz-index.js. This
   gives legacy graphs a deterministic trigger even while React is changing
   html/body classes during a route transition. */
.awm-chart-host.awm-theme-dark.awm-index-active,
.awm-chart-host.awm-theme-dark.awm-history-active,
.awm-chart-host.awm-theme-dark.awm-data-only {
  --awm-paper: #0f172a !important;
  --awm-ink: #f8fafc !important;
  --awm-muted: #94a3b8 !important;
  --awm-rule: #263650 !important;
  --awm-border: #334155 !important;
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}
.awm-chart-host.awm-theme-light.awm-index-active,
.awm-chart-host.awm-theme-light.awm-history-active,
.awm-chart-host.awm-theme-light.awm-data-only {
  --awm-paper: #f7f3eb !important;
  --awm-ink: #171717 !important;
  --awm-muted: #777777 !important;
  --awm-rule: #dedbd4 !important;
  --awm-border: #f4ad29 !important;
  background: #f7f3eb !important;
  border-color: #f4ad29 !important;
  color: #171717 !important;
}
.awm-chart-host.awm-theme-dark .chart,
.awm-chart-host.awm-theme-dark .national-chart,
.awm-chart-host.awm-theme-dark .group-chart-svg,
.awm-chart-host.awm-theme-dark .awm-ssr-history-svg {
  background: #020617 !important;
  border-color: #1e293b !important;
}
.awm-chart-host.awm-theme-light .chart,
.awm-chart-host.awm-theme-light .national-chart,
.awm-chart-host.awm-theme-light .group-chart-svg,
.awm-chart-host.awm-theme-light .awm-ssr-history-svg {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}
.awm-chart-host.awm-theme-dark .chart .axis,
.awm-chart-host.awm-theme-dark .chart .grid,
.awm-chart-host.awm-theme-dark .chart .threshold,
.awm-chart-host.awm-theme-dark .national-chart .axis,
.awm-chart-host.awm-theme-dark .national-chart .grid,
.awm-chart-host.awm-theme-dark .national-chart .threshold,
.awm-chart-host.awm-theme-dark .group-chart-svg .axis,
.awm-chart-host.awm-theme-dark .group-chart-svg .grid,
.awm-chart-host.awm-theme-dark .group-chart-svg .threshold { stroke: #64748b !important; }
.awm-chart-host.awm-theme-light .chart .axis,
.awm-chart-host.awm-theme-light .national-chart .axis,
.awm-chart-host.awm-theme-light .group-chart-svg .axis { stroke: #cbd5e1 !important; }
.awm-chart-host.awm-theme-light .chart .grid,
.awm-chart-host.awm-theme-light .national-chart .grid,
.awm-chart-host.awm-theme-light .group-chart-svg .grid { stroke: #e2e8f0 !important; }
.awm-chart-host.awm-theme-light .chart .threshold,
.awm-chart-host.awm-theme-light .national-chart .threshold,
.awm-chart-host.awm-theme-light .group-chart-svg .threshold { stroke: #94a3b8 !important; }
.awm-chart-host.awm-theme-dark .section-heading h2,
.awm-chart-host.awm-theme-dark .group-chart-title h2 { color: #f8fafc !important; }
.awm-chart-host.awm-theme-dark .section-heading p,
.awm-chart-host.awm-theme-dark .group-chart-axis,
.awm-chart-host.awm-theme-dark .group-chart-title { color: #94a3b8 !important; }

.awm-chart-host.awm-index-active,
.awm-chart-host.awm-history-active,
.awm-chart-host.awm-data-only,
.awm-chart-host.awm-index-active .chart,
.awm-chart-host.awm-history-active .chart,
.awm-chart-host.awm-data-only .chart,
.awm-chart-host.awm-index-active .national-chart,
.awm-chart-host.awm-history-active .national-chart,
.awm-chart-host.awm-data-only .national-chart,
.awm-chart-host.awm-index-active .group-chart-svg,
.awm-chart-host.awm-history-active .group-chart-svg,
.awm-chart-host.awm-data-only .group-chart-svg {
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

/* Data-only mode has no generated index heading to replace the native one. */
.awm-chart-host.awm-data-only > .group-chart-title,
.awm-chart-host.awm-data-only > .national-status-heading,
.awm-chart-host.awm-data-only > .national-status-header,
.awm-chart-host.awm-data-only > .national-status-meta { display: flex !important; }
.awm-chart-host.awm-data-only[aria-labelledby="national-status-title"] { margin-top: 0 !important; }

/* Final cascade guard: the page theme is authoritative over a host marker
   during the brief React route/theme reconciliation window. */
html.dark .awm-chart-host.awm-index-active,
html.dark .awm-chart-host.awm-history-active,
html.dark .awm-chart-host.awm-data-only,
html[data-awariomierz-theme="dark"] .awm-chart-host.awm-index-active,
html[data-awariomierz-theme="dark"] .awm-chart-host.awm-history-active,
html[data-awariomierz-theme="dark"] .awm-chart-host.awm-data-only {
  --awm-paper: #0f172a !important;
  --awm-ink: #f8fafc !important;
  --awm-muted: #94a3b8 !important;
  --awm-rule: #263650 !important;
  --awm-border: #334155 !important;
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}
html.light .awm-chart-host.awm-index-active,
html.light .awm-chart-host.awm-history-active,
html.light .awm-chart-host.awm-data-only,
html[data-awariomierz-theme="light"] .awm-chart-host.awm-index-active,
html[data-awariomierz-theme="light"] .awm-chart-host.awm-history-active,
html[data-awariomierz-theme="light"] .awm-chart-host.awm-data-only {
  --awm-paper: #f7f3eb !important;
  --awm-ink: #171717 !important;
  --awm-muted: #777777 !important;
  --awm-rule: #dedbd4 !important;
  --awm-border: #f4ad29 !important;
  background: #f7f3eb !important;
  border-color: #f4ad29 !important;
  color: #171717 !important;
}
html.dark .awm-chart-host .chart,
html.dark .awm-chart-host .national-chart,
html.dark .awm-chart-host .group-chart-svg,
html[data-awariomierz-theme="dark"] .awm-chart-host .chart,
html[data-awariomierz-theme="dark"] .awm-chart-host .national-chart,
html[data-awariomierz-theme="dark"] .awm-chart-host .group-chart-svg { background: #020617 !important; border-color: #1e293b !important; }
html.light .awm-chart-host .chart,
html.light .awm-chart-host .national-chart,
html.light .awm-chart-host .group-chart-svg,
html[data-awariomierz-theme="light"] .awm-chart-host .chart,
html[data-awariomierz-theme="light"] .awm-chart-host .national-chart,
html[data-awariomierz-theme="light"] .awm-chart-host .group-chart-svg { background: #f8fafc !important; border-color: #e2e8f0 !important; }
html.light .awm-chart-host .section-heading h2,
html.light .awm-chart-host .group-chart-title h2,
html[data-awariomierz-theme="light"] .awm-chart-host .section-heading h2,
html[data-awariomierz-theme="light"] .awm-chart-host .group-chart-title h2 { color: #171717 !important; }
html.light .awm-chart-host .section-heading p,
html.light .awm-chart-host .group-chart-axis,
html.light .awm-chart-host .group-chart-title,
html[data-awariomierz-theme="light"] .awm-chart-host .section-heading p,
html[data-awariomierz-theme="light"] .awm-chart-host .group-chart-axis,
html[data-awariomierz-theme="light"] .awm-chart-host .group-chart-title { color: #777 !important; }
html.dark .awm-chart-host .chart .axis,
html.dark .awm-chart-host .chart .grid,
html.dark .awm-chart-host .chart .threshold,
html.dark .awm-chart-host .national-chart .axis,
html.dark .awm-chart-host .national-chart .grid,
html.dark .awm-chart-host .national-chart .threshold,
html.dark .awm-chart-host .group-chart-svg .axis,
html.dark .awm-chart-host .group-chart-svg .grid,
html.dark .awm-chart-host .group-chart-svg .threshold,
html[data-awariomierz-theme="dark"] .awm-chart-host .chart .axis,
html[data-awariomierz-theme="dark"] .awm-chart-host .chart .grid,
html[data-awariomierz-theme="dark"] .awm-chart-host .chart .threshold,
html[data-awariomierz-theme="dark"] .awm-chart-host .national-chart .axis,
html[data-awariomierz-theme="dark"] .awm-chart-host .national-chart .grid,
html[data-awariomierz-theme="dark"] .awm-chart-host .national-chart .threshold,
html[data-awariomierz-theme="dark"] .awm-chart-host .group-chart-svg .axis,
html[data-awariomierz-theme="dark"] .awm-chart-host .group-chart-svg .grid,
html[data-awariomierz-theme="dark"] .awm-chart-host .group-chart-svg .threshold { stroke: #64748b !important; }
html.light .awm-chart-host .chart .axis,
html.light .awm-chart-host .national-chart .axis,
html.light .awm-chart-host .group-chart-svg .axis,
html[data-awariomierz-theme="light"] .awm-chart-host .chart .axis,
html[data-awariomierz-theme="light"] .awm-chart-host .national-chart .axis,
html[data-awariomierz-theme="light"] .awm-chart-host .group-chart-svg .axis { stroke: #cbd5e1 !important; }
html.light .awm-chart-host .chart .grid,
html.light .awm-chart-host .national-chart .grid,
html.light .awm-chart-host .group-chart-svg .grid,
html[data-awariomierz-theme="light"] .awm-chart-host .chart .grid,
html[data-awariomierz-theme="light"] .awm-chart-host .national-chart .grid,
html[data-awariomierz-theme="light"] .awm-chart-host .group-chart-svg .grid { stroke: #e2e8f0 !important; }
html.light .awm-chart-host .chart .threshold,
html.light .awm-chart-host .national-chart .threshold,
html.light .awm-chart-host .group-chart-svg .threshold,
html[data-awariomierz-theme="light"] .awm-chart-host .chart .threshold,
html[data-awariomierz-theme="light"] .awm-chart-host .national-chart .threshold,
html[data-awariomierz-theme="light"] .awm-chart-host .group-chart-svg .threshold { stroke: #94a3b8 !important; }

/* Host-scoped theme is synchronized from the live React page wrapper. Keep
   these selectors last so graph styling does not depend on html/body state. */
html .awm-chart-host.awm-theme-dark.awm-index-active,
html .awm-chart-host.awm-theme-dark.awm-history-active,
html .awm-chart-host.awm-theme-dark.awm-data-only {
  --awm-paper: #0f172a !important;
  --awm-ink: #f8fafc !important;
  --awm-muted: #94a3b8 !important;
  --awm-rule: #263650 !important;
  --awm-border: #334155 !important;
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}
html .awm-chart-host.awm-theme-light.awm-index-active,
html .awm-chart-host.awm-theme-light.awm-history-active,
html .awm-chart-host.awm-theme-light.awm-data-only {
  --awm-paper: #f7f3eb !important;
  --awm-ink: #171717 !important;
  --awm-muted: #777777 !important;
  --awm-rule: #dedbd4 !important;
  --awm-border: #f4ad29 !important;
  background: #f7f3eb !important;
  border-color: #f4ad29 !important;
  color: #171717 !important;
}
html .awm-chart-host.awm-theme-dark .chart,
html .awm-chart-host.awm-theme-dark .national-chart,
html .awm-chart-host.awm-theme-dark .group-chart-svg { background: #020617 !important; border-color: #1e293b !important; }
html .awm-chart-host.awm-theme-light .chart,
html .awm-chart-host.awm-theme-light .national-chart,
html .awm-chart-host.awm-theme-light .group-chart-svg { background: #f8fafc !important; border-color: #e2e8f0 !important; }
html .awm-chart-host.awm-theme-dark .section-heading h2,
html .awm-chart-host.awm-theme-dark .group-chart-title h2 { color: #f8fafc !important; }
html .awm-chart-host.awm-theme-dark .section-heading p,
html .awm-chart-host.awm-theme-dark .group-chart-axis,
html .awm-chart-host.awm-theme-dark .group-chart-title { color: #94a3b8 !important; }
html .awm-chart-host.awm-theme-light .section-heading h2,
html .awm-chart-host.awm-theme-light .group-chart-title h2 { color: #171717 !important; }
html .awm-chart-host.awm-theme-light .section-heading p,
html .awm-chart-host.awm-theme-light .group-chart-axis,
html .awm-chart-host.awm-theme-light .group-chart-title { color: #777 !important; }
html .awm-chart-host.awm-theme-dark .chart .axis,
html .awm-chart-host.awm-theme-dark .chart .grid,
html .awm-chart-host.awm-theme-dark .chart .threshold,
html .awm-chart-host.awm-theme-dark .national-chart .axis,
html .awm-chart-host.awm-theme-dark .national-chart .grid,
html .awm-chart-host.awm-theme-dark .national-chart .threshold,
html .awm-chart-host.awm-theme-dark .group-chart-svg .axis,
html .awm-chart-host.awm-theme-dark .group-chart-svg .grid,
html .awm-chart-host.awm-theme-dark .group-chart-svg .threshold { stroke: #64748b !important; }
html .awm-chart-host.awm-theme-light .chart .axis,
html .awm-chart-host.awm-theme-light .national-chart .axis,
html .awm-chart-host.awm-theme-light .group-chart-svg .axis { stroke: #cbd5e1 !important; }
html .awm-chart-host.awm-theme-light .chart .grid,
html .awm-chart-host.awm-theme-light .national-chart .grid,
html .awm-chart-host.awm-theme-light .group-chart-svg .grid { stroke: #e2e8f0 !important; }
html .awm-chart-host.awm-theme-light .chart .threshold,
html .awm-chart-host.awm-theme-light .national-chart .threshold,
html .awm-chart-host.awm-theme-light .group-chart-svg .threshold { stroke: #94a3b8 !important; }
