/* ==========================================================================
   Hoboken University Hospital Patient Portal V2.1
   (Hudson Regional Health)
   --------------------------------------------------------------------------
   Self-contained stylesheet. Replaces Bootstrap 3 + sky-forms + Font Awesome
   for every patient-facing page.

   Design brief: patients, not clinicians. Many are elderly, on phones, and
   anxious about what they are about to read. So:
     - 16px minimum body text, 17px inputs (iOS zooms anything under 16px)
     - 44px minimum touch targets
     - status conveyed by text and shape, never colour alone
     - system font stack, no webfont download on a slow connection
     - respects prefers-color-scheme and prefers-reduced-motion
   ========================================================================== */

:root {
    /* Brand -------------------------------------------------------------
       Hudson Regional Health (hudsonregionalhospital.com): royal blue
       #00239c is the website nav/heading colour, #194ba0 the logo blue,
       #18b2e8 the light end of the logo gradient, #ff8f1c the website CTA
       orange (used only for the header rule, never for text). */
    --brand:            #194ba0;
    --brand-dark:       #00239c;
    --brand-light:      #e9effa;
    --brand-navy:       #00239c;
    --accent:           #ff8f1c;
    --accent-sky:       #18b2e8;
    --on-brand:         #ffffff;   /* text on a --brand fill */

    /* Surfaces ---------------------------------------------------------- */
    --bg:               #eef3f6;
    --surface:          #ffffff;
    --surface-sunken:   #f6f9fb;
    --border:           #d4dee5;
    --border-strong:    #b3c2cd;

    /* Text -------------------------------------------------------------- */
    --text:             #16242e;
    --text-muted:       #5a6b78;
    --text-inverse:     #ffffff;

    /* Status ------------------------------------------------------------ */
    --ok:               #1a7f45;
    --ok-bg:            #e6f4ec;
    --warn:             #8a5a00;
    --warn-bg:          #fdf3e0;
    --danger:           #b3261e;
    --danger-bg:        #fdeceb;
    --info:             #194ba0;
    --info-bg:          #ebf2fa;
    --neutral:          #4a5b68;
    --neutral-bg:       #eef2f5;

    /* Shape ------------------------------------------------------------- */
    --radius:           10px;
    --radius-sm:        6px;
    --shadow:           0 1px 2px rgba(16, 34, 46, .06), 0 4px 16px rgba(16, 34, 46, .08);
    --shadow-sm:        0 1px 2px rgba(16, 34, 46, .08);

    --font: Montserrat, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
            "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg:             #10181e;
        --surface:        #18232b;
        --surface-sunken: #131d24;
        --border:         #2a3a45;
        --border-strong:  #3c505e;
        --text:           #e6edf2;
        --text-muted:     #9fb0bd;
        --brand:          #7fb0f0;
        --brand-dark:     #a9cbef;
        --brand-light:    #1a2c40;
        --brand-navy:     #a9c6f5;
        --accent:         #ff9d3a;
        --accent-sky:     #5cc8f0;
        --on-brand:       #0b1f33;
        --ok:             #5ec98a;   --ok-bg:     #122b1e;
        --warn:           #e0ac57;   --warn-bg:   #2e2415;
        --danger:         #f08d86;   --danger-bg: #331917;
        --info:           #6fb6e6;   --info-bg:   #14252f;
        --neutral:        #9fb0bd;   --neutral-bg:#1d2830;
        --shadow:         0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.3);
        --shadow-sm:      0 1px 2px rgba(0,0,0,.4);
    }
}

/* -------------------------------------------------------------- foundation */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.25; font-weight: 650; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p  { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }

/* A single visible focus treatment everywhere, including for mouse users --
   patients tabbing through a form must never lose their place. */
:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 2px;
    border-radius: 3px;
}

.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;
}

.skip-link {
    position: absolute; left: -9999px;
    background: var(--brand); color: var(--on-brand);
    padding: .75rem 1.25rem; z-index: 100; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; top: 0; }

/* ------------------------------------------------------------------ layout */

