/* Guide Star Health brand palette (official brand sheet, 2026; updated
   2026-08-08 to match guidestarhealth.net's typography + background/card
   tokens — see the "Fonts" note below). Defined once here so a future
   rebrand is a single-place edit. */
:root {
    --gsh-navy: #00295D;       /* primary */
    --gsh-navy-dark: #001E45;  /* button hover / pressed */
    --gsh-gold: #CA9C44;       /* accent — use sparingly */
    --gsh-gold-light: #E5C96A; /* secondary accent */
    --gsh-slate: #69839C;      /* UI secondary (not on the brand sheet; kept for now) */
    --gsh-bg: #F5F6F8;         /* app background, behind content cards */
    --gsh-card-bg: #FFFFFF;    /* content cards */

    --gsh-font-heading: 'Instrument Serif', Georgia, serif;
    --gsh-font-body: 'Inter Tight', 'Helvetica Neue', Helvetica, Arial, sans-serif;

    /* App-wide radius standardization (2026-08-08), extending the chat page's
       rounder look to the rest of the app. Overriding Bootstrap 5's own radius
       variables — rather than hand-editing every .card/.btn/.alert/.form-control
       — cascades this to every Bootstrap component app-wide (Care Circle and
       the admin pages have no custom CSS of their own, so they pick this up
       for free). --bs-border-radius-pill is untouched (already fully round,
       correct for the symptom tap-select pills); --sm gets a smaller bump than
       the 16-24px target so dense multi-button rows (severity pickers, PD
       stage, times-per-day) don't turn chunky. */
    --bs-border-radius: 1.125rem;    /* 18px, was 6px  — cards, alerts, default buttons/inputs */
    --bs-border-radius-lg: 1.25rem;  /* 20px, was 8px  — large buttons/inputs */
    --bs-border-radius-sm: 0.625rem; /* 10px, was 4px  — small/compact controls */
}

html, body {
    font-family: var(--gsh-font-body);
}

/* Fonts (2026-08-08): matches guidestarhealth.net — Instrument Serif for
   page titles/greeting-style copy, Inter Tight for everything else. This
   supersedes the earlier "app UI font is already Helvetica, no change
   needed" note from the 2026-06-30 brand sheet — Pete confirmed the swap
   2026-08-08 to follow the marketing site's now-current direction. */
h1, h2, h3 {
    font-family: var(--gsh-font-heading);
}

a, .btn-link {
    color: var(--gsh-navy);
}

.btn-primary {
    color: #fff;
    background-color: var(--gsh-navy);
    border-color: var(--gsh-navy);
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active,
.btn-primary:disabled, .btn-primary.disabled {
    color: #fff;
    background-color: var(--gsh-navy-dark);
    border-color: var(--gsh-navy-dark);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--gsh-slate);
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

/* Page-title icon (NavIcon reused outside the sidebar — same nav item's icon,
   set beside its page's own <h1>/<h2> so the two stay visually paired). Plain
   global rule rather than a scoped .razor.css because NavIcon's "nav-icon"
   class carries no scope attribute of its own when used from a page that
   isn't NavMenu. */
h1 .nav-icon, h2 .nav-icon {
    width: 1.4rem;
    height: 1.4rem;
    margin-right: 0.6rem;
    vertical-align: -0.2rem;
    color: var(--gsh-navy);
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ───────────────────────────────────────────────────────────────
   Branded frame for the classic Razor Pages auth screens
   (sign in / create account / access denied). Kept here so the
   brand palette stays single-sourced with the rest of the app.
   ─────────────────────────────────────────────────────────────── */
.auth-body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background-color: var(--gsh-bg);
}

/* Light panel, matching the sidebar's own header treatment (2026-08-08
   redesign) — these Razor Pages auth screens predated that pass and were
   still carrying the old navy gradient bar + boxed white logo chip. A
   hairline border is enough separation now that both sides are light. */
.auth-header {
    background: var(--gsh-bg);
    border-bottom: 1px solid #e3e6eb;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
}

.auth-brand-logo {
    /* Matches the sidebar's own logo size (NavMenu.razor.css) so the wordmark
       reads at the same scale everywhere in the app, not just on this screen. */
    height: 5rem;
    width: auto;
    display: block;
}

.auth-main {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background-color: #ffffff;
    border: 1px solid #e3e6eb;
    border-radius: 1.25rem;
    box-shadow: 0 6px 24px rgba(24, 48, 83, 0.08);
    padding: 2.25rem 2rem;
}

.auth-card h1 {
    color: var(--gsh-navy);
    font-size: 1.6rem;
}

.auth-card .auth-subtext {
    color: var(--gsh-slate);
    margin-top: -0.5rem;
    margin-bottom: 1.5rem;
}

.auth-intro {
    color: var(--gsh-slate);
    margin-bottom: 1.5rem;
}

/* Duplicate of the "Sign in" link that already lives at the bottom of the
   Register form — the form has enough fields that on shorter screens the
   bottom link can sit below the fold, so it's echoed up here too. */
.auth-top-link {
    text-align: right;
    font-size: 0.85rem;
    color: var(--gsh-slate);
    margin-bottom: 1.25rem;
}

.auth-trust-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: var(--gsh-slate);
    font-size: 0.85rem;
    margin-top: 1.25rem;
}

