/* Verse Health, the app (2026-10-12). Every rule sits under .vh-app. Layout answers the app's own width (container
   queries), so it is the same in a phone, a narrow window and a wide one.

   Paper holds the record; ink holds the tools. Everything clinical is dark text on an ivory sheet ruled like a ledger
   (the date in the margin column, the source stamped on the row). Navigation, forms and settings are on ink. Colour
   beyond ink and paper means a state only: brick critical, ochre flagged, moss done.
   Plan and reasons: docs/superpowers/plans/2026-10-12-verse-health-trust-and-ui.md, section 4. */

@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('/VerseServices/Health/fonts/ibm-plex-sans-var-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('/VerseServices/Health/fonts/ibm-plex-sans-var-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

.vh-app {
    --ink: #12161F;
    --ink-deep: #0E1119;
    --ink-raise: #1A1F2B;
    --ink-raise-2: #232938;
    --ink-line: #2B3140;
    --ink-line-2: #3F4759;
    --on-ink: #E7E4DC;
    --on-ink-2: #9AA1B2;
    --paper: #F1EDE3;
    --paper-ink: #1B1D24;
    --paper-ink-2: #565B68;
    --rule: #D8D1C0;
    --rule-strong: #B9B09B;
    --brick: #A3271F;
    --ochre: #8A5A00;
    --moss: #2F6B4A;
    --brick-on-ink: #F0857B;
    --ochre-on-ink: #E9B44C;
    --moss-on-ink: #6FCB9A;
    --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    container-type: inline-size;
    container-name: vh;
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--ink);
    color: var(--on-ink);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.45;
    font-variant-numeric: tabular-nums;
    -webkit-text-size-adjust: 100%;
}

.vh-app *, .vh-app *::before, .vh-app *::after { box-sizing: border-box; }
.vh-app :is(h1, h2, h3, h4, p, ul, ol, dl, dd, figure, table, fieldset, legend) { margin: 0; padding: 0; }
.vh-app :is(ul, ol) { list-style: none; }
.vh-app fieldset { border: 0; min-width: 0; }
.vh-app :is(button, input, select, textarea) { font: inherit; color: inherit; }
.vh-app button { cursor: pointer; }
.vh-app [hidden] { display: none !important; }
.vh-app .vh-vh { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.vh-app :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }
.vh-app .vh-sheet :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline-color: var(--paper-ink); }

/* ── shell ── */
.vh-app .vh-shell { display: grid; grid-template-columns: 204px minmax(0, 1fr); height: 100%; }

.vh-app .vh-rail { display: flex; flex-direction: column; min-height: 0; background: var(--ink-deep); border-right: 1px solid var(--ink-line); padding: 14px 10px; }
.vh-app .vh-nav { display: flex; flex-direction: column; gap: 2px; }
.vh-app .vh-nav-item { display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 8px 10px; border: 0; border-left: 2px solid transparent; border-radius: 0 6px 6px 0; background: none; color: var(--on-ink-2); font-weight: 500; text-align: left; text-decoration: none; }
.vh-app .vh-nav-item:hover { color: var(--on-ink); background: var(--ink-raise); }
.vh-app .vh-nav-item[aria-current="page"] { color: var(--on-ink); background: var(--ink-raise); border-left-color: var(--paper); }
.vh-app .vh-nav-item svg { flex: none; width: 18px; height: 18px; }
.vh-app .vh-rail-foot { margin-top: auto; padding: 12px 10px 2px; border-top: 1px solid var(--ink-line); color: var(--on-ink-2); font-size: 12.5px; overflow-wrap: anywhere; }
.vh-app .vh-rail-foot strong { display: block; color: var(--on-ink); font-weight: 500; }

