/* Vaccine Campaign Planner (#18), v2: the Intelligence theme of the approved Stock Take layout (owner instruction,
 * 2026-11-19).
 *
 * Presentation only. Calculations, fields, validation, saving, exports and the script (`vaccine_campaigns.v1.js`, unchanged)
 * are the live release's. Every class the script reads or sets (`d-none`, `active`, `done`, `vcp-wstep`, `vcp-ring`,
 * `vcp-tab`, `vcp-outline-pane`, `small`, `text-muted`) is kept. The shape follows Practice Stock Take's v2: a page head,
 * cards on the shell's tokens with a tinted header band, 40px controls that fill their column, one accent for the main action
 * and a quiet outline for the rest, tables that scroll inside a labelled region and never widen the document, and the whole
 * content width used through responsive grids. No inline style anywhere. Positioned wrappers (`.vcp`, `.table-responsive`,
 * `.vcp-panel`) give every visually hidden element a positioned ancestor, so it cannot widen the page on a narrow screen.
 */
:root {
  --vcp-accent: var(--hs-aqua, #0d5bb8);
  --vcp-accent-dark: #0a4c9c;
  --vcp-accent-soft: #e8f0fc;
  --vcp-band: #f2f6fc;
  --vcp-ink: var(--hs-ink, #1f2937);
  --vcp-muted: var(--hs-ink-muted, #55637a);
  --vcp-border: var(--hs-border, #dfe4ec);
  --vcp-border-strong: var(--hs-border-strong, #c8d0dd);
  --vcp-control: #8796a5;
  --vcp-canvas: var(--hs-ground, #f4f6fa);
  --vcp-good: #157347;
  --vcp-good-dark: #105c38;
  --vcp-good-soft: #e6f4ec;
  --vcp-warn-ink: #6b4e00;
  --vcp-warn-soft: #fbf1d9;
  --vcp-warn-line: #d9a514;
  --vcp-bad: #b42318;
  --vcp-bad-ink: #9c1f1f;
  --vcp-bad-soft: #fbe9e9;
  --vcp-grey: #64748b;
}

/* A heading or a field reached by a link or by focus is never hidden under the sticky topbar. */
html { scroll-padding-top: calc(var(--hs-topbar-h, 60px) + 16px); }

.vcp { position: relative; display: flex; flex-direction: column; gap: 16px; min-width: 0; color: var(--vcp-ink); }
.vcp > * { min-width: 0; margin-top: 0; margin-bottom: 0; }
.vcp--narrow { max-width: none; }
.vcp p { max-width: none; }
.vcp [hidden], .vcp .d-none { display: none !important; }
.vcp .visually-hidden, .vcp .vcp-vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ── Layout utilities the templates use (a small Bootstrap-like subset, on CSS grid where it is a grid) ── */
.vcp .row { display: flex; flex-wrap: wrap; margin: 0 -8px; }
.vcp .row > * { box-sizing: border-box; padding: 0 8px; width: 100%; min-width: 0; }
.vcp .g-1 { row-gap: 6px; } .vcp .g-2 { row-gap: 12px; } .vcp .g-3 { row-gap: 16px; } .vcp .g-4 { row-gap: 20px; }
.vcp .col-6 { width: 50%; } .vcp .col-12 { width: 100%; }
@media (min-width: 768px) {
  .vcp .col-md-2 { width: 16.666%; } .vcp .col-md-3 { width: 25%; } .vcp .col-md-4 { width: 33.333%; }
  .vcp .col-md-6 { width: 50%; }
}
@media (min-width: 1100px) {
  .vcp .col-lg-4 { width: 33.333%; } .vcp .col-lg-5 { width: 41.666%; } .vcp .col-lg-6 { width: 50%; }
  .vcp .col-lg-7 { width: 58.333%; }
}
.vcp .d-flex { display: flex; } .vcp .d-block { display: block; } .vcp .d-grid { display: grid; }
.vcp .d-inline-block { display: inline-block; }
.vcp .flex-wrap { flex-wrap: wrap; } .vcp .flex-grow-1 { flex-grow: 1; min-width: 0; }
.vcp .gap-2 { gap: 10px; } .vcp .gap-4 { gap: 22px; }
.vcp .justify-content-between { justify-content: space-between; } .vcp .justify-content-center { justify-content: center; }
.vcp .align-items-center { align-items: center; } .vcp .align-items-end { align-items: flex-end; }
.vcp .align-items-start { align-items: flex-start; }
.vcp .mb-0 { margin-bottom: 0; } .vcp .mb-1 { margin-bottom: 4px; } .vcp .mb-2 { margin-bottom: 8px; }
.vcp .mb-3 { margin-bottom: 14px; } .vcp .mb-4 { margin-bottom: 22px; }
.vcp .mt-1 { margin-top: 4px; } .vcp .mt-2 { margin-top: 8px; } .vcp .mt-3 { margin-top: 14px; }
.vcp .p-0 { padding: 0; } .vcp .py-2 { padding-top: 8px; padding-bottom: 8px; } .vcp .py-4 { padding-top: 22px; padding-bottom: 22px; }
.vcp .h-100 { height: 100%; } .vcp .w-100 { width: 100%; } .vcp .vcp-minw { min-width: min(100%, 220px); }
.vcp .text-muted { color: var(--vcp-muted); } .vcp .text-danger { color: var(--vcp-bad-ink); }
.vcp .text-end { text-align: right; } .vcp .text-center { text-align: center; } .vcp .small { font-size: 13px; line-height: 1.45; }
.vcp .fw-bold { font-weight: 700; } .vcp .fw-normal { font-weight: 400; } .vcp .text-dark { color: var(--vcp-ink); }
.vcp .text-primary { color: var(--vcp-accent-dark); }
.vcp .vcp-pad { padding-top: 32px; padding-bottom: 32px; }

/* ── Grids that use the whole content width ── */
.vcp-kpis { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); }
.vcp-cols { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); align-items: start; }
.vcp-cols--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.vcp-cols--wide-left { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.vcp-cols--wide-right { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
@media (max-width: 1099px) { .vcp-cols--wide-left, .vcp-cols--wide-right { grid-template-columns: minmax(0, 1fr); } }
.vcp-cols > *, .vcp-kpis > * { min-width: 0; }
.vcp-stretch { align-items: stretch; }

/* ── Page head ── */
.vcp-pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; padding-top: 4px; }
.vcp-pagehead__text { min-width: 0; flex: 1 1 22rem; }
.vcp-eyebrow { margin: 0 0 6px; color: var(--hs-teal-deep, #0b7d7d); font-size: 11px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; }
.vcp h1, .vcp .vcp-title { margin: 0 0 6px; font-size: 26px; line-height: 1.2; color: var(--hs-navy, #111827); overflow-wrap: anywhere; }
.vcp-org { margin: 0; font-size: 16px; font-weight: 600; color: var(--vcp-ink); overflow-wrap: anywhere; }
.vcp-org__code { font-weight: 400; color: var(--vcp-muted); }
.vcp-lead { margin: 4px 0 0; font-size: 15px; color: var(--vcp-muted); }
.vcp .vcp-h4 { font-size: 18px; line-height: 1.3; margin: 0 0 6px; color: var(--hs-navy, #111827); }
.vcp .vcp-h5, .vcp h5 { font-size: 16px; line-height: 1.3; margin: 0 0 2px; color: var(--hs-navy, #111827); }
.vcp h2 { color: var(--hs-navy, #111827); }
.vcp h6 { font-size: 15px; margin: 0; color: var(--hs-navy, #111827); }
.vcp .vcp-strapline { font-size: 16px; color: var(--vcp-muted); max-width: 72ch; }
.vcp .vcp-chip, .vcp .vcp-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--vcp-accent-soft);
  color: var(--vcp-accent-dark); font-size: 13px; font-weight: 600; }

/* ── The tool's own navigation: quiet links, the current one marked ── */
.vcp .vcp-toolnav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; font-size: 14px; }
.vcp .vcp-toolnav a { display: inline-flex; align-items: center; min-height: 34px; padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--vcp-border); background: #fff; color: var(--vcp-accent-dark); font-weight: 600; text-decoration: none; }
.vcp .vcp-toolnav a:hover { border-color: var(--vcp-accent); background: var(--vcp-accent-soft); }
.vcp .vcp-toolnav a[aria-current] { background: var(--vcp-accent); border-color: var(--vcp-accent); color: #fff; }

/* ── Forms: every control fills its column, never past it ── */
.vcp-fields { display: grid; gap: 14px 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.vcp-fields--narrow { grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); }
.vcp-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.vcp-field--wide { grid-column: 1 / -1; }
.vcp .form-label, .vcp-field > label { display: block; margin: 0; font-size: 13px; font-weight: 700; color: var(--vcp-ink); }
.vcp .form-text, .vcp-hint { font-size: 13px; color: var(--vcp-muted); }
.vcp :where(.vcp-input, .vcp-select, input[type="file"], .form-control, input[type="number"], input[type="text"], select, textarea):not([type="checkbox"]) {
  box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; min-height: 40px; padding: 8px 10px;
  border: 1px solid var(--vcp-control); border-radius: var(--hs-radius-sm, 6px); background: #fff; color: var(--vcp-ink);
  font: inherit; font-size: 15px; line-height: 1.3;
}
.vcp :where(select, .vcp-select) { text-overflow: ellipsis; }
.vcp input[type="file"] { padding: 6px 8px; }
.vcp textarea.vcp-input { min-height: 64px; }
.vcp .vcp-check, .vcp .form-check-input { width: 18px; height: 18px; margin: 0; accent-color: var(--vcp-accent); }
.vcp fieldset { border: 1px solid var(--vcp-border); min-width: 0; margin: 0; }
.vcp legend { font-weight: 700; padding: 0; }
.vcp .errorlist { margin: 2px 0 0; padding: 0; list-style: none; color: var(--vcp-bad-ink); font-size: 13px; font-weight: 600; }
.vcp-field--invalid :where(input, select, textarea) { border: 2px solid var(--vcp-bad); }

/* A group of fields with its heading and guidance (the cohort sections). */
.vcp-group { display: grid; gap: 12px; padding: 14px 16px; border: 1px solid var(--vcp-border); border-radius: 8px; background: #fff; }
.vcp-group + .vcp-group { margin-top: 12px; }
.vcp-group__head { display: grid; gap: 2px; }
.vcp-group__title { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: .02em; color: var(--vcp-accent-dark); }
.vcp-group__guide { margin: 0; font-size: 13px; color: var(--vcp-muted); }
.vcp-groups { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: start; }
.vcp-groups .vcp-group + .vcp-group { margin-top: 0; }

/* ── Buttons: one accent for the main action, a quiet outline for the rest ── */
.vcp .vcp-btn { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px;
  padding: 8px 16px; border-radius: var(--hs-radius-sm, 6px); background: var(--vcp-accent); color: #fff; border: 1px solid var(--vcp-accent);
  font: inherit; font-size: 14px; font-weight: 600; line-height: 1.25; text-align: center; text-decoration: none; cursor: pointer; }
.vcp .vcp-btn:hover { background: var(--vcp-accent-dark); border-color: var(--vcp-accent-dark); color: #fff; }
.vcp .vcp-btn-outline, .vcp .btn-outline-secondary { background: #fff; color: var(--vcp-accent-dark); border-color: var(--vcp-border-strong); }
.vcp .vcp-btn-outline:hover, .vcp .btn-outline-secondary:hover { background: var(--vcp-accent-soft); color: var(--vcp-accent-dark);
  border-color: var(--vcp-accent); }
.vcp .vcp-btn-sm, .vcp .btn-sm { min-height: 34px; padding: 4px 12px; font-size: 13px; }
.vcp .btn { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 34px;
  padding: 4px 12px; border-radius: var(--hs-radius-sm, 6px); font: inherit; font-size: 13px; font-weight: 600;
  border: 1px solid var(--vcp-border-strong); background: #fff; color: var(--vcp-accent-dark); cursor: pointer; text-decoration: none; }
.vcp .btn:hover { background: var(--vcp-accent-soft); border-color: var(--vcp-accent); }
.vcp .btn-outline-danger { border-color: var(--vcp-bad-ink); color: var(--vcp-bad-ink); }
.vcp .btn-outline-danger:hover { background: var(--vcp-bad-soft); border-color: var(--vcp-bad-ink); }
.vcp .btn-link { min-height: 32px; border: 0; background: none; padding: 2px 4px; text-decoration: underline; font-weight: 600; }
.vcp .btn-link:hover { background: none; }
.vcp .btn-link.text-danger { color: var(--vcp-bad-ink); }
.vcp .btn.vcp-btn { background: var(--vcp-accent); color: #fff; border-color: var(--vcp-accent); }
.vcp a:focus-visible, .vcp button:focus-visible, .vcp input:focus-visible, .vcp select:focus-visible, .vcp textarea:focus-visible,
.vcp summary:focus-visible, .vcp .table-responsive:focus-visible, .vcp-dialog button:focus-visible {
  outline: 3px solid var(--vcp-accent); outline-offset: 2px; }
.vcp-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.vcp-formfoot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 0 0;
  border-top: 1px solid var(--vcp-border); }
.vcp-formfoot .vcp-btn { min-width: 8rem; }
.vcp-save { margin-top: 14px; }

/* ── Cards with a tinted header band ── */
.vcp .vcp-panel { position: relative; box-sizing: border-box; background: var(--hs-surface, #fff); border: 1px solid var(--vcp-border);
  border-radius: var(--hs-radius, 10px); padding: 18px 20px; margin: 0; box-shadow: var(--hs-shadow, none); min-width: 0; }
.vcp .vcp-panel > .vcp-sec:first-child { margin: -18px -20px 16px; padding: 12px 20px; background: var(--vcp-band);
  border-bottom: 1px solid var(--vcp-border); border-radius: var(--hs-radius, 10px) var(--hs-radius, 10px) 0 0; }
.vcp .vcp-sec { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.vcp .vcp-sec > div:first-child, .vcp .vcp-sec > h6:first-child { flex: 1 1 220px; min-width: 0; }
.vcp .vcp-sec-sub { font-size: 13px; color: var(--vcp-muted); }
.vcp .vcp-sec-actions { margin-left: auto; }
.vcp .vcp-sec-actions:empty { display: none; }
.vcp .vcp-help { margin: 0; padding: 12px 16px; border: 1px solid #cddcf3; border-left: 4px solid var(--vcp-accent);
  border-radius: var(--hs-radius-sm, 6px); background: var(--vcp-accent-soft); font-size: 14px; line-height: 1.5; }
.vcp .vcp-help ol { margin: 6px 0 0; padding-left: 20px; }
.vcp .vcp-privacy { margin: 0; padding: 12px 16px; border: 1px solid #9cc9ad; border-left: 4px solid var(--vcp-good);
  border-radius: var(--hs-radius-sm, 6px); background: var(--vcp-good-soft); font-size: 14px; line-height: 1.5; }
.vcp .vcp-panel hr { border: 0; border-top: 1px solid var(--vcp-border); margin: 16px 0; }

/* ── Headline figures ── */
.vcp .vcp-kpi { box-sizing: border-box; display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 14px 16px;
  border: 1px solid var(--vcp-border); border-radius: var(--hs-radius, 10px); background: #fff; box-shadow: var(--hs-shadow, none); }
.vcp .vcp-kpi .value { order: 2; font-size: 26px; font-weight: 700; line-height: 1.2; color: var(--hs-navy, #111827);
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.vcp .vcp-kpi .label { order: 1; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--vcp-muted); }
.vcp .vcp-kpi .sub { order: 3; font-size: 13px; color: var(--vcp-muted); }
.vcp .vcp-kpi--good { box-shadow: inset 4px 0 0 var(--vcp-good), var(--hs-shadow, none); }
.vcp .vcp-kpi--money { box-shadow: inset 4px 0 0 var(--vcp-accent), var(--hs-shadow, none); }
.vcp .vcp-kpi--warn { box-shadow: inset 4px 0 0 var(--vcp-bad), var(--hs-shadow, none); }
.vcp .vcp-kpi--idle .value { color: var(--vcp-muted); }

.vcp .vcp-list-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--vcp-border); }
.vcp .vcp-list-row:last-of-type { border-bottom: 0; }
.vcp .vcp-list-row form { margin: 0; }
.vcp .vcp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--vcp-accent); flex: none; }
.vcp .vcp-empty { padding: 20px 12px; border: 1px dashed var(--vcp-border-strong); border-radius: 8px; background: var(--vcp-canvas);
  color: var(--vcp-muted); text-align: center; }
.vcp .vcp-empty h6 { margin-bottom: 4px; color: var(--vcp-ink); }
.vcp .vcp-empty p { margin: 0; }
.vcp .vcp-empty-line { margin: 0; padding: 10px 12px; border: 1px dashed var(--vcp-border-strong); border-radius: 8px;
  background: var(--vcp-canvas); color: var(--vcp-muted); font-size: 13px; }
.vcp .vcp-add-card { display: grid; gap: 12px; margin-top: 12px; padding: 14px 16px; border: 1px dashed var(--vcp-border-strong);
  border-radius: 8px; background: var(--vcp-canvas); }
.vcp .vcp-add-card form { display: grid; gap: 12px; margin: 0; }
.vcp .vcp-add-card form > .vcp-btn, .vcp .vcp-add-card form > button { justify-self: start; }
.vcp .vcp-import { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.vcp .vcp-import input[type="file"] { flex: 1 1 16rem; width: auto; }
.vcp .vcp-collapse { margin: 0 0 14px; }
.vcp .vcp-collapse > summary { list-style: none; }
.vcp .vcp-collapse > summary::-webkit-details-marker { display: none; }
.vcp .vcp-collapse > summary.vcp-btn::after { content: ""; width: 7px; height: 7px; margin-left: 2px; border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.vcp .vcp-collapse[open] > summary.vcp-btn { background: #fff; color: var(--vcp-accent-dark); border-color: var(--vcp-border-strong); }
.vcp .vcp-collapse[open] > summary.vcp-btn::after { transform: rotate(-135deg) translateY(-2px); }
.vcp-collapses { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.vcp-collapses > .vcp-collapse { margin: 0; }
.vcp-collapses > .vcp-collapse[open] { flex: 1 1 100%; order: 2; }
.vcp .vcp-notice { margin: 0; padding: 12px 16px; border: 1px solid #9cc9ad; border-left: 4px solid var(--vcp-good); border-radius: var(--hs-radius-sm, 6px);
  background: var(--vcp-good-soft); font-size: 14px; }
.vcp .vcp-notice--archived { border-color: var(--vcp-border-strong); border-left-color: var(--vcp-grey); background: #f3f5f8; }
.vcp .vcp-warn { color: var(--vcp-warn-ink); font-weight: 600; }

/* ── Alerts and statuses: each carries its word; colour is never the only cue ── */
.vcp .vcp-alert { margin: 0 0 10px; padding: 12px 14px; border: 1px solid var(--vcp-border-strong); border-left-width: 4px;
  border-radius: var(--hs-radius-sm, 6px); background: #fff; font-size: 14px; }
.vcp .vcp-alert:last-child { margin-bottom: 0; }
.vcp .vcp-alert .title { font-weight: 700; } .vcp .vcp-alert .action { margin-top: 4px; font-size: 13px; }
.vcp .vcp-alert form { margin: 0; }
.vcp .vcp-alert--info, .vcp .vcp-alert--success { border-color: #cddcf3; border-left-color: var(--vcp-accent); background: var(--vcp-accent-soft); }
.vcp .vcp-alert--attention, .vcp .vcp-alert--setup { border-color: #e7d29a; border-left-color: var(--vcp-warn-line); background: var(--vcp-warn-soft);
  color: var(--vcp-warn-ink); }
.vcp .vcp-alert--risk { border-color: #efb7b7; border-left-color: var(--vcp-bad); background: var(--vcp-bad-soft); color: var(--vcp-bad-ink); }
.vcp .vcp-alert ul { margin: 6px 0 0; padding-left: 20px; }
.vcp .vcp-status { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  line-height: 1.6; background: #eef2f5; color: var(--vcp-ink); white-space: nowrap; }
.vcp .vcp-status--live, .vcp .vcp-status--healthy, .vcp .vcp-status--ahead, .vcp .vcp-status--on_track,
.vcp .vcp-status--target_reached, .vcp .vcp-status--completed { background: var(--vcp-good-soft); color: var(--vcp-good-dark); }
.vcp .vcp-status--ready, .vcp .vcp-status--planning { background: var(--vcp-accent-soft); color: var(--vcp-accent-dark); }
.vcp .vcp-status--attention, .vcp .vcp-status--slightly_behind, .vcp .vcp-status--paused, .vcp .vcp-status--setup,
.vcp .vcp-status--target_unavailable { background: var(--vcp-warn-soft); color: var(--vcp-warn-ink); }
.vcp .vcp-status--at_risk, .vcp .vcp-status--significantly_behind { background: var(--vcp-bad-soft); color: var(--vcp-bad-ink); }
.vcp .vcp-status--archived, .vcp .vcp-status--draft { background: #eef2f5; color: var(--vcp-muted); }
.vcp .badge { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.6;
  white-space: nowrap; }
.vcp .bg-warning { background: var(--vcp-warn-soft); color: var(--vcp-warn-ink); }
.vcp .bg-primary-subtle { background: var(--vcp-accent-soft); color: var(--vcp-accent-dark); }

/* ── Tables: scroll inside the region, never the page ── */
.vcp .table-responsive { position: relative; overflow-x: auto; max-width: 100%; border: 1px solid var(--vcp-border); border-radius: 8px; }
.vcp .vcp-panel.table-responsive { padding: 0; }
.vcp .vcp-table, .vcp table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.vcp .vcp-table th, .vcp .vcp-table td { padding: 10px 12px; border-bottom: 1px solid var(--vcp-border); text-align: left; vertical-align: middle; }
.vcp .vcp-table thead th { background: var(--vcp-canvas); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--vcp-muted); border-bottom: 1px solid var(--vcp-border-strong); white-space: nowrap; }
.vcp .vcp-table tbody tr:last-child > * { border-bottom: 0; }
.vcp .vcp-table td form { margin: 0; }
.vcp .vcp-table .fw-bold { overflow-wrap: anywhere; }
.vcp .vcp-table--wide { min-width: 760px; }
.vcp .vcp-num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vcp .vcp-table tr.fw-bold td { background: var(--vcp-accent-soft); }

/* ── Campaign header: the strongest element on the page ── */
.vcp .vcp-camp-head { position: relative; display: grid; gap: 16px 24px; grid-template-columns: minmax(0, 1fr) auto; align-items: start;
  background: #fff; border: 1px solid var(--vcp-border); border-radius: var(--hs-radius, 10px); padding: 20px 22px;
  box-shadow: inset 5px 0 0 var(--vcp-grey), var(--hs-shadow, none); }
.vcp .vcp-camp-head--healthy { box-shadow: inset 5px 0 0 var(--vcp-good), var(--hs-shadow, none); }
.vcp .vcp-camp-head--attention, .vcp .vcp-camp-head--setup { box-shadow: inset 5px 0 0 var(--vcp-warn-line), var(--hs-shadow, none); }
.vcp .vcp-camp-head--at_risk { box-shadow: inset 5px 0 0 var(--vcp-bad), var(--hs-shadow, none); }
.vcp .vcp-camp-main { min-width: 0; display: grid; gap: 8px; }
.vcp .vcp-camp-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.vcp .vcp-camp-title h1 { margin: 0; font-size: 26px; line-height: 1.2; overflow-wrap: anywhere; min-width: 0; }
.vcp .vcp-camp-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--vcp-muted); }
.vcp .vcp-camp-meta li { min-width: 0; overflow-wrap: anywhere; }
.vcp .vcp-camp-meta strong { color: var(--vcp-ink); font-weight: 600; }
.vcp .vcp-camp-side { display: grid; gap: 12px; justify-items: end; }
.vcp .vcp-camp-stats { display: grid; grid-template-columns: repeat(3, minmax(5.5rem, auto)); gap: 8px; margin: 0; }
.vcp .vcp-camp-stats > div { padding: 8px 12px; border: 1px solid var(--vcp-border); border-radius: 8px; background: var(--vcp-band); text-align: center; }
.vcp .vcp-camp-stats .v { font-size: 20px; font-weight: 700; color: var(--hs-navy, #111827); font-variant-numeric: tabular-nums; }
.vcp .vcp-camp-stats .l { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--vcp-muted); }
.vcp .vcp-camp-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.vcp .vcp-camp-actions form { margin: 0; }
.vcp .vcp-camp-progress { display: grid; gap: 4px; }
.vcp .vcp-camp-progress__text { font-size: 13px; color: var(--vcp-muted); }
@media (max-width: 899px) {
  .vcp .vcp-camp-head { grid-template-columns: minmax(0, 1fr); }
  .vcp .vcp-camp-side { justify-items: stretch; }
  .vcp .vcp-camp-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vcp .vcp-camp-actions { justify-content: flex-start; }
}
.vcp .vcp-progress { display: block; width: 100%; height: 8px; accent-color: var(--vcp-accent); }

/* Tabs: links styled as tabs, the current one marked; the strip scrolls inside itself. */
.vcp .vcp-tabs { position: relative; display: flex; gap: 2px; overflow-x: auto; padding: 0 4px; border: 1px solid var(--vcp-border);
  border-radius: var(--hs-radius, 10px); background: #fff; box-shadow: var(--hs-shadow, none); }
.vcp .vcp-tab { display: inline-flex; align-items: center; min-height: 46px; padding: 0 14px; text-decoration: none; color: var(--vcp-ink);
  font-size: 15px; font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; }
.vcp .vcp-tab:hover { color: var(--vcp-accent-dark); background: var(--vcp-band); }
.vcp .vcp-tab.active { border-bottom-color: var(--vcp-accent); color: var(--vcp-accent-dark); }

.vcp .vcp-ring { --pct: 0; width: 128px; height: 128px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--vcp-accent) calc(var(--pct) * 1%), #e6ebf1 0); }
.vcp .vcp-ring-inner { width: 98px; height: 98px; border-radius: 50%; background: #fff; display: grid; place-content: center; text-align: center; }
.vcp .vcp-ring-num { font-weight: 700; font-size: 20px; color: var(--hs-navy, #111827); } .vcp .vcp-ring-lbl { font-size: 12px; color: var(--vcp-muted); }
.vcp .vcp-ring--idle { background: repeating-conic-gradient(#e6ebf1 0 6deg, #f3f5f8 6deg 12deg); }
.vcp .vcp-chart-wrap { position: relative; height: 300px; } .vcp .vcp-chart-wrap--sm { height: 240px; }

/* ── Wizard: the steps, the step being worked on, the actions ── */
.vcp .vcp-stepper { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; list-style: none; margin: 0; padding: 14px 18px;
  border: 1px solid var(--vcp-border); border-radius: var(--hs-radius, 10px); background: #fff; box-shadow: var(--hs-shadow, none); counter-reset: none; }
.vcp .vcp-stepper .step { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; padding-right: 12px;
  color: var(--vcp-muted); font-size: 15px; font-weight: 600; }
.vcp .vcp-stepper .step:not(:last-child)::after { content: ""; flex: 1 1 auto; height: 2px; min-width: 12px; background: var(--vcp-border-strong); }
.vcp .vcp-stepper .dot { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #eef2f5;
  border: 2px solid var(--vcp-border-strong); color: var(--vcp-muted); font-size: 13px; font-weight: 700; }
.vcp .vcp-stepper .active { color: var(--vcp-accent-dark); }
.vcp .vcp-stepper .active .dot { background: var(--vcp-accent); border-color: var(--vcp-accent); color: #fff; box-shadow: 0 0 0 4px var(--vcp-accent-soft); }
.vcp .vcp-stepper .done { color: var(--vcp-ink); }
.vcp .vcp-stepper .done .dot { background: var(--vcp-good); border-color: var(--vcp-good); color: #fff; }
.vcp .vcp-stepper .done::after { background: var(--vcp-good); }
@media (max-width: 767px) {
  .vcp .vcp-stepper { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px 14px; }
  .vcp .vcp-stepper .step::after { display: none; }
}
.vcp .vcp-wstep { box-sizing: border-box; display: block; }
.vcp .vcp-wstep > legend { float: left; box-sizing: border-box; width: calc(100% + 40px); margin: -18px -20px 16px; padding: 12px 20px;
  background: var(--vcp-band); border-bottom: 1px solid var(--vcp-border); border-radius: var(--hs-radius, 10px) var(--hs-radius, 10px) 0 0; }
.vcp .vcp-wstep > legend + * { clear: both; }
.vcp .vcp-wstep > .vcp-h4:first-child { margin: -18px -20px 16px; padding: 12px 20px; background: var(--vcp-band);
  border-bottom: 1px solid var(--vcp-border); border-radius: var(--hs-radius, 10px) var(--hs-radius, 10px) 0 0; }
.vcp .vcp-step-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--vcp-accent);
  color: #fff; font-size: 13px; margin-right: 10px; vertical-align: 1px; }
.vcp .vcp-step-lead { margin: 0 0 14px; font-size: 14px; color: var(--vcp-muted); }
.vcp .vcp-review-kpi { padding: 12px 14px; border: 1px solid var(--vcp-border); border-radius: 8px; background: var(--vcp-band); }
.vcp .vcp-review-kpi .v { font-weight: 700; font-size: 20px; color: var(--hs-navy, #111827); font-variant-numeric: tabular-nums; }
.vcp .vcp-review-kpi .l { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--vcp-muted); }
.vcp .vcp-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0; }
.vcp .vcp-dl dt { color: var(--vcp-muted); }
.vcp .vcp-dl dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.vcp dl.row dt, .vcp dl.row dd { margin: 0 0 6px; overflow-wrap: anywhere; }
.vcp .vcp-choices { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.vcp .vcp-choices .vcp-btn { width: 100%; justify-content: flex-start; text-align: left; overflow-wrap: anywhere; }
.vcp .vcp-choice__code { font-weight: 400; opacity: .85; }

/* ── Landing ── */
.vcp .vcp-hero { display: grid; gap: 12px; padding: 26px 28px; border: 1px solid var(--vcp-border); border-radius: var(--hs-radius, 10px);
  background: linear-gradient(135deg, #fff 0%, var(--vcp-band) 100%); box-shadow: var(--hs-shadow, none); }
.vcp .vcp-hero h1 { font-size: 30px; margin: 0; max-width: 34ch; }

/* ── Housebound map (no basemap: stops and routes on light ONS outlines or a plain ground) ── */
.vcp .vcp-map { height: 440px; border: 1px solid var(--vcp-border); border-radius: 8px; background: #f6f8fb; }
.vcp .vcp-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 13px; }
.vcp .vcp-legend .item { display: inline-flex; align-items: center; gap: 6px; }
.vcp .swatch, .vcp .vcp-pin { display: inline-block; }
.vcp .swatch { width: 12px; height: 12px; border-radius: 3px; }
.vcp .vcp-pin { width: 26px; height: 26px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: grid; place-items: center;
  border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.vcp .vcp-pin span { transform: rotate(45deg); color: #fff; font-size: 12px; font-weight: 700; }
.vcp .vcp-r0 { background: #0d5bb8; } .vcp .vcp-r1 { background: #157a3a; } .vcp .vcp-r2 { background: #a85d00; }
.vcp .vcp-r3 { background: #6d28d9; } .vcp .vcp-r4 { background: #b42318; } .vcp .vcp-r5 { background: #0e7490; }
.vcp .vcp-r6 { background: #be185d; } .vcp .vcp-r7 { background: #4d7c0f; }
.vcp .leaflet-pane.vcp-outline-pane { z-index: 350; pointer-events: none; }
.vcp .vcp-geo-attr { font-size: 12px; color: var(--vcp-muted); margin: 4px 0 0; }
.vcp #vcp-hb-controls { align-items: end; }

/* The Google directions disclosure (a native modal dialog). */
.vcp-dialog { box-sizing: border-box; width: min(36rem, calc(100vw - 2rem)); max-width: none; border: 1px solid var(--vcp-border-strong, #c8d0dd);
  border-radius: var(--hs-radius, 10px); padding: 20px 22px; color: var(--vcp-ink, #1f2937); box-shadow: 0 12px 40px rgba(17, 24, 39, .25); }
.vcp-dialog::backdrop { background: rgba(17, 24, 39, .45); }
.vcp-dialog h2 { margin: 0 0 8px; font-size: 18px; }
.vcp-dialog ol { max-height: 40vh; overflow: auto; padding-left: 1.5rem; }
.vcp-dialog .vcp-dialog-actions { display: flex; gap: 10px; flex-wrap: wrap; }

@media (max-width: 575px) {
  .vcp .vcp-panel { padding: 16px; }
  .vcp .vcp-panel > .vcp-sec:first-child { margin: -16px -16px 14px; padding: 12px 16px; }
  .vcp .vcp-wstep > legend { width: calc(100% + 32px); margin: -16px -16px 14px; padding: 12px 16px; }
  .vcp .vcp-wstep > .vcp-h4:first-child { margin: -16px -16px 14px; padding: 12px 16px; }
  .vcp h1, .vcp .vcp-title, .vcp .vcp-camp-title h1 { font-size: 22px; }
  .vcp .vcp-hero { padding: 20px; } .vcp .vcp-hero h1 { font-size: 24px; }
  .vcp .vcp-camp-head { padding: 16px; }
  .vcp-formfoot .vcp-btn, .vcp-formfoot > a, .vcp-formfoot > div { flex: 1 1 100%; }
  .vcp-formfoot > div { display: flex; gap: 10px; }
  .vcp-formfoot > div .vcp-btn { flex: 1 1 0; min-width: 0; }
  .vcp .vcp-ring { width: 110px; height: 110px; } .vcp .vcp-ring-inner { width: 84px; height: 84px; }
}

@media print {
  html { scroll-padding-top: 0; }
  .vcp .vcp-tabs, .vcp .vcp-toolnav, .vcp .vcp-help, .vcp form, .vcp #vcp-hb-controls, .vcp .vcp-camp-actions,
  .vcp .vcp-collapse { display: none !important; }
  .vcp .vcp-panel, .vcp .vcp-kpi, .vcp .vcp-camp-head { box-shadow: none; border-color: #999; break-inside: avoid-page; }
  .vcp .table-responsive { overflow: visible; border: 0; }
}

/* The housebound controls: the Plan button sits at the foot of its column, level with the inputs. */
.vcp-field--action { justify-content: flex-end; }
.vcp-field--action .vcp-btn { width: 100%; }
.vcp details.vcp-panel > summary { cursor: pointer; }