.auth-trust-line svg {
    flex: none;
    color: var(--gsh-slate);
}

.auth-footer {
    text-align: center;
    padding: 1rem;
    color: var(--gsh-slate);
    font-size: 0.85rem;
}

/* ───────────────────────────────────────────────────────────────
   Highlights / Resources — responsive card grid + group headings
   ─────────────────────────────────────────────────────────────── */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.content-group-title {
    font-size: 1.15rem;
    color: var(--gsh-navy);
    margin: 1.75rem 0 0.9rem;
}

    .content-group-title:first-of-type {
        margin-top: 0.5rem;
    }

/* Saved answers — bookmarked Q+A cards. */
.saved-card {
    border: 1px solid #e3e6eb;
    border-radius: 1.25rem;
    background: #fff;
    padding: 1rem 1.15rem;
    margin-bottom: 1rem;
}

.saved-q {
    /* A structural break (size + rule), not just color — navy vs. the answer's
       #333 bold headings read as near-identical at matching weight/size. */
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gsh-navy);
    margin-bottom: 0.6rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--gsh-gold-light);
}

/* Collapsible topic title — same look as .saved-q, but a real button so the
   answer body can be hidden until expanded. */
.saved-q-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    /* Lets the title give way to the copy and edit icons beside it. Without
       this a flex item will not shrink below its one-line title, and the
       icons were pushed out over the card's right border on a phone. */
    min-width: 0;
    border: none;
    background: none;
    padding: 0;
    margin-bottom: 0.6rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--gsh-gold-light);
    cursor: pointer;
    text-align: left;
}

.saved-q-chevron {
    flex: none;
    display: inline-block;
    transition: transform 0.15s ease;
    color: var(--gsh-navy);
}

    .saved-q-chevron.expanded {
        transform: rotate(90deg);
    }

.saved-q-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gsh-navy);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.saved-a {
    color: #333;
    line-height: 1.6;
}

.saved-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--gsh-slate);
}

/* Avatars — uploaded photo or initials-on-color fallback. */
.gsh-avatar {
    border-radius: 50%;
    object-fit: cover;
    flex: none;
    display: inline-block;
}

.gsh-avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
}

.avatar-color-swatch {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    border: 2px solid transparent;
    padding: 0;
    cursor: pointer;
}

    .avatar-color-swatch.selected {
        border-color: var(--gsh-slate);
    }

/* Small read-receipt avatars on a Shared item — who's seen this. */
.read-receipts {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

    .read-receipts .gsh-avatar,
    .read-receipts .gsh-avatar-initials {
        margin-left: -0.4rem;
        border: 2px solid #fff;
    }

        .read-receipts .gsh-avatar:first-child,
        .read-receipts .gsh-avatar-initials:first-child {
            margin-left: 0;
        }

/* Configurable intro blurb at the top of the Home/Highlights landing. */
.highlights-intro {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #333;
}

    .highlights-intro p:last-child {
        margin-bottom: 0;
    }

/* ───────────────────────────────────────────────────────────────
   Global footer (in-app + auth pages) and legal document pages
   ─────────────────────────────────────────────────────────────── */
.site-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem 1.25rem;
    padding: 1rem 2rem;
    border-top: 1px solid #e3e6eb;
    color: var(--gsh-slate);
    font-size: 0.85rem;
}