.vh-app .vh-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.vh-app .vh-top { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 10px 28px; border-bottom: 1px solid var(--ink-line); }
.vh-app .vh-title { font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
.vh-app .vh-title:focus { outline: none; }
.vh-app .vh-screen { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 22px 28px 48px; scrollbar-color: var(--ink-line-2) transparent; }
.vh-app .vh-screen > * + * { margin-top: 20px; }
.vh-app .vh-measure { max-width: 72ch; }

/* The band that says a visitor is looking at invented records. */
.vh-app .vh-preview { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 9px 28px; background: #2A2413; border-bottom: 1px solid #5A4A1C; color: #F3DFA6; }
.vh-app .vh-preview p { max-width: 70ch; }
.vh-app .vh-notice { padding: 11px 14px; border-left: 3px solid var(--ochre-on-ink); background: var(--ink-raise); border-radius: 0 6px 6px 0; max-width: 78ch; }
.vh-app .vh-notice.is-danger { border-left-color: var(--brick-on-ink); }
.vh-app .vh-notice p + p { margin-top: 6px; }
.vh-app .vh-notice .vh-row-actions { margin-top: 10px; }

/* ── buttons ── */
.vh-app .vh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 6px 14px; border: 1px solid var(--ink-line-2); border-radius: 6px; background: transparent; color: var(--on-ink); font-weight: 500; text-decoration: none; white-space: nowrap; }
.vh-app .vh-btn:hover { border-color: var(--paper); }
.vh-app .vh-btn svg { flex: none; width: 16px; height: 16px; }
.vh-app .vh-btn.is-primary { background: var(--paper); border-color: var(--paper); color: var(--paper-ink); font-weight: 600; }
.vh-app .vh-btn.is-primary:hover { background: #FFFFFF; border-color: #FFFFFF; }
.vh-app .vh-btn.is-danger { border-color: var(--brick-on-ink); color: var(--brick-on-ink); }
.vh-app .vh-btn.is-danger:hover { background: rgba(240, 133, 123, 0.12); }
.vh-app .vh-btn.is-quiet { border-color: transparent; color: var(--on-ink-2); padding-left: 8px; padding-right: 8px; }
.vh-app .vh-btn.is-quiet:hover { color: var(--on-ink); background: var(--ink-raise); }
.vh-app .vh-btn:disabled, .vh-app .vh-btn[aria-disabled="true"] { opacity: 0.5; cursor: default; }
.vh-app .vh-sheet .vh-btn { border-color: var(--rule-strong); color: var(--paper-ink); min-height: 32px; padding: 4px 11px; font-size: 13px; }
.vh-app .vh-sheet .vh-btn:hover { border-color: var(--paper-ink); }
.vh-app .vh-sheet .vh-btn.is-quiet { border-color: transparent; color: var(--paper-ink-2); }
.vh-app .vh-sheet .vh-btn.is-quiet:hover { color: var(--paper-ink); background: rgba(27, 29, 36, 0.07); }
.vh-app .vh-sheet .vh-btn.is-danger { border-color: transparent; color: var(--brick); }
.vh-app .vh-sheet .vh-btn.is-danger:hover { background: rgba(163, 39, 31, 0.09); }
.vh-app .vh-link { color: inherit; text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; padding: 0; font-weight: 500; }
.vh-app .vh-row-actions { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── tabs inside a screen ── */
.vh-app .vh-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--ink-line); overflow-x: auto; scrollbar-width: none; }
.vh-app .vh-tabs::-webkit-scrollbar { display: none; }
.vh-app .vh-tab { flex: none; position: relative; min-height: 40px; padding: 9px 12px; border: 0; background: none; color: var(--on-ink-2); font-weight: 500; text-decoration: none; white-space: nowrap; }
.vh-app .vh-tab:hover { color: var(--on-ink); }
.vh-app .vh-tab[aria-current="page"] { color: var(--on-ink); }
.vh-app .vh-tab[aria-current="page"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; background: var(--paper); }

/* ── paper ── */
.vh-app .vh-sheet { position: relative; background: var(--paper); color: var(--paper-ink); border-radius: 4px; overflow: hidden; }
.vh-app .vh-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding: 12px 18px; border-bottom: 1px solid var(--rule-strong); }
.vh-app .vh-sheet-title { font-size: 15px; font-weight: 600; }
.vh-app .vh-sheet-sub { color: var(--paper-ink-2); font-size: 13px; }
.vh-app .vh-sheet-body { padding: 18px 18px 18px; }
.vh-app .vh-sheet-foot { padding: 10px 18px 12px; border-top: 1px solid var(--rule); color: var(--paper-ink-2); font-size: 13px; }
.vh-app .vh-sheet.is-sample::after { content: "Sample"; position: absolute; top: 9px; right: 14px; padding: 1px 8px; border: 1px solid currentColor; border-radius: 3px; color: var(--ochre); font-size: 11.5px; font-weight: 600; transform: rotate(-2deg); pointer-events: none; }
.vh-app .vh-sheet.is-sample .vh-sheet-head { padding-right: 86px; }