.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-header {
    background: var(--surface);
    border-bottom: 4px solid var(--accent);
    box-shadow: var(--shadow-sm);
}

.site-header__inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: .75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* 44px = the same mark size as the old 60px logo that had the city line under it. */
.site-header__logo img { display: block; max-height: 44px; max-width: 100%; width: auto; }
/* The Hudson Regional Health logo is blue on a transparent background, which
   disappears on a dark header. Give it a light plate in dark mode. */
@media (prefers-color-scheme: dark) {
    .site-header__logo img { background: #ffffff; border-radius: var(--radius-sm); padding: 2px 6px; }
}

/* Left: logo with the hospital (Portal.Facility) centred under it.
   Right: "Patient Portal", with the signed-in user under it. */
.site-header__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.site-header__facility {
    font-size: 1rem;
    font-weight: 700;
    color: var(--brand-navy);
    line-height: 1.25;
    margin: .3rem 0 0;
}

.site-header__side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .35rem;
    text-align: right;
}

.site-header__title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--brand-navy);
    line-height: 1.2;
    margin: 0;
    padding-left: 1rem;
    border-left: 4px solid var(--accent);
}

/* Narrow screens: the portal name sits under the logo block instead of off to the side. */
@media (max-width: 600px) {
    .site-header__inner { justify-content: center; }
    .site-header__spacer { display: none; }
    .site-header__side { align-items: center; text-align: center; width: 100%; }
    .site-header__title { font-size: 1.1rem; border-left: 0; padding-left: 0; }
}

.site-header__spacer { flex: 1 1 auto; }

.site-header__user {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .92rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.site-header__user strong { color: var(--text); font-weight: 600; }

.main {
    flex: 1 1 auto;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 1.75rem 1.25rem 3rem;
}

.main--narrow { max-width: 560px; }
.main--auth   { max-width: 940px; }

.site-footer {
    border-top: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    font-size: .85rem;
}
.site-footer__inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 1.25rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: space-between;
}

/* ------------------------------------------------------------------- cards */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}
.card:last-child { margin-bottom: 0; }

.card__header { margin-bottom: 1.15rem; }
.card__header h2 { margin-bottom: .25rem; }
.card__lede { color: var(--text-muted); font-size: .95rem; margin: 0; }

/* Two independent entry routes sit side by side on desktop, stacked on
   mobile with the "or" divider rotating between them. */
.split {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
    align-items: start;
}
.split__or {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
    color: var(--text-muted);
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding-top: 2.5rem;
}
.split__or::before,
.split__or::after {
    content: "";
    flex: 1 1 auto;
    width: 1px;
    background: var(--border);
}

@media (max-width: 800px) {
    .split { grid-template-columns: 1fr; gap: 1rem; }
    .split__or { flex-direction: row; padding: 0; }
    .split__or::before, .split__or::after { width: auto; height: 1px; }
}

/* ------------------------------------------------------------------- forms */

.field { margin-bottom: 1.05rem; }
.field:last-of-type { margin-bottom: 1.25rem; }

.field > label,
.field__label {
    display: block;
    font-weight: 600;
    font-size: .92rem;
    margin-bottom: .35rem;
    color: var(--text);
}

.field__hint {
    display: block;
    font-size: .84rem;
    color: var(--text-muted);
    margin-top: .3rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="date"],
select,
textarea {
    width: 100%;
    font-family: inherit;
    /* 17px: iOS Safari zooms the viewport on focus for anything smaller. */
    font-size: 17px;
    line-height: 1.4;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: .7rem .8rem;
    min-height: 46px;
    transition: border-color .12s ease, box-shadow .12s ease;
}

input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: 1; }

input:focus, select:focus, textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-light);
    outline: none;
}

input[aria-invalid="true"] {
    border-color: var(--danger);
}
input[aria-invalid="true"]:focus {
    box-shadow: 0 0 0 3px var(--danger-bg);
}

/* Password fields carry a show/hide toggle inside the control.
   The toggle is positioned against .pw-wrap (input only), NOT against .field:
   .field also contains the label and any hint text, so anchoring to it made
   the button drift down over the hint on fields that have one. */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 4.5rem; }
