/* Health Records II (Story 5656) -- the person, the issues, the story of each issue.
   Borrows health.css (folds, timeline) and entity-detail.css (modals, panes); this is only
   what the issue-first pages add. Teal is the health color, as on Health Records -- unless the
   person picked a theme (picasso-themes.css, scope 'health'): every color below that is "the
   health color" reads the theme's variable first. */

:root {
    --hii-teal: var(--pt-accent, #0F766E);
    --hii-teal-2: var(--pt-edge, #0D9488);
    --hii-teal-wash: var(--pt-accent-wash, #E6F4F1);
    --hii-teal-dark: var(--pt-accent-dark, #115E59);
    --hii-teal-line: var(--pt-accent-line, #9FD3CB);
    --hii-head-bg: var(--pt-head-bg, #0F766E);
    --hii-head-ink: var(--pt-head-ink, #fff);
    --hii-head-soft: var(--pt-head-soft, #CCFBF1);
    --hii-head-shadow: var(--pt-head-shadow, none);
    --hii-ink: #1B1B1F;
    --hii-quiet: #5B6472;
    --hii-line: #E1E4EB;
    --hii-bg: var(--pt-page, #F4F5F8);
    --hii-red: #B42318;
    --hii-red-wash: #FDECEA;
    --hii-amber: #92400E;
    --hii-amber-wash: #FEF3C7;
}

body.hii-page { background: var(--hii-bg); }
.hii-shell { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
/* The header, its rolled-down part and the tabs stay put; only the chosen tab's content scrolls
   under them, so nothing but that tab is ever on the page (Tony, 2026-10-26). */
.hii-headzone { flex: 0 0 auto; }
.hii-scroll { flex: 1 1 auto; overflow: auto; -webkit-overflow-scrolling: touch; }
.hii-body { max-width: 1100px; margin: 0 auto; padding: 12px; }

/* ---- the header (the icon band is injected above .ct-header by quick-launch.js) ----
   One line: the name, the chosen tab's own add, and the roll-up. Everything else -- whose it is,
   the dates, the status, where it stands, every tab's tools -- is under the roll-up, which starts
   rolled up and is remembered (Tony: "The header should only contain the issue ... The rest
   should default rolled up"). */
.ct-header.hii-head {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 12px 9px 14px; background: var(--hii-head-bg); color: var(--hii-head-ink);
    text-shadow: var(--hii-head-shadow);
}
.hii-head h1 { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.2; flex: 1 1 auto; min-width: 0;
               overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The way back, over the title and always in sight (Tony, 2026-10-28: "Each page in the health
   system needs to be able to get back to the home page/pages"). */
.hii-titles { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.hii-titles h1 { flex: 0 0 auto; }
/* The trail itself is the shared one (picasso-crumbs.css); here only its tint on the header. */
.hii-path { margin: -2px 0 1px; --pcr-ink: var(--hii-head-soft); --pcr-ink-hover: var(--hii-head-ink); }
.ct-header.hii-head .pcr-stub { color: var(--hii-head-ink); }
.ct-header.hii-head button.hii-headbtn {
    flex: 0 0 auto; background: rgba(255,255,255,.18); color: var(--hii-head-ink); text-shadow: var(--hii-head-shadow);
    border: 1px solid rgba(255,255,255,.45); border-radius: 6px; padding: 6px 12px; font: inherit; font-size: 13.5px;
    font-weight: 700; cursor: pointer; white-space: nowrap;
}
.ct-header.hii-head button.hii-headbtn:hover, .ct-header.hii-head button.hii-headbtn:focus { background: rgba(255,255,255,.3); }
.ct-header.hii-head button.hii-headbtn:active { background: rgba(255,255,255,.4); }
.ct-header.hii-head button.hii-headbtn[hidden] { display: none; }
.ct-header.hii-head button.hii-roll { padding: 6px 11px; }
.hii-head .hii-roll .ef-caret { color: inherit; font-size: 14px; }
/* An allergy is the one thing that stays in sight with the header rolled up. */
.ct-header.hii-head button.hii-allergyflag {
    flex: 0 0 auto; font-size: 11.5px; font-weight: 700; text-shadow: none; letter-spacing: .02em;
    background: #FDECEA; color: #B42318; border-radius: 10px; padding: 2px 8px; cursor: pointer; border: 0;
}
.ct-header.hii-head button.hii-allergyflag[hidden] { display: none; }

/* The rolled-down part: who and when, the status, Theme; then the page's own boxes. */
.hii-more { background: var(--hii-bg); border-bottom: 1px solid var(--hii-line); max-height: 55vh; overflow: auto; }
.hii-shell.hii-rolled .hii-more { display: none; }
.hii-morebar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px 4px; max-width: 1100px; margin: 0 auto; box-sizing: border-box; }
.hii-morebar .hii-facts { flex: 1 1 260px; font-size: 13.5px; color: var(--hii-quiet); }
.hii-morebar .hii-facts a, .hii-morebar a.hii-crumb { color: var(--hii-teal); font-weight: 600; text-decoration: none; }
.hii-morebar .hii-facts a:hover, .hii-morebar a.hii-crumb:hover { text-decoration: underline; }
.hii-morebar .hii-crumb { font-size: 14px; }
.hii-more .hii-body { padding-top: 6px; padding-bottom: 8px; }

/* allergies: the whole line, in the rolled-down part (the flag on the header stays in sight) */
.hii-allergy {
    padding: 7px 12px; font-size: 13px; background: var(--hii-red-wash); color: var(--hii-red);
    border: 1px solid #F5C2BC; border-radius: 8px; margin: 6px 14px 4px;
}
@media (min-width: 1128px) { .hii-allergy { max-width: 1072px; margin-left: auto; margin-right: auto; } }
.hii-allergy.none { background: #F1F5F9; color: var(--hii-quiet); border-color: var(--hii-line); }
.hii-allergy b { font-weight: 700; }

/* ---- tabs (Story 5655: only the chosen tab's content shows) ---- */
/* One row at every width; the tabs that do not fit scroll off to the right instead of wrapping
   (Tony, 2026-10-29: "Allergies is wrapping. Can we have it scroll off screen instead?"). A thin
   scroll bar on a computer says there is more; a phone swipes. */
.hii-tabs {
    display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; padding: 10px 12px;
    background: var(--hii-bg); border-bottom: 1px solid var(--hii-line); scrollbar-width: thin;
}
.hii-tabs > .hii-tab { flex: 0 0 auto; }
.hii-tabs { scroll-padding-inline: 12px; }
.hii-tabs::after { content: ""; flex: 0 0 6px; }   /* room after the last tab when scrolled to the end */
@media (max-width: 899px) {
    .hii-tabs { scrollbar-width: none; }
    .hii-tabs::-webkit-scrollbar { display: none; }
}
.hii-tab {
    display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
    background: #fff; color: var(--hii-ink); border: 1px solid #DCDFE7; border-radius: 16px;
    padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer;
}
.hii-tab:hover { border-color: var(--hii-teal); }
.hii-tab.on { background: var(--hii-teal); border-color: var(--hii-teal); color: #fff; }
.hii-tab .n { min-width: 18px; padding: 0 5px; border-radius: 9px; background: #EEF0F5; color: #555B6B; font-size: 11px; font-weight: 600; text-align: center; line-height: 18px; }
.hii-tab.on .n { background: rgba(255,255,255,.25); color: #fff; }
.hii-tab .n:empty { display: none; }
.hii-pane[hidden] { display: none !important; }
/* The shared panes every record has (Notes, Files, Linked) bring their own 16px padding; inside a
   Health Records II tab they start flush, like every other tab (Tony, 2026-10-29: "a bunch of white
   space above it"). */
.hii-pane .ed-pane { padding: 0; }

/* ---- tool rows ----
   A tab's tools -- its adds, Fold all, its sort and filters -- belong to the header's roll-up:
   they show only while the header is rolled down, as a shelf at the top of the tab (Tony:
   "Expand all, sort order and such should all be in header, the one that rolls up"). That holds
   for the shared panes the tabs borrow too (Notes, Files, the Timeline, Symptoms): their own
   roll-up lines stay only as a plain count ("No files yet", "4 symptoms") -- the header's is the
   only roll-up. A tab's main add is on the header, so the shelf does not repeat it. */
.hii-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; padding: 8px 10px;
             background: #fff; border: 1px solid var(--hii-line); border-radius: 8px; }
.hii-tools .grow { flex: 1 1 auto; }
.hii-tools .hii-sum { font-size: 13px; color: var(--hii-quiet); }
.hii-shell.hii-rolled .hii-pane .hii-tools,
.hii-shell.hii-rolled .hii-pane .ht-toolwrap,
.hii-shell.hii-rolled .hii-pane .ht-status-row,
.hii-shell.hii-rolled .hii-pane .hr-tools,
.hii-shell.hii-rolled .hii-pane .ef-tools { display: none !important; }
.hii-pane .hr-rollbar, .hii-pane .ef-tools-toggle { pointer-events: none; cursor: default; }
.hii-pane .hr-rollbar .ef-caret, .hii-pane .ef-tools-toggle .ef-caret { display: none; }
.hii-pane .hii-tools .hii-btn.primary { display: none; }
.hii-shell:not(.hii-rolled) .hii-pane .ef-pane.ef-tools-collapsed .ef-tools { display: block; }
.hii-shell:not(.hii-rolled) .hii-pane .ef-tools-collapsed .hr-tools { display: flex; }
.hii-btn {
    background: #fff; color: var(--hii-teal); border: 1px solid var(--hii-teal-line); border-radius: 6px;
    padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.hii-btn:hover { background: var(--hii-teal-wash); }
.hii-btn.primary { background: var(--hii-teal); color: var(--pt-accent-ink, #fff); border-color: var(--hii-teal); }
.hii-btn.primary:hover { background: var(--hii-teal-dark); }
.hii-btn:disabled { opacity: .55; cursor: default; }
.hii-link { color: var(--hii-teal); font-size: 13px; text-decoration: none; }
.hii-link:hover { text-decoration: underline; }

/* ---- issue cards (the person's Issues tab) ---- */
.hii-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
@media (max-width: 520px) { .hii-cards { grid-template-columns: 1fr; } }
.hii-card {
    background: #fff; border: 1px solid var(--hii-line); border-left: 4px solid var(--hii-teal-2);
    border-radius: 8px; padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 5px;
}
.hii-card:hover { box-shadow: 0 1px 6px rgba(15,23,42,.16); }
.hii-card.st-monitoring { border-left-color: #2563EB; }
.hii-card.st-resolved { border-left-color: #16A34A; }
.hii-card .top { display: flex; align-items: center; gap: 8px; }
.hii-card .title { font-size: 16px; font-weight: 700; color: var(--hii-ink); flex: 1 1 auto; min-width: 0; text-decoration: none; }
.hii-card.st-resolved .title { color: #3F4A5A; }
.hii-card .meta { font-size: 12.5px; color: var(--hii-quiet); }
.hii-card .stand { font-size: 13.5px; color: #2B3340; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hii-card .stand.empty { color: #8A93A3; font-style: italic; }
.hii-card .line { font-size: 13px; color: #2B3340; }
.hii-card .line b { color: var(--hii-quiet); font-weight: 600; }
.hii-card .counts { font-size: 12px; color: var(--hii-quiet); }

.hii-pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; letter-spacing: .02em; white-space: nowrap; }
.hii-pill.active { background: var(--hii-teal-wash); color: var(--hii-teal-dark); }
.hii-pill.monitoring { background: #DBEAFE; color: #1E40AF; }
.hii-pill.resolved { background: #DCFCE7; color: #166534; }
.hii-pill.resolved::before { content: '\2713  '; }
.hii-chip { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 10px; background: #F1F5F9; color: #334155; margin: 1px 4px 1px 0; text-decoration: none; }
a.hii-chip:hover { background: var(--hii-teal-wash); }
.hii-chip.med { background: #EDE9FE; color: #5B21B6; }
.hii-chip.img { background: #FCE7F3; color: #9D174D; }
.hii-chip.issue { background: var(--hii-teal-wash); color: var(--hii-teal-dark); }

/* ---- rows (medicines, visits, tests, shots ...) ---- */
.hii-row {
    background: #fff; border: 1px solid var(--hii-line); border-radius: 8px; padding: 9px 12px; margin-bottom: 7px;
    display: flex; gap: 12px; align-items: flex-start;
}
.hii-row.quiet { opacity: .8; }
.hii-row .when { flex: 0 0 auto; min-width: 82px; font-size: 13px; color: var(--hii-quiet); }
.hii-row .when span { display: block; font-size: 12px; }
.hii-row .what { flex: 1 1 auto; min-width: 0; }
.hii-row .name { font-weight: 700; color: var(--hii-ink); }
.hii-row .sub { font-size: 13px; color: #3B4452; margin-top: 2px; }
.hii-row .text { font-size: 13.5px; color: #2B3340; margin-top: 4px; white-space: pre-wrap; }
.hii-row .flag { color: var(--hii-red); font-weight: 700; }
.hii-rowacts { flex: 0 0 auto; display: inline-flex; gap: 10px; }
.hii-rowacts a { color: var(--hii-teal); font-size: 13px; text-decoration: none; font-weight: 600; }
.hii-rowacts a:hover { text-decoration: underline; }
/* On a phone the row's links (View, Edit, Move, Share, Unlink) take their own line under it, so the
   row's words keep the width (2026-10-29). */
@media (max-width: 640px) {
    .hii-row { flex-wrap: wrap; }
    .hii-row .what { flex-basis: calc(100% - 94px); }
    .hii-row .hii-rowacts { flex-basis: 100%; flex-wrap: wrap; justify-content: flex-end; gap: 6px 14px; }
}
.hii-empty { color: var(--hii-quiet); font-size: 13.5px; padding: 6px 2px 10px; }

/* Every row and card folds to its name line (house rule), remembered. */
.hii-row .name[data-fold-head] { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 7px; }
.hii-row.collapsed .hii-rb, .hii-card.collapsed .hii-rb { display: none; }
.hii-row.collapsed .hr-row-chev, .hii-card.collapsed .hr-row-chev { transform: rotate(-90deg); }
.hii-card .top .hr-row-chev { flex: 0 0 auto; }
.hii-kind { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
            color: #475569; background: #EEF2F6; border-radius: 4px; padding: 1px 6px; margin-right: 4px; vertical-align: 1px; }

/* ---- Show as Cards | Rows, and Sort (in a list tab's tools, under the header's roll-up) ---- */
.hii-viewsort { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hii-seg { display: inline-flex; border: 1px solid var(--hii-teal); border-radius: 8px; overflow: hidden; background: #fff; }
.hii-seg button { background: transparent; color: var(--hii-teal); border: 0; padding: 5px 11px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.hii-seg button + button { border-left: 1px solid var(--hii-teal); }
.hii-seg button.on { background: var(--hii-teal); color: var(--pt-accent-ink, #fff); font-weight: 700; }
.hii-sortlbl { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--hii-quiet); }

/* Cards: the rows of a list (.hii-list) become a grid of boxes. */
.hii-as-cards .hii-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; margin-bottom: 7px; }
@media (max-width: 520px) { .hii-as-cards .hii-list { grid-template-columns: 1fr; } }
.hii-as-cards .hii-list .hii-row { margin: 0; flex-direction: column; gap: 4px; border-left: 4px solid var(--hii-teal-2); }
.hii-as-cards .hii-list .hii-row.quiet { border-left-color: #A3ACB9; }
.hii-as-cards .hii-list .hii-row .when { min-width: 0; font-size: 12.5px; }
.hii-as-cards .hii-list .hii-row .when span { display: inline; margin-left: 6px; }
.hii-as-cards .hii-list .hii-row .what { width: 100%; }
.hii-as-cards .hii-list .hii-row .hii-rowacts { margin-top: auto; padding-top: 2px; }
/* Rows: the issue cards line up one under another, each a little shorter. */
.hii-as-rows .hii-cards { display: block; }
.hii-as-rows .hii-cards .hii-card { margin-bottom: 7px; padding: 8px 12px; gap: 3px; }
.hii-as-rows .hii-cards .hii-card .stand { -webkit-line-clamp: 1; }

/* Arrange (2026-11-04): the health concerns shrink to their title lines, one under another, and
   each shows a grip to drag (the Phones / Files / Notes tabs' grip). */
.hii-grip {
    flex: 0 0 auto; cursor: grab; color: #4B5563; background: #E5E7EB; border: 1px solid #D1D5DB;
    border-radius: 4px; padding: 6px 8px 6px 6px; font-size: 14px; line-height: 1; letter-spacing: -3px;
    touch-action: none; user-select: none;
}
.hii-grip:hover { background: #DBEAFE; border-color: #93C5FD; color: #1D4ED8; }
.hii-grip:active { cursor: grabbing; }
.hii-pane:not(.hii-arranging) .hii-grip { display: none; }
.hii-arranging .hii-cards { display: block; }
.hii-arranging .hii-cards .hii-card { margin-bottom: 6px; padding: 6px 10px; cursor: default; }
.hii-arranging .hii-card .hii-rb,
.hii-arranging .hii-card .hr-row-chev,
.hii-arranging .hii-card .hii-rowacts { display: none; }
.hii-arranging .hii-card .title { pointer-events: none; }
.hii-card.dragging { opacity: .55; outline: 2px dashed #2563EB; outline-offset: -2px; }
.hii-arrange.on { background: var(--hii-teal); color: var(--pt-accent-ink, #fff); border-color: var(--hii-teal); }

.hii-inline { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }

/* About: a fact is a label over its value. */
.hii-fact { padding: 7px 2px; border-bottom: 1px solid #EEF0F4; }
.hii-fact:last-of-type { border-bottom: 0; }
.hii-fact .lbl { font-size: 12px; color: var(--hii-quiet); }
.hii-fact .val { font-size: 14.5px; font-weight: 600; color: var(--hii-ink); white-space: pre-wrap; }

/* ---- the issue page ---- */
.hii-status { display: inline-flex; border: 1px solid var(--hii-teal); border-radius: 8px; overflow: hidden; background: #fff; }
.hii-status button { background: transparent; color: var(--hii-teal); border: 0; padding: 5px 11px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.hii-status button + button { border-left: 1px solid var(--hii-teal); }
.hii-status button.on { background: var(--hii-teal); color: var(--pt-accent-ink, #fff); font-weight: 700; }
.hii-stand {
    background: #fff; border: 1px solid var(--hii-line); border-left: 4px solid var(--hii-teal-2);
    border-radius: 8px; padding: 10px 12px; margin-bottom: 10px;
}
.hii-stand h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--hii-quiet); margin: 0 0 4px; }
.hii-stand .txt { font-size: 15px; color: var(--hii-ink); white-space: pre-wrap; }
.hii-stand .txt.empty { color: #8A93A3; font-style: italic; font-size: 14px; }
.hii-now { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin-bottom: 10px; }
.hii-now > div { background: #fff; border: 1px solid var(--hii-line); border-radius: 8px; padding: 8px 12px; font-size: 13.5px; }
.hii-now h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--hii-quiet); margin: 0 0 4px; }
/* On a phone the three Now boxes become three short lines in one box. */
@media (max-width: 640px) {
    .hii-now { display: block; background: #fff; border: 1px solid var(--hii-line); border-radius: 8px; padding: 4px 10px; }
    .hii-now > div { border: 0; border-radius: 0; padding: 4px 0; }
    .hii-now > div + div { border-top: 1px solid #EEF0F4; }
    .hii-now h3 { display: inline; margin: 0 6px 0 0; }
}
.hii-topfold .hr-fold-head .hii-link { margin-left: auto; padding: 0 4px; }
.hii-morebar .ins-card-btn { background: #fff; color: var(--hii-teal); border: 1px solid var(--hii-teal-line); border-radius: 6px; padding: 6px 12px; font-size: 13px; font-weight: 600; }
.hii-sub { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--hii-quiet); margin: 16px 0 6px; }

/* ---- the board ---- */
.hii-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
@media (max-width: 520px) { .hii-people { grid-template-columns: 1fr; } }
.hii-person { background: #fff; border: 1px solid var(--hii-line); border-radius: 10px; padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.hii-person:hover { box-shadow: 0 1px 8px rgba(15,23,42,.16); }
.hii-person .nm { font-size: 18px; font-weight: 700; color: var(--hii-ink); text-decoration: none; }
.hii-person .al { font-size: 12.5px; color: var(--hii-red); }
.hii-person .who { font-size: 13px; color: var(--hii-quiet); }
.hii-person .line { font-size: 13px; color: #2B3340; }
.hii-person .line b { color: var(--hii-quiet); font-weight: 600; }
/* the board as Rows: one person per line, the facts running along after the name */
.hii-as-rows .hii-people { display: block; }
.hii-as-rows .hii-people .hii-person { margin-bottom: 8px; padding: 9px 14px; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; }
.hii-as-rows .hii-people .hii-person .nm { font-size: 16px; flex: 0 0 auto; }
.hii-boardtools { margin: 4px 0 8px; }
.hii-search { flex: 1 1 220px; padding: 7px 10px; border: 1px solid #D3D3D9; border-radius: 6px; font: inherit; font-size: 14px; }

/* ---- the result form (a modal of its own: readings are rows) ---- */
.hii-modal-bg { position: fixed; inset: 0; z-index: 1000; background: rgba(15,23,42,.45); display: flex; align-items: flex-start; justify-content: center; padding: 24px 12px; overflow: auto; }
.hii-modal { background: #fff; border-radius: 10px; width: 100%; max-width: 760px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.hii-modal-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--hii-line); }
.hii-modal-head h2 { margin: 0; font-size: 17px; flex: 1 1 auto; }
.hii-modal-body { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.hii-modal-body label.f { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--hii-quiet); }
.hii-modal-body input[type=text], .hii-modal-body input[type=date], .hii-modal-body textarea, .hii-modal-body select {
    width: 100%; box-sizing: border-box; padding: 7px 9px; border: 1px solid #D3D3D9; border-radius: 6px; font: inherit; font-size: 14px; color: var(--hii-ink);
}
.hii-modal-body textarea { min-height: 70px; resize: vertical; }
.hii-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .hii-two { grid-template-columns: 1fr; } }
.hii-readings { display: flex; flex-direction: column; gap: 6px; }
.hii-reading { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto; gap: 6px; align-items: center; }
@media (max-width: 640px) { .hii-reading { grid-template-columns: 1fr 1fr; } }
.hii-modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--hii-line); }
.hii-err { color: var(--hii-red); font-size: 13px; white-space: pre-wrap; }
.hii-err:empty { display: none; }

/* a note from the contact (birthday disagreement) */
.hii-note { background: var(--hii-amber-wash); color: var(--hii-amber); border: 1px solid #FCD34D; border-radius: 8px; padding: 8px 12px; font-size: 13px; margin: 8px 0; }

/* ---- the theme reaches the shared health styles (health.css) on these pages ---- */
.hii-page .hr-fold-chev, .hii-page .hr-row-chev { border-top-color: var(--hii-teal); }
.hii-page .hr-fold-count, .hii-page .hr-badge, .hii-page .hr-issue-chip { background: var(--hii-teal-wash); color: var(--hii-teal-dark); }
.hii-page .hr-box .hr-fold-title, .hii-page .hr-section > .hr-fold-head .hr-fold-title, .hii-page .ht-tools > .hr-fold-head .hr-fold-title,
.hii-page .ht-band .hr-fold-title, .hii-page .ht-month, .hii-page .hr-section-title, .hii-page .hr-box h3 { color: var(--hii-teal); }
.hii-page .hr-group .hr-fold-title { color: var(--hii-teal-dark); }
.hii-page .hr-chip.is-on, .hii-page .ht-chip.is-on, .hii-page .ht-pickbtn.is-on, .hii-page .hr-seg button.is-on {
    background: var(--hii-teal-2); border-color: var(--hii-teal-2); color: #fff; }
.hii-page .hr-row { border-left-color: var(--hii-teal-2); }
.hii-page .ht-item.kind-visit { border-left-color: var(--hii-teal-2); }
.hii-page .ht-pick { accent-color: var(--hii-teal-2); }
/* The shared panes' own buttons (Notes, Files, Symptoms) wear the theme too. */
.hii-page .hii-pane .ed-btn.primary { background: var(--hii-teal); border-color: var(--hii-teal); color: var(--pt-accent-ink, #fff); }
.hii-page .hii-pane .ed-btn.primary:hover { background: var(--hii-teal-dark); border-color: var(--hii-teal-dark); }
.hii-page .hii-pane .ed-btn:not(.primary):not(.danger) { color: var(--hii-teal); border-color: var(--hii-teal-line); }

/* print: the band and the tools never print */
@media print {
    .hii-tabs, .hii-tools, .hii-rowacts, .hii-status, .hii-headbtn, .hii-allergyflag, .hii-more { display: none !important; }
}

/* ---- where the content sits on a wide screen: Centered (the default), Left, Full width ----
   One choice for every Health Records II page (HII.layoutHtml, beside Theme; Tony, 2026-10-28). */
body.hii-lay-left .hii-body, body.hii-lay-left .hii-morebar { margin-left: 0; margin-right: auto; }
body.hii-lay-full .hii-body, body.hii-lay-full .hii-morebar { max-width: none; }
@media (min-width: 1128px) {
    body.hii-lay-left .hii-allergy { margin-left: 14px; margin-right: auto; }
    body.hii-lay-full .hii-allergy { max-width: none; margin-left: 14px; margin-right: 14px; }
}
.hii-seg { display: inline-flex; border: 1px solid #DCDFE7; border-radius: 6px; overflow: hidden; vertical-align: middle; }
.hii-seg button { background: #fff; color: var(--hii-ink); border: 0; border-left: 1px solid #DCDFE7; padding: 5px 10px;
                  font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.hii-seg button:first-child { border-left: 0; }
.hii-seg button:hover { background: var(--hii-teal-wash); }
.hii-seg button.on { background: var(--hii-teal); color: var(--pt-accent-ink, #fff); }

/* Link an existing medicine / test / visit to this issue: the last thing on its tab, always in sight. */
.hii-btn.danger { color: var(--hii-red); }
/* The Linked tab: its lists, and the Show empty lists checkbox in its tools (2026-10-29). */
.hii-linkset[hidden] { display: none; }
.hii-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
/* A visit row is a way into the visit: the whole row is the door (2026-10-29). */
.hii-row[data-testid="hii-visit-row"] { cursor: pointer; }
.hii-row[data-testid="hii-visit-row"]:hover { border-color: var(--hii-teal-2); }
/* What a visit had, on its row (2026-10-29). */
.hii-had { margin-top: 6px; padding: 6px 8px; background: #F4F7FA; border-radius: 6px; font-size: 13px; }
.hii-had > div + div { margin-top: 2px; }
.hii-had .lbl { font-weight: 700; color: var(--hii-quiet); margin-right: 2px; }
.hii-had.none { color: var(--hii-quiet); font-style: italic; background: none; padding: 0; }
/* The person's Calendar tab (2026-10-29): a month grid; on a phone, a list of the days that have something. */
.hii-cal-head { display: flex; align-items: center; gap: 10px; margin: 4px 0 8px; }
.hii-cal-head h2 { font-size: 17px; margin: 0; color: var(--hii-ink); min-width: 160px; text-align: center; }
.hii-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.hii-cal-wd { font-size: 12px; font-weight: 700; color: var(--hii-quiet); text-align: center; padding: 2px 0; }
.hii-cal-day { background: #fff; border: 1px solid var(--hii-line); border-radius: 6px; min-height: 84px; padding: 4px; overflow: hidden; }
.hii-cal-day.other { opacity: .5; }
.hii-cal-day.today { border-color: var(--hii-teal); box-shadow: inset 0 0 0 1px var(--hii-teal); }
.hii-cal-day .n { font-size: 12px; font-weight: 700; color: var(--hii-quiet); }
.hii-cal-day .n .wd { display: none; }
.hii-cal-item { display: block; font-size: 12px; line-height: 1.3; margin-top: 3px; padding: 2px 4px; border-radius: 4px;
                text-decoration: none; color: var(--hii-ink); background: #EEF3F8; border-left: 3px solid var(--hii-teal);
                overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hii-cal-item:hover { text-decoration: underline; }
.hii-cal-item .t { color: var(--hii-quiet); }
.hii-cal-item.k-visit { background: #F3F4F6; border-left-color: #9AA3AF; }
.hii-cal-item.k-refill, .hii-cal-item.k-shotdue, .hii-cal-item.k-followup { border-left-color: #C08A2B; background: #FBF4E6; }
.hii-cal-item.late { border-left-color: var(--hii-red); background: #FBEAEA; }
@media (max-width: 640px) {
    .hii-cal { display: block; }
    .hii-cal-wd, .hii-cal-day:not(.has) { display: none; }
    .hii-cal-day { min-height: 0; margin-bottom: 6px; }
    .hii-cal-day.other { display: none; }
    .hii-cal-day .n { font-size: 13px; }
    .hii-cal-day .n .wd { display: inline; }
    .hii-cal-item { white-space: normal; font-size: 13px; }
}
.hii-linkrow { margin: 12px 0 4px; display: flex; flex-wrap: wrap; gap: 8px; }