/* A ledger row: the date in the margin column, then what it is, then its value and the stamp of where it came from. */
.vh-app .vh-rows > li { display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; border-bottom: 1px solid var(--rule); }
.vh-app .vh-rows > li:last-child { border-bottom: 0; }
.vh-app .vh-row-date { padding: 12px 10px 12px 18px; border-right: 1px solid var(--rule); color: var(--paper-ink-2); font-size: 13px; line-height: 1.35; }
.vh-app .vh-row-date strong { display: block; color: var(--paper-ink); font-weight: 500; white-space: nowrap; }
.vh-app .vh-row-main { padding: 11px 14px 12px; min-width: 0; }
.vh-app .vh-row-side { padding: 11px 18px 12px 6px; display: flex; flex-direction: column; align-items: flex-end; gap: 7px; text-align: right; }
.vh-app .vh-row-title { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.vh-app .vh-row-title button { all: unset; cursor: pointer; font: inherit; text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 3px; padding: 10px 0; margin: -10px 0; }
.vh-app .vh-row-title button:hover { text-decoration-color: currentColor; }
.vh-app .vh-row-text { color: var(--paper-ink-2); font-size: 13.5px; overflow-wrap: anywhere; }
.vh-app .vh-row-text + .vh-row-text, .vh-app .vh-row-title + .vh-row-text { margin-top: 2px; }
.vh-app .vh-row-main .vh-row-actions { margin-top: 8px; margin-left: -8px; }
.vh-app .vh-value { font-size: 17px; font-weight: 600; white-space: nowrap; }
.vh-app .vh-value small { font-size: 12.5px; font-weight: 400; color: var(--paper-ink-2); margin-left: 3px; }
.vh-app .vh-rows.is-plain > li { grid-template-columns: minmax(0, 1fr) auto; }
.vh-app .vh-rows.is-plain .vh-row-main { padding-left: 18px; }

/* The stamp: where a row came from. Its border says what kind of source it is. */
.vh-app .vh-stamp { display: inline-block; max-width: 190px; padding: 1px 8px; border: 1px solid currentColor; border-radius: 3px; color: var(--paper-ink-2); font-size: 11.5px; font-weight: 500; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transform: rotate(-1.5deg); }
.vh-app .vh-stamp.is-manual { border-style: dashed; }
.vh-app .vh-stamp.is-ehr { border-style: double; border-width: 3px; padding: 0 7px; }
.vh-app .vh-stamp.is-sample { color: var(--ochre); }
.vh-app .vh-stamp.on-ink { color: var(--on-ink-2); transform: none; }

/* What the source said about a result. A shape as well as a colour. */
.vh-app .vh-flag { display: inline-flex; align-items: baseline; gap: 5px; font-size: 13px; font-weight: 500; color: var(--paper-ink-2); }
.vh-app .vh-flag::before { content: ""; flex: none; width: 8px; height: 8px; align-self: center; border: 1.5px solid currentColor; border-radius: 50%; }
.vh-app .vh-flag.is-normal { color: var(--moss); }
.vh-app .vh-flag.is-normal::before { background: currentColor; }
.vh-app .vh-flag.is-flagged { color: var(--ochre); }
.vh-app .vh-flag.is-flagged::before { border-radius: 0; background: currentColor; transform: rotate(45deg); }
.vh-app .vh-flag.is-critical { color: var(--brick); font-weight: 600; }
.vh-app .vh-flag.is-critical::before { border-radius: 0; background: currentColor; }

/* ── on ink: lists of tools and states ── */
.vh-app .vh-group-title { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.vh-app .vh-help { color: var(--on-ink-2); max-width: 72ch; }
.vh-app .vh-list { border: 1px solid var(--ink-line); border-radius: 6px; overflow: hidden; }
.vh-app .vh-list > li { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--ink-line); background: var(--ink-raise); }
.vh-app .vh-list > li:last-child { border-bottom: 0; }
.vh-app .vh-list-main { flex: 1 1 240px; min-width: 0; }
.vh-app .vh-list-title { font-weight: 600; overflow-wrap: anywhere; }
.vh-app .vh-list-text { color: var(--on-ink-2); font-size: 13.5px; overflow-wrap: anywhere; }
.vh-app .vh-state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--on-ink-2); }
.vh-app .vh-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.vh-app .vh-state.is-ok { color: var(--moss-on-ink); }
.vh-app .vh-state.is-warn { color: var(--ochre-on-ink); }
.vh-app .vh-state.is-bad { color: var(--brick-on-ink); }
.vh-app .vh-checks > li { display: flex; align-items: baseline; gap: 10px; border-bottom: 1px solid var(--ink-line); }
.vh-app .vh-checks > li:last-child { border-bottom: 0; }
.vh-app .vh-checks time { flex: none; color: var(--on-ink-2); font-size: 13px; min-width: 76px; }
.vh-app .vh-checks :is(a, span) { display: inline-block; padding: 11px 0; }

