/* Health & safety (ARC-470/473/475/476). Shared by the pages under Pages/HealthSafety.
   pg-* tokens only, so light and dark follow the theme. Status colours are the one
   place with literals: the design tokens carry no success or caution hue yet. */

.hs-page { max-width: 1080px; padding-bottom: 48px; }

.hs-sub {
    margin-top: 4px;
    font-size: 13px;
    color: var(--pg-text-secondary);
    max-width: 640px;
}

/* ── Section tabs ── */
.hs-tabs {
    display: flex;
    gap: 2px;
    margin: 0 0 16px;
    border-bottom: 1px solid var(--pg-border);
    overflow-x: auto;
}
.hs-tab {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--pg-text-secondary);
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.hs-tab:hover { color: var(--pg-text); }
.hs-tab.active { color: var(--pg-accent); border-bottom-color: var(--pg-accent); }

/* ── Toolbar ── */
.hs-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}
.hs-toolbar .pg-select, .hs-toolbar .pg-input { width: auto; min-width: 160px; max-width: 100%; }
.hs-grow { flex: 1; }

.hs-seg {
    display: inline-flex;
    border: 1px solid var(--pg-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.hs-seg button {
    border: none;
    background: none;
    padding: 6px 12px;
    font: inherit;
    font-size: 13px;
    color: var(--pg-text-secondary);
    cursor: pointer;
}
.hs-seg button + button { border-left: 1px solid var(--pg-border); }
.hs-seg button.on { background: var(--pg-accent); color: var(--pg-accent-text); font-weight: 500; }

/* ── Status pills ── */
.hs-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 20px;
    padding: 0 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.02em;
    white-space: nowrap;
    background: var(--pg-surface);
    color: var(--pg-text-secondary);
}
.hs-pill.ok { background: rgba(46, 160, 100, 0.12); color: #2a8f5a; }
.hs-pill.warn { background: rgba(217, 140, 20, 0.14); color: #b87408; }
.hs-pill.bad { background: var(--pg-danger-bg); color: var(--pg-danger); }
.hs-pill.accent { background: var(--pg-accent); color: var(--pg-accent-text); }
[data-theme="Midnight"] .hs-pill.ok, [data-theme="Dawn"] .hs-pill.ok, [data-theme="Dusk"] .hs-pill.ok { color: #5fcf94; }
[data-theme="Midnight"] .hs-pill.warn, [data-theme="Dawn"] .hs-pill.warn, [data-theme="Dusk"] .hs-pill.warn { color: #e8b04c; }

/* ── Quiet status: an 8px dot and grey words (HsStatus). Filled pills stay for what must stand out. ── */
.hs-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 400;
    color: var(--pg-text-secondary);
    white-space: nowrap;
}
.hs-status-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--pg-text-tertiary); }
.hs-status-dot.warn { background: #d98c14; }
.hs-status-dot.ok { background: #2ea064; }
.hs-status-dot.bad { background: var(--pg-danger); }
[data-theme="Midnight"] .hs-status-dot.warn, [data-theme="Dawn"] .hs-status-dot.warn, [data-theme="Dusk"] .hs-status-dot.warn { background: #e8b04c; }
[data-theme="Midnight"] .hs-status-dot.ok, [data-theme="Dawn"] .hs-status-dot.ok, [data-theme="Dusk"] .hs-status-dot.ok { background: #5fcf94; }

/* A risk changed since it was added: a small accent dot before the title. */
.hs-updated-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 7px;
    border-radius: 50%;
    background: var(--pg-accent);
    vertical-align: middle;
    position: relative;
    top: -1px;
}

/* A text button: accent words, no box. */
.hs-link {
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    font-size: 12px;
    color: var(--pg-accent);
    cursor: pointer;
}
.hs-link:hover { text-decoration: underline; }
.hs-link:focus-visible { outline: 2px solid var(--pg-accent); outline-offset: 2px; border-radius: 2px; }

/* A small count beside a button label. */
.hs-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 2px;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 600;
    background: var(--pg-surface);
    color: var(--pg-text);
}

/* A close button inside a pg-alert. */
.hs-alert-close {
    margin-left: auto;
    border: 0;
    background: none;
    padding: 0 2px;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    line-height: 1.5;
}
.hs-alert-close:hover { opacity: 1; }

/* ── Row lists ── */
.hs-list { display: flex; flex-direction: column; border: 1px solid var(--pg-border); border-radius: var(--radius-md); overflow: hidden; }
.hs-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    align-items: center;
    padding: 11px 14px;
    background: var(--pg-bg);
    border-bottom: 1px solid var(--pg-border);
    color: var(--pg-text);
    text-decoration: none;
}
.hs-row:last-child { border-bottom: none; }
a.hs-row:hover, button.hs-row:hover { background: var(--pg-surface); }
.hs-row-title { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.hs-row-meta { grid-column: 1; font-size: 12px; color: var(--pg-text-secondary); }
.hs-row-side { grid-row: 1 / span 2; grid-column: 2; display: flex; align-items: center; gap: 8px; }

.hs-empty, .hs-loading {
    padding: 28px 8px;
    color: var(--pg-text-secondary);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
}
/* Help text under a section title: plain text, not a box that looks like an empty input. */
.hs-note {
    font-size: 13px;
    color: var(--pg-text-secondary);
    margin-bottom: 14px;
}

/* ── Panels and forms ── */
.hs-panel {
    border: 1px solid var(--pg-border);
    border-radius: var(--radius-md);
    background: var(--pg-bg);
    box-shadow: var(--pg-card-shadow);
    padding: 16px;
    margin-bottom: 16px;
}
.hs-panel-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--pg-text);
    margin-bottom: 6px;
}
.hs-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.hs-form .full { grid-column: 1 / -1; }
.hs-form textarea.pg-input { min-height: 96px; resize: vertical; font-family: inherit; }
.hs-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.hs-error { color: var(--pg-danger); font-size: 12px; margin-top: 6px; }
.hs-kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 14px; font-size: 13px; }
.hs-kv dt { color: var(--pg-text-secondary); font-weight: 400; }
.hs-kv dd { margin: 0; }
.hs-prose { white-space: pre-wrap; font-size: 14px; line-height: 1.5; }
.hs-choice { display: flex; flex-wrap: wrap; gap: 8px; }
.hs-sentence { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13px; color: var(--pg-text); }
.hs-sentence .hs-num { width: 72px; }
.hs-sentence .hs-time { width: auto; min-width: 120px; }
.hs-radios { display: flex; flex-direction: column; gap: 8px; }
.hs-radio .pg-checkbox-box { border-radius: 50%; }

.hs-split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }

/* ── Plain tables (acks, audit, roll call) ── */
.hs-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hs-table th {
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--pg-text-secondary);
    padding: 6px 10px;
    border-bottom: 1px solid var(--pg-border);
}
.hs-table td { padding: 9px 10px; border-bottom: 1px solid var(--pg-border); vertical-align: top; }
.hs-table tr:last-child td { border-bottom: none; }
.hs-scroll { overflow-x: auto; }

/* ── On site now ── */
.hs-count {
    font-size: 28px;
    font-weight: 600;
    line-height: 1;
}
.hs-count small { font-size: 12px; font-weight: 400; color: var(--pg-text-secondary); margin-left: 6px; }
.hs-asof { font-size: 12px; color: var(--pg-text-tertiary); }

/* The total: the biggest thing on the page, what a roll call is checked against. */
.hs-total { padding: 18px 20px; }
.hs-total-num { font-size: 44px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--pg-text); }
.hs-total-label { margin-left: 10px; font-size: 18px; font-weight: 500; letter-spacing: 0; color: var(--pg-text); }
.hs-total-split { margin-top: 8px; font-size: 13px; color: var(--pg-text-secondary); }

/* A panel with its title and count inside, then a table or cards edge to edge (On site now, Site history). */
.hs-roll { padding: 0; overflow: hidden; }
.hs-roll-head { display: flex; align-items: baseline; gap: 8px; padding: 14px 16px 8px; }
.hs-roll-head .hs-panel-title { margin: 0; }
.hs-roll-count { font-size: 15px; font-weight: 600; color: var(--pg-text-tertiary); font-variant-numeric: tabular-nums; }
.hs-roll > .hs-empty { padding: 6px 16px 18px; }
.hs-roll > .pg-alert { margin: 0 16px 10px; }
.hs-roll .hs-table th:first-child, .hs-roll .hs-table td:first-child { padding-left: 16px; }
.hs-roll .hs-table th:last-child, .hs-roll .hs-table td:last-child { padding-right: 16px; }
.hs-roll .hs-table td .hs-status { margin-top: 3px; }

/* Site history: each NZ day under a light band. */
.hs-table tr.hs-day-band th,
div.hs-day-band {
    padding: 7px 16px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: var(--pg-text-secondary);
    background: var(--pg-surface);
    border-top: 1px solid var(--pg-border);
    border-bottom: 1px solid var(--pg-border);
}
.hs-history tbody:first-of-type tr.hs-day-band th { border-top: 0; }
.hs-roll > .hs-phone-only > div.hs-day-band:first-child { border-top: 0; }