.site-footer-links {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.site-footer a,
.auth-footer a {
    color: var(--gsh-slate);
    text-decoration: none;
}

    .site-footer a:hover,
    .auth-footer a:hover {
        text-decoration: underline;
    }

.auth-footer .site-footer-links {
    display: flex;
    justify-content: center;
    margin-top: 0.4rem;
}

.legal-content {
    line-height: 1.6;
    /* A long link or email address must break rather than run off a phone
       screen at the larger Text Size settings. */
    overflow-wrap: break-word;
}

    .legal-content h1 {
        color: var(--gsh-navy);
        font-size: 1.8rem;
    }

    .legal-content h2 {
        color: var(--gsh-navy);
        font-size: 1.3rem;
        margin-top: 1.6rem;
    }

    .legal-content h3 {
        font-size: 1.1rem;
        margin-top: 1.2rem;
    }

/* PWA install nudge (2026-09-06) — iOS Safari only, shown/hidden by
   js/pwa.js. Fixed to the bottom of the viewport like a standard install
   banner; env(safe-area-inset-bottom) keeps it clear of the iPhone home
   indicator. High-contrast navy/white with a gold accent line, and a
   44px-minimum dismiss target for anyone with reduced fine motor control. */
.ios-install-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1060;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--gsh-navy);
    color: #fff;
    border-top: 3px solid var(--gsh-gold);
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom)) 1rem;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.25);
}

.ios-install-banner-text {
    flex: 1 1 auto;
    font-size: 0.95rem;
    line-height: 1.4;
}

