/* Practice Overview, v2 (R4, owner instruction 2026-11-20): the Intelligence v2 layout of the approved
 * Practice Stock Take and Vaccine Campaign Planner pages, on the shell's tokens.
 *
 * Presentation only: the sections, cards, figures and their calculations are v1's. A page head with an
 * eyebrow, the practice's name and secondary identifier chips; one row of section tabs that scrolls
 * inside itself (with an edge shadow where more tabs lie) from 1024px, and a native disclosure menu below; cards with a tinted
 * header band and uppercase figure labels; period pills; sparklines on a quiet ground in the accent.
 * No inline style anywhere: the strict CSP admits this file only. `.po`, `.po-card-head`, `.po-figure`
 * and `.po-scroll` are positioned, so a visually hidden element can never widen the document.
 */
.po {
  --po-ink: var(--hs-ink, #1f2937);
  --po-quiet: var(--hs-ink-muted, #55637a);
  --po-line: var(--hs-border, #dfe4ec);
  --po-surface: var(--hs-surface, #ffffff);
  --po-ground: var(--hs-ground, #f4f6fa);
  --po-accent: var(--hs-aqua, #0d5bb8);
  --po-accent-dark: #0a4c9c;
  --po-accent-soft: #e8f0fc;
  --po-band: #f2f6fc;
  --po-navy: var(--hs-navy, #111827);
  --po-warn-bg: var(--hs-warn-bg, #fff8e6);
  --po-warn-border: var(--hs-warn-border, #e6c34a);
  --po-warn-ink: var(--hs-warn-ink, #6b5200);
  --po-radius: var(--hs-radius, 10px);
  position: relative;
  color: var(--po-ink);
  max-width: 100%;
  min-width: 0;
}
.po-visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.po-card-head, .po-figure, .po-scroll { position: relative; }

/* ── Page head ── */
.po-head { margin: 0 0 18px; }
.po-eyebrow { margin: 0 0 6px; color: var(--hs-teal-deep, #0b7d7d); font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; }
.po-title { margin: 0 0 8px; font-size: 26px; line-height: 1.2; color: var(--po-navy); overflow-wrap: anywhere; }
.po-ids { display: flex; flex-wrap: wrap; gap: 6px 8px; list-style: none; padding: 0; margin: 0 0 10px; }
.po-chip { display: inline-flex; align-items: baseline; gap: 6px; max-width: 100%; padding: 3px 10px;
  border: 1px solid var(--po-line); border-radius: 999px; background: var(--po-surface); font-size: 13px; }
.po-chip-key { color: var(--po-quiet); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.po-chip-value { font-weight: 600; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.po-lede { color: var(--po-quiet); margin: 0; max-width: var(--hs-measure, 68ch); }
.po-small { color: var(--po-quiet); font-size: 0.875rem; margin: 0.5rem 0 0; }
.po-code { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--po-ink); }
.po-notice {
  background: var(--po-warn-bg); border: 1px solid var(--po-warn-border); color: var(--po-warn-ink);
  border-radius: var(--hs-radius-sm, 6px); padding: 0.75rem 1rem; margin: 0 0 1rem;
}

/* ── Section navigation: one row of tabs, scrolling inside itself; a disclosure on a phone ── */
.po-nav { margin: 0 0 18px; }
/* The scroll cue: shadows at an edge that has more tabs beyond it (background-attachment: local), no script. */
.po-tabs { position: relative; display: flex; gap: 0; overflow-x: auto; list-style: none; margin: 0; padding: 0 4px;
  border: 1px solid var(--po-line); border-radius: var(--po-radius); box-shadow: var(--hs-shadow, none); scrollbar-width: thin;
  background:
    linear-gradient(to right, var(--po-surface) 30%, rgba(255, 255, 255, 0)) left center / 40px 100% no-repeat local,
    linear-gradient(to left, var(--po-surface) 30%, rgba(255, 255, 255, 0)) right center / 40px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(17, 24, 39, .18), rgba(17, 24, 39, 0)) left center / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(17, 24, 39, .18), rgba(17, 24, 39, 0)) right center / 12px 100% no-repeat scroll,
    var(--po-surface); }
.po-tabs li { flex: none; }
.po-tab { display: inline-flex; align-items: center; min-height: 46px; padding: 0 11px; text-decoration: none;
  color: var(--po-ink); font-size: 14px; font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; }
.po-tab:hover { color: var(--po-accent-dark); background: var(--po-band); }
.po-tab.is-current { border-bottom-color: var(--po-accent); color: var(--po-accent-dark); }
.po-tab:focus-visible { outline: 3px solid var(--po-accent); outline-offset: -3px; }
.po-menu { display: none; }
/* Below 1024px the strip would hide most sections behind a sideways scroll: the menu instead. */
@media (max-width: 1023.98px) {
  .po-tabs { display: none; }
  .po-menu { display: block; position: relative; border: 1px solid var(--po-line); border-radius: var(--po-radius);
    background: var(--po-surface); box-shadow: var(--hs-shadow, none); }
  .po-menu > summary { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; cursor: pointer;
    font-weight: 600; list-style: none; }
  .po-menu > summary::-webkit-details-marker { display: none; }
  .po-menu > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
  .po-menu[open] > summary::after { transform: rotate(-135deg); }
  .po-menu > summary:focus-visible { outline: 3px solid var(--po-accent); outline-offset: -3px; border-radius: var(--po-radius); }
  .po-menu-key { color: var(--po-quiet); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
  .po-menu-current { color: var(--po-accent-dark); }
  .po-menu ul { list-style: none; margin: 0; padding: 4px 0; border-top: 1px solid var(--po-line); }
  .po-menu a { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; text-decoration: none; color: var(--po-ink);
    border-left: 3px solid transparent; }
  .po-menu a:hover { background: var(--po-band); }
  .po-menu a.is-current { border-left-color: var(--po-accent); background: var(--po-accent-soft); }
  .po-menu a:focus-visible { outline: 3px solid var(--po-accent); outline-offset: -3px; }
  .po-menu-label { font-weight: 600; }
  .po-menu-desc { font-size: 13px; color: var(--po-quiet); }
}

.po-section-head { margin: 0 0 14px; }
.po-section-title { font-size: 20px; line-height: 1.25; margin: 0; color: var(--po-navy); }
.po-section-head .po-small { margin-top: 4px; }

/* ── Pills: periods and dataset currency ── */
.po-pill { display: inline-flex; align-items: center; min-height: 22px; padding: 1px 9px; border-radius: 999px;
  background: var(--po-accent-soft); color: var(--po-accent-dark); font-size: 12.5px; font-weight: 700;
  white-space: nowrap; font-variant-numeric: tabular-nums; }
.po-pill--muted { background: var(--po-ground); color: var(--po-quiet); font-weight: 600; }
.po-pill--period { margin: 0; flex: none; }

/* ── Bands: reporting periods, data currency, the section index ── */
.po-band { position: relative; background: var(--po-surface); border: 1px solid var(--po-line); border-radius: var(--po-radius);
  box-shadow: var(--hs-shadow, none); padding: 14px 18px; margin: 0 0 16px; min-width: 0; }
.po-band-title { margin: -14px -18px 12px; padding: 10px 18px; background: var(--po-band); border-bottom: 1px solid var(--po-line);
  border-radius: var(--po-radius) var(--po-radius) 0 0; font-size: 13px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--po-quiet); }
.po-period-list, .po-currency-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px 20px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.po-period-list li, .po-currency-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px;
  min-width: 0; padding: 5px 0; border-bottom: 1px solid var(--po-line); }
.po-period-label, .po-currency-label { color: var(--po-ink); font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.po-periods .po-small { margin-top: 10px; }

/* ── Cards ── */
.po-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 16px; margin: 0 0 16px; }
.po-card { position: relative; background: var(--po-surface); border: 1px solid var(--po-line); border-radius: var(--po-radius);
  min-width: 0; box-shadow: var(--hs-shadow, none); display: flex; flex-direction: column; }
.po-card--wide { grid-column: 1 / -1; }
.po-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px;
  padding: 12px 18px; background: var(--po-band); border-bottom: 1px solid var(--po-line);
  border-radius: var(--po-radius) var(--po-radius) 0 0; }
.po-card-title { font-size: 16px; line-height: 1.3; margin: 0; color: var(--po-navy); min-width: 0; overflow-wrap: anywhere; }
.po-card-body { padding: 16px 18px 18px; min-width: 0; }
.po-state { color: var(--po-quiet); font-style: italic; margin: 0.25rem 0; }
.po-figures { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 9rem), 1fr)); gap: 14px 16px; margin: 0; }
.po-figure { min-width: 0; padding-left: 10px; border-left: 3px solid var(--po-accent-soft); }
.po-figure dt { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--po-quiet); }
.po-figure dd { margin: 3px 0 0; display: flex; flex-direction: column; gap: 2px; }
.po-value { font-size: 22px; line-height: 1.2; font-weight: 700; color: var(--po-navy); font-variant-numeric: tabular-nums;
  overflow-wrap: break-word; hyphens: auto; }
.po-reason { font-size: 0.95rem; color: var(--po-quiet); font-style: italic; }
.po-note { font-size: 12.5px; color: var(--po-quiet); }
.po-items { margin: 0.75rem 0 0; padding-left: 1.25rem; }
.po-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin: 14px 0 0; }
.po-links a, .po-gov a, .po-choices a, .po-index a { color: var(--po-accent-dark); font-weight: 600; }

/* ── Trends: one sparkline style, the accent on a quiet ground ── */
.po-trend { margin: 16px 0 0; }
.po-trend figcaption { font-size: 12.5px; font-weight: 600; color: var(--po-quiet); margin: 0 0 6px; }
.po-spark { display: block; max-width: 100%; height: auto; }
.po-spark-bg { fill: var(--po-band); }
.po-spark-line { stroke: var(--po-accent); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.po-spark-dot { fill: var(--po-accent); }
.po-spark-last { fill: var(--po-surface); stroke: var(--po-accent); stroke-width: 2; }
.po-details { margin-top: 6px; }
.po-details summary { cursor: pointer; color: var(--po-accent-dark); font-size: 13px; font-weight: 600; }
.po-details summary:focus-visible { outline: 3px solid var(--po-accent); outline-offset: 2px; }

/* ── Tables ── */
.po-scroll { overflow-x: auto; max-width: 100%; margin: 12px 0 0; border: 1px solid var(--po-line); border-radius: 8px; }
.po-scroll:focus-visible { outline: 3px solid var(--po-accent); outline-offset: 2px; }
.po-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.po-table caption { text-align: left; font-weight: 700; padding: 8px 12px; color: var(--po-navy); }
.po-table th, .po-table td { border-bottom: 1px solid var(--po-line); padding: 8px 12px; text-align: left; vertical-align: top; }
.po-table tbody tr:last-child th, .po-table tbody tr:last-child td { border-bottom: 0; }
.po-table td { font-variant-numeric: tabular-nums; }
.po-table thead th { background: var(--po-ground); color: var(--po-quiet); font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; white-space: nowrap; }

/* ── Lists: the section index, governance, choosing a practice ── */
.po-choices, .po-gov, .po-index-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.po-index-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
.po-index-list a { display: flex; flex-direction: column; gap: 2px; height: 100%; box-sizing: border-box; padding: 10px 14px;
  border: 1px solid var(--po-line); border-radius: 8px; text-decoration: none; background: var(--po-surface); }
.po-index-list a:hover { border-color: var(--po-accent); background: var(--po-accent-soft); }
.po-index-list a:focus-visible, .po-choices a:focus-visible { outline: 3px solid var(--po-accent); outline-offset: 2px; }
.po-index-desc { color: var(--po-quiet); font-weight: 400; font-size: 13.5px; }
.po-tag { display: inline-block; font-size: 0.75rem; padding: 0 0.4rem; border: 1px solid var(--po-line); border-radius: 999px; color: var(--po-quiet); }
.po-choices a { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 12px 16px; border: 1px solid var(--po-line);
  border-radius: var(--po-radius); background: var(--po-surface); text-decoration: none; box-shadow: var(--hs-shadow, none); }
.po-choices a:hover { border-color: var(--po-accent); }
.po-choice-name { color: var(--po-navy); font-size: 16px; overflow-wrap: anywhere; }
.po-choice-code { color: var(--po-quiet); font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }

@media (max-width: 575.98px) {
  .po-title { font-size: 22px; }
  .po-band { padding: 12px 14px; }
  .po-band-title { margin: -12px -14px 10px; padding: 10px 14px; }
  .po-card-head { padding: 10px 14px; }
  .po-card-body { padding: 14px; }
  .po-value { font-size: 21px; }
}
@media print {
  .po-nav { display: none; }
  .po-card, .po-band { box-shadow: none; break-inside: avoid-page; }
}