/* Phone cards: the name over one grey line, an action on the right. */
.hs-cards { list-style: none; margin: 0; padding: 0; }
.hs-card { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--pg-border); }
.hs-cards > .hs-card:first-child { border-top: 0; }
.hs-roll-head ~ .hs-cards > .hs-card:first-child { border-top: 1px solid var(--pg-border); }
.hs-card-main { flex: 1 1 auto; min-width: 0; }
.hs-card-name { font-size: 15px; font-weight: 600; color: var(--pg-text); overflow-wrap: anywhere; }
.hs-card-line { margin-top: 2px; font-size: 13px; color: var(--pg-text-secondary); }
.hs-card-line .hs-status { display: flex; margin-top: 3px; }
.hs-card-side { flex: none; }
.hs-card-action { margin-top: 6px; font-size: 13px; }
.hs-card-action[disabled] { opacity: 0.4; cursor: not-allowed; }

/* Tap to call: big enough for a thumb in a glove, the number on it. */
.hs-call {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 14px;
    border-radius: var(--radius-md);
    background: var(--pg-surface);
    color: var(--pg-text);
    font-size: 15px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-decoration: none;
    white-space: nowrap;
}
.hs-call:hover, .hs-call:focus-visible { color: var(--pg-text); filter: brightness(0.97); }
.hs-call .bi { font-size: 16px; }

/* Tables at 640px and up and in print; cards below. */
.hs-phone-only { display: none; }
@media (max-width: 639.98px) {
    .hs-phone-only { display: block; }
    .hs-wide-only { display: none !important; }
}
@media print {
    .hs-phone-only { display: none !important; }
    .hs-wide-only { display: block !important; }
}
.hs-table td.hs-cell-action { text-align: right; vertical-align: middle; padding-top: 4px; padding-bottom: 4px; }
.hs-btn-small { padding: 4px 10px; font-size: 12px; white-space: nowrap; }

@media (max-width: 760px) {
    .hs-form { grid-template-columns: 1fr; }
    .hs-split { grid-template-columns: 1fr; }
    .hs-kv { grid-template-columns: 1fr; gap: 0; }
    .hs-kv dt { margin-top: 8px; }
    .hs-toolbar .pg-select, .hs-toolbar .pg-input { flex: 1 1 100%; }
}