/* Empty, loading and failed: a sentence and what to do next. */
.vh-app .vh-blank { padding: 26px 18px; color: var(--paper-ink-2); }
.vh-app .vh-blank p { max-width: 60ch; }
.vh-app .vh-blank .vh-row-actions { margin-top: 12px; }
.vh-app .vh-blank.on-ink { padding: 4px 0; color: var(--on-ink-2); }
.vh-app .vh-first { max-width: 60ch; padding: 6px 0 4px; }
.vh-app .vh-first h3 { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 8px; }
.vh-app .vh-first p { color: var(--on-ink-2); margin-bottom: 16px; }

/* ── forms ── */
.vh-app .vh-form { display: grid; gap: 14px; }
.vh-app .vh-form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.vh-app .vh-field > label, .vh-app .vh-field > legend { display: block; margin-bottom: 5px; font-size: 13px; font-weight: 500; color: var(--on-ink-2); }
.vh-app .vh-field :is(input, select, textarea) { display: block; width: 100%; min-height: 40px; padding: 8px 11px; border: 1px solid var(--ink-line-2); border-radius: 6px; background: var(--ink); color: var(--on-ink); font-size: 15px; }
.vh-app .vh-field textarea { min-height: 84px; resize: vertical; line-height: 1.45; }
.vh-app :is(input, textarea)::placeholder { color: var(--on-ink-2); opacity: 0.8; }
.vh-app .vh-sheet :is(input, textarea)::placeholder { color: var(--paper-ink-2); opacity: 0.85; }
.vh-app .vh-field :is(input, select, textarea):focus { border-color: var(--paper); }
.vh-app .vh-field select option { background: var(--ink-raise); color: var(--on-ink); }
.vh-app .vh-field :is(input, select, textarea)[aria-invalid="true"] { border-color: var(--brick-on-ink); }
.vh-app .vh-field-hint { margin-top: 5px; font-size: 12.5px; color: var(--on-ink-2); }
.vh-app .vh-field-error { margin-top: 5px; font-size: 13px; color: var(--brick-on-ink); }
.vh-app .vh-field-error:empty { display: none; }
.vh-app .vh-checkline { display: flex; align-items: flex-start; gap: 9px; min-height: 28px; padding: 3px 0; }
.vh-app .vh-checkline input { flex: none; width: 17px; height: 17px; min-height: 0; margin: 2px 0 0; padding: 0; accent-color: var(--paper); }
.vh-app .vh-form-error { padding: 9px 12px; border-left: 3px solid var(--brick-on-ink); background: rgba(240, 133, 123, 0.1); border-radius: 0 6px 6px 0; }
.vh-app .vh-form-error:empty { display: none; }

/* On paper a field is a line to write on. */
.vh-app .vh-sheet .vh-field > label { color: var(--paper-ink-2); }
.vh-app .vh-sheet .vh-field :is(input, select, textarea) { border: 0; border-bottom: 1px solid var(--rule-strong); border-radius: 0; background: transparent; color: var(--paper-ink); padding-left: 2px; padding-right: 2px; }
.vh-app .vh-sheet .vh-field textarea { border: 1px solid var(--rule-strong); border-radius: 3px; padding: 8px 10px; }
.vh-app .vh-sheet .vh-field :is(input, select, textarea):focus { border-color: var(--paper-ink); }
.vh-app .vh-sheet .vh-field-hint { color: var(--paper-ink-2); }
.vh-app .vh-sheet .vh-field-error, .vh-app .vh-sheet .vh-form-error { color: var(--brick); }
.vh-app .vh-sheet .vh-form-error { border-left-color: var(--brick); background: rgba(163, 39, 31, 0.07); }
.vh-app .vh-sheet .vh-checkline input { accent-color: var(--paper-ink); }

