/* Hospital Waiting Times. Every rule is a class: the Content Security Policy admits no inline style.
 *
 * Wait bands use two ramps that meet at 18 weeks, the referral-to-treatment standard: teal for waits within 18 weeks, warm for longer.
 * The same colour means the same band on every chart. Provider series colours are fixed by position (1 to 4); England is slate, dashed.
 */
.hwt-wrap { color: var(--hs-ink, #1a2a3b); padding: 0 0 24px; }
.hwt-head { margin: 0 0 14px; }
.hwt-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--hs-teal-deep, #0f6e57); margin: 0 0 3px; }
.hwt-title { font-size: 22px; font-weight: 800; margin: 0; }
.hwt-subtitle { font-size: 15px; font-weight: 600; color: var(--hs-ink-muted, #55657a); margin: 2px 0 8px; }
.hwt-lead { margin: 0 0 8px; color: var(--hs-ink-muted, #55657a); max-width: 75ch; line-height: 1.5; }
.hwt-source { font-size: 13px; margin: 0; color: var(--hs-ink-muted, #55657a); max-width: 85ch; }
.hwt-muted { color: var(--hs-ink-muted, #55657a); font-size: 13px; font-weight: 400; }
.hwt-small { font-size: 12px; margin: 8px 0 0; }
.hwt-code { color: var(--hs-ink-muted, #55657a); font-size: 12px; font-weight: 400; white-space: nowrap; }
.hwt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.hwt-card { background: var(--hs-surface-card, var(--hs-surface, #fff)); border: 1px solid var(--hs-border, #e3e8ee); border-radius: 12px; padding: 14px 18px; margin: 0 0 16px; min-width: 0; }
.hwt-card-head { margin: 0 0 12px; }
.hwt-h2 { font-size: 16px; font-weight: 700; margin: 0 0 4px; }

.hwt-filter-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.hwt-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.hwt-label { font-weight: 600; font-size: 13px; }
.hwt-select { min-width: 12rem; max-width: 100%; padding: 7px 9px; border: 1px solid var(--hs-border-strong, #c7d0da); border-radius: 8px; background: var(--hs-surface-card, #fff); color: inherit; font: inherit; }
.hwt-providers { border: 0; padding: 0; margin: 14px 0 0; min-width: 0; }
.hwt-providers legend { padding: 0; margin: 0 0 6px; }
.hwt-provider-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 10px; }
.hwt-provider-select { width: 100%; min-width: 0; }
.hwt-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 14px 0 0; }
.hwt-button { padding: 9px 18px; border: 0; border-radius: 8px; background: var(--hs-navy, #111827); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.hwt-button:hover, .hwt-button:focus-visible { background: var(--hs-navy-2, #1d4466); }
.hwt-link { color: var(--hs-link, #0b5cad); font-size: 13px; }

.hwt-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--hs-border, #e3e8ee); margin: 0 0 16px; }
.hwt-tab { padding: 9px 14px; color: var(--hs-ink-muted, #55657a); text-decoration: none; font-weight: 600; font-size: 14px; border-bottom: 3px solid transparent; white-space: nowrap; }
.hwt-tab:hover { color: var(--hs-ink, #1a2a3b); }
.hwt-tab.is-current { color: var(--hs-ink, #1a2a3b); border-bottom-color: var(--hs-teal-deep, #0f6e57); }
.hwt-measures { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.hwt-pill { padding: 5px 11px; border: 1px solid var(--hs-border-strong, #c7d0da); border-radius: 999px; font-size: 13px; color: var(--hs-ink, #1a2a3b); text-decoration: none; }
.hwt-pill.is-current { background: var(--hs-navy, #111827); border-color: var(--hs-navy, #111827); color: #fff; }

.hwt-alert { border-radius: 8px; padding: 9px 14px; margin: 0 0 14px; font-size: 13px; line-height: 1.5; border: 1px solid var(--hs-border, #e3e8ee); }
.hwt-alert-info { background: var(--hs-ground, #f4f7f9); }
.hwt-alert-warn { background: var(--hs-warn-bg, #fff6e0); border-color: var(--hs-warn-border, #f0d48a); color: var(--hs-warn-ink, #6b4b00); }

.hwt-scroll { position: relative; overflow-x: auto; max-width: 100%; }
.hwt-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hwt-table th, .hwt-table td { padding: 8px 10px; border-bottom: 1px solid var(--hs-border, #e3e8ee); text-align: left; vertical-align: top; }
.hwt-table thead th { font-size: 12px; font-weight: 700; color: var(--hs-ink-muted, #55657a); border-bottom-width: 2px; }
.hwt-table tbody th { font-weight: 600; }
.hwt-table .hwt-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hwt-table .hwt-group { text-align: center; }
.hwt-table-compact { max-width: 40rem; }
.hwt-status { color: var(--hs-ink-muted, #55657a); font-style: italic; }
.hwt-benchmark th, .hwt-benchmark td { background: var(--hs-ground, #f4f7f9); }
.hwt-total th, .hwt-total td { font-weight: 700; border-top: 2px solid var(--hs-border-strong, #c7d0da); }
.is-chosen th { box-shadow: inset 3px 0 0 var(--hs-teal-deep, #0f6e57); }
tr.is-missing th, tr.is-missing td { color: var(--hs-ink-muted, #55657a); }

.hwt-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 8px 0 0; vertical-align: baseline; }
.hwt-series-1 { background: #1d4ed8; }
.hwt-series-2 { background: #0f766e; }
.hwt-series-3 { background: #b45309; }
.hwt-series-4 { background: #7c3aed; }
.hwt-england { background: #334155; }

.hwt-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 10px; padding: 0; font-size: 12px; color: var(--hs-ink-muted, #55657a); }
.hwt-legend li { display: inline-flex; align-items: center; gap: 6px; }
.hwt-swatch { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }
.hwt-band-w00_06 { background: #b9e2d9; }
.hwt-band-w06_12 { background: #6fbfb1; }
.hwt-band-w12_18 { background: #2a8a80; }
.hwt-band-w18_26 { background: #f7d78f; }
.hwt-band-w26_40 { background: #efab5e; }
.hwt-band-w40_52 { background: #d9732f; }
.hwt-band-w52_plus { background: #9c3a1e; }

.hwt-chart { position: relative; height: 280px; margin: 0 0 10px; }
.hwt-chart-bands { height: 180px; }
.hwt-chart-bands.is-tall { height: 260px; }
.hwt-table-toggle summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--hs-link, #0b5cad); margin: 4px 0 8px; }
.hwt-headline { border-style: dashed; }

.hwt-about summary { cursor: pointer; }
.hwt-defs { display: grid; grid-template-columns: minmax(10rem, 14rem) 1fr; gap: 8px 18px; margin: 12px 0 0; font-size: 13px; line-height: 1.5; }
.hwt-defs dt { font-weight: 700; }
.hwt-defs dd { margin: 0; }
.hwt-defs code { font-size: 12px; }

@media (max-width: 640px) {
  .hwt-card { padding: 12px; }
  .hwt-select { min-width: 0; width: 100%; }
  .hwt-filter-row .hwt-field { flex: 1 1 100%; }
  .hwt-defs { grid-template-columns: 1fr; }
  .hwt-defs dd { margin: 0 0 6px; }
}
