/* NHS 111 Activity & Performance. Every rule is a class: the Content Security Policy admits no inline style.
 *
 * The frame follows Hospital Waiting Times (the other Wider Systems tool). Series colours are fixed by scope: the contract area blue,
 * its region teal, England slate and dashed. Provisional figures carry an amber badge and hollow points; a missing figure is words.
 */
.n111-wrap { color: var(--hs-ink, #1a2a3b); padding: 0 0 24px; }
.n111-head { margin: 0 0 14px; }
.n111-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--hs-teal-deep, #0f6e57); margin: 0 0 3px; }
.n111-title { font-size: 22px; font-weight: 800; margin: 0; }
.n111-subtitle { font-size: 15px; font-weight: 600; color: var(--hs-ink-muted, #55657a); margin: 2px 0 8px; }
.n111-lead { margin: 0 0 8px; color: var(--hs-ink-muted, #55657a); max-width: 75ch; line-height: 1.5; }
.n111-source { font-size: 13px; margin: 0; color: var(--hs-ink-muted, #55657a); max-width: 85ch; }
.n111-muted { color: var(--hs-ink-muted, #55657a); font-size: 13px; font-weight: 400; }
.n111-small { font-size: 12px; margin: 8px 0 0; }
.n111-code { color: var(--hs-ink-muted, #55657a); font-size: 12px; font-weight: 400; white-space: nowrap; }
.n111-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.n111-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; }
.n111-card-head { margin: 0 0 12px; }
.n111-h2 { font-size: 16px; font-weight: 700; margin: 0 0 4px; }

.n111-filter-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.n111-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.n111-label { font-weight: 600; font-size: 13px; }
.n111-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; }
.n111-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 14px 0 0; }
.n111-button { padding: 9px 18px; border: 0; border-radius: 8px; background: var(--hs-navy, #111827); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.n111-button:hover, .n111-button:focus-visible { background: var(--hs-navy-2, #1d4466); }
.n111-link { color: var(--hs-link, #0b5cad); font-size: 13px; }

.n111-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--hs-border, #e3e8ee); margin: 0 0 16px; }
.n111-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; }
.n111-tab:hover { color: var(--hs-ink, #1a2a3b); }
.n111-tab.is-current { color: var(--hs-ink, #1a2a3b); border-bottom-color: var(--hs-teal-deep, #0f6e57); }

.n111-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); }
.n111-alert-info { background: var(--hs-ground, #f4f7f9); }
.n111-alert-warn { background: var(--hs-warn-bg, #fff6e0); border-color: var(--hs-warn-border, #f0d48a); color: var(--hs-warn-ink, #6b4b00); }

.n111-scroll { position: relative; overflow-x: auto; max-width: 100%; }
.n111-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.n111-table th, .n111-table td { padding: 8px 10px; border-bottom: 1px solid var(--hs-border, #e3e8ee); text-align: left; vertical-align: top; }
.n111-table thead th { font-size: 12px; font-weight: 700; color: var(--hs-ink-muted, #55657a); border-bottom-width: 2px; }
.n111-table tbody th { font-weight: 600; }
.n111-table .n111-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.n111-table .n111-group { text-align: center; }
.n111-table-compact { max-width: 40rem; }
.n111-status { color: var(--hs-ink-muted, #55657a); font-style: italic; }
.n111-benchmark th, .n111-benchmark td { background: var(--hs-ground, #f4f7f9); }
.n111-total th, .n111-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); }

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

.n111-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); }

.n111-chart { position: relative; height: 280px; margin: 0 0 10px; }
.n111-table-toggle summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--hs-link, #0b5cad); margin: 4px 0 8px; }

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

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

.n111-swatch { width: 14px; height: 3px; border-radius: 1px; display: inline-block; }
.n111-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 12px; padding: 0; font-size: 12px; color: var(--hs-ink-muted, #55657a); }
.n111-legend li { display: inline-flex; align-items: center; gap: 6px; }

/* NHS 111 additions. */
.n111-input { min-width: 14rem; 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; }
.n111-field-wide { flex: 1 1 22rem; }
.n111-field-wide .n111-select, .n111-field-wide .n111-input { width: 100%; }
.n111-badge { display: inline-block; padding: 1px 9px; border-radius: 999px; background: var(--hs-teal-tint, #e3f3ef); color: var(--hs-teal-deep, #0f6e57); font-size: 12px; font-weight: 700; margin: 0 6px 0 0; white-space: nowrap; }
.n111-badge.is-provisional { background: var(--hs-warn-bg, #fff6e0); color: var(--hs-warn-ink, #6b4b00); border: 1px solid var(--hs-warn-border, #f0d48a); }
.n111-badge.is-absent { background: var(--hs-ground, #f4f7f9); color: var(--hs-ink-muted, #55657a); }
.n111-tiles { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 10px; }
.n111-tile { border: 1px solid var(--hs-border, #e3e8ee); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.n111-tile-label { font-size: 12px; font-weight: 700; color: var(--hs-ink-muted, #55657a); text-transform: uppercase; letter-spacing: .04em; }
.n111-tile-value { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.n111-tile-note { font-size: 12px; color: var(--hs-ink-muted, #55657a); }
.n111-tile-per { font-size: 11px; color: var(--hs-ink-muted, #55657a); margin: -2px 0 2px; }
.n111-per { font-size: 12px; font-weight: 400; color: var(--hs-ink-muted, #55657a); margin: 0 0 6px; white-space: normal; }
.n111-compare thead .n111-per { display: block; text-transform: none; letter-spacing: 0; font-size: 11px; margin: 2px 0 0; }
.n111-tile-bench { font-size: 12px; color: var(--hs-ink, #1a2a3b); margin: 4px 0 0; padding: 4px 0 0; border-top: 1px solid var(--hs-border, #e3e8ee); }
.n111-tile.is-featured { border-color: #1d4ed8; background: #f3f7ff; }
.n111-facts { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 4px 0 8px; font-size: 13px; }
.n111-fact-label { font-size: 11px; font-weight: 700; color: var(--hs-ink-muted, #55657a); text-transform: uppercase; letter-spacing: .04em; margin: 0 4px 0 0; }
.n111-compare tr.is-chosen th, .n111-compare tr.is-chosen td { background: #f3f7ff; font-weight: 600; }
.n111-figure { font-weight: 600; }
.n111-sub { display: block; font-size: 12px; font-weight: 400; color: var(--hs-ink-muted, #55657a); white-space: nowrap; }
.n111-basis { white-space: normal; max-width: 26rem; }
.n111-table tbody th { min-width: 11rem; }
.n111-partial { color: var(--hs-warn-ink, #6b4b00); }
.n111-table td.is-missing { color: var(--hs-ink-muted, #55657a); font-style: italic; }
tr.is-provisional th { box-shadow: inset 3px 0 0 #d9a22b; }
.n111-break { font-size: 13px; margin: 0 0 10px; padding: 8px 12px; border-left: 3px solid #b45309; background: var(--hs-ground, #f4f7f9); border-radius: 0 6px 6px 0; }
.n111-notes { margin: 0 0 8px; padding: 0 0 0 18px; font-size: 13px; line-height: 1.5; }
.n111-chart-tall { height: 320px; }
.n111-sort { color: inherit; text-decoration: none; }
.n111-sort:hover, .n111-sort:focus-visible { text-decoration: underline; }
.n111-sort.is-current { color: var(--hs-ink, #1a2a3b); }
.n111-compare thead th { white-space: normal; vertical-align: bottom; min-width: 5.5rem; }
.n111-compare thead th:first-child { min-width: 12rem; }
.n111-wrap-cell { white-space: normal; min-width: 12rem; }
.n111-inventory td, .n111-inventory th { font-size: 13px; }
.n111-defs-card .n111-defs { margin-top: 4px; }

@media (max-width: 640px) {
  .n111-input { min-width: 0; width: 100%; }
  .n111-tile-value { font-size: 20px; }
  .n111-sub { white-space: normal; }
}