.pw-toggle {
    position: absolute;
    right: .4rem;
    top: 50%;
    transform: translateY(-50%);
    height: 38px;
    padding: 0 .7rem;
    font-size: .85rem;
    font-weight: 600;
    color: var(--brand);
    background: transparent;
    border: 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.pw-toggle:hover { background: var(--brand-light); }

/* ----------------------------------------------------------------- buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 46px;
    padding: .7rem 1.35rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color .12s ease, border-color .12s ease;
}

.btn--primary {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--on-brand);
}
.btn--primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: var(--on-brand); }

/* "View report" in the results table: the primary button, sized for a
   table row, with a document icon, and never wrapping to two lines. */
.btn--report {
    min-height: 38px;
    padding: .45rem .95rem;
    font-size: .95rem;
    white-space: nowrap;
    gap: .4rem;
}
.btn--report svg { flex: 0 0 auto; }

.btn--secondary {
    background: var(--surface);
    border-color: var(--border-strong);
    color: var(--text);
}
.btn--secondary:hover { background: var(--surface-sunken); color: var(--text); }

.btn--ghost {
    background: transparent;
    border-color: transparent;
    color: var(--brand);
    min-height: 40px;
    padding: .5rem .75rem;
}
.btn--ghost:hover { background: var(--brand-light); }

.btn--block { width: 100%; }

.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

.btn-row {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    align-items: center;
}

/* ------------------------------------------------------------------ alerts */

.alert {
    display: flex;
    gap: .7rem;
    padding: .85rem 1rem;
    border: 1px solid;
    border-left-width: 4px;
    border-radius: var(--radius-sm);
    font-size: .94rem;
    margin-bottom: 1.15rem;
}
.alert:empty { display: none; }
.alert__icon { flex: 0 0 auto; font-weight: 700; font-size: 1rem; line-height: 1.5; }
.alert__body { flex: 1 1 auto; }
.alert__body > :last-child { margin-bottom: 0; }

.alert--error   { color: var(--danger); background: var(--danger-bg); border-color: var(--danger); }
.alert--success { color: var(--ok);     background: var(--ok-bg);     border-color: var(--ok); }
.alert--warn    { color: var(--warn);   background: var(--warn-bg);   border-color: var(--warn); }
.alert--info    { color: var(--info);   background: var(--info-bg);   border-color: var(--info); }

/* ------------------------------------------------------------------ tables */

.table-wrap {
    /* Wide tables scroll inside their own box; the page body never scrolls
       sideways on a phone. */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

table.results {
    width: 100%;
    border-collapse: collapse;
    font-size: .95rem;
}

table.results caption {
    text-align: left;
    padding: 1rem 1.15rem .35rem;
    font-weight: 650;
    color: var(--text);
}

table.results th,
table.results td {
    /* .9rem sides: eight columns plus the View report button fit a
       ~1200px window without a horizontal scrollbar. */
    padding: .8rem .9rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

table.results thead th {
    background: var(--surface-sunken);
    font-size: .82rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-muted);
    white-space: nowrap;
    border-bottom: 1px solid var(--border-strong);
}

table.results tbody tr:last-child td { border-bottom: 0; }
table.results tbody tr:hover { background: var(--surface-sunken); }

.accession { font-variant-numeric: tabular-nums; font-weight: 600; }
.nowrap    { white-space: nowrap; }
.numeric   { font-variant-numeric: tabular-nums; }

/* Status is a pill AND a word -- never colour on its own, so it survives
   greyscale printing and colour-vision differences. */
.pill {
    display: inline-block;
    padding: .2rem .6rem;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 650;
    white-space: nowrap;
    border: 1px solid;
}
.pill--final       { color: var(--ok);      background: var(--ok-bg);      border-color: var(--ok); }
.pill--corrected   { color: var(--info);    background: var(--info-bg);    border-color: var(--info); }
.pill--preliminary { color: var(--warn);    background: var(--warn-bg);    border-color: var(--warn); }
.pill--pending     { color: var(--neutral); background: var(--neutral-bg); border-color: var(--border-strong); }
.pill--cancelled   { color: var(--danger);  background: var(--danger-bg);  border-color: var(--danger); }
.pill--unknown     { color: var(--neutral); background: var(--neutral-bg); border-color: var(--border-strong); }

/* Outcome pills. Same rule as the status pills above -- the word carries the
   meaning, the colour only reinforces it, so nothing is lost in greyscale or
   to a colour-vision difference. Rendered only once the lab has released the
   result; tblResults.Expected is populated on pending rows too, where it does
   not mean anything yet. */
.pill--normal      { color: var(--ok);      background: var(--ok-bg);      border-color: var(--ok); }
.pill--abnormal    { color: var(--danger);  background: var(--danger-bg);  border-color: var(--danger); }
.pill--detected    { color: var(--warn);    background: var(--warn-bg);    border-color: var(--warn); }

/* ----------------------------------------------------------- tests performed

   An accession here carries 13.7 tests on average and as many as 46. A cell
   that narrow cannot hold that, so the long ones expand into a full-width row
   beneath. The toggle is an ordinary link driven by ?open= -- no JavaScript,
   and every expanded view is a URL that can be bookmarked or sent on. */
.tests { max-width: 22rem; }

.tests__toggle {
    display: inline-flex;
    align-items: center;
    /* Lifts the target to a comfortable ~34px without spacing the table out
       the way a full 44px row would. */
    min-height: 34px;
    font-weight: 600;
}

.detailrow td {
    background: var(--surface-sunken);
    border-bottom: 1px solid var(--border-strong);
}

.detailrow__head {
    margin: 0 0 .6rem;
    font-size: .82rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-muted);
}

.detailrow__list {
    margin: 0;
    padding: 0;
    list-style: none;
    columns: 3;
    column-gap: 2rem;
    font-size: .93rem;
}

.detailrow__list li {
    break-inside: avoid;
    margin: 0 0 .25rem;
    padding-left: .9rem;
    text-indent: -.9rem;
}

/* A dot rather than a list marker, so the columns keep a flush left edge. */
.detailrow__list li::before {
    content: "\2022";
    color: var(--border-strong);
    padding-right: .5rem;
}

.detailrow__foot { margin-top: .9rem; color: var(--text-muted); }

@media (max-width: 900px) {
    .detailrow__list { columns: 2; }
}

/* On narrow screens the table collapses into stacked cards, each cell
   labelled by its column header via the data-label attribute. */
@media (max-width: 640px) {
    .table-wrap { border: 0; background: transparent; overflow-x: visible; }
    table.results, table.results tbody, table.results tr, table.results td { display: block; width: 100%; }
    table.results thead { display: none; }

    /* A table-caption inside a block-ified table shrink-wraps and breaks
       "2 results" across two lines. Make it a plain block. */
    table.results caption {
        display: block;
        width: 100%;
        padding: 0 0 .5rem;
    }

    table.results tr {
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        box-shadow: var(--shadow-sm);
        margin-bottom: .85rem;
        padding: .35rem .25rem;
    }
    table.results td {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 1rem;
        border-bottom: 0;
        padding: .45rem 1rem;
        text-align: right;
    }
    table.results td::before {
        content: attr(data-label);
        font-size: .8rem;
        font-weight: 650;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: var(--text-muted);
        text-align: left;
        flex: 0 0 auto;
    }
    table.results td:empty { display: none; }

    /* The card cells are flex rows with the label pushed left and the value
       right. That is wrong for a list: a <details> squeezed into the right-hand
       flex item wraps to a few characters a line. Let this one cell stack, so
       the label sits above a full-width list. */
    table.results td.tests {
        display: block;
        max-width: none;
        text-align: left;
    }
    table.results td.tests::before { display: block; margin-bottom: .15rem; }

    /* The panel is a colspan row, so in card layout it becomes a card of its
       own. Single column at this width, and no data-label to render. */
    table.results tr.detailrow td {
        display: block;
        text-align: left;
        padding: .7rem 1rem .9rem;
    }
    table.results tr.detailrow td::before { content: none; }
    .detailrow__list { columns: 1; }
}

/* ------------------------------------------------------------- filter bar */

.filter-bar {
    display: flex;
    align-items: flex-end;
    gap: .85rem;
    flex-wrap: wrap;
    padding: 1rem 1.15rem;
    margin-bottom: 1.15rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.filter-bar__field {
    display: flex;
    flex-direction: column;
    flex: 1 1 170px;
    min-width: 0;
}

.filter-bar__field label {
    font-size: .82rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-muted);
    margin-bottom: .3rem;
}

.filter-bar__actions {
    display: flex;
    gap: .5rem;
    align-items: center;
    flex: 0 0 auto;
}

/* Safari and Chrome render the native date control with their own light
   chrome; nudge the indicator so it stays visible on a dark background. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .filter-bar input[type="date"]::-webkit-calendar-picker-indicator {
        filter: invert(1) opacity(.7);
    }
}
:root[data-theme="dark"] .filter-bar input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1) opacity(.7);
}

@media (max-width: 560px) {
    /* Full-width stack: two date fields side by side are unusable at 375px. */
    .filter-bar__field { flex: 1 1 100%; }
    .filter-bar__actions { width: 100%; }
    .filter-bar__actions .btn { flex: 1 1 auto; }
}