/* ── dialogs ── */
.vh-app .vh-layer { position: absolute; inset: 0; z-index: 30; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; background: rgba(6, 8, 13, 0.72); overflow-y: auto; }
.vh-app .vh-dialog { width: 100%; max-width: 520px; background: var(--ink-raise); border: 1px solid var(--ink-line-2); border-radius: 8px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55); }
.vh-app .vh-dialog.is-wide { max-width: 720px; }
.vh-app .vh-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--ink-line); }
.vh-app .vh-dialog-title { font-size: 17px; font-weight: 600; }
.vh-app .vh-dialog-body { padding: 16px 18px; }
.vh-app .vh-dialog-body > * + * { margin-top: 12px; }
.vh-app .vh-dialog-body p { max-width: 62ch; }
.vh-app .vh-dialog-foot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 12px 18px 16px; }
.vh-app .vh-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 0; border-radius: 6px; background: none; color: var(--on-ink-2); }
.vh-app .vh-icon-btn:hover { color: var(--on-ink); background: var(--ink-raise-2); }
.vh-app .vh-icon-btn svg { width: 18px; height: 18px; }
.vh-app .vh-choices { display: grid; gap: 6px; }
.vh-app .vh-choice { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 8px 12px; border: 1px solid var(--ink-line); border-radius: 6px; background: var(--ink); color: var(--on-ink); text-align: left; }
.vh-app .vh-choice:hover { border-color: var(--paper); }
.vh-app .vh-choice svg { flex: none; width: 18px; height: 18px; color: var(--on-ink-2); }
.vh-app .vh-choice span { display: block; }
.vh-app .vh-choice small { display: block; color: var(--on-ink-2); font-size: 12.5px; }
.vh-app .vh-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 16px; }
.vh-app .vh-facts dt { color: var(--on-ink-2); }
.vh-app .vh-facts dd { overflow-wrap: anywhere; }

/* ── the status line (what just happened) ── */
.vh-app .vh-status { position: absolute; left: 50%; bottom: 18px; z-index: 40; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; width: max-content; max-width: min(560px, calc(100% - 28px)); padding: 10px 12px 10px 14px; background: var(--ink-raise-2); color: var(--on-ink); border: 1px solid var(--ink-line-2); border-left: 3px solid var(--moss-on-ink); border-radius: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55); font-weight: 500; }
.vh-app .vh-status.is-error { border-left-color: var(--brick-on-ink); }
.vh-app .vh-status button { flex: none; border: 0; background: none; color: inherit; text-decoration: underline; text-underline-offset: 3px; padding: 4px 6px; }