.ios-install-banner-dismiss {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.ios-install-banner-dismiss:hover,
.ios-install-banner-dismiss:focus-visible {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
}

/* The "Get the Guide Star app" banners (#android-app-banner / #ios-app-banner in
   App.razor) reuse the .ios-install-banner look above; this is their store link. */
.app-banner-link {
    color: var(--gsh-gold-light);
    font-weight: 600;
    text-decoration: underline;
    white-space: nowrap;
    margin-left: 0.35rem;
}

.app-banner-link:hover,
.app-banner-link:focus-visible {
    color: #fff;
}

/* Inside the Guide Star phone app (<html class="gsh-in-app">, set server-side from the
   app's User-Agent - see NativeAppDetection): the app is sign-in only, so sign-up and
   billing links/buttons are hidden, and a few sentences swap to app-appropriate wording. */
.gsh-in-app .hide-in-app { display: none !important; }
.show-in-app { display: none !important; }
.gsh-in-app .show-in-app { display: inline !important; }

/* "Connecting…" gate for Back Office and Moderation pages (js/backoffice.js):
   while the content is locked it is dimmed and the note shows; both go the
   moment the page is live. */
[data-backoffice-gate][inert] {
    opacity: 0.55;
}

.backoffice-connecting-note {
    display: none;
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

[data-backoffice-gate][inert] > .backoffice-connecting-note {
    display: block;
}

/* ── Staying inside the screen at every Text Size ─────────────────────────
   Found by sweeping every page at phone, tablet and desktop widths at all
   three Text Size settings (2026-10-09). Text Size scales the root font, so
   a row that fits at 100% can be half as wide again at 150%. */

/* Bootstrap 5 has no min-width utility, but markup here was already using
   this class name (Documents list), so the file name never truncated. A flex
   child needs min-width: 0 before text-truncate can do anything. */
.min-w-0 {
    min-width: 0 !important;
}

/* A joined button group ("1x 2x 3x ... Other", symptom severity) that may
   wrap onto a second line on a narrow screen or at a large Text Size. The
   small row gap keeps the two lines from touching. */
.btn-group.btn-group-wrap {
    flex-wrap: wrap;
    row-gap: 0.25rem;
}

/* ── Plan & Prepare print view (2026-10-14) ────────────────────────────
   Large, plain type that fits a typical prep list on one sheet. Used on
   screen too, so what you see is what prints. */
.plan-print {
    max-width: 7.5in;
    margin: 0 auto;
    padding: 1rem 16px 2rem;
    background: #fff;
    color: #111;
    font-family: var(--gsh-font-body);
    font-size: 13pt;
    line-height: 1.35;
}
.plan-print-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.plan-print-header {
    display: flex;
    gap: 14px;
    align-items: center;
    border-bottom: 2px solid var(--gsh-navy);
    padding-bottom: 8px;
    margin-bottom: 10px;
}
.plan-print-logo { height: 44px; width: auto; flex-shrink: 0; }
.plan-print-heading { min-width: 0; }
.plan-print-header h1 {
    font-family: var(--gsh-font-body);
    font-size: 18pt;
    font-weight: 700;
    margin: 0;
    color: var(--gsh-navy);
    overflow-wrap: anywhere;
}
.plan-print-sub { font-size: 11pt; color: #444; }
.plan-print-section { margin-bottom: 8px; break-inside: avoid; }
.plan-print-section h2 {
    font-family: var(--gsh-font-body);
    font-size: 13.5pt;
    font-weight: 700;
    color: var(--gsh-navy);
    margin: 0 0 2px;
}
.plan-print-section ul { margin: 0; padding-left: 1.2em; }
.plan-print-section li { margin: 1px 0; overflow-wrap: anywhere; }
.plan-print-checks { list-style: none; padding-left: 0 !important; }
.plan-print-box { display: inline-block; width: 1.3em; }
/* "— Sam" after a Care Circle member's question (v1.1): smaller and grey, so the question reads first. */
.plan-print-by { font-size: 0.85em; color: #555; white-space: nowrap; }
.plan-print-section li.is-checked { color: #555; }
.plan-print-blank { border-bottom: 1px solid #999; height: 1.7em; }
.plan-print-footer { margin-top: 12px; font-size: 9.5pt; color: #555; }

@media print {
    @page { margin: 0.5in; }
    body { background: #fff !important; }
    /* 12pt on paper (13pt on screen) is what fits a typical prep list,
       eight note lines included, on one Letter sheet. */
    .plan-print { padding: 0; max-width: none; font-size: 12pt; }
    .plan-print-header h1 { font-size: 16pt; }
    .plan-print-section h2 { font-size: 12.5pt; }
    .plan-print-blank { height: 1.6em; }
    #blazor-error-ui, .ios-install-banner { display: none !important; }
}

/* Plan & Prepare list page: each line's text gets the full width; its
   buttons sit on their own row beneath it, right-aligned, so a long line
   never ends up squeezed into a narrow column beside five buttons. */
.plan-item { flex-wrap: wrap; }
.plan-item-actions { flex-basis: 100%; justify-content: flex-end; }
.plan-item-actions .btn { min-width: 2.25rem; }

/* The triage screen's instruction is in the plain body font, bold: in the
   heading serif "911" reads as "9ll". */
.plan-triage-heading {
    font-family: var(--gsh-font-body);
    font-weight: 700;
}

/* ── Hospital Card (2026-10-22 brief) ─────────────────────────────────────
   Readable under stress: large type, black on white, one red outline (the
   drug-allergy box), so it still reads printed in black and white. The
   on-time line is the largest text after the banner. .hc-card-large is the
   page's "Large text" switch. */
.hc-card {
    --hc-scale: 1;
    background: #fff;
    color: #000;
    border: 2px solid #000;
    border-radius: 0.75rem;
    padding: 1rem 1.1rem;
    font-size: calc(1rem * var(--hc-scale));
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.hc-card-large { --hc-scale: 1.3; }
.hc-banner {
    background: #000;
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-align: center;
    font-size: calc(1.35rem * var(--hc-scale));
    padding: 0.35rem 0.5rem;
    border-radius: 0.4rem;
    margin-bottom: 0.75rem;
}
.hc-who { margin-bottom: 0.6rem; }
.hc-name { font-size: calc(1.5rem * var(--hc-scale)); font-weight: 800; line-height: 1.15; }
.hc-placeholder { color: #767676; font-weight: 600; font-style: italic; }
.hc-callme { font-size: calc(1.05rem * var(--hc-scale)); }
.hc-facts { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; font-weight: 600; }
.hc-ontime { border-top: 2px solid #000; border-bottom: 2px solid #000; padding: 0.5rem 0; margin-bottom: 0.75rem; }
.hc-ontime p { margin: 0; }
.hc-ontime-main { font-size: calc(1.3rem * var(--hc-scale)); font-weight: 800; line-height: 1.2; }
.hc-ontime-more { font-weight: 600; margin-top: 0.3rem !important; }
.hc-card h3 {
    font-family: var(--gsh-font-body);
    font-size: calc(0.85rem * var(--hc-scale));
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.25rem;
}
.hc-section { margin-bottom: 0.7rem; }
.hc-meds { width: 100%; border-collapse: collapse; }
.hc-meds th { font-size: calc(0.8rem * var(--hc-scale)); text-align: left; border-bottom: 1px solid #000; padding: 0.15rem 0.4rem 0.15rem 0; }
.hc-meds td { padding: 0.25rem 0.4rem 0.25rem 0; vertical-align: top; border-bottom: 1px solid #ccc; }
.hc-med-name { font-weight: 700; }
.hc-lastdose { list-style: none; margin: 0.3rem 0 0; padding: 0; font-size: 0.95em; }
.hc-allergies { border: 3px solid #c00; border-radius: 0.5rem; padding: 0.45rem 0.6rem; margin-bottom: 0.7rem; font-weight: 700; }
.hc-allergies ul { margin: 0; padding-left: 1.1rem; }
.hc-list { margin: 0; padding-left: 1.1rem; }
.hc-list li + li { margin-top: 0.15rem; }
.hc-contacts { list-style: none; margin: 0; padding: 0; }
.hc-contacts li { display: flex; flex-wrap: wrap; gap: 0 0.6rem; padding: 0.2rem 0; border-bottom: 1px solid #ddd; }
.hc-contact-label { font-size: calc(0.8rem * var(--hc-scale)); font-weight: 700; width: 100%; }
.hc-contact-name { font-weight: 600; }
.hc-phone { font-weight: 700; color: #000; white-space: nowrap; }
a.hc-phone { text-decoration: underline; }
.hc-footer { border-top: 1px solid #000; padding-top: 0.35rem; font-size: calc(0.78rem * var(--hc-scale)); }
.hc-footer-who { font-weight: 700; }
.hc-section-note { font-size: 0.85em; font-style: italic; margin: -0.15rem 0 0.25rem; }
.hc-unreviewed {
    display: inline-block;
    margin-left: 0.35rem;
    font-size: 0.7rem;
    font-weight: 800;
    color: #000;
    background: var(--gsh-gold-light);
    border-radius: 0.3rem;
    padding: 0 0.3rem;
    vertical-align: middle;
}
.hc-time { width: 7.5rem; }
.hc-med-edit { background: #fff; }
@media (min-width: 992px) {
    .hc-preview { position: sticky; top: 1rem; }
}

/* Hospital Card PR 2: QR and print view. (The wallet card is a PDF: WalletCardPdf.) */
.hc-qr { width: 9rem; flex-shrink: 0; }
.hc-qr svg { width: 100%; height: auto; display: block; }
.hc-print { max-width: 7.5in; margin: 0 auto; padding: 1rem; }
/* Full-page print: the QR sits beside the contacts, at 1.65in so an
   800-character code keeps dots of about 0.35mm. */
.hc-contacts-row { display: flex; gap: 0.2in; align-items: flex-start; }
.hc-contacts-main { flex: 1 1 auto; min-width: 0; }
/* The width is set on .hc-qr-print by the print view: 1.65in, bigger for a
   very full card so the dots stay the same size (QrPrintSize). */
.hc-contacts-aside { flex: 0 0 auto; }
.hc-qr-print { width: 1.65in; font-size: 0.68rem; line-height: 1.25; break-inside: avoid; }
.hc-qr-print .hc-qr { width: 100%; margin-bottom: 0.05in; }


@media print {
    @page { size: letter; margin: 0.5in; }
    .hc-print { padding: 0; max-width: none; }
    /* Sized to fit one Letter page for a typical card; a very long one runs
       onto a second page without splitting a section. Sized for iPhone
       printing, the tightest we've measured (PDF from Pete's iPhone,
       2026-10-23): it ignores @page margins, keeps about 6.4 x 8.2in of CSS
       space for the page and prints everything about 11% larger. The width
       follows the page, so a Mac gets the full 7.5in. The list text is
       smaller than on screen; the banner, name and ON TIME line keep their
       size. */
    .hc-print-full .hc-card { --hc-scale: 0.73; border-width: 2px; padding: 0.1in 0.16in; }
    .hc-print-full .hc-banner { font-size: calc(1.35rem * 0.82); padding: 0.04in; margin-bottom: 0.08in; }
    .hc-print-full .hc-name { font-size: calc(1.5rem * 0.82); }
    .hc-print-full .hc-ontime-main { font-size: calc(1.3rem * 0.82); }
    .hc-print-full .hc-who { margin-bottom: 0.06in; }
    .hc-print-full .hc-ontime { padding: 0.05in 0; margin-bottom: 0.08in; }
    .hc-print-full .hc-section, .hc-print-full .hc-allergies { margin-bottom: 0.08in; }
    .hc-print-full .hc-contacts-row { margin-bottom: 0; }
    .hc-print-full .hc-contacts-main { display: flex; flex-direction: column; align-self: stretch; }
    .hc-print-full .hc-footer-beside { margin-top: auto; }
    .hc-print-full .hc-section, .hc-print-full .hc-allergies, .hc-print-full .hc-ontime { break-inside: avoid; }
    /* The shorter sections (device, how to help me, what's normal, other
       medicines and allergies, history) sit two to a row on paper (PR 4).
       Inline-blocks rather than a grid: iPhone Safari split grid sections
       across the page break (Pete's iPhone PDF, 2026-10-23), and an
       inline-block can't be split. Everything else spans the width. */
    .hc-print-full .hc-card > .hc-half { display: inline-block; vertical-align: top; width: calc(50% - 0.2in); margin-right: 0.15in; }
    .hc-banner {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .hc-unreviewed { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