@media print {
    .filter-bar { display: none; }
}

/* ------------------------------------------------------------------ pager */

.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.pager__pages {
    display: flex;
    align-items: center;
    gap: .3rem;
    flex-wrap: wrap;
}

/* 44px targets throughout: this is the control an elderly patient on a phone
   taps most, and the numbers are small hit areas by default. */
.pager__num,
.pager__step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 .75rem;
    font-size: .95rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--brand);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
}

.pager__num:hover,
.pager__step:hover {
    background: var(--brand-light);
    color: var(--brand-dark);
}

.pager__num.is-current {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--on-brand);
    cursor: default;
}

/* Disabled prev/next render as <span>, not <a> — nothing to focus, nothing
   to click, and no href for a screen reader to announce. */
.pager__step--off {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 .75rem;
    font-size: .95rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--surface-sunken);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    opacity: .6;
}

.pager__gap {
    padding: 0 .15rem;
    color: var(--text-muted);
}

@media (max-width: 560px) {
    /* Numbers wrap to their own row below Previous / Next on a narrow screen. */
    .pager { justify-content: center; }
    .pager__pages { order: 3; width: 100%; justify-content: center; }
    .pager__step, .pager__step--off { flex: 1 1 auto; }
}

@media print {
    .pager { display: none; }
}