/* Roll call and register print cleanly: chrome off, panels flat. */
@media print {
    .sidebar, .sub-nav, .hs-tabs, .hs-toolbar, .hs-noprint, .content-header .pg-btn { display: none !important; }
    .content, .content-body { margin: 0 !important; padding: 0 !important; }
    .hs-panel, .hs-list { border-color: #999; }
    .hs-pill { border: 1px solid #999; background: none !important; color: #000 !important; }
}

.hs-print-title { display: none; font-size: 16px; margin: 0 0 8px; }
@media print { .hs-print-title { display: block; } }

.hs-incident-title { font-size: 18px; font-weight: 600; margin: 0 0 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hs-handons { margin: 0 0 10px; padding-left: 16px; font-size: 12px; color: var(--pg-text-secondary); }
button.hs-row { width: 100%; border: none; text-align: left; font: inherit; cursor: pointer; }

/* ── Map pins and site settings ── */
.hs-pin { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hs-pin-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hs-coord { flex: 1 1 140px; min-width: 0; }
.hs-pin-pick { width: auto; min-width: 180px; max-width: 100%; }
.hs-point { border-top: 1px solid var(--pg-border); padding-top: 14px; margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.hs-point:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.hs-point-head { display: flex; gap: 8px; align-items: flex-end; }
.hs-point-head .pg-input-group { flex: 1; min-width: 0; }
.hs-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 16px; margin-top: 8px; }
.hs-photo { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.hs-photo img { max-width: 220px; max-height: 160px; border-radius: var(--radius-md); border: 1px solid var(--pg-border); object-fit: cover; }

/* Settings rows (Safety rules): one setting per row, as in Linear's settings. */
.hs-settings { max-width: 760px; }
.hs-rows { display: flex; flex-direction: column; }
.hs-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 24px;
    padding: 14px 0;
    border-top: 1px solid var(--pg-border);
}
.hs-row:first-child { border-top: 0; padding-top: 6px; }
.hs-row-label { display: block; font-size: 13px; font-weight: 500; color: var(--pg-text); }
.hs-row-help { margin-top: 3px; font-size: 12px; color: var(--pg-text-secondary); }
.hs-row-control { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; font-size: 13px; color: var(--pg-text); }
.hs-row-control .hs-num { width: 76px; }
.hs-row-control .hs-time { width: auto; min-width: 120px; }
.hs-row-control .hs-signout { width: auto; min-width: 200px; }
.hs-row-control .hs-keep { width: auto; min-width: 140px; }
@media (max-width: 640px) {
    .hs-row { grid-template-columns: 1fr; }
    .hs-row-control { justify-content: flex-start; }
}

/* A row that belongs to the one above it (Sites: the site contact's person, name, phone): indented on a left rule. */
.hs-row.hs-row-sub {
    margin-left: 4px;
    padding: 8px 0 8px 16px;
    border-top: 0;
    border-left: 2px solid var(--pg-border);
}
.hs-row.hs-row-sub + .hs-row:not(.hs-row-sub) { margin-top: 6px; }

/* Sites: the search above a long list of people to choose. */
.hs-host-search { max-width: 280px; margin-top: 4px; }

/* Safety sites: the small map of the vineyard's assembly points. */
.hs-assembly-map {
    height: 240px;
    margin-bottom: 4px;
    border: 1px solid var(--pg-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--pg-surface);
}
.hs-assembly-missing { margin-bottom: 0; }
.hs-assembly-map-link { display: block; border-radius: var(--radius-md); }
.hs-assembly-map-link .hs-assembly-map { cursor: pointer; transition: border-color var(--duration-fast) var(--ease-out); }
.hs-assembly-map-link:hover .hs-assembly-map,
.hs-assembly-map-link:focus-visible .hs-assembly-map { border-color: var(--pg-accent); }
.hs-assembly-map-link .hs-assembly-map canvas { pointer-events: none; }

/* Safety sites: the sign-in code, typed in capitals and spaced like the boxes on the sign. */
.hs-row-control .hs-code { width: 140px; text-transform: uppercase; letter-spacing: 0.2em; font-weight: 600; }
.hs-row-control .hs-code::placeholder { text-transform: none; letter-spacing: normal; font-weight: 400; }

/* Site history: visitors are marked in grey after their name. */
.hs-visitor-mark { margin-left: 8px; font-size: 12px; font-weight: 400; color: var(--pg-text-tertiary); }

/* Risks: the standard risks to choose from, a title over what to do. */
.hs-checks-wide { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px 20px; }
.pg-checkbox.hs-check-desc { align-items: flex-start; }
.hs-check-desc .pg-checkbox-box { margin-top: 1px; flex: none; }
.hs-prompt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; font-size: 13px; color: var(--pg-text-secondary); }
.hs-import { margin: 14px 0 0; font-size: 12px; }
.hs-import a { color: var(--pg-accent); }

/* ── Item lists (Risks, Incidents): a panel of rows, title over one muted line, the status on the right. ── */
.hs-wide { max-width: 960px; }
.hs-items-panel { padding: 0; overflow: hidden; }
.hs-items-panel > .hs-toolbar { padding: 12px 16px 0; margin-bottom: 8px; }
.hs-items-panel > .hs-empty { padding: 28px 16px; }
.hs-items { display: flex; flex-direction: column; }
.hs-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-top: 1px solid var(--pg-border);
    color: var(--pg-text);
    text-decoration: none;
}
.hs-items:first-child .hs-item:first-child { border-top: 0; }
a.hs-item { transition: background var(--duration-fast) var(--ease-out); }
a.hs-item:hover, a.hs-item:focus-visible { background: var(--pg-surface); color: var(--pg-text); }
.hs-item-main { flex: 1 1 auto; min-width: 0; }
.hs-item-title { display: block; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.hs-item-title.hs-clip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-item-line {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--pg-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hs-item-side { flex: none; display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--pg-text-tertiary); white-space: nowrap; }
.hs-item-num { color: var(--pg-text-tertiary); font-weight: 400; margin-right: 8px; font-variant-numeric: tabular-nums; }
/* Every row keeps its second line, even with nothing to say, so the rows are one height. */
.hs-item-line:empty::before { content: "\00a0"; }
.hs-wide.pg-alert { margin-bottom: 12px; }
.hs-foot { margin-top: 8px; font-size: 12px; color: var(--pg-text-secondary); }
.hs-foot a { color: var(--pg-accent); }
@media (max-width: 640px) {
    .hs-item { flex-wrap: wrap; gap: 6px 10px; }
    .hs-item-main { flex-basis: 100%; }
    .hs-item-side { flex-wrap: wrap; white-space: normal; }
}

/* ── Risk editor ── */
/* Text fields need room: the label keeps a narrow column and the field takes the rest. */
.hs-row-wide { grid-template-columns: 200px minmax(0, 1fr); align-items: start; }
.hs-row-wide > .hs-row-label, .hs-row-wide > div:first-child { padding-top: 8px; }
.hs-row-wide .hs-row-control { justify-content: flex-start; }
.hs-row-wide .hs-row-control > .pg-input, .hs-row-wide .hs-row-control > .hs-pin { flex: 1 1 100%; }
.hs-row-control textarea.pg-input { min-height: 96px; resize: vertical; font-family: inherit; }
.hs-row-control .hs-date { width: auto; }
.hs-row-value { font-size: 13px; color: var(--pg-text); }
.hs-count-left { margin-top: 2px; font-size: 11px; color: var(--pg-text-tertiary); flex-basis: 100%; text-align: right; font-variant-numeric: tabular-nums; }

/* Text fields stack: the label over a full-width field. */
.hs-row-stack { grid-template-columns: minmax(0, 1fr); gap: 6px; }
.hs-row-stack .hs-row-control { justify-content: flex-start; }
.hs-row-stack .hs-row-control > .pg-input { flex: 1 1 100%; }
@media (max-width: 640px) {
    .hs-row-wide { grid-template-columns: 1fr; }
    .hs-row-wide > .hs-row-label, .hs-row-wide > div:first-child { padding-top: 0; }
}
.hs-more { margin: -4px 0 16px; }
.hs-pin-compact { gap: 8px; }
.hs-pin-compact .pg-btn { padding: 5px 10px; font-size: 12px; }
.hs-pin-compact .hs-pin-pick { padding-top: 6px; padding-bottom: 6px; font-size: 12px; min-width: 0; width: auto; }
.hs-pin-compact .hs-pin-row { gap: 4px 6px; }
.hs-pin-state { font-size: 13px; color: var(--pg-text-secondary); margin-right: 4px; }
.hs-pin-set { color: var(--pg-text); }
.hs-pin-set .bi { color: var(--pg-accent); }
.hs-pin-sep { color: var(--pg-text-tertiary); }
.hs-pin-more { margin-left: 6px; }

/* A styled button over the browser's file picker; the input stays reachable by keyboard. */
.hs-file { position: relative; cursor: pointer; }
.hs-file:focus-within { outline: 2px solid var(--pg-accent); outline-offset: 2px; }
.hs-file input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.hs-photo-thumb { max-width: 160px; max-height: 120px; border-radius: var(--radius-md); border: 1px solid var(--pg-border); object-fit: cover; }

.hs-btn-danger-outline { background: var(--pg-bg); color: var(--pg-danger); border-color: var(--pg-danger); }
.hs-btn-danger-outline:hover { background: var(--pg-danger-bg); }
.hs-actions.hs-settings { margin-top: 0; }
.hs-row-control > .hs-error { flex-basis: 100%; margin-top: 0; }

/* ── Phone (< 640px) ── */
@media (max-width: 639.98px) {
    .hs-hide-phone { display: none !important; }
}

/* Risks filters: inline at 640px and up; on a phone, the search then a Filters button that opens the rest. */
.hs-filters { display: contents; }
.hs-filterbar .hs-site-filter { order: -1; }
.hs-filters-toggle { display: none; }
@media (max-width: 639.98px) {
    .hs-filterbar .hs-search { flex: 1 1 100%; }
    .hs-filters-toggle { display: inline-flex; align-items: center; gap: 6px; }
    .hs-filters { display: none; flex: 1 1 100%; flex-direction: column; align-items: stretch; gap: 8px; }
    .hs-filterbar.open .hs-filters { display: flex; }
    .hs-filters > .pg-select { flex: none; width: 100%; min-width: 0; }
    .hs-filters > .hs-seg { align-self: flex-start; }
}

/* Incidents: the auditor export. */
.hs-export-field { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 639.98px) {
    .hs-row-control.hs-export { flex-direction: column; align-items: stretch; gap: 10px; }
    .hs-export-field { flex-direction: column; align-items: stretch; gap: 4px; }
    .hs-export-field label { font-size: 12px; color: var(--pg-text-secondary); }
    .hs-export-to { text-transform: capitalize; }
    .hs-row-control .hs-export-field .hs-date { width: 100%; }
    .hs-export-go { width: 100%; justify-content: center; }
}