/* ── charts: a line of readings, each a dot, with the same numbers as a table ── */
.vh-app .vh-chart { padding: 6px 18px 14px; }
.vh-app .vh-chart + .vh-rows { border-top: 1px solid var(--rule); }
.vh-app .vh-chart-summary { color: var(--paper-ink-2); font-size: 13.5px; padding: 8px 0 4px; }
.vh-app .vh-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.vh-app .vh-chart .axis { stroke: var(--rule-strong); stroke-width: 1; }
.vh-app .vh-chart .grid { stroke: var(--rule); stroke-width: 1; }
.vh-app .vh-chart .line { fill: none; stroke: var(--paper-ink); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.vh-app .vh-chart .line.is-second { stroke-dasharray: 5 4; }
.vh-app .vh-chart .dot { fill: var(--paper); stroke: var(--paper-ink); stroke-width: 1.6; }
.vh-app .vh-chart .dot.is-second { fill: var(--paper-ink); }
.vh-app .vh-chart text { fill: var(--paper-ink-2); font-size: 11px; font-family: var(--font); }
.vh-app .vh-chart-key { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--paper-ink-2); padding-top: 4px; }
.vh-app .vh-chart-key span::before { content: ""; display: inline-block; width: 18px; margin-right: 6px; vertical-align: middle; border-top: 2px solid var(--paper-ink); }
.vh-app .vh-chart-key span.is-second::before { border-top-style: dashed; }
.vh-app details.vh-more { padding: 0 18px 14px; }
.vh-app details.vh-more > summary { display: inline-block; cursor: pointer; padding: 6px 0; font-size: 13.5px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.vh-app .vh-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.vh-app .vh-table :is(th, td) { padding: 7px 10px 7px 0; text-align: left; border-bottom: 1px solid var(--rule); vertical-align: top; }
.vh-app .vh-table th { font-weight: 500; color: var(--paper-ink-2); }
.vh-app .vh-table.on-ink :is(th, td) { border-bottom-color: var(--ink-line); }
.vh-app .vh-table.on-ink th { color: var(--on-ink-2); }
.vh-app .vh-scroll-x { overflow-x: auto; }

.vh-app .vh-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vh-app .vh-chip { min-height: 32px; padding: 4px 12px; border: 1px solid var(--ink-line-2); border-radius: 999px; background: none; color: var(--on-ink-2); font-size: 13px; font-weight: 500; }
.vh-app .vh-chip:hover { color: var(--on-ink); border-color: var(--on-ink-2); }
.vh-app .vh-chip[aria-pressed="true"] { background: var(--paper); border-color: var(--paper); color: var(--paper-ink); }

.vh-app .vh-search { display: flex; gap: 8px; max-width: 520px; }
.vh-app .vh-search input { flex: 1 1 auto; min-height: 40px; padding: 8px 12px; border: 1px solid var(--ink-line-2); border-radius: 6px; background: var(--ink-deep); color: var(--on-ink); font-size: 15px; }
.vh-app .vh-search input:focus { border-color: var(--paper); }

/* ── spacing and small parts used across screens ── */
.vh-app .vh-screen > * { max-width: 920px; }
.vh-app .vh-stack > * + * { margin-top: 20px; }
.vh-app .vh-stack-s > * + * { margin-top: 10px; }
.vh-app .vh-group-title + .vh-help { margin-bottom: 12px; }
.vh-app .vh-narrow { max-width: 320px; }
.vh-app .vh-plain-list { list-style: disc; padding-left: 20px; }
.vh-app .vh-plain-list > li + li { margin-top: 8px; }
.vh-app .vh-dialog-body h4 { font-size: 14px; font-weight: 600; padding-top: 4px; }
.vh-app .vh-row-title button:focus-visible { outline: 2px solid var(--paper-ink); outline-offset: 2px; border-radius: 2px; }
.vh-app .vh-sheet .vh-btn.is-primary { background: var(--paper-ink); border-color: var(--paper-ink); color: var(--paper); font-weight: 600; }
.vh-app .vh-sheet .vh-btn.is-primary:hover { background: #000; border-color: #000; }
.vh-app .vh-sheet .vh-btn.is-danger { border-color: transparent; }
.vh-app .vh-check .vh-field-hint { margin-left: 26px; }
.vh-app .vh-checkline label { cursor: pointer; }
.vh-app .vh-set { display: grid; gap: 2px; }
.vh-app .vh-set > legend { margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--on-ink-2); }
.vh-app .vh-sheet-body > .vh-btn { margin-top: 0; }
.vh-app .vh-blank.on-ink p { color: var(--on-ink-2); }
.vh-app .vh-blank.on-ink p:first-child { color: var(--on-ink); font-weight: 500; }

/* The visit summary, on screen. (Printed, it uses the print rules at the end.) */
.vh-app .vh-doc h1 { font-size: 19px; font-weight: 600; margin-bottom: 4px; }
.vh-app .vh-doc h2 { font-size: 14px; font-weight: 600; margin: 18px 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--rule-strong); }
.vh-app .vh-doc p + p { margin-top: 3px; }
.vh-app .vh-doc ul { list-style: disc; padding-left: 20px; }
.vh-app .vh-doc .vh-print-note { color: var(--paper-ink-2); font-size: 13px; }

/* ── the printable page (a visit summary or the medicine list): only it prints ── */
.vh-app .vh-printable { display: none; }