/* ------------------------------------------------------------ empty states */

.empty {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: var(--text-muted);
}
.empty__title { font-size: 1.1rem; font-weight: 650; color: var(--text); margin-bottom: .4rem; }

/* --------------------------------------------------------------- utilities */

.stack > * + * { margin-top: 1rem; }
.muted    { color: var(--text-muted); }
.small    { font-size: .88rem; }
.mt-0     { margin-top: 0; }
.mb-0     { margin-bottom: 0; }
.text-center { text-align: center; }

.divider { height: 1px; background: var(--border); border: 0; margin: 1.35rem 0; }

/* ---------------------------------------------------------------- consent  */

.disclosure {
    max-height: 340px;
    overflow-y: auto;
    padding: 1.15rem;
    background: var(--surface-sunken);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .93rem;
    line-height: 1.6;
}
.disclosure h3 { margin-top: 1.15rem; }
.disclosure h3:first-child { margin-top: 0; }

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    padding: .85rem 0;
    cursor: pointer;
}
.checkbox input[type="checkbox"] {
    width: 22px; height: 22px;
    margin: 1px 0 0;
    flex: 0 0 auto;
    accent-color: var(--brand);
    cursor: pointer;
}

/* ------------------------------------------------------------ motion/print */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

@media print {
    body { background: #fff; }
    .site-header, .site-footer, .btn, .skip-link { display: none !important; }
    .card { box-shadow: none; border-color: #999; }
    .main { max-width: none; padding: 0; }
}