/* ── narrow container: the five destinations move to a bar along the bottom ── */
@container vh (max-width: 899px) {
    .vh-app .vh-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
    .vh-app .vh-rail { order: 2; flex-direction: row; padding: 0; border-right: 0; border-top: 1px solid var(--ink-line); padding-bottom: env(safe-area-inset-bottom, 0px); }
    .vh-app .vh-nav { flex: 1 1 auto; flex-direction: row; gap: 0; }
    .vh-app .vh-nav-item { flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; gap: 3px; min-height: 56px; padding: 7px 2px 6px; border-left: 0; border-top: 2px solid transparent; border-radius: 0; font-size: 11.5px; text-align: center; }
    .vh-app .vh-nav-item[aria-current="page"] { border-top-color: var(--paper); background: none; }
    .vh-app .vh-nav-item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .vh-app .vh-rail-foot { display: none; }
    .vh-app .vh-top { min-height: 52px; padding: 8px 14px; }
    .vh-app .vh-title { font-size: 19px; }
    .vh-app .vh-preview { padding: 9px 14px; }
    .vh-app .vh-screen { padding: 14px 14px 32px; }
    .vh-app .vh-form-2 { grid-template-columns: 1fr; }
    .vh-app .vh-btn { min-height: 44px; }
    .vh-app .vh-sheet .vh-btn { min-height: 40px; }
    .vh-app .vh-tab { min-height: 44px; }
    .vh-app .vh-chip { min-height: 40px; }
    .vh-app .vh-icon-btn { width: 44px; height: 44px; }
    .vh-app .vh-checkline { min-height: 44px; align-items: center; }
    .vh-app .vh-checkline input { margin-top: 0; }
    .vh-app .vh-status button { min-height: 40px; }
    .vh-app .vh-field :is(input, select, textarea), .vh-app .vh-search input { font-size: 16px; min-height: 44px; }
    .vh-app .vh-layer { padding: 0; align-items: flex-end; }
    .vh-app .vh-dialog { max-width: none; max-height: 100%; overflow-y: auto; border-radius: 12px 12px 0 0; border-bottom: 0; }
    .vh-app .vh-dialog-foot .vh-btn { flex: 1 1 auto; }
    .vh-app .vh-status { bottom: 70px; }
}

/* Narrower still: a ledger row stacks, the date above what it dates. */
@container vh (max-width: 620px) {
    .vh-app .vh-rows > li, .vh-app .vh-rows.is-plain > li { grid-template-columns: minmax(0, 1fr); }
    .vh-app .vh-row-date { padding: 10px 14px 0; border-right: 0; }
    .vh-app .vh-row-date strong { display: inline; margin-right: 8px; }
    .vh-app .vh-row-main, .vh-app .vh-rows.is-plain .vh-row-main { padding: 4px 14px 6px; }
    .vh-app .vh-row-side { padding: 2px 14px 12px; flex-direction: row; align-items: center; justify-content: space-between; text-align: left; flex-wrap: wrap; }
    .vh-app .vh-sheet-head, .vh-app .vh-sheet-body { padding-left: 14px; padding-right: 14px; }
    .vh-app .vh-sheet-foot, .vh-app .vh-chart, .vh-app details.vh-more { padding-left: 14px; padding-right: 14px; }
    .vh-app .vh-facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .vh-app .vh-facts dd { margin-bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .vh-app *, .vh-app *::before, .vh-app *::after { transition: none !important; animation: none !important; }
}

@media print {
    body:has(.vh-app.is-printing) .hs-bar { display: none !important; }
    body:has(.vh-app.is-printing), html:has(.vh-app.is-printing) { height: auto !important; overflow: visible !important; background: #fff !important; }
    body:has(.vh-app.is-printing) .hs-host { position: static !important; }
    .vh-app.is-printing { position: static !important; height: auto; overflow: visible; background: #fff; color: #000; container-type: normal; }
    .vh-app.is-printing > :not(.vh-printable) { display: none !important; }
    .vh-app.is-printing .vh-printable { display: block; color: #000; font-size: 12pt; }
    .vh-app .vh-printable h1 { font-size: 18pt; margin-bottom: 4pt; }
    .vh-app .vh-printable h2 { font-size: 13pt; margin: 14pt 0 5pt; border-bottom: 1px solid #000; padding-bottom: 2pt; }
    .vh-app .vh-printable p, .vh-app .vh-printable li { margin-bottom: 3pt; }
    .vh-app .vh-printable .vh-print-note { color: #333; font-size: 10pt; }
    .vh-app .vh-printable table { width: 100%; border-collapse: collapse; }
    .vh-app .vh-printable :is(th, td) { text-align: left; padding: 3pt 8pt 3pt 0; border-bottom: 1px solid #999; vertical-align: top; }
}
