/* South32 Visitor Identification System: render stylesheet (hand written).
   Phone first at 375 px: one column, 44 px targets (48 px on gate-family rows).
   The 1280 layout is derived by adding width and panes, at 900 px (rail becomes a sidebar) and 1280 px.
   Every colour, size, radius and shadow is var(--token) from ../../tokens.css. No colour literals here.
   Surfaces are scoped: .staff, .portal, .kiosk. */

@font-face { font-family: Figtree; src: url(../assets/figtree-variable.woff2) format("woff2"); font-weight: 300 900; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
[hidden] { display: none !important; }
h1, h2, h3, h4, p, dl, dd, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; }
::selection { background: var(--yellow-zest); color: var(--ink); }

.staff, .portal, .kiosk { font-family: var(--font-sans); font-size: var(--text-body-size); line-height: var(--text-body-line); color: var(--ink); -webkit-font-smoothing: antialiased; font-variant-numeric: var(--font-features-numeric); }
.staff { background: var(--canvas); }
.portal { background: var(--portal-canvas); }
.kiosk { background: var(--kiosk-bg); color: var(--on-ink); }

.staff .icon, .kiosk .icon { width: var(--icon-size); height: var(--icon-size); flex: none; stroke: currentColor; fill: none; stroke-width: var(--icon-stroke); stroke-linecap: round; stroke-linejoin: round; }
.portal .icon { width: var(--icon-size); height: var(--icon-size); flex: none; stroke: currentColor; fill: none; stroke-width: var(--icon-stroke-portal); stroke-linecap: round; stroke-linejoin: round; }
.staff .icon-sm, .portal .icon-sm { width: var(--icon-size-sm); height: var(--icon-size-sm); stroke-width: var(--icon-stroke-sm); }
.staff :focus-visible, .kiosk :focus-visible { outline: var(--focus-width) solid var(--focus-ring); outline-offset: var(--focus-offset); border-radius: var(--radius-sm); }
.portal :focus-visible { outline: var(--focus-width-portal) solid var(--focus-ring-portal); outline-offset: var(--focus-offset); border-radius: var(--portal-radius-sm); }
.staff .rail :focus-visible { outline-color: var(--focus-ring-on-dark); }
.portal .hdr :focus-visible, .portal .pass :focus-visible { outline-color: var(--focus-ring-on-dark); }
.kiosk :focus-visible { outline: var(--focus-width-kiosk) solid var(--focus-ring-on-dark-white); outline-offset: 3px; }
.staff a, .portal a { color: var(--indigo); text-underline-offset: 3px; }

.skip { position: absolute; left: var(--space-2); top: -64px; z-index: 100; padding: var(--space-2) var(--space-4); border-radius: var(--radius-md); background: var(--ink); color: var(--on-ink); font-weight: 700; text-decoration: none; }
.skip:focus { top: var(--space-2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ==========================================================================
   STAFF: shell
   ========================================================================== */
.staff .app { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; background: var(--canvas); } /* mockup .v-app is a grid */
.staff .rail { background: var(--rail); display: flex; flex-direction: column; gap: var(--space-5); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); } /* mockup phone sidebar: 12/16 padding, 20 gap, hairline below */
.staff .rail-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.staff .rail-brand { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.staff .rail-logo { width: var(--logo-rail-width); height: auto; flex: none; margin-left: -6px; aspect-ratio: 304 / 146; color: var(--on-ink); } /* the lockup at one size at every width */
.staff .rail-name { color: var(--on-ink); font-size: var(--text-label-size); line-height: var(--text-label-line); font-weight: 600; }
.staff .rail-site { color: var(--yellow-zest); font-size: var(--text-small-size); line-height: var(--text-support-line); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.staff .rail-user { display: flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--target-min); min-width: var(--target-min); color: var(--rail-ink); text-decoration: none; flex: none; }
.staff .rail-user:hover { color: var(--on-ink); }
.staff .rail-user-t { display: none; }
.staff .rail-user .icon { display: none; }
.staff .user-name { display: block; color: var(--on-ink); font-size: var(--text-label-size); line-height: var(--text-label-line); font-weight: 600; }
.staff .user-role { display: inline; color: var(--rail-ink); font-size: var(--text-support-size); line-height: var(--text-support-line); }
.staff .rail-cta { width: 100%; height: var(--target-min); font-weight: 800; }
.staff .rail-nav { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.staff .nav-group { display: contents; }
.staff .nav-label { display: none; }
.staff .nav-item { position: relative; display: flex; align-items: center; gap: var(--space-3); min-height: var(--target-min); padding: 0 var(--space-3); border-radius: var(--radius-md); color: var(--rail-ink); font-size: var(--text-label-size); line-height: var(--text-label-line); font-weight: 600; text-decoration: none; white-space: nowrap; transition: background-color var(--motion-base) var(--motion-ease), color var(--motion-base) var(--motion-ease); }
.staff .nav-item:hover { background: var(--rail-wash); color: var(--rail-ink-hover); }
.staff .nav-item[aria-current="page"] { background: var(--rail-active-wash); color: var(--yellow-zest); }
.staff .nav-count { margin-left: auto; }
.staff .count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--surface-sunken); color: var(--ink-muted); font-size: var(--text-support-size); line-height: var(--text-support-line); font-weight: 600; }
.staff .count.is-strong { background: var(--ink); color: var(--on-ink); }
.staff .nav-count.is-strong { background: var(--nav-count); color: var(--on-ink); }

.staff .main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.staff .topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-1) var(--space-4); min-height: var(--topbar-height); padding: var(--space-2) var(--gutter-phone); background: var(--surface); border-bottom: 1px solid var(--line); }
.staff .crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); font-size: var(--text-label-size); line-height: var(--text-label-line); }
.staff .crumbs li { display: flex; align-items: center; gap: var(--space-2); }
.staff .crumbs li + li::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid var(--bluestone); border-top: 1.5px solid var(--bluestone); transform: rotate(45deg); margin-right: var(--space-1); }
.staff .crumbs a { display: inline-flex; align-items: center; min-height: var(--target-min); min-width: var(--target-min); color: var(--ink-muted); text-decoration: none; }
.staff .crumb-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--radius-sm); background: var(--ink); color: var(--yellow-zest); font-size: var(--text-small-size); font-weight: 800; letter-spacing: var(--text-overline-tracking); text-transform: uppercase; }
.staff .crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.staff .sitetime { display: flex; align-items: center; gap: var(--space-2); color: var(--ink-muted); font-size: var(--text-support-size); line-height: var(--text-support-line); }
.staff .sitetime b { color: var(--ink); font-weight: 700; }
.staff .content { display: flex; flex-direction: column; gap: var(--space-3h); width: 100%; max-width: var(--content-max); margin: 0 auto; padding: var(--space-5) var(--gutter-phone) var(--space-7); flex: 1; }
.staff .footer { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: var(--space-2) var(--gutter-desktop) var(--space-4); color: var(--ink-subtle); font-size: var(--text-support-size); line-height: var(--text-support-line); }

/* page head */
.staff .pagehead { display: flex; flex-direction: column; gap: var(--space-6); }
.staff .pagehead-text { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.staff .overline { display: flex; align-items: center; gap: var(--space-2); color: var(--ink-subtle); font-size: var(--text-overline-size); line-height: var(--text-overline-line); font-weight: var(--text-overline-weight); letter-spacing: var(--text-overline-tracking); text-transform: uppercase; }
.staff .title { font-size: var(--text-page-title-size); line-height: var(--text-page-title-line); font-weight: var(--text-page-title-weight); letter-spacing: var(--text-page-title-tracking); }
.staff .sub { color: var(--ink-muted); font-size: var(--text-label-size); line-height: var(--text-label-line); }
.staff .sub b { color: var(--ink); font-weight: 700; }
.staff .actions { display: flex; flex-direction: column; gap: var(--space-3); }
.staff .actions-row { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.staff .pagehead .btn, .staff .x-back .btn { padding: 0 var(--space-3); font-size: var(--text-label-size); line-height: var(--text-label-line); } /* mockup .v-btn-sm text and padding; height kept at the 44/38 target */
.staff .pagehead .btn-icon { padding: 0; }
.staff .hint { display: flex; align-items: center; gap: var(--space-2); color: var(--ink-muted); font-size: var(--text-label-size); line-height: var(--text-label-line); }

/* buttons */
.staff .btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--target-min); padding: 0 var(--space-4); border-radius: var(--radius-md); border: 1px solid var(--control-border); background: var(--surface); color: var(--ink); font-size: var(--text-body-size); line-height: var(--text-body-line); font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color var(--motion-base) var(--motion-ease), border-color var(--motion-base) var(--motion-ease), box-shadow var(--motion-base) var(--motion-ease); }
.staff .btn:hover { border-color: var(--zest-deep); background: var(--surface); }
.staff .btn-primary { background: var(--yellow-zest); border-color: var(--yellow-zest); color: var(--ink); }
.staff .btn-primary:hover { background: var(--zest-hover); border-color: var(--zest-deep); box-shadow: var(--shadow-primary-hover); }
.staff .btn-danger { background: var(--red-earth-ink); border-color: var(--red-earth-ink); color: var(--on-ink); }
.staff .btn-ghost { border-color: transparent; background: none; color: var(--indigo); padding: 0 var(--space-3); }
.staff .btn-ghost:hover { background: var(--indigo-soft); border-color: var(--indigo-soft); }
.staff .btn-icon { width: var(--target-min); padding: 0; flex: none; }
.staff .btn-block { width: 100%; }
.staff .btn[aria-disabled="true"] { background: var(--surface-sunken); border-color: var(--line); color: var(--ink-subtle); cursor: not-allowed; box-shadow: none; }

/* cards */
.staff .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.staff .card-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); padding: var(--space-3h) var(--space-5); }
.staff .card-titles { display: flex; flex-direction: column; min-width: 0; flex: 1 1 200px; }
.staff .card-title { font-size: var(--text-section-size); line-height: var(--text-section-line); font-weight: var(--text-section-weight); }
.staff .card-title em { font-style: normal; color: var(--ink-subtle); font-weight: 600; }
.staff .card-sub { color: var(--ink-muted); font-size: var(--text-support-size); line-height: var(--text-support-line); }
.staff .card-sub b { color: var(--ink); font-weight: 700; }
.staff .tile { width: 36px; height: 36px; border-radius: var(--radius-md); display: grid; place-items: center; flex: none; background: var(--surface-sunken); color: var(--graphite); }
.staff .tile.is-zest { background: var(--zest-soft); color: var(--zest-ink); }
.staff .tile.is-azure { background: var(--azure-soft); color: var(--azure-ink); }
.staff .tile.is-veridian { background: var(--veridian-soft); color: var(--veridian-ink); }
.staff .tile.is-ochre { background: var(--ochre-soft); color: var(--ochre-ink); }
.staff .tile.is-red { background: var(--red-earth-soft); color: var(--red-earth-ink); }
.staff .tile.is-indigo { background: var(--indigo-soft); color: var(--indigo); }

/* search field */
.staff .search { position: relative; display: flex; align-items: center; flex: 1 1 100%; min-width: 0; }
.staff .search .icon { position: absolute; left: var(--space-3); color: var(--ink-muted); pointer-events: none; }
.staff .search .input { padding-left: 38px; padding-right: 38px; }
.staff .input { width: 100%; height: var(--control-height-search); min-height: var(--target-min); padding: 0 var(--space-3); border-radius: var(--radius-md); border: 1px solid var(--control-border); background: var(--surface); color: var(--ink); font-size: var(--text-body-size); line-height: var(--text-body-line); }
.staff .input::placeholder { color: var(--ink-subtle); opacity: 1; }
.staff .input:focus { outline: var(--focus-width) solid var(--focus-ring); outline-offset: 1px; border-color: var(--ink); }
.staff .input.is-error { border-color: var(--red-earth-ink); background: var(--red-earth-soft); }
.staff select.input { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 38px; }
.staff .select { position: relative; display: flex; align-items: center; min-width: 0; flex: 1 1 100%; }
.staff .select .icon { position: absolute; right: var(--space-3); pointer-events: none; color: var(--ink-muted); }
.staff .field .select { flex: none; width: 100%; }
.staff .hc-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3h); align-items: end; }
.staff .field { display: flex; flex-direction: column; gap: var(--space-1h); min-width: 0; }
.staff .label { font-size: var(--text-label-size); line-height: var(--text-label-line); font-weight: 600; }
.staff .help { color: var(--ink-subtle); font-size: var(--text-support-size); line-height: var(--text-support-line); }

/* summary strip (a row of figure buttons) */
.staff .strip { display: flex; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-sm); overflow: hidden; }
.staff .seg { position: relative; flex: 1 1 30%; display: flex; align-items: center; gap: var(--space-2); min-height: 46px; padding: 0 var(--space-4); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: none; color: var(--ink-muted); font-size: var(--text-label-size); line-height: var(--text-body-line); font-weight: 600; text-decoration: none; min-width: 0; }
.staff .seg { white-space: nowrap; min-width: auto; } /* mockup .h-seg is nowrap: whole segments wrap to the next row, a label never breaks inside a segment */
.staff .seg:hover { background: var(--surface-sunken); color: var(--ink); }
.staff .seg .icon { width: 26px; height: 26px; padding: 5px; border-radius: 8px; background: var(--surface-sunken); color: var(--ink-muted); }
.staff .seg b { margin-left: 2px; color: var(--ink); font-size: var(--text-stat-strip-size); line-height: var(--text-stat-strip-line); font-weight: 800; }
.staff .seg.zero b { color: var(--ink-subtle); }
.staff .seg[aria-current="true"] { background: var(--zest-soft); color: var(--ink); box-shadow: inset 0 -3px 0 var(--ink); }
.staff .seg.warn { background: var(--red-earth-soft); color: var(--red-earth-ink); }
.staff .seg.warn b { color: var(--red-earth-ink); }
.staff .seg.warn::before { content: ""; position: absolute; left: 0; top: var(--space-2h); bottom: var(--space-2h); width: 3px; border-radius: 0 3px 3px 0; background: var(--red-earth); }
.staff .t-azure .icon { background: var(--azure-soft); color: var(--azure-ink); }
.staff .t-indigo .icon { background: var(--indigo-soft); color: var(--indigo); }
.staff .t-veridian .icon { background: var(--veridian-soft); color: var(--veridian-ink); }
.staff .t-zest .icon { background: var(--zest-soft); color: var(--zest-ink); }
.staff .t-red .icon { background: var(--red-earth-soft); color: var(--red-earth-ink); }
.staff .seg.zero .icon { background: var(--surface-sunken); color: var(--ink-subtle); }

/* summary cards with a coloured left edge */
.staff .cards { display: grid; grid-template-columns: 1fr; gap: var(--space-2h); }
.staff .scard { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-0) var(--space-2h); align-items: center; min-height: var(--target-min); padding: var(--space-2h) var(--space-3) var(--space-2h) var(--space-3h); border-radius: var(--radius-card); border: 1px solid var(--line); border-left: 4px solid var(--edge, var(--bluestone)); background: var(--surface); box-shadow: var(--shadow-sm); color: var(--ink); text-decoration: none; }
.staff .scard:hover { box-shadow: var(--shadow-lift); border-color: var(--line-strong); border-left-color: var(--edge, var(--bluestone)); }
.staff .scard .tile { width: 34px; height: 34px; grid-row: 1 / 3; }
.staff .scard b { font-size: var(--text-label-size); line-height: var(--text-label-line); font-weight: 700; grid-column: 2; }
.staff .scard small { grid-column: 2 / -1; grid-row: 2; color: var(--ink-subtle); font-size: var(--text-small-size); line-height: var(--text-small-line); }
.staff .scard strong { grid-column: 3; grid-row: 1; font-size: var(--text-stat-size); line-height: var(--text-stat-line); font-weight: var(--text-stat-weight); letter-spacing: -0.01em; }
.staff .scard.no-tile { grid-template-columns: minmax(0, 1fr) auto; }
.staff .scard.no-tile b, .staff .scard.no-tile small { grid-column: 1; }
.staff .scard.no-tile strong { grid-column: 2; grid-row: 1 / 3; }
.staff .scard[aria-current="true"] { background: var(--zest-soft); border-color: var(--ink); border-left-color: var(--edge, var(--bluestone)); box-shadow: var(--ring-selected), var(--shadow-sm); }
.staff .scard.is-zero strong { color: var(--ink-subtle); }
.staff .e-all { --edge: var(--bluestone-deep); }
.staff .e-attn { --edge: var(--red-earth); }
.staff .e-prog { --edge: var(--yellow-zest); }
.staff .e-ok { --edge: var(--veridian-deep); }
.staff .e-past { --edge: var(--stone); }
.staff .e-wait { --edge: var(--ochre); }

/* pill tabs */
.staff .tabs { display: flex; flex-wrap: wrap; gap: var(--space-1h); }
.staff .tab { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--target-min); padding: 0 var(--space-3h); border-radius: var(--radius-pill); border: 1px solid var(--control-border); background: var(--surface); color: var(--ink-muted); font-size: var(--text-label-size); line-height: normal; font-weight: 600; text-decoration: none; } /* mockup .r-tab: 38 px pill, line-height normal */
.staff .tab .icon { width: 16px; height: 16px; }
.staff .tab b { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--surface-sunken); color: var(--ink); font-size: var(--text-support-size); line-height: normal; font-weight: 800; }
.staff .tab b.hot { background: var(--red-earth-soft); color: var(--red-earth-ink); }
.staff .tab:hover { border-color: var(--ink); color: var(--ink); }
.staff .tab[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.staff .tab[aria-current="true"] b { background: var(--yellow-zest); color: var(--ink); }

/* two-way switch (List / By schedule, Today / Tomorrow) */
.staff .switch { display: inline-flex; border: 1px solid var(--control-border); border-radius: var(--radius-md); overflow: hidden; background: var(--surface); align-self: flex-start; }
.staff .switch a { display: inline-flex; align-items: center; gap: var(--space-1h); min-height: var(--target-min); padding: 0 var(--space-3); color: var(--ink-muted); font-size: var(--text-label-size); line-height: var(--text-label-line); font-weight: 600; text-decoration: none; }
.staff .switch a + a { border-left: 1px solid var(--control-border); }
.staff .switch a:hover { background: var(--surface-sunken); color: var(--ink); }
.staff .switch a[aria-current="true"] { background: var(--ink); color: var(--on-ink); }
.staff .switch .icon { width: 15px; height: 15px; }

/* chips for active filters */
.staff .fchips { display: flex; align-items: center; gap: var(--space-2h); flex-wrap: wrap; padding: var(--space-2) var(--space-5); background: var(--zest-soft); border-top: 1px solid var(--zest-edge); font-size: var(--text-support-size); color: var(--ink-muted); }
.staff .fchip { display: inline-flex; align-items: center; gap: var(--space-1h); min-height: var(--target-min); padding: 0 var(--space-1h) 0 var(--space-2h); border: 1px solid var(--zest-edge-chip); border-radius: var(--radius-pill); background: var(--surface); color: var(--ink-muted); font-size: var(--text-support-size); text-decoration: none; }
.staff .fchip b { color: var(--ink); font-weight: 700; }
.staff .fchips .btn-ghost { margin-left: auto; font-weight: 700; }

/* badges and avatars */
.staff .badge { display: inline-flex; align-items: center; gap: var(--space-1); height: var(--badge-height); padding: 0 var(--space-2); border-radius: var(--radius-pill); background: var(--status-neutral-bg); color: var(--status-neutral-ink); font-size: var(--text-support-size); line-height: var(--text-support-line); font-weight: 600; white-space: nowrap; }
.staff .badge.is-info { background: var(--status-info-bg); color: var(--status-info-ink); }
.staff .badge.is-success { background: var(--status-success-bg); color: var(--status-success-ink); }
.staff .badge.is-warning { background: var(--status-warning-bg); color: var(--status-warning-ink); }
.staff .badge.is-danger { background: var(--status-danger-bg); color: var(--status-danger-ink); }
.staff .badge.is-attention { background: var(--status-attention-bg); color: var(--status-attention-ink); }
.staff .badge.is-ready { background: var(--status-ready-bg); color: var(--status-ready-ink); }
.staff .badge.is-ready .icon { color: var(--yellow-zest); }
.staff .avatar { width: var(--avatar-sm); height: var(--avatar-sm); border-radius: var(--radius-pill); display: grid; place-items: center; flex: none; background: var(--amethyst); color: var(--on-ink); font-size: var(--text-small-size); line-height: var(--text-small-line); font-weight: 700; }
.staff .avatar.is-vendor { background: var(--vendor-avatar); }
.staff .avatar.has-photo { overflow: hidden; }
.staff .avatar.has-photo img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.staff .avatar.is-user { width: var(--avatar-md); height: var(--avatar-md); background: var(--yellow-zest); color: var(--ink); font-size: var(--text-support-size); line-height: var(--text-support-line); }
.staff .avatar.is-ring { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--yellow-zest); }
.staff .ref { color: var(--ink-muted); font-weight: 500; letter-spacing: 0.02em; white-space: nowrap; }

/* ---- visitor list (gate family): one row per visitor, whole row is the link ---- */
.staff .lhead { display: none; }
.staff .list { display: flex; flex-direction: column; }
.staff .row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) var(--target-min); gap: var(--space-2) var(--space-3); align-items: start; padding: var(--space-3) var(--space-4) var(--space-3) var(--space-4); border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: background-color var(--motion-fast) var(--motion-ease); }
.staff .gate-list .row { grid-template-columns: minmax(0, 1fr) var(--target-gate); }
.staff .row > * { grid-column: 1; min-width: 0; }
.staff .row > .act { grid-column: 2; grid-row: 1 / span 4; align-self: center; }
.staff .row:hover { background: var(--zest-soft); }
.staff .row:focus-visible { outline: var(--focus-width) solid var(--focus-ring); outline-offset: -2px; background: var(--zest-soft); }
.staff .row.is-todo::before, .staff .row.is-stop::before { content: ""; position: absolute; left: 0; top: var(--space-2); bottom: var(--space-2); width: 3px; border-radius: 0 3px 3px 0; background: var(--yellow-zest); }
.staff .row.is-stop::before { background: var(--red-earth); }
.staff .row.is-stop { background: var(--red-earth-faint); }
.staff .row.is-todo .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--yellow-zest); }
.staff .row.is-done { color: var(--ink-muted); }
.staff .row.is-done:hover { background: var(--surface-sunken); }
.staff .row.is-last { background: var(--zest-soft); box-shadow: var(--ring-last); }
.staff .who { display: flex; align-items: center; gap: var(--space-3); }
.staff .who .avatar { width: var(--avatar-sm); height: var(--avatar-sm); }
.staff .who-t { display: flex; flex-direction: column; min-width: 0; }
.staff .name { font-size: var(--text-body-size); line-height: var(--text-label-line); font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.staff .row.is-done .name { color: var(--ink-muted); font-weight: 600; }
.staff .who-t .sub { color: var(--ink-muted); font-size: var(--text-support-size); line-height: var(--text-support-line); }
.staff .host { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-3); font-size: var(--text-label-size); line-height: var(--text-label-line); }
.staff .host strong { font-weight: 600; }
.staff .host .ref { font-size: var(--text-support-size); }
.staff .col-label { display: inline; color: var(--ink-subtle); font-size: var(--text-small-size); font-weight: 600; margin-right: var(--space-1h); }
.staff .window { display: inline-flex; align-items: center; gap: var(--space-1h); font-size: var(--text-label-size); line-height: var(--text-label-line); font-weight: 700; color: var(--ink); white-space: nowrap; }
.staff .window .icon { width: 14px; height: 14px; color: var(--ink-subtle); }
.staff .window em { font-style: normal; display: inline-flex; align-items: center; gap: var(--space-1); color: var(--red-earth-ink); font-size: var(--text-small-size); font-weight: 700; margin-left: var(--space-2); }
.staff .window em .icon { color: var(--red-earth-ink); }
.staff .status { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.staff .chips { display: flex; flex-wrap: wrap; gap: var(--space-1h); }
.staff .status small { color: var(--ink); font-size: var(--text-support-size); line-height: var(--text-support-line); font-weight: 600; }
.staff .status small.is-quiet { color: var(--ink-muted); }
.staff .status small.is-clinic { color: var(--azure-ink); }
.staff .act { display: inline-flex; align-items: center; justify-content: center; width: var(--target-min); min-height: var(--target-min); border-radius: var(--radius-md); border: 1px solid var(--control-border); background: var(--surface); color: var(--ink); }
.staff .gate-list .act { width: var(--target-gate); min-height: var(--target-gate); }
.staff .row .act .icon { width: 17px; height: 17px; }
.staff .row .act.is-go { background: var(--zest-soft); border-color: var(--zest-ink); }
.staff .row:hover .act.is-go { background: var(--yellow-zest); }
.staff .gate-list .name { overflow-wrap: anywhere; white-space: normal; }

/* static group header (clinic) */
.staff .group { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-4); border-top: 1px solid var(--line); background: var(--surface-sunken); font-size: var(--text-support-size); color: var(--ink-muted); }
.staff .group strong { color: var(--ink); font-weight: 700; font-size: var(--text-label-size); }
.staff .group.is-on { background: var(--veridian-soft); border-top-color: var(--veridian-edge); }
.staff .group .count { margin-left: auto; }

/* empty and error states */
.staff .empty { display: flex; flex-direction: column; align-items: center; gap: var(--space-1h); padding: var(--space-7) var(--space-5) var(--space-8); text-align: center; border-top: 1px solid var(--line); background: var(--surface-faint); }
.staff .empty .tile { margin-bottom: var(--space-1); }
.staff .empty strong { font-size: var(--text-card-title-size); line-height: var(--text-card-title-line); font-weight: 700; }
.staff .empty p { color: var(--ink-muted); font-size: var(--text-support-size); line-height: var(--text-support-line); max-width: 44ch; }
.staff .empty .actions-row { justify-content: center; margin-top: var(--space-2); }

/* alerts */
.staff .alert { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--azure-soft); color: var(--azure-ink); font-size: var(--text-label-size); line-height: var(--text-label-line); }
.staff .alert .icon { margin-top: 1px; }
.staff .alert strong { display: block; font-weight: 600; }
.staff .alert.is-warning { background: var(--ochre-soft); color: var(--ochre-ink); }
.staff .alert.is-danger { background: var(--red-earth-soft); color: var(--red-earth-ink); }
.staff .alert.is-attention { background: var(--zest-soft); color: var(--zest-ink); }
.staff .card > .alert { border-radius: 0; }

/* toast */
.staff .toast-region { position: fixed; left: var(--gutter-phone); right: var(--gutter-phone); bottom: var(--space-5); z-index: var(--z-toast); }
.staff .toast { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--veridian-deep); border-radius: var(--radius-md); box-shadow: var(--shadow-md); font-size: var(--text-label-size); line-height: var(--text-label-line); }
.staff .toast .icon { color: var(--veridian-ink); }
.staff .toast strong { font-weight: 600; }

/* dialog */
.staff .scrim { position: fixed; inset: 0; z-index: var(--z-scrim-reception); background: var(--scrim); display: grid; place-items: center; padding: var(--space-3h); overflow: auto; }
.staff .dialog { width: 100%; max-width: 520px; background: var(--surface); border-radius: var(--radius-dialog); box-shadow: var(--shadow-lg); padding: var(--space-5) var(--space-5); display: flex; flex-direction: column; gap: var(--space-3h); max-height: calc(100vh - 28px); overflow: auto; }
.staff .dialog-wide { max-width: min(1080px, 94vw); }
.staff .dialog-head { display: flex; align-items: flex-start; gap: var(--space-2h); }
.staff .dialog-head > div { flex: 1; }
.staff .dialog-head > .icon { width: 22px; height: 22px; color: var(--ochre-ink); margin-top: 1px; }
.staff .dialog h2 { font-size: 18px; line-height: 24px; font-weight: 700; }
.staff .dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); }
.staff .dialog-actions .btn { flex: 1 1 140px; }
.staff .hc { border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden; }
.staff .hc-g { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); padding: var(--space-2) var(--space-3h); background: var(--azure-soft); border-bottom: 1px solid var(--azure-edge); font-size: var(--text-support-size); color: var(--azure-ink); }
.staff .hc-g strong { font-weight: 700; }
.staff .hc-g span:last-child { margin-left: auto; font-weight: 600; }
.staff .hc-v { display: grid; grid-template-columns: var(--target-min) var(--avatar-sm) minmax(0, 1fr); gap: var(--space-1) var(--space-3); align-items: center; padding: var(--space-2) var(--space-1) var(--space-2) var(--space-2); border-bottom: 1px solid var(--line); }
.staff .hc-v input { width: 20px; height: 20px; margin: 0 auto; accent-color: var(--ink); }
.staff .hc-n strong { display: block; font-size: var(--text-card-title-size); font-weight: 700; }
.staff .hc-n span { color: var(--ink-muted); font-size: var(--text-support-size); display: block; }
.staff .hc-v .status { grid-column: 3; }
.staff .hc-v > .ref, .staff .hc-v > .badge { grid-column: 3; justify-self: start; }
.staff .dialog select.input { font-size: var(--text-label-size); }
.staff .hc-v em { grid-column: 3; display: flex; align-items: flex-start; gap: var(--space-1h); padding: var(--space-1h) var(--space-2h); border-radius: var(--radius-sm); background: var(--azure-soft); color: var(--azure-ink); font-style: normal; font-size: var(--text-support-size); line-height: var(--text-support-line); font-weight: 600; }
.staff .hostcard { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2h) var(--space-3h); border-radius: var(--radius-card); background: var(--indigo-soft); }
.staff .hostcard strong { display: block; font-size: var(--text-card-title-size); }
.staff .hostcard span { color: var(--ink-muted); font-size: var(--text-support-size); }
.staff .hostcard .tile { background: var(--surface); color: var(--indigo); }

/* ---- schedules (host desk, approval queue) ---- */
.staff .shead { display: none; }
.staff .srow { display: grid; grid-template-columns: 1fr; gap: var(--space-2h); padding: var(--space-3) var(--space-4); border-top: 1px solid var(--line); }
.staff .srow:hover { background: var(--canvas); }
.staff .srow .sc { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.staff .srow .sc > strong { font-size: var(--text-card-title-size); line-height: var(--text-card-title-line); font-weight: 700; }
.staff .srow .sc > span { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-1h) var(--space-2); color: var(--ink-muted); font-size: var(--text-support-size); line-height: var(--text-support-line); }
.staff .srow .sc .icon { width: 14px; height: 14px; }
.staff .srow .sc .badge { height: 20px; font-size: var(--text-small-size); }
.staff .srow .sc .when { color: var(--ink); font-weight: 600; }
.staff .srow .sc .note { display: inline-flex; align-items: center; gap: var(--space-1h); padding: 0 var(--space-2); min-height: 20px; border-radius: var(--radius-sm); background: var(--ochre-soft); color: var(--ochre-ink); font-size: var(--text-support-size); }
.staff .prog { display: flex; flex-direction: column; gap: var(--space-1h); }
.staff .prog > span { color: var(--ink-muted); font-size: var(--text-support-size); line-height: var(--text-small-line); font-weight: 600; }
.staff .prog > div { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-1); }
.staff .prog i { height: 7px; border-radius: var(--radius-pill); background: var(--line); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line-strong); }
.staff .prog i.d { background: var(--veridian-deep); box-shadow: none; }
.staff .prog i.c { background: var(--zest-soft); box-shadow: inset 0 0 0 1.5px var(--zest-ink); }
.staff .prog i.c:empty { background: var(--yellow-zest); }
.staff .prog i b { display: block; height: 100%; background: var(--yellow-zest); border-right: 1.5px solid var(--zest-ink); }
.staff .srow .btn { width: 100%; }

/* ---- dashboard ---- */
.staff .dash { display: flex; flex-direction: column; gap: var(--space-3h); }
.staff .tv { display: flex; flex-direction: column; }
.staff .tv-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-1) var(--space-3); align-items: center; padding: var(--space-3) var(--space-4); border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; min-height: var(--target-min); }
.staff .tv-row:hover { background: var(--canvas); }
.staff .tv-row .who { grid-column: 1 / -1; }
.staff .tv-row .ref { font-size: var(--text-label-size); }
.staff .tv-row .go { color: var(--ink-subtle); }
.staff .attn { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; padding: var(--space-3) var(--space-4); border-top: 1px solid var(--line); box-shadow: inset 3px 0 0 var(--red-earth); }
.staff .attn h3 { font-size: var(--text-card-title-size); line-height: var(--text-card-title-line); font-weight: 700; margin: 1px 0; }
.staff .attn .meta { display: flex; flex-wrap: wrap; gap: var(--space-1h) var(--space-3); color: var(--ink-muted); font-size: var(--text-support-size); line-height: var(--text-support-line); }
.staff .attn .meta span { display: inline-flex; align-items: center; gap: var(--space-1h); }
.staff .attn .meta .icon { width: 14px; height: 14px; }
.staff .attn-top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); }
.staff .attn-top .ref { font-size: var(--text-support-size); }
.staff .attn .btn { min-height: var(--target-min); }

/* ---- hero for visitor records (kept for the read-only panel) ---- */
.staff .hero { display: flex; flex-wrap: wrap; gap: var(--space-3h); align-items: center; padding: var(--space-3h) var(--space-5); background: var(--zest-soft); box-shadow: inset 6px 0 0 var(--yellow-zest); }

/* ==========================================================================
   STAFF: from 900 px the rail becomes the left sidebar and lists become tables
   ========================================================================== */
@media (min-width: 900px) {
  .staff .app { grid-template-columns: var(--sidebar-width) minmax(0, 1fr); grid-template-rows: none; }
  .staff .rail { border-bottom: 0; }
  .staff .rail { width: var(--sidebar-width); flex: none; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: var(--space-5) var(--space-4); gap: var(--space-5); }
  .staff .rail-top { display: contents; }
  .staff .rail-brand { flex-direction: column; align-items: flex-start; gap: var(--space-3); padding: 0 var(--space-1); }
  .staff .rail-logo { width: var(--logo-rail-width); margin-left: -6px; }
  .staff .rail-site { font-size: var(--text-small-size); }
  .staff .rail-user { order: 3; margin-top: auto; padding: var(--space-4) var(--space-1) 0; border-top: 1px solid var(--rail-divider); gap: var(--space-3); }
  .staff .rail-user-t { display: block; flex: 1; }
  .staff .rail-user .icon { display: block; }
  .staff .rail-nav { flex-direction: column; flex-wrap: nowrap; gap: var(--space-5); order: 2; }
  .staff .nav-group { display: flex; flex-direction: column; gap: var(--space-1); }
  .staff .nav-label { display: block; padding: 0 var(--space-3) var(--space-1); color: var(--rail-label); font-size: var(--text-overline-size); line-height: var(--text-overline-line); font-weight: var(--text-label-weight); letter-spacing: 0.06em; text-transform: uppercase; } /* mockup .v-nav-label: 12/16, 600, .06em */
  .staff .nav-item { min-height: var(--control-height); }
  .staff .rail-cta { height: var(--target-min); width: 100%; }
  .staff .rail { flex-direction: column; }
  .staff .rail-cta { order: 1; }
  .staff .rail-top { display: contents; }
  .staff .topbar { height: var(--topbar-height); padding: 0 var(--gutter-desktop); flex-wrap: nowrap; gap: var(--space-4); position: sticky; top: 0; z-index: var(--z-topbar); }
  .staff .content { padding: var(--space-5) var(--gutter-desktop) var(--space-7); }
  .staff .pagehead { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--space-6); }
  .staff .actions { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .staff .btn { min-height: var(--control-height-button); }
  .staff .btn-icon { width: var(--target-row-desktop); }
  .staff .search { flex: 0 1 clamp(260px, 26vw, 420px); }
  .staff .select { flex: 0 0 170px; }
  .staff .hc-top { grid-template-columns: minmax(260px, 420px) minmax(0, 1fr); gap: var(--space-4); }
  .staff .input { min-height: var(--control-height-search); }
  .staff .toast-region { left: auto; right: var(--gutter-desktop); bottom: var(--space-5); max-width: 420px; }
  .staff .scrim { padding: var(--space-5); }
  .staff .dialog-actions .btn { flex: 0 0 auto; }

  .staff .strip { display: flex; }
  .staff .seg { flex: 1; border-bottom: 0; }
  .staff .cards { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
  .staff .cards.is-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .staff .cards.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .staff .tab { min-height: 38px; }
  .staff .switch a { min-height: var(--control-height); }

  .staff .lhead, .staff .shead { display: grid; align-items: center; gap: var(--space-3h); padding: 0 var(--space-5); height: 32px; background: var(--azure-soft); color: var(--azure-ink); border-top: 1px solid var(--azure-edge); border-bottom: 1px solid var(--azure-edge); font-size: var(--text-overline-size); line-height: var(--text-overline-line); font-weight: var(--text-overline-weight); letter-spacing: var(--text-overline-tracking); text-transform: uppercase; }
  .staff .shead { background: var(--surface-sunken); color: var(--ink-muted); border-bottom: 0; border-top-color: var(--line); }
  .staff .row, .staff .gate-list .row { padding: var(--space-2) var(--space-5); align-items: center; gap: var(--space-3h); min-height: 58px; }
  .staff .row.cols-lane { min-height: 58px; }
  .staff .row > *, .staff .row > .act { grid-column: auto; grid-row: auto; }
  .staff .row .act, .staff .gate-list .row .act { width: var(--target-row-desktop); min-height: 34px; height: 34px; justify-self: end; }
  .staff .col-label { display: none; }
  .staff .host { flex-direction: column; gap: var(--space-0); }
  .staff .host strong { font-size: var(--text-label-size); }
  .staff .window .icon { color: var(--ink-subtle); }
  .staff .row.cols-reception, .staff .gate-list .row.cols-reception, .staff .lhead.cols-reception { grid-template-columns: minmax(210px, 1.2fr) minmax(140px, 0.7fr) 120px minmax(330px, 1.6fr) 40px; }
  .staff .row.cols-gate, .staff .gate-list .row.cols-gate, .staff .lhead.cols-gate { grid-template-columns: minmax(220px, 1.2fr) minmax(110px, 0.9fr) minmax(140px, 0.9fr) 150px minmax(240px, 1.1fr) 40px; }
  .staff .gate-list .row { min-height: 48px; }
  .staff .row.cols-clinic, .staff .gate-list .row.cols-clinic, .staff .lhead.cols-clinic { grid-template-columns: minmax(220px, 1.3fr) minmax(150px, 0.8fr) 128px minmax(250px, 1.3fr) 40px; }
  .staff .row.cols-property, .staff .gate-list .row.cols-property, .staff .lhead.cols-property { grid-template-columns: minmax(200px, 1.1fr) minmax(0, 1.2fr) 190px minmax(190px, 1fr) 40px; }
  .staff .row .who .name { font-size: var(--text-body-size); }
  .staff .row .purpose { color: var(--ink-muted); }

  .staff .srow, .staff .shead.cols-sched { grid-template-columns: minmax(220px, 0.9fr) minmax(260px, 1.3fr) 236px 164px; align-items: center; gap: var(--space-4); padding: 0 var(--space-5); }
  .staff .srow { min-height: 58px; padding-top: var(--space-1h); padding-bottom: var(--space-1h); }
  .staff .srow .btn { width: 164px; padding: 0; }
  .staff .cols-sched .sc > span, .staff .cols-sched .when { flex-wrap: nowrap; white-space: nowrap; }

  .staff .tv-row { grid-template-columns: minmax(0, 1.4fr) minmax(110px, 0.6fr) 80px 120px 20px; gap: var(--space-3h); }
  .staff .tv-row .who { grid-column: auto; }
  .staff .dash { display: grid; grid-template-columns: minmax(0, 1fr) clamp(340px, 27vw, 460px); align-items: start; gap: var(--space-3h); }
  .staff .tvhead { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(110px, 0.6fr) 80px 120px 20px; gap: var(--space-3h); align-items: center; height: 32px; padding: 0 var(--space-5); background: var(--surface-sunken); color: var(--ink-muted); font-size: var(--text-overline-size); font-weight: var(--text-overline-weight); letter-spacing: var(--text-overline-tracking); text-transform: uppercase; }
  .staff .hc-v { grid-template-columns: 20px var(--avatar-sm) minmax(180px, 1.2fr) 150px minmax(200px, 1fr); }
  .staff .hc-v .status, .staff .hc-v em, .staff .hc-v > .ref, .staff .hc-v > .badge { grid-column: auto; }
  .staff .hc-v em { grid-column: 3 / -1; }
}
.staff .tvhead { display: none; }
@media (min-width: 900px) { .staff .tvhead { display: grid; } }

@media (min-width: 1280px) {
  .staff .rail-cta { height: 44px; }
}

/* ==========================================================================
   KIOSK (Alpha Gate gate screen): dark, one headline, one 72 px button
   ========================================================================== */
.kiosk .k-app { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-6); padding: var(--space-6) var(--space-4); }
.kiosk .k-card { width: 100%; max-width: var(--kiosk-card-max); background: var(--rail); border-radius: var(--radius-kiosk); padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-5); box-shadow: var(--shadow-lg); }
.kiosk .k-brand { display: flex; align-items: center; gap: var(--space-4); padding-bottom: var(--space-5); border-bottom: 1px solid var(--rail-divider-kiosk); }
.kiosk .k-brand .logo { display: block; height: var(--logo-kiosk-height); width: auto; aspect-ratio: 304 / 146; margin-left: -6px; flex: none; max-width: 40%; color: var(--on-ink); }
.kiosk .k-brand > div { min-width: 0; }
.kiosk .k-card .k-name { color: var(--on-ink); font-size: var(--text-label-size); line-height: var(--text-label-line); font-weight: 600; }
.kiosk .k-card .k-site { color: var(--yellow-zest); font-size: var(--text-overline-size); line-height: var(--text-overline-line); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.kiosk .k-ic { width: 64px; height: 64px; border-radius: var(--radius-pill); background: var(--yellow-zest); color: var(--ink); display: grid; place-items: center; }
.kiosk .k-ic .icon { width: 32px; height: 32px; }
.kiosk .k-card h1 { font-size: 30px; line-height: 36px; font-weight: 800; letter-spacing: -0.02em; }
.kiosk .k-card p { font-size: var(--text-kiosk-body-size); line-height: var(--text-kiosk-body-line); color: var(--kiosk-ink); }
.kiosk .k-done { display: flex; align-items: center; justify-content: center; height: var(--kiosk-button-height); border-radius: var(--radius-lg); background: var(--yellow-zest); color: var(--ink); font-size: var(--text-kiosk-button-size); font-weight: 800; text-decoration: none; margin-top: var(--space-3); }
.kiosk .k-done:hover { background: var(--zest-hover); }
@media (min-width: 900px) {
  .kiosk .k-card { padding: var(--space-10); }
  .kiosk .k-card h1 { font-size: var(--text-kiosk-title-size); line-height: var(--text-kiosk-title-line); }
}

/* ==========================================================================
   PORTAL (Visitor Portal): softer, roomier, 48 px controls, indigo focus
   ========================================================================== */
.portal .hdr { background: var(--rail); color: var(--rail-ink); border-bottom: 3px solid var(--yellow-zest); position: sticky; top: 0; z-index: var(--z-portal-header); }
.portal .hdr-in { max-width: var(--portal-frame-max); margin: 0 auto; display: flex; align-items: center; gap: var(--space-2h); padding: var(--space-2) var(--space-3h); min-height: var(--portal-header-height); } /* mockup phone header: 10 gap, 14 sides */
.portal .hdr .logo { display: block; height: var(--logo-portal-height); width: auto; aspect-ratio: 304 / 146; margin-left: -6px; flex: none; color: var(--on-ink); }
.portal .hdr-in > div:first-of-type { min-width: 0; }
.portal .hdr-who { flex: none; }
.portal .hdr-name { color: var(--on-ink); font-weight: 600; font-size: var(--text-support-size); line-height: var(--text-support-line); }
.portal .hdr-site { color: var(--yellow-zest); font-size: var(--text-small-size); line-height: var(--text-small-line); font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.portal .hdr-who { margin-left: auto; display: flex; align-items: center; gap: var(--space-3); font-size: var(--text-label-size); }
.portal .hdr-who strong { color: var(--on-ink); font-weight: 600; }
.portal .hdr-who .w, .portal .hdr-site .w { display: none; }
.portal .avatar { width: 34px; height: 34px; border-radius: var(--radius-pill); display: grid; place-items: center; background: var(--yellow-zest); color: var(--ink); font-size: var(--text-support-size); font-weight: 800; flex: none; }
.portal .hdr .btn { background: none; border-color: var(--rail-outline); color: var(--rail-ink-hover); width: var(--target-min); min-height: var(--target-min); padding: 0; font-size: var(--text-label-size); line-height: var(--text-label-line); }
.portal .hdr .btn span { display: none; }

.portal .shell { max-width: var(--portal-frame-max); margin: 0 auto; display: flex; flex-direction: column; gap: var(--space-3h); padding: var(--space-3h) var(--portal-gutter-phone) var(--space-7); }
.portal .side { display: flex; flex-direction: column; gap: var(--space-3); }
.portal .main { min-width: 0; }
.portal .main-in { width: 100%; max-width: var(--portal-main-max); }
.portal .screen { display: flex; flex-direction: column; gap: var(--space-5); }
.portal .foot { max-width: var(--portal-frame-max); margin: 0 auto; padding: 0 var(--portal-gutter-phone) var(--space-6); color: var(--portal-subtle); font-size: var(--text-support-size); }
.portal .stack { display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; }
.portal .cols { display: flex; flex-direction: column; gap: var(--space-5); }
.portal .cols > * { min-width: 0; }

.portal .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--portal-radius-lg); box-shadow: var(--shadow-portal); }
.portal .card-h { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3h); padding: var(--space-4); }
.portal .card-h h2 { font-size: var(--text-section-size); line-height: var(--text-section-line); font-weight: 700; }
.portal .card-h p { color: var(--portal-muted); font-size: var(--text-support-size); line-height: var(--text-support-line); }
.portal .card-h .grow { flex: 1 1 180px; min-width: 0; }
.portal .card-b { padding: 0 var(--space-4) var(--space-4); }
.portal .card-b.top { padding-top: var(--space-4); border-top: 1px solid var(--line); }
.portal .tile { width: 38px; height: 38px; border-radius: var(--portal-radius); display: grid; place-items: center; flex: none; background: var(--surface-sunken); color: var(--graphite); }
.portal .t-azure { background: var(--azure-soft); color: var(--azure-ink); }
.portal .t-indigo { background: var(--indigo-soft); color: var(--indigo); }
.portal .t-veridian { background: var(--veridian-soft); color: var(--veridian-ink); }
.portal .t-ochre { background: var(--ochre-soft); color: var(--ochre-ink); }
.portal .t-red { background: var(--red-earth-soft); color: var(--red-earth-ink); }
.portal .t-zest { background: var(--zest-soft); color: var(--zest-ink); }
.portal .t-blue { background: var(--bluestone-soft); color: var(--bluestone-ink); }
.portal .eyebrow { color: var(--portal-subtle); font-size: var(--text-overline-size); line-height: var(--text-overline-line); font-weight: var(--text-overline-weight); letter-spacing: var(--text-overline-tracking); text-transform: uppercase; }
.portal .muted { color: var(--portal-muted); }
.portal .small { font-size: var(--text-support-size); line-height: var(--text-support-line); }
.portal .hint { display: flex; align-items: flex-start; gap: var(--space-2); color: var(--portal-muted); font-size: var(--text-label-size); line-height: var(--text-label-line); }

.portal .hero { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4h); padding: var(--space-4); border-radius: var(--portal-radius-xl); background: var(--tint, var(--azure-soft)); border: 1px solid var(--tint-line, var(--azure-edge-hero)); }
.portal .hero-ic { width: 46px; height: 46px; border-radius: var(--portal-radius-lg); display: grid; place-items: center; background: var(--surface); color: var(--tone, var(--azure-ink)); box-shadow: var(--shadow-portal); flex: none; }
.portal .hero-t { flex: 1 1 220px; min-width: 0; }
.portal .hero .eyebrow { color: var(--tone, var(--azure-ink)); }
.portal .hero h1 { font-size: 22px; line-height: 28px; font-weight: 800; letter-spacing: -0.02em; margin-top: 2px; }
.portal .hero p { color: var(--graphite); margin-top: var(--space-1); max-width: 70ch; }
.portal [data-tone="indigo"] { --tint: var(--indigo-soft); --tint-line: var(--indigo-edge-hero); --tone: var(--indigo); }
.portal [data-tone="blue"] { --tint: var(--bluestone-soft); --tint-line: var(--bluestone-edge-hero); --tone: var(--bluestone-ink); }
.portal [data-tone="red"] { --tint: var(--red-earth-soft); --tint-line: var(--red-earth-edge); --tone: var(--red-earth-ink); }
.portal [data-tone="ochre"] { --tint: var(--ochre-soft); --tint-line: var(--ochre-edge-hero); --tone: var(--ochre-ink); }
.portal [data-tone="veridian"] { --tint: var(--veridian-soft); --tint-line: var(--veridian-edge-hero); --tone: var(--veridian-ink); }
.portal [data-tone="zest"] { --tint: var(--zest-soft); --tint-line: var(--zest-edge-hero); --tone: var(--zest-ink); }

.portal .pill { display: inline-flex; align-items: center; gap: var(--space-1h); height: 28px; padding: 0 var(--space-3) 0 var(--space-2h); border-radius: var(--radius-pill); font-size: var(--text-support-size); line-height: var(--text-support-line); font-weight: 600; white-space: nowrap; background: var(--surface-sunken); color: var(--graphite); border: 1px solid var(--line); }
.portal .pill.ok { background: var(--veridian-soft); color: var(--veridian-ink); border-color: var(--veridian-edge); }
.portal .pill.todo { background: var(--zest-soft); color: var(--zest-ink); border-color: var(--zest-edge-portal); }
.portal .pill.wait { background: var(--ochre-soft); color: var(--ochre-ink); border-color: var(--ochre-edge-portal); }
.portal .pill.info { background: var(--azure-soft); color: var(--azure-ink); border-color: var(--azure-edge-portal); }
.portal .pill.solid { background: var(--ink); color: var(--yellow-zest); border-color: var(--ink); }
.portal .pill.on-white { background: var(--surface); }
.portal .pill .icon { stroke-width: 2.2; } /* mockup pill icon: 14 px, stroke 2.2 */

.portal .btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--portal-control-height); padding: 0 var(--space-5); border-radius: var(--portal-radius); border: 1.5px solid var(--ink); background: var(--surface); color: var(--ink); font-size: var(--text-body-size); line-height: var(--text-body-line); font-weight: 700; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background-color var(--motion-base), border-color var(--motion-base), box-shadow var(--motion-base); }
.portal .btn:hover { background: var(--surface-sunken); }
.portal .btn-p { background: var(--yellow-zest); border-color: var(--zest-deep); box-shadow: var(--shadow-portal-primary); }
.portal .btn-p:hover { background: var(--zest-hover); }
.portal .btn-t { border-color: transparent; background: none; color: var(--indigo); padding: 0 var(--space-3); }
.portal .btn-t:hover { background: var(--indigo-soft); }
.portal .btn-block { width: 100%; }
.portal .btn[aria-disabled="true"] { background: var(--disabled-fill); border-color: var(--disabled-edge); color: var(--disabled-ink); box-shadow: none; cursor: not-allowed; }

.portal .fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4h) var(--space-5); }
.portal .field { display: flex; flex-direction: column; gap: var(--space-1h); min-width: 0; }
.portal .lbl { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-label-size); line-height: var(--text-label-line); font-weight: 600; }
.portal .opt { font-weight: 400; font-size: var(--text-small-size); color: var(--portal-subtle); background: var(--surface-sunken); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 0 var(--space-2); line-height: 18px; }
.portal .input { width: 100%; height: var(--portal-control-height); padding: 0 var(--space-3h); border-radius: var(--portal-radius); border: 1.5px solid var(--control-border-portal); background: var(--surface); font-size: var(--text-body-size); }
.portal .input::placeholder { color: var(--portal-placeholder); opacity: 1; }
.portal .input.is-error { border-color: var(--red-earth-ink); background: var(--red-earth-soft); }
.portal .ctl { position: relative; display: flex; align-items: center; }
.portal .ctl > .icon { position: absolute; left: var(--space-3h); color: var(--portal-muted); pointer-events: none; }
.portal .ctl > .icon + .input { padding-left: 42px; }
.portal select.input { appearance: none; -webkit-appearance: none; padding-right: 42px; }
.portal .ctl > .input + .icon { left: auto; right: var(--space-3h); }
.portal .help { color: var(--portal-subtle); font-size: var(--text-support-size); line-height: var(--text-support-line); }
.portal .error { display: flex; align-items: center; gap: var(--space-1h); color: var(--red-earth-ink); font-size: var(--text-support-size); line-height: var(--text-support-line); font-weight: 600; }
.portal .ro { display: flex; flex-direction: column; gap: 2px; padding: var(--space-3) var(--space-3h); border-radius: var(--portal-radius); background: var(--surface-sunken); border: 1px dashed var(--line-mid); min-width: 0; }
.portal .ro span { display: flex; align-items: center; gap: var(--space-1h); font-size: var(--text-small-size); line-height: var(--text-small-line); font-weight: 600; color: var(--portal-subtle); }
.portal .ro strong { font-weight: 700; overflow-wrap: anywhere; }
.portal .ro-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
.portal .check { display: flex; align-items: center; gap: var(--space-3h); min-height: var(--portal-control-height); padding: var(--space-3h) var(--space-4); border: 1.5px solid var(--control-border-portal); border-radius: var(--portal-radius); font-weight: 700; background: var(--surface); }
.portal .check-box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--control-border-portal); background: var(--surface); flex: none; }
.portal .points { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
.portal .points li { display: flex; gap: var(--space-3); align-items: flex-start; font-size: var(--text-label-size); line-height: var(--text-label-line); color: var(--graphite); }
.portal .points strong { display: block; color: var(--ink); font-weight: 700; }
.portal .points .tile { width: 34px; height: 34px; border-radius: var(--radius-md); }
.portal .note { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3h) var(--space-4); border-radius: var(--portal-radius); background: var(--azure-soft); color: var(--azure-ink); font-size: var(--text-label-size); line-height: var(--text-label-line); border: 1px solid var(--azure-edge-portal); }
.portal .note strong { font-weight: 700; }
.portal .note.ok { background: var(--veridian-soft); color: var(--veridian-ink); border-color: var(--veridian-edge); }
.portal .note.wait { background: var(--ochre-soft); color: var(--ochre-ink); border-color: var(--ochre-edge-portal); }
.portal .note.is-danger { background: var(--red-earth-soft); color: var(--red-earth-ink); border-color: var(--red-earth-edge); }
.portal .bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); padding: var(--space-3); background: var(--surface); border: 1px solid var(--line-mid); border-radius: var(--portal-radius-lg); box-shadow: var(--shadow-portal-bar); }
.portal .bar .hint { display: none; font-size: var(--text-support-size); line-height: var(--text-support-line); }
.portal .bar-actions { display: flex; align-items: center; gap: var(--space-2); width: 100%; }
.portal .bar-actions .btn-p { flex: 1; min-width: 0; white-space: normal; line-height: 18px; padding: 0 var(--space-3); }

/* side: visit summary and journey */
.portal .visit { padding: var(--space-4) var(--space-4h); }
.portal .visit-top { display: flex; align-items: flex-start; gap: var(--space-3); justify-content: space-between; }
.portal .visit h2 { font-size: var(--text-portal-visit-size); line-height: var(--text-portal-visit-line); font-weight: 800; letter-spacing: -0.01em; }
.portal .visit-facts { margin-top: var(--space-3); display: grid; gap: var(--space-1h); }
.portal .visit-facts div { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: var(--space-2h); align-items: center; }
.portal .visit-facts dt { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-sunken); color: var(--graphite); }
.portal .visit-facts dd { font-size: var(--text-label-size); line-height: var(--text-label-line); font-weight: 600; }
.portal .visit-facts dd span { display: block; font-weight: 400; font-size: var(--text-small-size); line-height: var(--text-small-line); color: var(--portal-subtle); }
.portal .journey { padding: var(--space-3) var(--space-3); }
.portal .journey > summary { display: flex; align-items: center; gap: var(--space-2h); min-height: var(--target-min); cursor: pointer; list-style: none; padding: 0 2px; }
.portal .journey > summary::-webkit-details-marker { display: none; }
.portal .journey > summary strong { display: block; font-size: var(--text-card-title-size); line-height: var(--text-card-title-line); font-weight: 700; }
.portal .journey > summary span { font-size: var(--text-support-size); line-height: var(--text-support-line); font-weight: 600; color: var(--portal-subtle); }
.portal .journey > summary .icon { margin-left: auto; transition: transform var(--motion-slow); }
.portal .journey[open] > summary .icon { transform: rotate(180deg); }
.portal .journey-h { display: none; align-items: baseline; justify-content: space-between; gap: var(--space-3); padding: 0 var(--space-1h); }
.portal .journey-h h2 { font-size: var(--text-section-size); line-height: var(--text-section-line); font-weight: 700; }
.portal .journey-h span { font-size: var(--text-support-size); font-weight: 700; color: var(--veridian-ink); }
.portal .seg-bar { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; margin: var(--space-2h) var(--space-1h); }
.portal .seg-bar i { height: 8px; border-radius: var(--radius-pill); background: var(--line); }
.portal .seg-bar i.d { background: var(--portal-veridian); }
.portal .seg-bar i.c { background: var(--yellow-zest); box-shadow: inset 0 0 0 1.5px var(--zest-ink); }
.portal .tl { display: flex; flex-direction: column; margin-top: var(--space-2h); }
.portal .tl li { position: relative; }
.portal .tl li + li::before { content: ""; position: absolute; left: 29px; top: -7px; height: 14px; width: 2px; background: var(--line-mid); border-radius: 2px; }
.portal .tl li.link-done::before { background: var(--portal-veridian); }
.portal .st { position: relative; z-index: 1; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; width: 100%; min-height: 52px; padding: var(--space-1h) var(--space-3); border: 1.5px solid transparent; border-radius: var(--portal-radius); color: var(--ink); text-decoration: none; }
.portal .st-m { width: 34px; height: 34px; border-radius: var(--radius-pill); display: grid; place-items: center; border: 2px solid var(--control-border-portal); background: var(--surface); color: var(--ink); font-size: var(--text-label-size); font-weight: 700; }
.portal .st-t strong { display: block; font-size: var(--text-card-title-size); line-height: var(--text-card-title-line); font-weight: 700; }
.portal .st-s { display: inline-flex; align-items: center; gap: 5px; font-size: var(--text-support-size); line-height: var(--text-support-line); font-weight: 600; color: var(--portal-subtle); }
.portal .st.done .st-m { background: var(--portal-veridian); border-color: var(--portal-veridian); color: var(--on-ink); }
.portal .st.done .st-s { color: var(--veridian-ink); }
.portal .st.cur { background: var(--zest-soft); border-color: var(--ink); }
.portal .st.cur .st-m { background: var(--ink); border-color: var(--ink); color: var(--yellow-zest); transform: scale(1.06); }
.portal .st.cur.done .st-m { background: var(--portal-veridian); border-color: var(--portal-veridian); color: var(--on-ink); }
.portal .st.lock .st-m { background: var(--surface-sunken); border-color: var(--line-mid); color: var(--portal-locked); }
.portal .st.lock .st-t strong { color: var(--portal-locked-title); }
.portal .gate { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: var(--space-3); align-items: center; margin: 0 var(--space-3); padding: 5px 0; }
.portal .gate-m { width: 22px; height: 22px; margin: 0 6px; border-radius: 7px; display: grid; place-items: center; background: var(--surface-sunken); border: 1.5px dashed var(--line-mid); color: var(--portal-locked); transform: rotate(45deg); }
.portal .gate-m .icon { transform: rotate(-45deg); width: 12px; height: 12px; stroke-width: 2.4; }
.portal .gate span { font-size: var(--text-support-size); line-height: var(--text-support-line); font-weight: 600; color: var(--portal-locked-title); letter-spacing: 0.02em; }
.portal .gate.ok .gate-m { background: var(--portal-veridian); border: 1.5px solid var(--portal-veridian); color: var(--on-ink); }
.portal .gate.ok span { color: var(--veridian-ink); }
.portal .journey-foot { margin: var(--space-2) var(--space-1h) 2px; padding-top: var(--space-2h); border-top: 1px solid var(--line); }
.portal .journey-foot .btn { width: 100%; }

/* still needed */
.portal .done-ring { display: flex; align-items: center; gap: var(--space-4); padding: 0 var(--space-4) var(--space-4h); }
.portal .ring { position: relative; width: 76px; height: 76px; flex: none; }
.portal .ring svg { width: 76px; height: 76px; transform: rotate(-90deg); }
.portal .ring circle { fill: none; stroke-width: 8; }
.portal .ring .bg { stroke: var(--line); }
.portal .ring .fg { stroke: var(--portal-veridian); stroke-linecap: round; }
.portal .ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: var(--text-stat-strip-size); font-weight: 800; }
.portal .done-ring strong { display: block; font-size: var(--text-section-size); line-height: var(--text-section-line); font-weight: 700; }
.portal .done-ring span { font-size: var(--text-support-size); line-height: var(--text-support-line); color: var(--portal-muted); }
.portal .miss li { border-top: 1px solid var(--line); }
.portal .miss a { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; min-height: var(--target-min); padding: var(--space-3) var(--space-4); color: var(--ink); text-decoration: none; font-size: var(--text-label-size); line-height: var(--text-label-line); font-weight: 600; }
.portal .mk { width: 26px; height: 26px; border-radius: var(--radius-pill); display: grid; place-items: center; border: 2px dashed var(--ochre); color: var(--ochre-ink); background: var(--surface); }
.portal .is-prov .mk { border: 2px solid var(--portal-veridian); background: var(--portal-veridian); color: var(--on-ink); }
.portal .is-opt .mk { border: 2px dashed var(--line-mid); color: var(--portal-locked); }
.portal .ms { font-size: var(--text-support-size); line-height: var(--text-support-line); font-weight: 600; color: var(--ochre-ink); }
.portal .is-prov .ms { color: var(--veridian-ink); }
.portal .is-opt .ms { color: var(--portal-subtle); }

/* ready hero, pass, day list */
.portal .ready-hero { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4h); padding: var(--space-5); border-radius: var(--portal-radius-xl); background: var(--portal-veridian); color: var(--on-ink); position: relative; overflow: hidden; }
.portal .ready-hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: var(--radius-pill); border: 36px solid var(--hero-ring); }
.portal .ready-ic { width: 60px; height: 60px; border-radius: var(--radius-pill); background: var(--surface); color: var(--veridian-ink); display: grid; place-items: center; flex: none; }
.portal .ready-ic .icon { width: 30px; height: 30px; stroke-width: 2.6; }
.portal .ready-hero > div { flex: 1 1 220px; position: relative; z-index: 1; }
.portal .ready-hero h1 { font-size: 22px; line-height: 28px; font-weight: 800; letter-spacing: -0.02em; }
.portal .ready-hero p { color: var(--portal-ready-ink); font-size: var(--text-body-size); line-height: var(--text-body-line); margin-top: var(--space-1); }
.portal .ready-hero .pill { position: relative; z-index: 1; }
.portal .ready-cols { display: flex; flex-direction: column; gap: var(--space-6); align-items: center; }
.portal .ready-cols > .stack { width: 100%; }
.portal .pass { width: var(--pass-width); max-width: 100%; border-radius: var(--portal-radius-pass); background: var(--rail); color: var(--on-ink); box-shadow: var(--shadow-portal-lg); overflow: hidden; }
.portal .pass-top { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) var(--space-5); border-bottom: 3px solid var(--yellow-zest); }
.portal .pass-top .logo { display: block; height: var(--logo-pass-height); width: auto; aspect-ratio: 304 / 146; margin-left: -5px; color: var(--on-ink); }
.portal .pass-top span { font-size: var(--text-small-size); font-weight: 800; letter-spacing: 0.14em; color: var(--yellow-zest); }
.portal .pass-who { display: flex; align-items: center; gap: var(--space-3h); padding: var(--space-4h) var(--space-5) var(--space-3h); }
.portal .pass-who .avatar { width: 54px; height: 54px; font-size: 19px; }
.portal .pass-who strong { display: block; font-size: var(--text-portal-visit-size); line-height: var(--text-portal-visit-line); font-weight: 800; }
.portal .pass-who div span { font-size: var(--text-support-size); color: var(--rail-quiet-ink); }
.portal .pass-qr { margin: 0 var(--space-5); padding: var(--space-4); border-radius: var(--radius-lg); background: var(--surface); display: flex; flex-direction: column; align-items: center; gap: var(--space-2); color: var(--ink); }
.portal .pass-qr svg { display: block; fill: var(--ink); width: 176px; height: 176px; }
.portal .pass-qr em { font-style: normal; font-size: var(--text-small-size); font-weight: 700; letter-spacing: 0.06em; color: var(--portal-subtle); text-transform: uppercase; }
.portal .pass-qr.is-stale svg { opacity: 0.25; }
.portal .pass-cut { position: relative; margin: var(--space-4) 0 0; border-top: 2px dashed var(--rail-divider); }
.portal .pass-cut::before, .portal .pass-cut::after { content: ""; position: absolute; top: -11px; width: 22px; height: 22px; border-radius: var(--radius-pill); background: var(--pass-hole); }
.portal .pass-cut::before { left: -11px; }
.portal .pass-cut::after { right: -11px; }
.portal .pass-facts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3h) var(--space-4); padding: var(--space-4) var(--space-5) var(--space-5); }
.portal .pass-facts dt { font-size: var(--text-small-size); line-height: var(--text-small-line); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--rail-quiet-label); }
.portal .pass-facts dd { font-size: var(--text-label-size); line-height: var(--text-label-line); font-weight: 600; }
.portal .pass-foot { padding: var(--space-2h) var(--space-5); background: var(--rail-divider); font-size: var(--text-small-size); line-height: var(--text-small-line); color: var(--rail-quiet-ink); display: flex; gap: var(--space-2); align-items: center; }
.portal .sum { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
.portal .day li { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3h) var(--space-4); border-top: 1px solid var(--line); font-size: var(--text-label-size); line-height: var(--text-label-line); }
.portal .day strong { display: block; font-weight: 700; }
.portal .day span.s { color: var(--portal-muted); }
.portal .all-done li { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-top: 1px solid var(--line); font-size: var(--text-label-size); font-weight: 600; }
.portal .all-done .mk { border: 2px solid var(--portal-veridian); background: var(--portal-veridian); color: var(--on-ink); }
.portal .all-done span.s { margin-left: auto; font-size: var(--text-support-size); font-weight: 600; color: var(--veridian-ink); }

/* pre-session pages: passcode, link expired */
.portal .narrow { max-width: 560px; margin: 0 auto; padding: var(--space-5) var(--portal-gutter-phone) var(--space-8); display: flex; flex-direction: column; gap: var(--space-4); }
.portal .page-title { font-size: 22px; line-height: 28px; font-weight: 800; letter-spacing: -0.02em; }
.portal .lead { color: var(--graphite); }
.portal .code { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-2); }
.portal .code span { display: grid; place-items: center; height: 56px; border-radius: var(--portal-radius); border: 1.5px solid var(--control-border-portal); background: var(--surface); font-size: var(--text-code-size); line-height: var(--text-code-line); font-weight: 800; }
.portal .code.is-error span { border-color: var(--red-earth-ink); background: var(--red-earth-soft); }
.portal .stack-sm { display: flex; flex-direction: column; gap: var(--space-3); }

@media (min-width: 681px) {
  .portal .hdr-who .w, .portal .hdr-site .w { display: inline; }
  .portal .hdr .logo { height: var(--logo-portal-height); }
  .portal .hdr-in { padding: var(--space-2h) var(--space-6); gap: var(--space-4); }
  .portal .hdr-name { font-size: var(--text-label-size); }
  .portal .hdr .btn { width: auto; min-height: var(--portal-control-height-sm); padding: 0 var(--space-3h); }
  .portal .hdr .btn span { display: inline; }
  .portal .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal .fields .wide { grid-column: 1 / -1; }
  .portal .points { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4) var(--space-6); }
  .portal .ro-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .portal .sum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal .card-h { padding: var(--space-4h) var(--space-6); }
  .portal .card-b { padding: 0 var(--space-6) var(--space-6); }
  .portal .miss a, .portal .day li, .portal .all-done li { padding-left: var(--space-6); padding-right: var(--space-6); }
  .portal .done-ring { padding: 0 var(--space-6) var(--space-4h); }
  .portal .bar { padding: var(--space-3) var(--space-3) var(--space-3) var(--space-5); }
  .portal .bar .hint { display: flex; flex: 1; min-width: 0; }
  .portal .bar-actions { width: auto; margin-left: auto; }
  .portal .bar-actions .btn-p { flex: none; min-width: var(--portal-btn-min); padding: 0 var(--space-5); line-height: var(--text-body-line); }
  .portal .hero { padding: 22px var(--space-6); } /* mockup .hero desktop padding */
  .portal .hero-ic { width: 56px; height: 56px; }
  .portal .hero h1, .portal .ready-hero h1 { font-size: var(--text-page-title-size); line-height: var(--text-page-title-line); }
  .portal .page-title { font-size: var(--text-page-title-size); line-height: var(--text-page-title-line); }
  .portal .ready-hero { padding: var(--space-7); }
  .portal .ready-ic { width: 68px; height: 68px; }
}
@media (min-width: 941px) {
  .portal .shell { display: grid; grid-template-columns: 312px minmax(0, 1fr); gap: var(--space-6); padding: var(--space-5) var(--space-6) var(--space-10); align-items: start; }
  .portal .side { position: sticky; top: 87px; }
  .portal .journey > summary { display: none; }
  .portal .journey-h { display: flex; }
  .portal .journey::details-content { display: block; content-visibility: visible; }
  .portal .cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
  .portal .ready-cols { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .portal .foot { padding: 0 var(--space-6) var(--space-7); }
}
@media (min-width: 1281px) {
  .portal .shell { grid-template-columns: var(--portal-sidebar-width) minmax(0, 1fr); gap: var(--space-8); padding: var(--space-5) var(--space-8) var(--space-10); }
  .portal .cols { grid-template-columns: minmax(0, 1fr) 360px; }
  .portal .hdr-in { padding: var(--space-2h) var(--space-8); }
  .portal .foot { padding: 0 var(--space-8) var(--space-7); }
}


/* ---- additions: cells, lane rows, portal helpers ---- */
.staff .cell { color: var(--ink-muted); font-size: var(--text-label-size); line-height: var(--text-label-line); overflow-wrap: anywhere; }
.staff .cell .col-label { margin-right: var(--space-1h); }
.staff .row.cols-lane { grid-template-columns: minmax(0, 1fr) var(--target-min); }
.staff .row.cols-lane .status { grid-column: 1; }
.staff .card > .alert + .row, .staff .card > .alert + .empty { border-top: 1px solid var(--line); }
.portal .t-amethyst { background: var(--amethyst-soft); color: var(--amethyst-ink); }
.portal .hint.mt { margin-top: var(--space-3h); }
.portal .consent-note { margin: var(--space-4) 0 var(--space-3); }
.portal .seg-bar.is-7 { grid-template-columns: repeat(7, 1fr); }
.portal .seg-bar.is-6 { grid-template-columns: repeat(6, 1fr); }
.portal .aside { min-width: 0; order: -1; }
.portal .pass-facts .wide { grid-column: 1 / -1; }
.portal .stack-sm { display: flex; flex-direction: column; gap: var(--space-2); }
.portal .check input { appearance: none; -webkit-appearance: none; width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--control-border-portal); background: var(--surface); flex: none; margin: 0; }
.portal .check:has(input:checked) { background: var(--veridian-soft); border-color: var(--portal-veridian); }
.portal .ro-grid .ro { min-width: 0; }
@media (min-width: 941px) {
  .portal .aside { order: 0; position: sticky; top: 87px; }
}
@media (min-width: 900px) {
  .staff .row.cols-lane { grid-template-columns: minmax(220px, 1.2fr) minmax(220px, 1fr) 40px; }
  .staff .row.cols-lane .status { grid-column: auto; }
  .staff .cell { color: var(--ink-muted); }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (forced-colors: active) {
  .staff .tab[aria-current="true"], .staff .switch a[aria-current="true"], .staff .seg[aria-current="true"] { outline: 2px solid; }
  .portal .pass-qr svg { forced-color-adjust: none; }
}

/* Extra staff components for the schedule editor and the schedule record.
   Only var(--token) values from ../../tokens.css. Loaded after styles.css. Phone first; panes added at 900 and 1280 px. */

.staff .stack { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.staff .split { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3h); align-items: start; }
.staff .split > * { min-width: 0; }
.staff .card-body { padding: var(--space-4) var(--space-5) var(--space-5); display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; }
.staff .card-head .tile { align-self: flex-start; }
.staff .sc > .card-head { gap: var(--space-3); padding: var(--space-2h) var(--space-4) var(--space-2h) var(--space-5); align-items: center; } /* mockup .a-colh */
.staff .sc > .card-head .tile { width: 32px; height: 32px; align-self: center; }
.staff .sc .card-title { line-height: 22px; }
.staff .sc-toggle { gap: var(--space-1h); padding: 0 var(--space-2h); border-radius: var(--radius-pill); background: none; color: var(--ink-muted); font-size: var(--text-support-size); font-weight: 700; } /* mockup .a-colx pill; height kept at the 44/32 target */
.staff .sc-toggle .icon { width: 15px; height: 15px; }
.staff .sc > .sc-body { padding: var(--space-1) var(--space-5) var(--space-3h); }
.staff .pagehead .sub .badge { vertical-align: middle; margin-right: var(--space-1h); }
.staff .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.staff .btn-wrap { white-space: normal; text-align: center; padding-top: var(--space-2); padding-bottom: var(--space-2); }
.staff .btn-danger-ghost { color: var(--red-earth-ink); border-color: var(--red-earth-edge); background: var(--surface); }
.staff .btn-row { display: flex; flex-direction: column; gap: var(--space-2h); }
.staff .btn-row form { display: contents; }
.staff .btn-row .btn { width: 100%; }

/* stepper */
.staff .stepper { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-sm); padding: var(--space-4) var(--space-5); display: flex; flex-direction: column; gap: var(--space-3h); }
.staff .stepper-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); }
.staff .stepper-label { font-size: var(--text-overline-size); line-height: var(--text-overline-line); font-weight: var(--text-overline-weight); letter-spacing: var(--text-overline-tracking); text-transform: uppercase; color: var(--ink-muted); }
.staff .stepper-pill { padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill); background: var(--zest-soft); border: 1px solid var(--zest-edge); color: var(--zest-ink); font-weight: 700; font-size: var(--text-label-size); line-height: var(--text-label-line); }
.staff .steps { list-style: none; margin: 0; padding: 0; display: flex; }
.staff .step { position: relative; flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: var(--space-1h); text-align: center; min-width: 0; }
.staff .step + .step::before { content: ""; position: absolute; top: 17px; right: 50%; width: 100%; height: 2px; background: var(--line-strong); }
.staff .step.is-done + .step::before { background: var(--veridian-deep); }
.staff .step-node { position: relative; z-index: 1; width: 36px; height: 36px; border-radius: var(--radius-pill); display: grid; place-items: center; border: 2px solid var(--line-strong); background: var(--surface); color: var(--ink-muted); font-weight: 700; font-size: var(--text-label-size); }
.staff .step.is-active .step-node { background: var(--yellow-zest); border-color: var(--ink); color: var(--ink); }
.staff .step.is-done .step-node { background: var(--veridian-deep); border-color: var(--veridian-deep); color: var(--on-ink); }
.staff .step-cap { display: none; font-size: var(--text-support-size); line-height: var(--text-support-line); font-weight: 600; color: var(--ink-muted); overflow-wrap: anywhere; }
.staff .step.is-active .step-cap { color: var(--ink); font-weight: 700; }

/* forms */
.staff .fgrid { display: flex; flex-direction: column; gap: var(--space-5); }
.staff textarea.input { height: auto; min-height: 112px; padding: var(--space-3); resize: vertical; font-family: inherit; }
.staff .input[readonly] { background: var(--surface-sunken); color: var(--ink-muted); }
.staff .label .icon { width: 14px; height: 14px; vertical-align: -2px; margin-left: var(--space-1h); color: var(--ink-subtle); }
.staff .req { color: var(--red-earth-ink); }
.staff .opt { color: var(--ink-subtle); font-weight: 400; margin-left: var(--space-1h); }
.staff .fmsg { display: flex; align-items: flex-start; gap: var(--space-2); color: var(--red-earth-ink); font-size: var(--text-label-size); line-height: var(--text-label-line); font-weight: 600; }
.staff .fmsg .icon { flex: none; margin-top: 1px; }
.staff .formfoot { display: flex; flex-direction: column; gap: var(--space-3); padding-top: var(--space-4); border-top: 1px solid var(--line); }
.staff .formfoot .btn { width: 100%; }
.staff .errsum { border: 2px solid var(--red-earth-ink); background: var(--red-earth-faint); border-radius: var(--radius-md); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
.staff .errsum h2 { display: flex; align-items: center; gap: var(--space-2); color: var(--red-earth-ink); font-size: var(--text-section-size); line-height: var(--text-section-line); font-weight: var(--text-section-weight); }
.staff .errsum ul { margin: 0; padding-left: var(--space-5); }
.staff .errsum a { color: var(--red-earth-ink); font-weight: 700; text-decoration: underline; display: inline-block; padding: var(--space-2) 0; min-height: var(--target-min); }

/* summary tiles and facts */
.staff .stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2h); }
.staff .stat { padding: var(--space-3); border-radius: var(--radius-md); background: var(--surface-sunken); display: flex; flex-direction: column; }
.staff .stat strong { font-size: var(--text-stat-size); line-height: var(--text-stat-line); font-weight: var(--text-stat-weight); }
.staff .stat span { color: var(--ink-muted); font-size: var(--text-support-size); }
.staff .stat.is-hi { background: var(--zest-soft); box-shadow: inset 0 0 0 1px var(--zest-edge); }
.staff .facts { display: grid; grid-template-columns: minmax(0, 1fr); margin: 0; }
.staff .fact { display: flex; flex-direction: column; gap: var(--space-0); padding: var(--space-3) 0; border-top: 1px solid var(--line); min-width: 0; }
.staff .fact:first-child { border-top: 0; padding-top: 0; }
.staff .fact dt { color: var(--ink-subtle); font-size: var(--text-small-size); line-height: var(--text-small-line); font-weight: 400; }
.staff .fact dd { margin: 0; font-size: var(--text-label-size); line-height: var(--text-label-line); font-weight: 600; overflow-wrap: anywhere; }
.staff .fact .prov { color: var(--ink-subtle); font-size: var(--text-support-size); line-height: var(--text-support-line); }
.staff .fact.is-degraded { padding-left: var(--space-3); border-left: 3px solid var(--line-strong); }
.staff .qual { display: inline-flex; align-items: center; gap: var(--space-1h); color: var(--ink-muted); font-weight: 600; }
.staff .mono { font-variant-numeric: var(--font-features-numeric); letter-spacing: 0.02em; }

/* sections inside a record card */
.staff .sec { display: flex; flex-direction: column; gap: var(--space-3); padding-top: var(--space-5); border-top: 1px solid var(--line); min-width: 0; }
.staff .sec:first-child { padding-top: 0; border-top: 0; }
.staff .sec-head { display: flex; align-items: center; gap: var(--space-2); }
.staff .sec-head .tile { width: 26px; height: 26px; border-radius: 8px; }
.staff .sec-head .tile .icon { width: 14px; height: 14px; }
.staff .sec-title { color: var(--ink-muted); font-size: var(--text-overline-size); line-height: var(--text-overline-line); font-weight: var(--text-overline-weight); letter-spacing: var(--text-overline-tracking); text-transform: uppercase; } /* mockup record caption .h-lbl */
.staff .sec-note { color: var(--ink-muted); font-size: var(--text-support-size); line-height: var(--text-support-line); }

/* next-step line */
.staff .nextline { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--zest-soft); box-shadow: inset 4px 0 0 var(--yellow-zest); }
.staff .nextline p:first-child { display: flex; gap: var(--space-2h); align-items: flex-start; font-weight: 700; color: var(--ink); }
.staff .nextline p + p { color: var(--ink-muted); font-size: var(--text-label-size); line-height: var(--text-label-line); padding-left: calc(var(--icon-size) + var(--space-2h)); }
.staff .nextline .icon { flex: none; margin-top: 2px; }

/* data tables, stacked to rows on the phone */
.staff .dtable { width: 100%; border-collapse: collapse; font-size: var(--text-table-size); line-height: var(--text-table-line); }
.staff .dtable th { text-align: left; padding: var(--space-2) var(--space-3); background: var(--surface-sunken); color: var(--ink-subtle); font-size: var(--text-overline-size); line-height: var(--text-overline-line); font-weight: var(--text-overline-weight); letter-spacing: var(--text-overline-tracking); text-transform: uppercase; }
.staff .dtable td { padding: var(--space-3); border-top: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.staff .dtable .num { font-variant-numeric: var(--font-features-numeric); white-space: nowrap; }
.staff .tablewrap { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.staff .dtable td .badge { margin-bottom: var(--space-1h); }
.staff .dtable td p { margin: 0; color: var(--ink-muted); font-size: var(--text-support-size); line-height: var(--text-support-line); }
.staff .dtable .who-t .ref { font-size: var(--text-support-size); }

@media (max-width: 899px) {
  .staff .dtable.is-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .staff .dtable.is-stack, .staff .dtable.is-stack tbody, .staff .dtable.is-stack tr, .staff .dtable.is-stack td { display: block; width: 100%; }
  .staff .dtable.is-stack tr { padding: var(--space-3); border-top: 1px solid var(--line); }
  .staff .dtable.is-stack tr:first-child { border-top: 0; }
  .staff .dtable.is-stack td { padding: var(--space-1h) 0; border-top: 0; }
  .staff .dtable.is-stack td[data-label]::before { content: attr(data-label); display: block; color: var(--ink-subtle); font-size: var(--text-small-size); line-height: var(--text-small-line); font-weight: 700; letter-spacing: var(--text-overline-tracking); text-transform: uppercase; margin-bottom: var(--space-0); }
}

/* person disclosure inside a table cell */
.staff .pdet { margin-top: var(--space-2); }
.staff .pdet > summary { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--target-min); cursor: pointer; color: var(--indigo); font-weight: 600; font-size: var(--text-label-size); list-style: none; }
.staff .pdet > summary::-webkit-details-marker { display: none; }
.staff .pdet[open] > summary .icon { transform: rotate(180deg); }
.staff .pdet-body { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-3); background: var(--surface-faint); border: 1px solid var(--line); border-radius: var(--radius-md); }
.staff .pitem { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-3); }
.staff .pitem > div { min-width: 0; }
.staff .pitem strong { display: block; }
.staff .pitem span.ids { color: var(--ink-muted); font-size: var(--text-support-size); overflow-wrap: anywhere; }
.staff .pdet-body form { display: contents; }

/* timelines */
.staff .tline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.staff .tline > li { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--space-2h); padding-bottom: var(--space-4); }
.staff .tline > li:last-child { padding-bottom: 0; }
.staff .tline > li:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.staff .tmark { width: 28px; height: 28px; border-radius: var(--radius-pill); display: grid; place-items: center; background: var(--surface-sunken); color: var(--graphite); }
.staff .tmark.is-pos { background: var(--veridian-soft); color: var(--veridian-ink); }
.staff .tmark.is-neg { background: var(--ochre-soft); color: var(--ochre-ink); }
.staff .tmark.is-info { background: var(--azure-soft); color: var(--azure-ink); }
.staff .tline strong { display: block; font-size: var(--text-body-size); line-height: var(--text-body-line); }
.staff .tline .tmeta { color: var(--ink-muted); font-size: var(--text-support-size); line-height: var(--text-support-line); }
.staff .tline .tnote { margin-top: var(--space-1); font-size: var(--text-label-size); line-height: var(--text-label-line); overflow-wrap: anywhere; }

/* dialog shown by link target, no script */
.staff .scrim.is-target { display: none; }
.staff .scrim.is-target:target { display: grid; }
.staff .dialog .field + .field { margin-top: var(--space-3); }
.staff .dialog .idline { display: flex; flex-direction: column; padding: var(--space-3); border-radius: var(--radius-md); background: var(--surface-sunken); }
.staff .dialog .idline span { color: var(--ink-muted); font-size: var(--text-support-size); }
.staff .dialog-actions form { display: contents; }

@media (min-width: 900px) {
  .staff .card-body { padding: var(--space-5) var(--space-6) var(--space-6); }
  .staff .sc > .sc-body { padding: var(--space-1) var(--space-5) var(--space-3h); }
  .staff .sc-toggle { min-height: var(--control-height-sm); }
  .staff .facts.is-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-6); }
  .staff .facts.is-2 .fact:nth-child(2) { border-top: 0; padding-top: 0; }
  .staff .step-cap { display: block; }
  .staff .formfoot { flex-direction: row; justify-content: flex-end; }
  .staff .formfoot .btn { width: auto; }
  .staff .btn-row { flex-direction: row; flex-wrap: wrap; }
  .staff .btn-row .btn { width: auto; }
}
@media (min-width: 1280px) {
  .staff .split { grid-template-columns: minmax(0, 1fr) 340px; }
}

/* Staff additions B: approval review and visitor record (read-only).
   Only var(--token) values from ../../tokens.css. Loaded after styles.css. Phone first; panes added at 900 and 1280 px. */

.staff .x-stack { display: flex; flex-direction: column; gap: var(--space-3h); min-width: 0; }
.staff .x-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3h); align-items: start; }
.staff .x-body { padding: var(--space-4) var(--space-4) var(--space-5); display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; }
.staff .x-back { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.staff .x-back .btn { flex: 0 1 auto; }
.staff .x-subline { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1h) var(--space-2); color: var(--ink-muted); font-size: var(--text-label-size); line-height: var(--text-label-line); }
.staff .x-subline b { color: var(--ink); font-weight: 700; }
.staff .x-mono { font-variant-numeric: var(--font-features-numeric); letter-spacing: 0.02em; }

/* next step */
.staff .x-next { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--zest-soft); box-shadow: inset 4px 0 0 var(--yellow-zest); }
.staff .x-next p:first-child { display: flex; gap: var(--space-2h); align-items: flex-start; font-weight: 700; }
.staff .x-next p + p { color: var(--ink-muted); font-size: var(--text-label-size); line-height: var(--text-label-line); padding-left: calc(var(--icon-size) + var(--space-2h)); }
.staff .x-next .icon { margin-top: 2px; }

/* sections */
.staff .x-sec { display: flex; flex-direction: column; gap: var(--space-3); padding-top: var(--space-5); border-top: 1px solid var(--line); min-width: 0; }
.staff .x-sec:first-child { padding-top: 0; border-top: 0; }
.staff .x-sechead { display: flex; align-items: center; gap: var(--space-2h); }
.staff .x-sechead .tile { width: 32px; height: 32px; }
.staff .x-sectitle { font-size: var(--text-card-title-size); line-height: var(--text-card-title-line); font-weight: var(--text-card-title-weight); }
.staff .x-secsub { color: var(--ink-muted); font-size: var(--text-support-size); line-height: var(--text-support-line); }

/* facts */
.staff .x-facts { display: grid; grid-template-columns: minmax(0, 1fr); }
.staff .x-fact { display: flex; flex-direction: column; gap: var(--space-0); padding: var(--space-3) 0; border-top: 1px solid var(--line); min-width: 0; }
.staff .x-fact:first-child { border-top: 0; padding-top: 0; }
.staff .x-fact dt { color: var(--ink-subtle); font-size: var(--text-small-size); line-height: var(--text-small-line); font-weight: 400; }
.staff .x-fact dd { margin: 0; font-size: var(--text-label-size); line-height: var(--text-label-line); font-weight: 600; overflow-wrap: anywhere; }
.staff .x-fact dd.x-prov { color: var(--ink-subtle); font-size: var(--text-support-size); line-height: var(--text-support-line); }
.staff .x-fact dd.x-prov b { color: var(--ink-muted); font-weight: 700; margin-right: var(--space-1h); }
.staff .x-fact.is-degraded { padding-left: var(--space-3); border-left: 3px solid var(--line-strong); }
.staff .x-qual { display: inline-flex; align-items: center; gap: var(--space-1h); color: var(--ink-muted); font-weight: 600; }
.staff .x-fact .badge { height: auto; min-height: 24px; white-space: normal; }

/* tables, stacked on the phone */
.staff .x-wrap { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.staff .x-table { width: 100%; border-collapse: collapse; font-size: var(--text-table-size); line-height: var(--text-table-line); }
.staff .x-table th { text-align: left; padding: var(--space-2) var(--space-3); background: var(--surface-sunken); color: var(--ink-subtle); font-size: var(--text-overline-size); line-height: var(--text-overline-line); font-weight: var(--text-overline-weight); letter-spacing: var(--text-overline-tracking); text-transform: uppercase; }
.staff .x-table td, .staff .x-table tbody th { padding: var(--space-3); border-top: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; text-align: left; text-transform: none; background: none; letter-spacing: normal; font-size: var(--text-table-size); line-height: var(--text-table-line); color: var(--ink); font-weight: 700; }
.staff .x-table td { font-weight: 400; }
.staff .x-table .sub { display: block; color: var(--ink-muted); font-size: var(--text-support-size); line-height: var(--text-support-line); font-weight: 400; }
.staff .x-table .badge { height: auto; min-height: 24px; white-space: normal; }
.staff .x-table td p { color: var(--ink-muted); font-size: var(--text-support-size); line-height: var(--text-support-line); margin-top: var(--space-1); }
@media (max-width: 899px) {
  .staff .x-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .staff .x-table, .staff .x-table tbody, .staff .x-table tr, .staff .x-table td, .staff .x-table tbody th { display: block; width: 100%; }
  .staff .x-table tr { padding: var(--space-3); border-top: 1px solid var(--line); }
  .staff .x-table tr:first-child { border-top: 0; }
  .staff .x-table td, .staff .x-table tbody th { padding: var(--space-1h) 0; border-top: 0; }
  .staff .x-table td[data-label]::before { content: attr(data-label); display: block; color: var(--ink-subtle); font-size: var(--text-small-size); line-height: var(--text-small-line); font-weight: 700; letter-spacing: var(--text-overline-tracking); text-transform: uppercase; }
}

/* person disclosure */
.staff .x-det { margin-top: var(--space-1); }
.staff .x-det > summary { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--target-min); cursor: pointer; color: var(--indigo); font-weight: 600; font-size: var(--text-label-size); list-style: none; }
.staff .x-det > summary::-webkit-details-marker { display: none; }
.staff .x-det[open] > summary .icon { transform: rotate(180deg); }
.staff .x-detbody { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-3); background: var(--surface-faint); border: 1px solid var(--line); border-radius: var(--radius-md); font-weight: 400; }
.staff .x-detbody .x-facts { font-weight: 400; }

/* vendor headcount */
.staff .x-hline { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1h) var(--space-4); padding: var(--space-3); background: var(--surface-faint); border: 1px solid var(--line); border-radius: var(--radius-md); }
.staff .x-hline strong { flex: 1 1 160px; }
.staff .x-hline span { color: var(--ink-muted); font-size: var(--text-label-size); }

/* timelines */
.staff .x-tline { display: flex; flex-direction: column; }
.staff .x-tline > li { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--space-2h); padding-bottom: var(--space-4); }
.staff .x-tline > li:last-child { padding-bottom: 0; }
.staff .x-tline > li:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.staff .x-tmark { width: 28px; height: 28px; border-radius: var(--radius-pill); display: grid; place-items: center; background: var(--surface-sunken); color: var(--graphite); }
.staff .x-tmark.is-in { background: var(--veridian-soft); color: var(--veridian-ink); }
.staff .x-tmark.is-info { background: var(--azure-soft); color: var(--azure-ink); }
.staff .x-tmark .icon { width: 16px; height: 16px; }
.staff .x-tline strong { display: block; font-size: var(--text-body-size); line-height: var(--text-body-line); }
.staff .x-tmeta { color: var(--ink-muted); font-size: var(--text-support-size); line-height: var(--text-support-line); display: block; }
.staff .x-day { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 0 var(--space-3) var(--space-3); }
.staff .x-day > summary { display: flex; align-items: center; gap: var(--space-2h); min-height: var(--target-min); cursor: pointer; font-weight: 700; list-style: none; }
.staff .x-day > summary::-webkit-details-marker { display: none; }
.staff .x-day > summary .count { margin-left: auto; }
.staff .x-day[open] > summary .icon:last-child { transform: rotate(180deg); }
.staff .x-day > summary .icon:last-child { margin-left: var(--space-1); }

/* arrival-point stamps */
.staff .x-stamps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2h); }
.staff .x-stamp { display: flex; flex-direction: column; gap: var(--space-0); padding: var(--space-3); border-radius: var(--radius-md); border: 1px solid var(--azure-edge); background: var(--azure-soft); color: var(--azure-ink); min-width: 0; }
.staff .x-stamp.is-outstanding { background: var(--surface-faint); border: 1px dashed var(--line-strong); color: var(--ink-muted); }
.staff .x-stamp strong { color: var(--ink); font-size: var(--text-body-size); }
.staff .x-stamp .st { display: inline-flex; align-items: center; gap: var(--space-1h); font-weight: 700; font-size: var(--text-label-size); }
.staff .x-stamp small { font-size: var(--text-support-size); line-height: var(--text-support-line); }

/* decision */
.staff .x-form { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.staff .x-choices { display: flex; flex-direction: column; gap: var(--space-2h); border: 0; padding: 0; margin: 0; min-width: 0; }
.staff .x-choices legend { padding: 0; margin-bottom: var(--space-2); }
.staff .x-choice { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-3); align-items: start; padding: var(--space-3) var(--space-4); min-height: var(--target-min); border: 1px solid var(--control-border); border-radius: var(--radius-md); background: var(--surface); cursor: pointer; }
.staff .x-choice input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ink); }
.staff .x-choice:has(input:checked) { background: var(--zest-soft); border-color: var(--ink); box-shadow: var(--ring-selected); }
.staff .x-choice:has(input:focus-visible) { outline: var(--focus-width) solid var(--focus-ring); outline-offset: var(--focus-offset); }
.staff .x-choice b { display: block; font-size: var(--text-body-size); }
.staff .x-choice small { display: block; color: var(--ink-muted); font-size: var(--text-support-size); line-height: var(--text-support-line); }
.staff .x-req { color: var(--red-earth-ink); }
.staff textarea.input.x-area { height: auto; min-height: 112px; padding: var(--space-3); resize: vertical; }
.staff .x-aim { display: flex; flex-direction: column; gap: var(--space-0); padding: var(--space-3); border-radius: var(--radius-md); background: var(--surface-sunken); }
.staff .x-aim strong { overflow-wrap: anywhere; }
.staff .x-aim span { color: var(--ink-muted); font-size: var(--text-support-size); line-height: var(--text-support-line); }
.staff .btn.x-go { white-space: normal; text-align: center; padding-top: var(--space-2); padding-bottom: var(--space-2); }

@media (min-width: 900px) {
  .staff .x-body { padding: var(--space-5) var(--space-6) var(--space-6); }
  .staff .x-facts.is-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-6); }
  .staff .x-facts.is-2 .x-fact:nth-child(2) { border-top: 0; padding-top: 0; }
  .staff .x-stamps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .staff .x-split { grid-template-columns: minmax(0, 1fr) 360px; }
  .staff .x-rail { position: sticky; top: calc(var(--topbar-height) + var(--space-3h)); }
}
.staff .x-narrow { max-width: 640px; }

/* Visitor portal additions for landing, invitation, details, consent, photograph and medical pages.
   Tokens only. Linked after styles.css. */

.portal .check input { display: grid; place-items: center; cursor: pointer; }
.portal .check input:checked { background: var(--portal-veridian); border-color: var(--portal-veridian); }
.portal .check input:checked::after { content: ""; width: 6px; height: 11px; border: solid var(--on-ink); border-width: 0 3px 3px 0; transform: rotate(45deg) translate(-1px, -1px); }

.portal .errsum ul { margin-top: var(--space-1h); display: flex; flex-direction: column; }
.portal .errsum a { display: inline-flex; align-items: center; min-height: var(--target-min); color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.portal .note > .icon { margin-top: 2px; }

.portal .btn-t { justify-content: flex-start; }
.portal .btn-block-sm { width: 100%; }
@media (min-width: 681px) { .portal .btn-block-sm { width: auto; } }

.portal .viewport { display: grid; place-items: center; aspect-ratio: 4 / 3; max-height: 420px; width: 100%; padding: var(--space-4); text-align: center; background: var(--surface-sunken); border: 2px dashed var(--line-mid); border-radius: var(--portal-radius-lg); color: var(--portal-muted); }
.portal .viewport p { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); max-width: 32ch; }
.portal .viewport .ic-lg { width: 40px; height: 40px; }

.portal .qlist { display: flex; flex-direction: column; }
.portal .q { border: 0; border-top: 1px solid var(--line); margin: 0; padding: var(--space-4) 0; min-width: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.portal .q:first-child { border-top: 0; padding-top: 0; }
.portal .q legend { display: flex; gap: var(--space-3); align-items: flex-start; padding: 0; float: left; width: 100%; font-weight: 600; margin-bottom: var(--space-3); }
.portal .q legend b { flex: none; width: 28px; height: 28px; border-radius: var(--radius-pill); display: grid; place-items: center; background: var(--surface-sunken); font-size: var(--text-support-size); }
.portal .q legend + .yn { clear: both; }
.portal .yn { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.portal .yn label { display: flex; align-items: center; gap: var(--space-2h); min-height: var(--portal-control-height); padding: 0 var(--space-4); border: 1.5px solid var(--control-border-portal); border-radius: var(--portal-radius); background: var(--surface); font-weight: 600; cursor: pointer; }
.portal .yn input { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; margin: 0; flex: none; border-radius: var(--radius-pill); border: 2px solid var(--control-border-portal); background: var(--surface); }
.portal .yn input:checked { background: var(--ink); box-shadow: inset 0 0 0 4px var(--surface); }
.portal .yn label:has(input:checked) { background: var(--surface-sunken); border-color: var(--ink); }
.portal .yn label:has(input:focus-visible) { outline: var(--focus-width-portal) solid var(--focus-ring-portal); outline-offset: var(--focus-offset); }
.portal .q-other { border-top: 1px solid var(--line); padding-top: var(--space-4); margin-top: var(--space-2); }
.portal textarea.input { height: auto; min-height: 96px; padding: var(--space-3) var(--space-3h); resize: vertical; }

.portal .none { display: flex; flex-direction: column; gap: 2px; padding: var(--space-3h) var(--space-4); border: 1px dashed var(--line-mid); border-radius: var(--portal-radius); background: var(--surface-sunken); }
.portal .none p { color: var(--portal-muted); font-size: var(--text-support-size); line-height: var(--text-support-line); }

.portal .disclose > summary { list-style: none; width: 100%; justify-content: flex-start; cursor: pointer; }
.portal .disclose > summary::-webkit-details-marker { display: none; }
.portal .disclose > summary .icon:last-child { margin-left: auto; transition: transform var(--motion-slow); }
.portal .disclose[open] > summary .icon:last-child { transform: rotate(180deg); }
.portal .disclose-b { margin-top: var(--space-4); }
.portal .disclose-b h3 { font-size: var(--text-card-title-size); line-height: var(--text-card-title-line); font-weight: 700; }
.portal .disclose-b h4 { font-size: var(--text-label-size); line-height: var(--text-label-line); font-weight: 700; margin: var(--space-3) 0 var(--space-1h); }
.portal .medlist li { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: var(--target-min); border-top: 1px solid var(--line); }

/* Visitor portal, batch B: induction, property declaration, coordinator people, visit changed, signed out.
   Linked after styles.css. Only var(--token) values from ../../tokens.css; no colour literals. */

.portal .vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.portal .req { color: var(--red-earth-ink); font-weight: 700; }
.portal .ic-lg { width: 26px; height: 26px; }
.portal .main-in .btn-t { padding: 0 var(--space-3); }
.portal .act-row { display: flex; }
.portal .act-row .btn { flex: 1; }
.portal .cap-b { max-width: 760px; }
.portal .form-act { margin-top: var(--space-5); }
.portal .fields.one { grid-template-columns: minmax(0, 1fr); }
.portal .field.narrow-b { max-width: 160px; }
.portal .mono-b { font-variant-numeric: tabular-nums; }
.portal .fs-b { border: 0; margin: 0; padding: 0; min-width: 0; }
.portal .note.is-danger ul { margin: var(--space-1h) 0; display: flex; flex-direction: column; gap: 0; }
.portal .note.is-danger a { color: var(--red-earth-ink); font-weight: 700; display: inline-flex; align-items: center; min-height: var(--target-min); }
.portal .note.is-danger > div { min-width: 0; }

/* check box glyph */
.portal .check input:checked { background: var(--portal-veridian); border-color: var(--portal-veridian); position: relative; }
.portal .check input:checked::after { content: ""; position: absolute; left: 6px; top: 1px; width: 6px; height: 12px; border: solid var(--on-ink); border-width: 0 3px 3px 0; transform: rotate(45deg); }

/* two regions */
.portal .split-b { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); align-items: start; }
.portal .split-b > * { min-width: 0; }
.portal .wide-b { max-width: var(--portal-frame-max); margin: 0 auto; padding: var(--space-5) var(--portal-gutter-phone) var(--space-10); display: flex; flex-direction: column; gap: var(--space-5); }

/* videos */
.portal .vlist { border-top: 1px solid var(--line); }
.portal .vlist li + li { border-top: 1px solid var(--line); }
.portal .vrow { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; min-height: 56px; padding: var(--space-3) var(--space-4); color: var(--ink); text-decoration: none; }
.portal a.vrow:hover { background: var(--surface-sunken); }
.portal .vrow strong { display: block; font-size: var(--text-card-title-size); line-height: var(--text-card-title-line); font-weight: 700; }
.portal .vrow .s { display: block; font-size: var(--text-support-size); line-height: var(--text-support-line); color: var(--portal-muted); font-weight: 600; }
.portal .vrow.is-done .s { color: var(--veridian-ink); }
.portal .vi { display: grid; place-items: center; width: 26px; height: 26px; color: var(--azure-ink); }
.portal .vrow.is-done .vi { color: var(--veridian-ink); }
.portal .vrow .s .icon { display: inline-block; vertical-align: -3px; margin-right: var(--space-1); }
.portal .note p + p { margin-top: var(--space-1h); }
.portal .items .tile { align-self: center; }
.portal .vt { min-width: 0; overflow-wrap: anywhere; }
.portal .vrow.is-done { grid-template-columns: 26px minmax(0, 1fr); }
.portal .vrow.is-done .btn { grid-column: 2; justify-self: start; }
.portal .player { max-width: 760px; border-radius: var(--portal-radius-lg); overflow: hidden; background: var(--rail); color: var(--rail-quiet-ink); }
.portal .player video { display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--rail); }
.portal .player :focus-visible { outline-color: var(--focus-ring-on-dark); }
.portal .pl-meta { display: flex; align-items: center; gap: var(--space-3); font-size: var(--text-support-size); font-weight: 600; color: var(--portal-muted); }
.portal .pl-meta span { white-space: nowrap; }
.portal progress { appearance: none; -webkit-appearance: none; flex: 1; height: 8px; border: 0; border-radius: var(--radius-pill); background: var(--line); overflow: hidden; }
.portal progress::-webkit-progress-bar { background: var(--line); }
.portal progress::-webkit-progress-value { background: var(--portal-veridian); border-radius: var(--radius-pill); }
.portal progress::-moz-progress-bar { background: var(--portal-veridian); }

/* property */
.portal .btn-sq { width: var(--portal-control-height); padding: 0; flex: none; }
.portal .items li { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; padding: var(--space-3) var(--space-4); border-top: 1px solid var(--line); }
.portal .items strong { display: block; font-weight: 700; overflow-wrap: anywhere; }
.portal .items .s { display: block; font-size: var(--text-support-size); line-height: var(--text-support-line); color: var(--portal-muted); overflow-wrap: anywhere; }
.portal .empty-b { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-2); padding: var(--space-6) var(--space-4); border-top: 1px solid var(--line); }
.portal .empty-b strong { font-size: var(--text-card-title-size); line-height: var(--text-card-title-line); }
.portal .empty-b p { color: var(--portal-muted); max-width: 36ch; }

/* coordinator roster */
.portal .roster { border-top: 1px solid var(--line); }
.portal .roster > li + li { border-top: 1px solid var(--line); }
.portal .p-sum { display: grid; grid-template-columns: 34px minmax(0, 1fr) var(--target-min); grid-template-areas: "a w c" ". s c"; gap: var(--space-2) var(--space-3); align-items: center; min-height: 56px; padding: var(--space-3) var(--space-2) var(--space-3) var(--space-4); cursor: pointer; list-style: none; }
.portal .p-sum::-webkit-details-marker { display: none; }
.portal .p-sum .avatar { grid-area: a; }
.portal .p-sum .p-who { grid-area: w; min-width: 0; }
.portal .p-sum .pill { grid-area: s; justify-self: start; }
.portal .p-sum .p-chev { grid-area: c; display: grid; place-items: center; width: var(--target-min); height: var(--target-min); }
.portal .p-chev .icon { transition: transform var(--motion-slow); }
.portal .person[open] .p-chev .icon { transform: rotate(180deg); }
.portal .p-who strong { display: block; font-size: var(--text-card-title-size); line-height: var(--text-card-title-line); }
.portal .p-mail { display: block; font-size: var(--text-support-size); line-height: var(--text-support-line); color: var(--portal-muted); overflow-wrap: anywhere; }
.portal .p-body { display: flex; flex-direction: column; gap: var(--space-4); padding: 0 var(--space-4) var(--space-5); }
.portal .ans { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); padding: var(--space-3h) var(--space-4); border-radius: var(--portal-radius); background: var(--surface-sunken); border: 1px solid var(--line); }
.portal .ans .eyebrow { margin-bottom: var(--space-1); }
.portal .next-b { display: flex; gap: var(--space-2); align-items: flex-start; }
.portal .lg-b { display: flex; align-items: center; gap: var(--space-2); font-weight: 700; margin-bottom: var(--space-3h); padding: 0; }
.portal .edit-b { padding-top: var(--space-4); border-top: 1px solid var(--line); }
.portal .rm { border-top: 1px solid var(--line); padding-top: var(--space-3); }
.portal .rm > summary { list-style: none; display: inline-flex; }
.portal .rm > summary::-webkit-details-marker { display: none; }
.portal .btn-danger-o { border-color: var(--red-earth-ink); color: var(--red-earth-ink); }
.portal .btn-danger { background: var(--red-earth-ink); border-color: var(--red-earth-ink); color: var(--on-ink); }
.portal .btn-danger:hover { background: var(--red-earth-ink); }
.portal .rm-g { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-3); padding: var(--space-3h) var(--space-4); border-radius: var(--portal-radius); background: var(--red-earth-faint); border: 1px solid var(--red-earth-edge); }

@media (min-width: 681px) {
  .portal .ans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal .vrow, .portal .items li, .portal .p-body { padding-left: var(--space-6); padding-right: var(--space-6); }
  .portal .p-sum { padding-left: var(--space-6); }
  .portal .wide-b { padding-left: var(--space-6); padding-right: var(--space-6); }
  .portal .act-row .btn { flex: none; min-width: var(--portal-btn-min); }
}
@media (min-width: 941px) {
  .portal .split-b { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal .split-b.coord { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
}
@media (min-width: 1281px) {
  .portal .wide-b { padding-left: var(--space-8); padding-right: var(--space-8); }
}

/* Visitor Portal group A: portal-header, visit-card, journey-steps, step-hero, readonly-grid, needed-checklist,
   consent-points, yes-no-question, medication-dialog.
   Only what 00-base.css lacks. Tokens only (var(--token) from tokens.css). Every rule is scoped under .portal. */

/* ---- portal-header: sign-out is a real POST form with a button (the application posts to /Portal/SignedOut) ---- */
.portal .hdr .btn { flex: none; }
@media (min-width: 681px) { .portal .hdr-who { flex: 0 1 auto; min-width: 0; } }
.portal .hdr-who form { display: contents; }
.portal .hdr-who .w { min-width: 0; overflow-wrap: anywhere; }
.portal .hdr .btn { cursor: pointer; } /* height: 44 px below 681 px, 38 px (mockup) from 681 px, both from 00-base.css */
.portal .hdr .avatar .icon { width: var(--icon-size-sm); height: var(--icon-size-sm); }
/* owner note N-01: on a phone the visitor's name and the "Sign out" words stay visible (see 26-fix-phone-info.css) */

/* ---- visit-card ---- */
.portal .visit-top { flex-wrap: wrap; }
.portal .visit-top > div { min-width: 0; }
.portal .visit h2 { overflow-wrap: anywhere; }
.portal .visit-facts dd { min-width: 0; overflow-wrap: anywhere; }
.portal .mt-visit { margin-top: var(--space-3); }
.portal .visit-status { flex: none; } /* mockup #v-status: the pill keeps its own inline-flex box and the tinted fill (not on white) */
.portal .note a { color: inherit; font-weight: 700; display: inline-flex; align-items: center; min-height: var(--target-min); }

/* ---- journey-steps. Mockup .journey: 12 12 10 on a phone with a lifted shadow, 16 12 12 from 941 px with the card shadow.
   The phone toggle carries its own copy of the segment bar (the mockup shows .seg under .jtoggle while collapsed); the body copy shows from 941 px. ---- */
.portal .journey { padding: var(--space-3) var(--space-3) var(--space-2h); box-shadow: var(--shadow-lift); } /* mockup 0 10px 24px -14px rgba(ink,.45): nearest token (22 px blur) */
.portal .journey > summary { flex-wrap: wrap; }
.portal .journey > summary .seg-phone { display: grid; flex: 1 0 100%; margin: var(--space-2) 2px 2px; color: var(--ink); font-size: var(--text-body-size); line-height: var(--text-body-line); font-weight: 400; }
/* owner note N-01: the list is no longer folded behind a toggle below 941 px (see 26-fix-phone-info.css) */
.portal .journey[open] .tl { margin-top: var(--space-2h); }
.portal .st.cur { box-shadow: var(--shadow-portal-tab); } /* mockup 0 6px 16px -10px rgba(ink,.5): nearest token */
.portal .journey-foot .btn { padding: 0 var(--space-3h); font-size: var(--text-label-size); line-height: var(--text-label-line); } /* mockup .btn-sm text; 44 px target kept */
@media (min-width: 941px) {
  .portal .journey { padding: var(--space-4) var(--space-3) var(--space-3); box-shadow: var(--shadow-portal); }
  .portal .journey .seg-wide { display: grid; }
}
/* the two states the approved renders do not draw (up next, waiting) */
.portal .st-t { min-width: 0; overflow-wrap: anywhere; }
.portal .st.next .st-m { border-color: var(--ink); }
.portal .st.next .st-s { color: var(--ink); }
.portal .st.wait .st-m { background: var(--ochre-soft); border-color: var(--ochre); color: var(--ochre-ink); }
.portal .st.wait .st-s { color: var(--ochre-ink); }
.portal a.st:hover { background: var(--surface-sunken); }
.portal a.st.cur:hover { background: var(--zest-soft); }
.portal .gate span:last-child { min-width: 0; overflow-wrap: anywhere; }

/* ---- step-hero ---- */
.portal .hero h1, .portal .ready-hero h1 { overflow-wrap: anywhere; border-radius: var(--portal-radius-sm); } /* mockup :focus-visible corner when the title takes focus */
.portal .hero-ic .icon { width: 24px; height: 24px; } /* mockup .ic-lg */
.portal .hero-pill { flex: none; } /* mockup .js-pill wrapper: the pill stays inline-flex */

/* ---- readonly-grid: a description list, same look as the approved boxes ---- */
.portal .ro dt, .portal .ro dd { margin: 0; }
.portal .ro strong { display: block; }
.portal .ro strong.na { color: var(--portal-subtle); font-weight: 600; }
.portal .hint.small { font-size: var(--text-support-size); line-height: var(--text-support-line); } /* mockup .hint.small (13/18) */
.portal .hint.small .icon { margin-top: 0; }
/* mockup .card-h .grow is flex 1 1 0: the short pill stays on the title line on a phone */
.portal .ro-card .card-h .grow, .portal .consent-card .card-h .grow { flex: 1 1 0; }

/* ---- needed-checklist ---- */
.portal .miss a:hover { background: var(--surface-sunken); }
.portal .miss li:last-child a { border-radius: 0 0 var(--portal-radius-lg) var(--portal-radius-lg); }
.portal .miss a > span:nth-child(2) { min-width: 0; overflow-wrap: anywhere; }

/* ---- consent-points ---- */
.portal .check { cursor: pointer; }
.portal .check > span { min-width: 0; }
.portal .check.is-error { border-color: var(--red-earth-ink); background: var(--red-earth-soft); }
.portal .check + .error { margin-top: var(--space-2); }
.portal .error .icon { flex: none; }

/* ---- yes-no-question: mockup .qgroup / .qs / .q / .yn. Each question is a bordered row (label left, answers right), two per row
   from 820 px; answers are segmented chips, the radio itself is hidden but stays the focus and form control. ---- */
.portal .qtools:not(:has(.btn:not([hidden]))) { display: none; }
.portal .qtools { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3h); }
.portal .qtools .btn { min-height: var(--target-min); padding: 0 var(--space-3h); font-size: var(--text-label-size); line-height: var(--text-label-line); } /* mockup .btn-sm; 44 px target */
.portal .errsum { margin-bottom: var(--space-4); }
.portal .qgroup + .qgroup { margin-top: var(--space-5); }
.portal .qgroup h3 { margin-bottom: var(--space-2h); color: var(--portal-subtle); font-size: var(--text-overline-size); line-height: var(--text-overline-line); font-weight: var(--text-overline-weight); letter-spacing: var(--text-overline-tracking); text-transform: uppercase; }
.portal .qs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: var(--space-2h); }
.portal .qs .q { flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--space-2h) var(--space-3); margin: 0; padding: var(--space-2h) var(--space-2h) var(--space-2h) var(--space-3h); border: 1.5px solid var(--line); border-radius: var(--portal-radius); background: var(--surface); }
.portal .qs .q legend { flex: 1 1 130px; width: auto; min-width: 0; margin: 0; gap: var(--space-2h); font-size: var(--text-label-size); line-height: var(--text-label-line); font-weight: 600; }
.portal .qs .q legend b { width: 24px; height: 24px; margin-top: -2px; font-size: var(--text-small-size); font-weight: 700; color: var(--graphite); }
.portal .q legend > span { min-width: 0; overflow-wrap: anywhere; }
.portal .qs .yn { flex: none; flex-wrap: nowrap; gap: var(--space-1h); margin-left: auto; }
.portal .qs .yn label { display: block; min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; font-weight: 400; gap: normal; }
.portal .qs .yn label:has(input:checked) { background: none; }
.portal .qs .yn label:has(input:focus-visible) { outline: none; }
.portal .qs .yn input { position: absolute; width: 1px; height: 1px; margin: 0; border: 0; opacity: 0; }
.portal .qs .yn span { display: grid; place-items: center; min-width: 58px; min-height: var(--target-min); padding: 0 var(--space-3); border: 1.5px solid var(--control-border-portal); border-radius: var(--radius-md); background: var(--surface); color: var(--graphite); font-size: var(--text-label-size); line-height: var(--text-label-line); font-weight: 700; white-space: nowrap; transition: background-color var(--motion-base), border-color var(--motion-base); }
.portal .qs .yn label:hover span { border-color: var(--ink); color: var(--ink); }
.portal .qs .yn input:focus-visible + span { border-color: var(--indigo); box-shadow: var(--halo-focus); outline: var(--focus-width-portal) solid var(--focus-ring-portal); outline-offset: var(--focus-offset); }
.portal .qs .yn input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.portal .qs .yn input[value="Yes"]:checked + span { background: var(--yellow-zest); border-color: var(--zest-ink); color: var(--ink); }
.portal .qs .q:has(input:checked) { border-color: var(--line-mid); background: var(--surface-weekend); }
.portal .qs .q:has(input[value="Yes"]:checked) { border-color: var(--zest-edge-portal-answer); background: var(--zest-soft); }
.portal .qs .q:has(input[value="Yes"]:checked) legend b { background: var(--yellow-zest); color: var(--ink); }
.portal .qs .q:has(input[aria-invalid="true"]) { border-color: var(--red-earth-ink); }
.portal .qs .q .error { flex: 1 0 100%; margin: 0; }
.portal .q-other { margin-top: var(--space-5); padding-top: 0; border-top: 0; }
.portal .q-other textarea.input { min-height: 84px; padding: var(--space-2h) var(--space-3h); }
@media (max-width: 680px) {
  .portal .qs .q legend { flex-basis: 100%; }
  .portal .qs .yn { width: 100%; margin: 0; flex-wrap: wrap; } /* wraps only when a long answer cannot fit (320 px, large text) */
  .portal .qs .yn label { flex: 1; }
  .portal .qs .yn span { width: 100%; padding: 0 var(--space-1h); }
}
@media (forced-colors: active) {
  .portal .qs .yn input:checked + span { outline: 2px solid; }
}

/* ---- medication-dialog: modal sheet. Scrim rules are scoped under .portal .med because 10-portal-b.css also defines .portal .scrim (display: grid) and loads later.  Without script the opener is a link to the dialog (:target) and Close is a link back. ---- */
.portal .med { position: relative; }
.portal .med > .btn { width: 100%; justify-content: flex-start; }
.portal .med .scrim { display: none; position: fixed; inset: 0; z-index: var(--z-portal-scrim); background: var(--scrim-portal); place-items: center; padding: var(--space-3h); }
.portal .med .scrim.is-target:target, .portal .med .scrim[data-open="true"] { display: grid; }
.portal .med .scrim.is-pinned { position: absolute; }
.portal .med.is-pinned:has(.scrim[data-open="true"]) { min-height: 700px; }
.portal .dialog { width: 100%; max-width: 520px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--portal-radius-lg); box-shadow: var(--shadow-portal-lg); max-height: calc(100vh - var(--space-6)); overflow: hidden; }
.portal .dialog:focus { outline: none; }
.portal .dialog-wide { max-width: 720px; }
.portal .med .scrim.is-pinned .dialog { max-height: 660px; }
.portal .dialog-head { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-4) var(--space-4) var(--space-3); border-bottom: 1px solid var(--line); }
.portal .dialog-head > div { flex: 1; min-width: 0; }
.portal .dialog-head .btn-sq { flex: none; }
.portal .dialog h2 { font-size: var(--text-section-size); line-height: var(--text-section-line); font-weight: 700; }
.portal .dialog-body { flex: 1; min-height: 0; overflow: auto; padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-4); }
.portal .dialog-actions { display: flex; justify-content: flex-end; gap: var(--space-2); padding: var(--space-3) var(--space-4); border-top: 1px solid var(--line); }
.portal .dialog-actions .btn { flex: 1 1 auto; }
/* Medication list in the mockup's step-4 language: not-allowed names are red tiles in a grid (.mi-na), safe-to-take
   groups are veridian category boxes (.mi-cat). The words "Not allowed" / "Safe to take" stay for screen readers; the group heading says it on screen. */
.portal .medgroups { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-3); align-items: start; }
.portal .medgroups > .med-na { grid-column: 1 / -1; }
.portal .med-na .medlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-1h); }
.portal .med-na .medlist li { flex-wrap: nowrap; gap: var(--space-1); min-height: var(--target-min); padding: 0 0 0 var(--space-2h); border: 0; border-radius: var(--portal-radius-sm); background: var(--red-earth-soft); color: var(--ink); font-size: var(--text-label-size); line-height: var(--text-support-line); font-weight: 600; }
.portal .med-na .med-end .btn-sq { width: var(--target-min); min-height: var(--target-min); border-color: transparent; background: none; border-radius: var(--portal-radius-sm); }
.portal .med-na .med-end .btn-sq:hover { background: var(--surface); border-color: var(--red-earth-edge); }
.portal .med-safe { border: 1px solid var(--veridian-edge); border-radius: var(--portal-radius); overflow: hidden; }
.portal .medgroups .med-safe h3 { margin: 0; padding: var(--space-2) var(--space-3); background: var(--portal-veridian); color: var(--on-ink); font-size: var(--text-label-size); line-height: var(--text-label-line); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; } /* mockup 12.5 px; white on veridian is 4.57:1, so 14 px bold (R6) */
.portal .med-safe .medlist { padding: var(--space-1) 0; background: var(--veridian-soft); }
.portal .med-safe .medlist li { min-height: 0; padding: var(--space-1h) var(--space-3); border-top: 1px solid var(--veridian-edge); background: var(--veridian-soft); font-size: var(--text-label-size); line-height: var(--text-support-line); }
.portal .med-safe .medlist li:first-child { border-top: 0; }
.portal .medlist .pill { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.portal .medgroups:focus-visible { border-radius: var(--portal-radius); }
/* When the search hides every group the scroll region has nothing to show: remove it from the tab order instead of leaving a zero-height focus stop. */
.portal .medgroups:not(:has(> [data-vis-med-group]:not([hidden]))) { display: none; }
.portal .medgroups h3 { font-size: var(--text-label-size); line-height: var(--text-label-line); font-weight: 700; margin-bottom: var(--space-1h); }
.portal .med-name { min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.portal .med-end { display: flex; align-items: center; gap: var(--space-2); flex: none; margin-left: auto; }
.portal .med-end .btn-sq { min-height: var(--portal-control-height); }
.portal mark.hl { background: var(--yellow-zest); color: var(--ink); border-radius: 3px; padding: 0 2px; }
.portal .note-act { margin-top: var(--space-2h); }
@media (min-width: 681px) {
  .portal .med > .btn { width: auto; }
  .portal .dialog-actions .btn { flex: none; min-width: var(--portal-btn-min); }
  .portal .dialog-head, .portal .dialog-body, .portal .dialog-actions { padding-left: var(--space-6); padding-right: var(--space-6); }
}
@media (max-width: 680px) {
  .portal .med .scrim { padding: 0; place-items: stretch; }
  .portal .dialog { max-width: none; max-height: none; height: 100%; border: 0; border-radius: 0; }
  .portal .med .scrim.is-pinned .dialog { height: auto; max-height: 660px; }
}
@media (forced-colors: active) {
  .portal mark.hl { outline: 1px solid; }
  .portal .check.is-error { outline: 2px solid; }
}
.portal .note-act .btn { white-space: normal; text-align: left; max-width: 100%; padding-top: var(--space-2); padding-bottom: var(--space-2); }

/* Visitor Portal group B and Kiosk: classes the approved base (00-base.css) lacks.
   Every rule is scoped to .portal or .kiosk and uses only var(--token) values from tokens.css.
   Sources: South32-VIS-Visitor-Portal-Mockup_Latest.html (.pl-*, .wait-card, .track, .scrim, .modal, .qty) translated to tokens. */

/* ---------- C-PRT-10 video player ----------
   Mockup portal.css .player/.pl-*: the card holds the player with 14 px padding (inline style on the mockup card),
   the title sits on the screen (.pl-title), the screen is min(48vh, 420px) tall with a radial glow, an 84 px zest
   play button with a 10 px zest halo, and a 36 px control row (kept at 44 px: approved touch target). */
.portal .pl-card { padding: var(--space-3h); }
.portal .player { max-width: none; border-radius: var(--portal-radius-lg); overflow: hidden; background: var(--rail); color: var(--on-ink); }
.portal .pl-screen { position: relative; display: grid; place-items: center; height: min(48vh, 420px); min-height: 240px; background: radial-gradient(120% 120% at 20% 10%, var(--rail-glow) 0%, var(--rail) 60%); overflow: hidden; }
.portal .player .pl-screen video { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; object-fit: contain; background: transparent; }
.portal .pl-title { position: absolute; left: 18px; top: var(--space-3h); right: 18px; z-index: 2; display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-support-size); line-height: var(--text-support-line); font-weight: 700; color: var(--rail-ink-hover); overflow-wrap: anywhere; pointer-events: none; }
.portal .pl-title .icon { flex: none; }
.portal .pl-big { position: relative; z-index: 1; display: grid; place-items: center; width: 84px; height: 84px; border: 0; border-radius: var(--radius-pill); background: var(--yellow-zest); color: var(--ink); cursor: pointer; box-shadow: 0 0 0 10px color-mix(in srgb, var(--yellow-zest) 18%, transparent); transition: transform var(--motion-base); }
.portal .pl-big:hover { transform: scale(1.06); }
.portal .pl-big .icon, .portal .pl-btn .icon { fill: currentColor; stroke: none; }
.portal .pl-big .icon { width: 30px; height: 30px; }
.portal .pl-btn .icon { width: 14px; height: 14px; }
.portal [data-vis-player][data-state="playing"] .pl-big,
.portal [data-vis-player][data-state="paused"] .pl-big,
.portal [data-vis-player][data-state="loading"] .pl-big,
.portal [data-vis-player][data-state="complete"] .pl-big,
.portal [data-vis-player][data-state="error"] .pl-big { display: none; }
.portal .pl-wait { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center; gap: var(--space-2h); background: var(--rail); color: var(--on-ink); font-weight: 700; }
.portal .pl-bar-pulse { width: 12px; height: 12px; border-radius: var(--radius-pill); background: var(--yellow-zest); animation: vis-pl-pulse 1.1s ease-in-out infinite; }
@keyframes vis-pl-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
.portal .pl-done { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2h); padding: var(--space-3); background: radial-gradient(120% 120% at 20% 10%, var(--rail-glow) 0%, var(--rail) 60%); color: var(--on-ink); font-weight: 700; text-align: center; }
.portal .pl-done .tile { width: 56px; height: 56px; border-radius: var(--radius-pill); }
.portal .pl-bar { display: flex; align-items: center; gap: var(--space-3h); padding: var(--space-3) 18px; font-size: var(--text-support-size); line-height: var(--text-body-line); font-weight: 600; color: var(--on-ink); }
.portal .pl-btn { display: grid; place-items: center; flex: none; width: var(--target-min); height: var(--target-min); border: 0; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--on-ink) 14%, transparent); color: var(--on-ink); cursor: pointer; }
.portal .pl-btn:hover { background: var(--rail-outline); }
.portal .pl-btn:disabled { color: var(--rail-quiet-label); cursor: not-allowed; }
.portal .player progress.pl-track { flex: 1; min-width: 0; height: 8px; border: 0; border-radius: var(--radius-pill); overflow: hidden; color: var(--on-ink); background: color-mix(in srgb, var(--on-ink) 20%, transparent); appearance: none; -webkit-appearance: none; }
.portal .player progress.pl-track::-webkit-progress-bar { background: color-mix(in srgb, var(--on-ink) 20%, transparent); border-radius: var(--radius-pill); }
.portal .player progress.pl-track::-webkit-progress-value { background: var(--yellow-zest); border-radius: var(--radius-pill); }
.portal .player progress.pl-track::-moz-progress-bar { background: var(--yellow-zest); }
.portal .pl-time { flex: none; white-space: nowrap; color: var(--on-ink); }
@media (max-width: 359px) {
  .portal .pl-bar { padding: var(--space-2h) var(--space-3); gap: var(--space-2h); }
}

/* ---------- C-PRT-11 item list and editor ----------
   Mockup property step: an "Add an item" form card and a "Your list" card (veridian tiles, count pill, rows
   14 px 24 px with 14 px gaps, 38 px outlined icon buttons with the --line-2 edge; kept at 44 px for touch). */
.portal .il-b .card-h .tile-ic { display: contents; }
.portal .il-b .card-h .tile-ic[hidden] { display: none; }
.portal .items li { gap: var(--space-3h); padding: var(--space-3h) var(--space-4); }
.portal .items .act-b { display: flex; gap: var(--space-1h); }
.portal .items .btn-sq { width: var(--target-min); min-height: var(--target-min); height: var(--target-min); border-color: var(--line-mid); }
.portal .items .btn-sq:hover { border-color: var(--graphite); }
.portal .items li > .rm-g { grid-column: 1 / -1; margin-top: 0; }
.portal .items li.is-editing { background: var(--zest-soft); }
.portal .items .s.is-now { font-weight: 700; color: var(--zest-ink); }
.portal .il-b .empty-b { padding: 28px var(--space-6); }
.portal .il-b .empty-b p { font-size: var(--text-label-size); line-height: var(--text-label-line); }
.portal .mt-b { margin-top: var(--space-3); }
.portal .input.file-b { height: auto; padding: var(--space-2h) var(--space-3h); }
@media (min-width: 681px) {
  .portal .items li { padding-left: var(--space-6); padding-right: var(--space-6); }
}
@media (max-width: 359px) {
  .portal .items li { grid-template-columns: 38px minmax(0, 1fr); }
  .portal .items .act-b { grid-column: 1 / -1; justify-content: flex-end; }
}

/* ---------- C-PRT-12 bottom action card ----------
   Mockup .bar: 96 % white with a 6 px backdrop blur, 10 px padding on a phone, hint 14/20 at desktop;
   the previous control collapses to an icon on a phone (mockup: 46 px wide, --line-2 edge). */
.portal .bar { background: color-mix(in srgb, var(--surface) 96%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@media (min-width: 681px) {
  .portal .bar .hint { font-size: var(--text-label-size); line-height: var(--text-label-line); }
  .portal .bar .hint .icon { margin-top: 1px; }
}
@media (max-width: 680px) {
  .portal .bar { padding: var(--space-2h); }
  .portal .bar-actions .btn-t { flex: none; width: var(--portal-control-height); padding: 0; justify-content: center; border-color: var(--line-mid); }
  .portal .bar-actions .btn-t span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* ---------- C-PRT-13 waiting card ----------
   Mockup .wait-card: 36 px 28 px padding, 14 px gap, 76 px ochre ring with a ping, 19/24/800 title,
   three tinted stages (12 px radius, 14 px 16 px) whose state pill spans the stage width. */
.portal .wait-card { display: flex; flex-direction: column; align-items: center; gap: var(--space-3h); padding: 36px var(--space-7); text-align: center; }
.portal .big-ic { position: relative; display: grid; place-items: center; width: 76px; height: 76px; border-radius: var(--radius-pill); background: var(--ochre-soft); color: var(--ochre-ink); border: 2px solid var(--ochre); }
.portal .big-ic .icon { width: 32px; height: 32px; }
.portal .big-ic::after { content: ""; position: absolute; inset: -9px; border-radius: var(--radius-pill); border: 2px solid var(--ochre); opacity: 0.35; animation: vis-ping 2.2s ease-out infinite; }
@keyframes vis-ping { from { transform: scale(0.9); opacity: 0.5; } to { transform: scale(1.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .portal .big-ic::after { animation: none; } .portal .pl-bar-pulse { animation: none; } }
.portal .wait-card h2 { font-size: var(--text-portal-visit-size); line-height: var(--text-portal-visit-line); font-weight: 800; }
.portal .wait-card p { max-width: 56ch; color: var(--graphite); overflow-wrap: anywhere; }
.portal .track { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); width: 100%; max-width: 760px; margin-top: var(--space-2h); text-align: left; }
.portal .track li { display: flex; flex-direction: column; gap: var(--space-1h); min-width: 0; padding: var(--space-3h) var(--space-4); border-radius: var(--portal-radius); border: 1px solid var(--line); background: var(--surface-sunken); }
.portal .track strong { font-weight: 700; overflow-wrap: anywhere; }
.portal .track li > span:not(.pill) { font-size: var(--text-support-size); line-height: var(--text-support-line); color: var(--portal-muted); overflow-wrap: anywhere; }
.portal .track .ok { background: var(--veridian-soft); border-color: var(--veridian-edge); }
.portal .track .now { background: var(--ochre-soft); border-color: var(--ochre); }
@media (min-width: 681px) { .portal .track { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 359px) { .portal .wait-card { padding: var(--space-6) var(--space-4); } }

/* ---------- C-PRT-14 visitor pass: code placeholders and the pass modal ---------- */
.portal .pass-qr-ph { display: grid; place-items: center; width: 176px; height: 176px; padding: var(--space-3); text-align: center; border: 2px dashed var(--line-mid); border-radius: var(--portal-radius); color: var(--portal-muted); font-weight: 700; }
.portal .pass-ref { font-variant-numeric: tabular-nums; letter-spacing: 0.04em; overflow-wrap: anywhere; }
.portal .scrim { position: fixed; inset: 0; z-index: var(--z-portal-scrim); display: grid; place-items: center; padding: var(--space-5); overflow: auto; background: var(--scrim-portal); }
.portal .modal { --pass-hole: var(--pass-cut); display: flex; flex-direction: column; align-items: center; gap: var(--space-3h); max-width: 100%; }
.portal .modal :focus-visible { outline-color: var(--focus-ring-on-dark-white); }
.portal .modal .pass-ref { font-size: var(--text-portal-visit-size); line-height: var(--text-portal-visit-line); font-weight: 800; }
@media (max-width: 680px) {
  .portal .scrim { padding: var(--space-3); }
  .portal .modal { width: 100%; }
  .portal .modal .pass { width: 100%; }
  .portal .modal .pass-qr svg, .portal .modal .pass-qr-ph { width: min(60vw, 240px); height: min(60vw, 240px); }
}

/* ---------- C-PRT-15 passcode cells: real inputs drawn as the approved cells ---------- */
.portal .code input { display: block; width: 100%; min-width: 0; height: 56px; padding: 0; text-align: center; border-radius: var(--portal-radius); border: 1.5px solid var(--control-border-portal); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--text-code-size); line-height: var(--text-code-line); font-weight: 800; font-variant-numeric: tabular-nums; appearance: none; -webkit-appearance: none; }
.portal .code input:focus { border-color: var(--ink); }
.portal .code.is-error input { border-color: var(--red-earth-ink); background: var(--red-earth-soft); }
@media (max-width: 359px) {
  .portal .code { gap: var(--space-1); margin-inline: calc(-1 * var(--space-4)); }
}

/* ---------- C-PRT-16 vendor people rows ----------
   Mockup vendor overview (.vrows): rows 14 px 24 px (16 px on a phone) with a hairline on top, 16 px gaps
   (10/12 on a phone), 44 px amethyst initials, 14.5/20 names, 13 px muted sub line, toned status pill, and an
   outlined 1 px, 12 px radius row button (14/20/700). The disclosure control keeps the row's own chevron (app
   behaviour: each person opens in place and is saved on their own, OD-29) drawn as that outlined button. */
.portal .roster, .portal .roster > li + li { border-top: 0; }
.portal .roster > li > .person, .portal .roster > .slot { border-top: 1px solid var(--line); }
.portal .roster > li > .person { padding: 0; }
.portal .roster .p-sum { grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "a w c" ". s c"; gap: var(--space-2h) var(--space-3); min-height: 0; padding: var(--space-3h) var(--space-4); }
.portal .roster .p-sum:hover, .portal .roster > .slot:hover { background: var(--surface-weekend); }
.portal .roster .avatar { width: 44px; height: 44px; background: var(--amethyst); color: var(--on-ink); font-size: var(--text-label-size); font-weight: 800; }
.portal .roster .avatar.is-open { background: var(--surface-sunken); color: var(--portal-muted); border: 2px dashed var(--line-mid); }
.portal .roster .p-who strong { font-size: var(--text-card-title-size); line-height: var(--text-card-title-line); font-weight: 700; }
.portal .roster .p-who strong + .p-mail { display: inline; font-size: var(--text-support-size); line-height: inherit; color: var(--portal-muted); }
.portal .roster .p-sum .p-chev { display: flex; align-items: center; justify-content: center; width: auto; min-width: var(--target-min); height: var(--target-min); padding: 0 var(--space-3h); gap: var(--space-2); border: 1px solid var(--ink); border-radius: var(--portal-radius); background: var(--surface); color: var(--ink); font-size: var(--text-label-size); line-height: var(--text-label-line); font-weight: 700; }
.portal .roster .p-sum:hover .p-chev { background: var(--surface-sunken); }
.portal .roster .btn { min-height: var(--target-min); padding: 0 var(--space-3h); border-width: 1px; font-size: var(--text-label-size); line-height: var(--text-label-line); }
.portal .roster .p-body { padding: 0 var(--space-4) var(--space-5); }
.portal .roster > .slot { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: var(--space-2h) var(--space-3); align-items: center; padding: var(--space-3h) var(--space-4); }
.portal .slot .p-who { min-width: 0; }
@media (min-width: 681px) {
  .portal .roster .p-sum { grid-template-columns: 44px minmax(0, 1.1fr) minmax(0, 1fr) auto; grid-template-areas: "a w s c"; gap: var(--space-4); padding: var(--space-3h) var(--space-6); }
  .portal .roster > .slot { gap: var(--space-4); padding: var(--space-3h) var(--space-6); }
  .portal .roster .p-body { padding: 0 var(--space-6) var(--space-5); }
}
@media (max-width: 680px) {
  .portal .roster > .slot { grid-template-columns: 44px minmax(0, 1fr); }
  .portal .roster > .slot .btn { grid-column: 1 / -1; width: 100%; }
}

/* ---------- C-PRT-17 camera capture ---------- */
.portal .viewport { position: relative; overflow: hidden; }
.portal .viewport.is-live, .portal .viewport.is-captured { border-style: solid; padding: 0; background: var(--rail); color: var(--on-ink); }
.portal .viewport.is-live p { color: var(--on-ink); position: relative; z-index: 1; }
.portal .viewport img, .portal .viewport canvas { display: block; width: 100%; height: 100%; object-fit: cover; }
.portal .viewport video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.portal .viewport .reticle { position: absolute; inset: 12% 24%; border: 3px solid var(--yellow-zest); border-radius: var(--radius-pill); pointer-events: none; }

/* Nothing to do on this step (deferred): the mockup's "photograph already on file" card, 24 px head padding,
   52 px round veridian tile with a 24 px check, 14 px sentence. */
.portal .cam-done .card-h { padding: var(--space-6); }
.portal .cam-done .tile { width: 52px; height: 52px; border-radius: var(--radius-pill); }
.portal .cam-done .tile .icon { width: 24px; height: 24px; }
.portal .cam-done .card-h p { font-size: var(--text-label-size); line-height: var(--text-label-line); }

/* ---------- C-PRT-15 passcode cells: mockup text field edge (1 px #8b9189, 12 px radius) ---------- */
.portal .code input, .portal .code span { border-width: 1px; }

/* ---------- C-KSK-01 kiosk message card ----------
   Mockup Alpha Gate kiosk (.k-app/.k-card): 24 px page padding, 40 px card padding, 44 px logo at full size,
   40/46 heading and 22/30 text at every width. Below 360 px the padding and heading step down so long words fit. */
.kiosk .k-app { padding: var(--space-6); }
.kiosk .k-card { padding: var(--space-10); }
.kiosk .k-brand .logo { max-width: none; }
.kiosk .k-card .k-name { font-size: var(--text-body-size); line-height: var(--text-body-line); font-weight: 600; color: var(--on-ink); }
.kiosk .k-card .k-site { line-height: var(--text-body-line); }
.kiosk .k-card h1 { font-size: var(--text-kiosk-title-size); line-height: var(--text-kiosk-title-line); overflow-wrap: anywhere; }
.kiosk .k-card .k-greeting { font-weight: 700; color: var(--on-ink); }
.kiosk .k-done:focus-visible { outline-offset: 4px; }
.kiosk .k-frame .k-app { min-height: 0; padding: var(--space-6); }
@media (max-width: 359px) {
  .kiosk .k-app, .kiosk .k-frame .k-app { padding: var(--space-4); }
  .kiosk .k-card { padding: var(--space-6); }
  .kiosk .k-brand { flex-wrap: wrap; }
  .kiosk .k-card h1 { font-size: 30px; line-height: 36px; }
}

/* Note icon wrappers (video player swaps the icon with the tone). */
.portal .note > [data-vis-note-icon] { display: flex; margin-top: 2px; }
.portal .note > [data-vis-note-icon] .icon { margin-top: 0; }

/* Confirmation buttons name the item, so they may wrap on a narrow screen. */
.portal .rm-g .act-row { flex-wrap: wrap; gap: var(--space-2); }
.portal .rm-g .btn { white-space: normal; text-align: center; min-width: 0; }

/* Forced colours: the play/pause control and the progress track were a bare glyph and an invisible bar (no border to keep once fills are replaced by system colours). */
@media (forced-colors: active) {
  .portal .pl-btn, .portal .pl-big { border: 1px solid currentColor; }
  .portal .player progress.pl-track { border: 1px solid currentColor; }
}

/* ---------- C-PRT-18 notice page ----------
   No mockup page for these notices. Closest language: the capture-link thank-you screen (portal-vendor--capture-sent):
   a tinted hero (tile, title, sentence) followed by plain cards, 20 px apart. */
.portal [data-vis-notice] { gap: var(--space-5); }
.portal .notice-hero .hero-ic .icon { width: 24px; height: 24px; }
.portal .notice-hero h1 { border-radius: var(--portal-radius-sm); overflow-wrap: anywhere; }

/* Edit-mode buttons in the item form: the mockup's form button row keeps 8 px between buttons. */
.portal [data-vis-item-form] .act-row { flex-wrap: wrap; gap: var(--space-2); }

/* Staff group A additions: shell and navigation, summary and filter, refresh control.
   Only classes the approved base (00-base.css) lacks. Every colour, size and radius is var(--token). Scoped under .staff.
   Phone first; the rail becomes a sidebar at 900 px (the same break as the base). */

/* ==========================================================================
   Shell: phone Menu button and sheet (C-SHELL-01), condensed crumbs (C-SHELL-02)
   ========================================================================== */
.staff .rail-menu { display: none; }
@media (max-width: 899px) {
  .staff .rail { position: relative; }
  .staff .rail-brand { margin-right: auto; }
  .staff .rail-menu { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--target-min); padding: 0 var(--space-3); border: 1px solid var(--rail-outline); border-radius: var(--radius-md); background: none; color: var(--rail-ink-hover); font-size: var(--text-label-size); line-height: var(--text-label-line); font-weight: 600; cursor: pointer; flex: none; }
  .staff .rail-menu:hover { background: var(--rail-wash); }
  .staff .rail.is-open .rail-menu { background: var(--rail-active-wash); border-color: var(--yellow-zest); color: var(--yellow-zest); }
  .staff .rail.is-collapsible .rail-nav { display: none; }
  .staff .rail.is-collapsible.is-open .rail-nav { display: flex; flex-direction: column; flex-wrap: nowrap; gap: var(--space-3); position: absolute; left: 0; right: 0; top: 100%; z-index: var(--z-scrim); padding: var(--space-3) var(--gutter-phone) var(--space-4); background: var(--rail); border-top: 1px solid var(--rail-divider); box-shadow: var(--shadow-lg); max-height: calc(100vh - 140px); overflow-y: auto; }
  .staff .rail.is-open .nav-group { display: flex; flex-direction: column; gap: var(--space-1); }
  .staff .rail.is-open .nav-label { display: block; padding: 0 var(--space-3) var(--space-1); color: var(--rail-label); font-size: var(--text-overline-size); line-height: var(--text-overline-line); font-weight: var(--text-overline-weight); letter-spacing: var(--text-overline-tracking); text-transform: uppercase; }
  .staff .rail.is-open .nav-item { min-height: var(--target-gate); }
}
@media (min-width: 900px) {
  .staff .rail-menu { display: none !important; }
}
/* owner note N-01: every breadcrumb level stays on a phone; the list wraps (00-base .crumbs flex-wrap) instead of dropping middle levels */

/* ==========================================================================
   Page header and back bar (C-SHELL-03, C-SHELL-04, C-FDBK-05)
   ========================================================================== */
.staff .x-back .btn { white-space: normal; text-align: left; }
.staff .btn[aria-busy="true"] { cursor: progress; border-color: var(--zest-deep); background: var(--zest-soft); }
.staff .actions .hint { flex-wrap: wrap; }

/* ==========================================================================
   Summary and filter (C-FILT-01 .. C-FILT-07)
   ========================================================================== */
/* figures as in-place toggle buttons */
.staff button.seg { border-top: 0; border-left: 0; text-align: left; cursor: pointer; width: 100%; }
.staff .seg[aria-pressed="true"] { background: var(--zest-soft); color: var(--ink); box-shadow: inset 0 -3px 0 var(--ink); }
.staff .seg-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; text-align: left; }
.staff .seg-flag { display: none; font-style: normal; font-size: var(--text-small-size); line-height: var(--text-small-line); font-weight: 800; color: var(--ink); }
.staff .seg[aria-pressed="true"] .seg-flag { display: block; }
.staff .seg .na { margin-left: auto; padding-left: var(--space-1); color: var(--ink-muted); font-size: var(--text-small-size); line-height: var(--text-small-line); font-weight: 700; }
.staff button.scard { font: inherit; text-align: left; cursor: pointer; width: 100%; }
.staff .scard[aria-pressed="true"] { background: var(--zest-soft); border-color: var(--ink); border-left-color: var(--edge, var(--bluestone)); box-shadow: var(--ring-selected), var(--shadow-sm); }
.staff .scard.is-warn { background: var(--red-earth-soft); }
.staff .scard.is-warn strong { color: var(--red-earth-ink); }
.staff .scard strong.na { font-size: var(--text-support-size); line-height: var(--text-support-line); color: var(--ink-muted); }

/* pill tabs as buttons (tablist) */
.staff button.tab { cursor: pointer; }
.staff .tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.staff .tab[aria-selected="true"] b { background: var(--yellow-zest); color: var(--ink); }
.staff .tab[aria-selected="true"] b.hot { background: var(--red-earth-soft); color: var(--red-earth-ink); }
.staff .tab-panel { padding-top: var(--space-3); }

/* segmented choice as a radiogroup */
.staff .switch button { display: inline-flex; align-items: center; gap: var(--space-1h); min-height: var(--target-min); padding: 0 var(--space-3); border: 0; background: none; color: var(--ink-muted); font-size: var(--text-label-size); line-height: var(--text-label-line); font-weight: 600; cursor: pointer; }
.staff .switch button + button { border-left: 1px solid var(--control-border); }
.staff .switch button:hover { background: var(--surface-sunken); color: var(--ink); }
.staff .switch button[aria-checked="true"] { background: var(--ink); color: var(--on-ink); }
@media (min-width: 900px) { .staff .switch button { min-height: var(--control-height); } }

/* filter bar */
.staff .fbar { display: flex; flex-direction: column; }
.staff .fbar-fields { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-3h) var(--space-5); }
.staff .fbar-fields.is-inline { display: contents; }
.staff .fbar-fields .search, .staff .fbar-fields .select { flex: 1 1 100%; }
@media (min-width: 900px) {
  .staff .fbar-fields:not(.is-inline) { flex-direction: row; align-items: center; }
  .staff .fbar-fields .search { flex: 0 1 clamp(260px, 26vw, 420px); }
  .staff .fbar-fields .select { flex: 0 0 170px; }
}
.staff select.input.is-set { font-weight: 700; border-color: var(--ink); }
.staff button.fchip { font: inherit; font-size: var(--text-support-size); cursor: pointer; }
.staff .fchip .icon { width: 14px; height: 14px; color: var(--ink-muted); }
.staff .fchip:hover { border-color: var(--ink); }
.staff .fcount { color: var(--ink-muted); font-weight: 600; }


@media (forced-colors: active) {
  .staff .seg[aria-pressed="true"], .staff .tab[aria-selected="true"], .staff .switch button[aria-checked="true"], .staff .scard[aria-pressed="true"], .staff .tab[aria-current], .staff .switch a[aria-current] { outline: 2px solid; }
  .staff .fchip { border: 1px solid; }
}
@media (prefers-reduced-motion: reduce) {
  .staff .btn[aria-busy="true"] .icon { animation: none; }
}

/* The skip link lands on <main tabindex="-1">: that is a script target, not a control, so it gets no focus ring (the next Tab shows the first control inside). */
.staff main.content:focus { outline: none; }

/* .staff a / .portal a (indigo links) out-rank .skip, which left the focused skip link indigo on near-black ink at 2.2:1. */
.staff .skip, .portal .skip { color: var(--on-ink); }

/* Staff group B: detail views, forms and record actions, feedback.
   Only classes the approved base (00-base.css) lacks. Every colour, size and radius is var(--token); all rules scoped under .staff.
   Loaded after 00-base.css. Phone first; panes added at 700, 900 and 1280 px. */

/* ---- record hero (C-DET-01) ---- */
.staff .rh-text { min-width: 0; display: flex; flex-direction: column; gap: var(--space-0); }
.staff .hero .title { overflow-wrap: anywhere; }
.staff .hero .sub { overflow-wrap: anywhere; }
.staff .rh-badges { display: flex; flex-wrap: wrap; gap: var(--space-1h) var(--space-2); margin-top: var(--space-1); }
.staff .pagehead .x-subline { min-width: 0; }
.staff .pagehead .title { overflow-wrap: anywhere; }

/* ---- key-value panel (C-DET-02) ---- */
.staff .fact .badge { height: auto; min-height: var(--badge-height); white-space: normal; }
.staff .fact dt .icon { width: var(--icon-size-sm); height: var(--icon-size-sm); vertical-align: -2px; color: var(--ink-subtle); }
.staff .x-fact dt .icon { width: var(--icon-size-sm); height: var(--icon-size-sm); vertical-align: -2px; color: var(--ink-subtle); }
.staff .sec-head .count, .staff .x-sechead .count { margin-left: auto; }

/* ---- section card (C-DET-03) ---- */
.staff .sc-toggle { margin-left: auto; flex: none; }
.staff .sc-toggle .icon { transition: transform var(--motion-fast) var(--motion-ease); }
.staff .sc-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
.staff .sc .card-title .count { margin-left: var(--space-2); vertical-align: middle; }
.staff .sc .card-titles { min-width: 0; flex: 1 1 auto; }

/* ---- timeline: the day disclosure carries its own count and chevron ---- */
.staff .x-day + .x-day { margin-top: var(--space-2h); }
.staff .x-day .x-tline, .staff .x-day .tline { margin-top: var(--space-2); }
.staff .tline > li > div, .staff .x-tline > li > div { min-width: 0; overflow-wrap: anywhere; }

/* ---- schedule stepper (C-DET-06): link wrapper, accessible captions on phones, reason a step is closed ---- */
.staff .step-link { position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--space-1h); min-width: 0; min-height: var(--target-min); color: inherit; text-decoration: none; }
.staff .step-link::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: max(100%, var(--target-min)); transform: translateX(-50%); }
.staff .step-link:hover .step-node { border-color: var(--ink); }
.staff .step-note { display: block; font-size: var(--text-small-size); line-height: var(--text-small-line); color: var(--ink-subtle); overflow-wrap: anywhere; }
/* owner note N-01: the step caption and the closed-step reason are no longer hidden below 900 px (see 26-fix-phone-info.css) */

/* ---- alert banner (C-DET-07) ---- */
.staff .alert > div { min-width: 0; overflow-wrap: anywhere; }
.staff .alert.is-info { background: var(--azure-soft); color: var(--azure-ink); }
.staff .alert.is-success { background: var(--veridian-soft); color: var(--veridian-ink); }
.staff .alert .al-actions { margin-top: var(--space-2); }

/* ---- form field group (C-FORM-01) ---- */
.staff .fgrid .field .select { flex: none; }
.staff .field .input.mono { font-variant-numeric: var(--font-features-numeric); letter-spacing: 0.02em; }
.staff .errsum[hidden] { display: none; }
.staff .formfoot .btn[aria-disabled="true"] { pointer-events: none; }
.staff form[aria-busy="true"] .field .input { cursor: progress; }
.staff .fmsg > span { min-width: 0; overflow-wrap: anywhere; }

/* ---- decision options (C-FORM-02): the checked card says so in words ---- */
.staff .x-choice .x-pick { display: none; align-items: center; gap: var(--space-1h); margin-top: var(--space-1); font-weight: 700; font-size: var(--text-support-size); line-height: var(--text-support-line); color: var(--ink); }
.staff .x-choice:has(input:checked) .x-pick { display: inline-flex; }
.staff .x-choice { min-height: var(--target-gate); }
.staff .x-choice > span { min-width: 0; overflow-wrap: anywhere; }

/* ---- record action (C-FORM-03) ---- */
.staff .ra { display: flex; flex-direction: column; gap: var(--space-2h); min-width: 0; }
.staff .ra .btn { min-height: var(--target-gate); }
@media (min-width: 900px) {
  .staff .ra .btn { min-height: var(--control-height-button); }
}

/* ---- lock box (C-FORM-04) ---- */
.staff .lb-body { gap: var(--space-4); }
.staff .lb-actions { display: flex; flex-direction: column; gap: var(--space-2h); }
.staff .lb-actions .btn { width: 100%; min-height: var(--target-gate); }
.staff .lb-code { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-faint); }
.staff .lb-code[hidden] { display: none; }
.staff .lb-code .btn { min-height: var(--target-gate); }
.staff .lb-code-input { max-width: 14ch; font-variant-numeric: var(--font-features-numeric); letter-spacing: 0.2em; }
.staff .lb-status { display: flex; align-items: center; gap: var(--space-2); font-weight: 600; color: var(--ink-muted); }
.staff .lockbox.is-not-on-site .card-head .tile { background: var(--surface-sunken); color: var(--ink-muted); }
@media (min-width: 900px) {
  .staff .lb-actions { flex-direction: row; flex-wrap: wrap; }
  .staff .lb-actions .btn { width: auto; min-height: var(--control-height-button); }
  .staff .lb-code .btn { align-self: flex-start; min-height: var(--control-height-button); }
}

/* ---- property check list (C-FORM-06) ---- */
.staff .pc { display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; }
.staff .pc-who { padding: var(--space-3); border-radius: var(--radius-md); background: var(--surface-sunken); }
.staff .pc-items { display: flex; flex-direction: column; gap: var(--space-3); }
.staff .pc-aggregate { font-size: var(--text-body-size); }
.staff .pc-item { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-3) var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); min-width: 0; }
.staff .pc-item.is-missing { border-color: var(--red-earth-ink); background: var(--red-earth-faint); }
.staff .pc-main { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; overflow-wrap: anywhere; }
.staff .pc-ids { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); color: var(--ink-muted); font-size: var(--text-support-size); line-height: var(--text-support-line); }
.staff .pc-toggle { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.staff .pc-opt { position: relative; display: flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--target-gate); padding: var(--space-1h) var(--space-3); border: 1px solid var(--control-border); border-radius: var(--radius-md); background: var(--surface); font-weight: 600; text-align: center; cursor: pointer; overflow-wrap: anywhere; }
.staff .pc-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.staff .pc-opt:has(input:checked) { border-color: var(--ink); box-shadow: var(--ring-selected); }
.staff .pc-opt.is-yes:has(input:checked) { background: var(--veridian-soft); color: var(--veridian-ink); }
.staff .pc-opt.is-no:has(input:checked) { background: var(--ochre-soft); color: var(--ochre-ink); }
.staff .pc-opt:has(input:focus-visible) { outline: var(--focus-width) solid var(--focus-ring); outline-offset: var(--focus-offset); }
.staff .pc-opt:has(input:disabled) { cursor: default; }
.staff .pc-opt input:disabled { cursor: default; }
.staff .pc-found-form { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-faint); }
.staff .pc-found-form .btn { align-self: flex-start; }
.staff .pc-found-list { display: flex; flex-direction: column; gap: var(--space-2); }
.staff .pc-found-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-3); padding: var(--space-2) var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-md); overflow-wrap: anywhere; }
.staff .pc-found-row > span { min-width: 0; flex: 1 1 200px; }
.staff .pc-act { display: flex; flex-direction: column; gap: var(--space-2h); padding-top: var(--space-4); border-top: 1px solid var(--line); }
@media (min-width: 700px) {
  .staff .pc-item { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .staff .pc-main { flex: 1 1 auto; }
  .staff .pc-toggle { flex: 0 0 340px; }
  .staff .pc-item .fmsg { flex: 1 0 100%; }
}

/* ---- host collection list (C-FORM-07) ---- */
.staff .hc-wrap { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.staff .hc-hit { display: grid; place-items: center; min-width: var(--target-min); min-height: var(--target-min); cursor: pointer; }
.staff .hc-hit input { cursor: pointer; }
.staff .hc-v.is-locked .hc-n strong, .staff .hc-v.is-locked .hc-n span { color: var(--ink-muted); }
.staff .hc-v.is-locked .hc-hit, .staff .hc-v.is-locked .hc-hit input { cursor: not-allowed; }
.staff .hc-n { min-width: 0; overflow-wrap: anywhere; }
.staff .hc-v .badge { height: auto; min-height: var(--badge-height); max-width: 100%; white-space: normal; padding-top: var(--space-0); padding-bottom: var(--space-0); }
.staff .hc-v .ref { overflow-wrap: anywhere; white-space: normal; }
.staff .hc-prompt { padding: var(--space-3); border: 1px dashed var(--line-strong); border-radius: var(--radius-md); }
.staff .hc-top { display: flex; flex-direction: column; gap: var(--space-3); }

/* ---- dialog, drawer, confirm (C-FDBK-01, C-FDBK-02) ---- */
.staff .scrim.is-target.is-open { display: grid; }
.staff .dialog { overscroll-behavior: contain; }
.staff .dialog:focus { outline: none; }
.staff .dialog-head h2 { overflow-wrap: anywhere; }
.staff .dialog form { display: flex; flex-direction: column; gap: var(--space-3h); }
html.vis-lock { overflow: hidden; }
.staff .scrim.is-drawer { place-items: stretch end; padding: 0; background: var(--scrim-drawer); }
.staff .dialog.dialog-drawer { max-width: min(560px, 100vw); height: 100%; max-height: none; border-radius: var(--radius-dialog) 0 0 var(--radius-dialog); }
@media (max-width: 699px) {
  .staff .scrim { padding: 0; place-items: stretch; }
  .staff .scrim .dialog, .staff .scrim.is-drawer .dialog.dialog-drawer { max-width: none; max-height: none; min-height: 100%; border-radius: 0; }
  .staff .dialog-actions { flex-direction: column-reverse; }
  .staff .dialog-actions .btn { flex: none; width: 100%; min-height: var(--target-gate); }
}

/* ---- toast (C-FDBK-03) ---- */
.staff .toast-region:empty { display: none; }
.staff .toast.is-info { border-left-color: var(--azure); }
.staff .toast.is-info .icon { color: var(--azure-ink); }
.staff .toast .toast-text { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.staff .toast .btn-icon { margin-left: auto; }
.staff .toast { transition: opacity var(--motion-base) var(--motion-ease); }
.staff .toast.is-leaving { opacity: 0; }

/* ---- empty state, loading skeleton, error (C-FDBK-04) ---- */
.staff .empty .actions-row .btn { min-height: var(--target-gate); }
@media (min-width: 900px) {
  .staff .empty .actions-row .btn { min-height: var(--control-height-button); }
}
.staff .empty.is-loading { align-items: stretch; text-align: left; gap: var(--space-3); padding-top: var(--space-4); padding-bottom: var(--space-5); }
.staff .sk-caption { color: var(--ink-muted); font-size: var(--text-support-size); line-height: var(--text-support-line); font-weight: 600; }
.staff .sk-list { display: flex; flex-direction: column; }
.staff .sk-row { display: grid; grid-template-columns: var(--avatar-sm) minmax(0, 1fr) 72px; gap: var(--space-3); align-items: center; padding: var(--space-2h) 0; border-top: 1px solid var(--line); }
.staff .sk-circle, .staff .sk-bar, .staff .sk-pill { display: block; background: var(--line); animation: sk-pulse 1.4s ease-in-out infinite; }
.staff .sk-circle { width: var(--avatar-sm); height: var(--avatar-sm); border-radius: var(--radius-pill); }
.staff .sk-bars { display: flex; flex-direction: column; gap: var(--space-1h); min-width: 0; }
.staff .sk-bar { height: 12px; border-radius: var(--radius-sm); }
.staff .sk-bar.is-short { width: 55%; }
.staff .sk-pill { height: var(--badge-height); border-radius: var(--radius-pill); }
@keyframes sk-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@media (forced-colors: active) {
  .staff .sk-circle, .staff .sk-bar, .staff .sk-pill { border: 1px solid GrayText; }
}
.staff .pc-opt > span { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); }

/* Staff group A additions: shell, summary and filter, lists and groups, status and progress.
   Only classes the approved base (00-base.css) lacks. Every colour, size and radius is var(--token). Scoped under .staff.
   Phone first; the rail becomes a sidebar at 900 px (the same break as the base). */

/* ==========================================================================
   Shell: phone Menu button and sheet (C-SHELL-01), condensed crumbs (C-SHELL-02)
   ========================================================================== */
.staff .rail-menu { display: none; }
@media (max-width: 899px) {
  .staff .rail { position: relative; }
  .staff .rail-brand { margin-right: auto; }
  .staff .rail-menu { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--target-min); padding: 0 var(--space-3); border: 1px solid var(--rail-outline); border-radius: var(--radius-md); background: none; color: var(--rail-ink-hover); font-size: var(--text-label-size); line-height: var(--text-label-line); font-weight: 600; cursor: pointer; flex: none; }
  .staff .rail-menu:hover { background: var(--rail-wash); }
  .staff .rail.is-open .rail-menu { background: var(--rail-active-wash); border-color: var(--yellow-zest); color: var(--yellow-zest); }
  .staff .rail.is-collapsible .rail-nav { display: none; }
  .staff .rail.is-collapsible.is-open .rail-nav { display: flex; flex-direction: column; flex-wrap: nowrap; gap: var(--space-3); position: absolute; left: 0; right: 0; top: 100%; z-index: var(--z-scrim); padding: var(--space-3) var(--gutter-phone) var(--space-4); background: var(--rail); border-top: 1px solid var(--rail-divider); box-shadow: var(--shadow-lg); max-height: calc(100vh - 140px); overflow-y: auto; }
  .staff .rail.is-open .nav-group { display: flex; flex-direction: column; gap: var(--space-1); }
  .staff .rail.is-open .nav-label { display: block; padding: 0 var(--space-3) var(--space-1); color: var(--rail-label); font-size: var(--text-overline-size); line-height: var(--text-overline-line); font-weight: var(--text-overline-weight); letter-spacing: var(--text-overline-tracking); text-transform: uppercase; }
  .staff .rail.is-open .nav-item { min-height: var(--target-gate); }
}
@media (min-width: 900px) {
  .staff .rail-menu { display: none !important; }
}
/* owner note N-01: every breadcrumb level stays on a phone; the list wraps (00-base .crumbs flex-wrap) instead of dropping middle levels */

/* A long status word wraps inside its container instead of overflowing it (the badge keeps one line whenever it fits). */
.staff .badge { max-width: 100%; height: auto; min-height: var(--badge-height); white-space: normal; padding-top: 0; padding-bottom: 0; } /* mockup .v-badge: 24 px tall, no vertical padding; min-height (not height) so a long word wraps */

/* ==========================================================================
   Page header and back bar (C-SHELL-03, C-SHELL-04, C-FDBK-05)
   ========================================================================== */
.staff .x-back .btn { white-space: normal; text-align: left; }
.staff .btn[aria-busy="true"] { cursor: progress; border-color: var(--zest-deep); background: var(--zest-soft); }
.staff .actions .hint { flex-wrap: wrap; }

/* ==========================================================================
   Summary and filter (C-FILT-01 .. C-FILT-07)
   ========================================================================== */
/* figures as in-place toggle buttons */
.staff button.seg { border-top: 0; border-left: 0; text-align: left; cursor: pointer; width: 100%; }
.staff .seg[aria-pressed="true"] { background: var(--zest-soft); color: var(--ink); box-shadow: inset 0 -3px 0 var(--ink); }
.staff .seg-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; text-align: left; }
.staff .seg-flag { display: none; font-style: normal; font-size: var(--text-small-size); line-height: var(--text-small-line); font-weight: 800; color: var(--ink); }
.staff .seg[aria-pressed="true"] .seg-flag { display: block; }
.staff .seg .na { margin-left: auto; padding-left: var(--space-1); color: var(--ink-muted); font-size: var(--text-small-size); line-height: var(--text-small-line); font-weight: 700; }
.staff button.scard { font: inherit; text-align: left; cursor: pointer; width: 100%; }
.staff .scard[aria-pressed="true"] { background: var(--zest-soft); border-color: var(--ink); border-left-color: var(--edge, var(--bluestone)); box-shadow: var(--ring-selected), var(--shadow-sm); }
.staff .scard.is-warn { background: var(--red-earth-soft); }
.staff .scard.is-warn strong { color: var(--red-earth-ink); }
.staff .scard strong.na { font-size: var(--text-support-size); line-height: var(--text-support-line); color: var(--ink-muted); }

/* pill tabs as buttons (tablist) */
.staff button.tab { cursor: pointer; }
.staff .tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.staff .tab[aria-selected="true"] b { background: var(--yellow-zest); color: var(--ink); }
.staff .tab[aria-selected="true"] b.hot { background: var(--red-earth-soft); color: var(--red-earth-ink); }
.staff .tab-panel { padding-top: var(--space-3); }

/* segmented choice as a radiogroup */
.staff .switch button { display: inline-flex; align-items: center; gap: var(--space-1h); min-height: var(--target-min); padding: 0 var(--space-3); border: 0; background: none; color: var(--ink-muted); font-size: var(--text-label-size); line-height: var(--text-label-line); font-weight: 600; cursor: pointer; }
.staff .switch button + button { border-left: 1px solid var(--control-border); }
.staff .switch button:hover { background: var(--surface-sunken); color: var(--ink); }
.staff .switch button[aria-checked="true"] { background: var(--ink); color: var(--on-ink); }
@media (min-width: 900px) { .staff .switch button { min-height: var(--control-height); } }

/* filter bar */
.staff .fbar { display: flex; flex-direction: column; }
.staff .fbar-fields { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-3h) var(--space-5); }
.staff .fbar-fields.is-inline { display: contents; }
.staff .fbar-fields .search, .staff .fbar-fields .select { flex: 1 1 100%; }
@media (min-width: 900px) {
  .staff .fbar-fields:not(.is-inline) { flex-direction: row; align-items: center; }
  .staff .fbar-fields .search { flex: 0 1 clamp(260px, 26vw, 420px); }
  .staff .fbar-fields .select { flex: 0 0 170px; }
}
.staff select.input.is-set { font-weight: 700; border-color: var(--ink); }
.staff button.fchip { font: inherit; font-size: var(--text-support-size); cursor: pointer; }
.staff .fchip .icon { width: 14px; height: 14px; color: var(--ink-muted); }
.staff .fchip:hover { border-color: var(--ink); }
.staff .fcount { color: var(--ink-muted); font-weight: 600; }

/* ==========================================================================
   Lists and groups (C-LIST-01 .. C-LIST-08)
   ========================================================================== */
.staff .row.is-static { cursor: default; }
.staff .row.is-static:hover { background: none; }
.staff .lane-foot { display: flex; justify-content: flex-end; padding: var(--space-2) var(--space-4); border-top: 1px solid var(--line); }

/* skeleton placeholders (loading) */
.staff .skel { position: relative; display: block; height: 12px; border-radius: var(--radius-pill); background: var(--surface-sunken); overflow: hidden; }
.staff .skel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--surface), transparent); transform: translateX(-100%); animation: vis-shimmer 1.4s ease-in-out infinite; }
@keyframes vis-shimmer { to { transform: translateX(100%); } }
.staff .skel-s { width: 56px; }
.staff .skel-m { width: 120px; max-width: 100%; }
.staff .skel-l { width: min(240px, 70%); }
.staff .skel-row { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-top: 1px solid var(--line); }
.staff .skel-row .skel-l { flex: 1 1 auto; }

/* stage progress: a rejected stage */
.staff .prog i.r { background: var(--red-earth); box-shadow: none; }

/* group header (layout in the fidelity pass below) */
.staff .group-h { display: block; }
.staff .group-empty { padding: var(--space-3) var(--space-4); color: var(--ink-muted); font-size: var(--text-support-size); line-height: var(--text-support-line); border-top: 1px solid var(--line); }

/* person row: unnamed place */
.staff .avatar.is-place { background: var(--surface-sunken); color: var(--ink-muted); box-shadow: inset 0 0 0 1px var(--line-strong); }

/* data table */
.staff .dt { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.staff .dt-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.staff .dt-bar .search { flex: 1 1 100%; }
/* The table filter sits straight on the page canvas, where --control-border measures 2.9:1; the stronger subtle ink gives the field edge 3:1 or more (WCAG 1.4.11). */
.staff .dt-bar .search .input { border-color: var(--ink-subtle); }
.staff .dt-bar .search .input:focus { border-color: var(--ink); }
.staff .dt-sortsel { display: flex; flex-direction: column; gap: var(--space-1h); flex: 1 1 100%; }
.staff .dt-sortsel .select { flex: 1 1 100%; }
@media (min-width: 900px) {
  .staff .dt-bar .search { flex: 0 1 clamp(260px, 26vw, 420px); }
  .staff .dt-sortsel { display: none; }
}
.staff .dt-wrap { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.staff .dt-table thead th:first-child { border-top-left-radius: var(--radius-md); }
.staff .dt-table thead th:last-child { border-top-right-radius: var(--radius-md); }
.staff .dt-table tbody tr { position: relative; }
.staff .dt-table tbody tr[hidden] { display: none; } /* rows filtered out or on another page (the stacked phone layout sets display: block on rows, which would otherwise beat [hidden]) */
.staff .dt-table tbody tr:hover { background: var(--canvas); }
.staff .dt-table tbody tr:focus-within { box-shadow: inset 0 0 0 2px var(--focus-ring); }
.staff .dt-table .num { text-align: right; }
.staff .dt-table th[aria-sort] { color: var(--ink); }
.staff .th-sort { display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--target-min); margin: calc(var(--space-2) * -1) 0; padding: 0; border: 0; background: none; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; text-decoration: none; cursor: pointer; }
.staff .th-sort:hover { color: var(--ink); }
.staff .th-ind { display: inline-flex; }
.staff .th-ind .icon { opacity: 0.45; }
.staff th[aria-sort] .th-ind .icon { opacity: 1; }
.staff th[aria-sort="ascending"] .th-ind .icon { transform: rotate(180deg); }
.staff .rowlink { color: inherit; font-weight: 700; text-decoration: none; }
.staff .rowlink::after { content: ""; position: absolute; inset: 0; }
.staff .rowlink:focus-visible { outline-offset: -2px; }
.staff .dt-state td { padding: var(--space-4); }
.staff .dt-state .alert { border-radius: var(--radius-md); }
.staff .dt-empty { display: flex; flex-direction: column; align-items: center; gap: var(--space-1h); padding: var(--space-5) var(--space-4); text-align: center; color: var(--ink-muted); }
.staff .dt-empty strong { color: var(--ink); font-size: var(--text-card-title-size); line-height: var(--text-card-title-line); }
.staff .dt-skel td { padding: var(--space-3); }
.staff .dt-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.staff .dt-count { color: var(--ink-muted); font-size: var(--text-support-size); line-height: var(--text-support-line); font-weight: 600; }
.staff .dt-pager { display: flex; align-items: center; gap: var(--space-3); }
.staff .dt-page { color: var(--ink-muted); font-size: var(--text-label-size); font-weight: 600; }
.staff .dt-act { width: 56px; text-align: right; }
.staff .rowmenu { position: relative; display: inline-block; z-index: 1; }
.staff .kebab { display: block; width: 4px; height: 4px; border-radius: var(--radius-pill); background: currentColor; box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor; }
.staff .rowmenu-list { position: absolute; right: 0; top: calc(100% + var(--space-1)); z-index: 3; min-width: 220px; display: flex; flex-direction: column; padding: var(--space-1); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-md); box-shadow: var(--shadow-md); text-align: left; }
.staff .rowmenu-list.is-up { top: auto; bottom: calc(100% + var(--space-1)); }
.staff .rowmenu-item { display: flex; align-items: center; gap: var(--space-2); min-height: var(--target-min); padding: 0 var(--space-3); border-radius: var(--radius-sm); color: var(--ink); font-size: var(--text-label-size); line-height: var(--text-label-line); font-weight: 600; text-decoration: none; white-space: nowrap; }
.staff .rowmenu-item:hover, .staff .rowmenu-item:focus-visible { background: var(--zest-soft); }
.staff .card:has(.rowmenu-list:not([hidden])) { overflow: visible; }
@media (max-width: 899px) {
  .staff .dt-table thead .th-sort { visibility: hidden; }
  .staff .dt-table .num { text-align: left; }
  .staff .dt-act { width: auto; text-align: left; }
  .staff .dt-table tbody tr.dt-state { padding: 0; }
  .staff .dt-act::before { content: none; }
}

/* month calendar */
.staff .mcal-nav { display: flex; gap: var(--space-2); }
.staff .mcal-grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.staff .mcal-grid th { padding: var(--space-2) 0; text-align: center; background: var(--surface-sunken); color: var(--ink-subtle); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: var(--text-overline-size); line-height: var(--text-overline-line); font-weight: var(--text-overline-weight); letter-spacing: var(--text-overline-tracking); text-transform: uppercase; }
.staff .mcal-day { padding: 0; border: 1px solid var(--line); vertical-align: top; background: var(--surface); }
.staff .mcal-day.is-weekend { background: var(--surface-weekend); }
.staff .mcal-day.is-out { background: var(--surface-faint); }
.staff .mcal-day.is-out .mcal-num { color: var(--ink-subtle); font-weight: 600; }
.staff .mcal-btn { display: flex; flex-direction: column; align-items: center; gap: var(--space-1); width: 100%; min-height: 56px; padding: var(--space-1h) var(--space-1); border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.staff .mcal-btn:hover { background: var(--zest-soft); }
.staff .mcal-btn:focus-visible { outline-offset: -3px; }
.staff .mcal-day.is-selected .mcal-btn { background: var(--zest-soft); box-shadow: inset 0 0 0 2px var(--ink); }
.staff .mcal-num { display: inline-flex; align-items: center; gap: var(--space-1h); min-width: 24px; height: 24px; justify-content: center; padding: 0 var(--space-1h); border-radius: var(--radius-pill); font-size: var(--text-label-size); line-height: var(--text-label-line); font-weight: 700; }
.staff .mcal-day.is-today .mcal-num { background: var(--ink); color: var(--on-ink); }
.staff .mcal-today { display: none; font-size: var(--text-small-size); line-height: var(--text-small-line); font-weight: 700; }
.staff .mcal-count { display: inline-flex; align-items: center; min-width: 22px; height: 22px; justify-content: center; padding: 0 var(--space-1h); border-radius: var(--radius-pill); background: var(--surface-sunken); color: var(--ink); font-size: var(--text-small-size); font-weight: 800; box-shadow: inset 0 0 0 1px var(--line-strong); }
.staff .mcal-count-w { display: none; }
.staff .mcal-chips { display: none; }
.staff .mcal-more { font-size: var(--text-small-size); line-height: var(--text-small-line); font-weight: 700; color: var(--ink-muted); padding: 0 var(--space-1h); }
.staff .mcal-panel { padding: var(--space-3) var(--space-4); border-top: 1px solid var(--line); }
.staff .mcal-panel-h { font-size: var(--text-card-title-size); line-height: var(--text-card-title-line); font-weight: var(--text-card-title-weight); margin-bottom: var(--space-2); }
.staff .mcal-list { list-style: none; }
.staff .mcal-list li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); padding: var(--space-1h) 0; border-top: 1px solid var(--line); }
.staff .mcal-list li:first-child { border-top: 0; }
.staff .mcal-list a { display: inline-flex; align-items: center; min-height: var(--target-min); color: var(--indigo); }
.staff .mcal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-4); border-top: 1px solid var(--line); color: var(--ink-muted); font-size: var(--text-support-size); line-height: var(--text-support-line); font-weight: 600; }
.staff .mcal-empty { padding: var(--space-3) var(--space-4); color: var(--ink-muted); font-size: var(--text-support-size); line-height: var(--text-support-line); }
@media (min-width: 700px) {
  .staff .mcal-btn { align-items: stretch; min-height: 120px; padding: var(--space-1h); }
  .staff .mcal-num { align-self: flex-start; }
  .staff .mcal-today { display: inline; }
  .staff .mcal-count { display: none; }
  .staff .mcal-chips { display: flex; flex-direction: column; gap: var(--space-1); width: 100%; }
  .staff .mcal-chip { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 var(--space-1); padding: var(--space-0) var(--space-1h); border-radius: var(--radius-sm); background: var(--status-neutral-bg); color: var(--status-neutral-ink); font-size: var(--text-small-size); line-height: var(--text-small-line); }
  .staff .mcal-chip .icon { margin-top: 1px; }
  .staff .mcal-chip .mcal-t { flex: 1 1 60%; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
  .staff .mcal-chip .mcal-w { flex: 1 1 100%; font-weight: 600; padding-left: calc(var(--icon-size-sm) + var(--space-1)); }
  .staff .mcal-chip.is-success { background: var(--status-success-bg); color: var(--status-success-ink); }
  .staff .mcal-chip.is-info { background: var(--status-info-bg); color: var(--status-info-ink); }
  .staff .mcal-chip.is-warning { background: var(--status-warning-bg); color: var(--status-warning-ink); }
  .staff .mcal-chip.is-danger { background: var(--status-danger-bg); color: var(--status-danger-ink); }
  .staff .mcal-chip.is-attention { background: var(--status-attention-bg); color: var(--status-attention-ink); }
  .staff .mcal-chip.is-ready { background: var(--status-ready-bg); color: var(--status-ready-ink); }
}
@media (max-width: 699px) {
  .staff .mcal-count-w { display: none; }
  .staff .mcal-grid th { font-size: var(--text-small-size); }
}

/* ==========================================================================
   Status and progress (C-STAT-04, C-STAT-05)
   ========================================================================== */
.staff .meter { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1h) var(--space-3); min-width: 0; }
.staff .meter-bar { flex: 1 1 120px; min-width: 80px; height: 8px; border-radius: var(--radius-pill); background: var(--line); box-shadow: inset 0 0 0 1px var(--line-strong); overflow: hidden; }
.staff .meter-bar i { display: block; height: 100%; border-radius: var(--radius-pill); background: var(--yellow-zest); border-right: 1.5px solid var(--zest-ink); }
.staff .meter.is-full .meter-bar i { background: var(--veridian-deep); border-right: 0; }
.staff .meter.is-zero .meter-bar i { border-right: 0; }
.staff .meter-text { flex: 0 1 auto; min-width: 0; max-width: 100%; overflow-wrap: anywhere; color: var(--ink); font-size: var(--text-label-size); line-height: var(--text-label-line); font-weight: 700; }
.staff .mdots { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.staff .mdots li { width: 14px; height: 14px; border-radius: var(--radius-pill); border: 2px solid var(--line-strong); background: var(--surface); }
.staff .mdots li.is-done { background: var(--veridian-deep); border-color: var(--veridian-deep); }
.staff .mdots li.is-current { background: var(--yellow-zest); border-color: var(--zest-ink); }
.staff .meter.is-full .mdots li { background: var(--veridian-deep); border-color: var(--veridian-deep); }

.staff .rdy-lead { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); padding: var(--space-2h) var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: inset 3px 0 0 var(--stone); }
.staff .rdy-lead.is-ok { box-shadow: inset 3px 0 0 var(--veridian-deep); }
.staff .rdy-lead.is-todo { box-shadow: inset 3px 0 0 var(--yellow-zest); }
.staff .rdy-lead.is-stop { background: var(--red-earth-faint); box-shadow: inset 3px 0 0 var(--red-earth); }
.staff .rdy-text { font-weight: 700; }
.staff .rdy-missing { list-style: disc; margin-left: var(--space-5); color: var(--ink-muted); font-size: var(--text-label-size); line-height: var(--text-label-line); }
.staff .rdy-skel { display: flex; flex-direction: column; gap: var(--space-3); }

@media (forced-colors: active) {
  .staff .seg[aria-pressed="true"], .staff .tab[aria-selected="true"], .staff .switch button[aria-checked="true"], .staff .scard[aria-pressed="true"], .staff .mcal-day.is-selected .mcal-btn { outline: 2px solid; }
  .staff .skel, .staff .meter-bar, .staff .mdots li { border: 1px solid currentColor; }
  .staff .meter-bar i { background: currentColor; }
  .staff .rdy-lead { border-left: 4px solid currentColor; }
}

/* ==========================================================================
   Mockup fidelity pass (lists and groups, status and progress).
   Values measured from the mockup (references/template/apps/staff-*.html computed styles); px where the mockup CSS writes px.
   ========================================================================== */

/* visitor row (mockup .r-row / .r-head, Reception desk) */
.staff .row { min-height: 58px; padding: 7px var(--space-5); gap: var(--space-2) var(--space-3h); font-size: var(--text-label-size); }
.staff .lhead + .row, .staff .card-head + .row, .staff .lhead + .list > .row:first-child, .staff .card-head + .list > .row:first-child { border-top: 0; } /* mockup .r-head + .r-row */
.staff .row .avatar { line-height: 18px; }
.staff .row .who-t .name { gap: var(--space-2); }
.staff .row .act { gap: var(--space-2); font-size: var(--text-body-size); font-weight: 700; height: 38px; min-height: 0; }
/* the reception list draws a plain white bordered square (mockup .r-row .g-ib); the yellow "go" square belongs to the gate-family lists (.g-row .g-ib.is-go) */
.staff .row.cols-reception .act.is-go { background: var(--surface); border-color: var(--control-border); }
.staff .row.cols-reception:hover .act.is-go { background: var(--surface); border-color: var(--zest-deep); }
.staff .lhead, .staff .shead { font-size: var(--text-small-size); line-height: 22px; letter-spacing: 0.07em; }
@media (min-width: 900px) {
  .staff .row, .staff .gate-list .row { padding-top: 7px; padding-bottom: 7px; gap: var(--space-3h); }
  .staff .row .act, .staff .gate-list .row .act { width: var(--control-height); height: var(--control-height-button); min-height: 0; }
  .staff .row.cols-gate .act, .staff .row.cols-clinic .act, .staff .gate-list .row .act { width: var(--target-row-desktop); height: 34px; }
}

/* schedule row (mockup .h-srow / .h-sc / .h-when / .h-prog, Host desk) */
.staff .srow { grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2); padding: var(--space-2h) var(--space-3h); }
.staff .srow > .sc:first-child { grid-column: 1; grid-row: 1; }
.staff .srow > .sc:nth-child(2), .staff .srow > .prog { grid-column: 1 / -1; }
.staff .srow > .btn { grid-column: 2; grid-row: 1; align-self: start; width: auto; padding: 0 var(--space-3); font-size: var(--text-label-size); line-height: var(--text-label-line); }
.staff .srow .sc { gap: 3px; }
.staff .srow .sc > strong { gap: var(--space-2); font-size: var(--text-card-title-size); line-height: 20px; overflow-wrap: anywhere; }
.staff .srow .sc > span { gap: var(--space-2); line-height: 22px; }
.staff .srow .sc .badge { height: auto; min-height: 20px; }
.staff .srow .sc .when { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-size: var(--text-support-size); font-weight: 400; line-height: 22px; color: var(--ink-muted); }
.staff .srow .sc .when b { display: inline-flex; align-items: center; gap: var(--space-1h); font-size: var(--text-label-size); font-weight: 600; color: var(--ink); }
.staff .srow .sc .note { font-style: normal; gap: var(--space-1h); min-height: 20px; border-radius: var(--radius-sm); font-size: var(--text-support-size); line-height: 16px; overflow-wrap: anywhere; }
.staff .srow .sc .note .icon { width: 12px; height: 12px; flex: none; }
@media (min-width: 900px) {
  .staff .srow, .staff .shead.cols-sched { gap: var(--space-4); padding: 0 var(--space-5); }
  .staff .srow { min-height: 58px; padding-top: 0; padding-bottom: 0; }
  .staff .srow > .sc:first-child, .staff .srow > .sc:nth-child(2), .staff .srow > .prog, .staff .srow > .btn { grid-column: auto; grid-row: auto; }
  .staff .srow > .btn { align-self: center; width: 164px; padding: 0; }
  .staff .shead { height: 30px; }
}

/* stage progress (mockup .h-prog) */
.staff .prog { gap: 5px; }
.staff .prog > span { font-size: var(--text-support-size); line-height: 16px; }
.staff .prog { width: 236px; max-width: 100%; }
@media (max-width: 1250px) { .staff .prog { width: 200px; } }
@media (min-width: 900px) {
  .staff .srow, .staff .shead.cols-sched { grid-template-columns: minmax(280px, 1fr) minmax(0, 1.7fr) 236px 164px; }
}
@media (min-width: 900px) and (max-width: 1250px) {
  .staff .srow, .staff .shead.cols-sched { grid-template-columns: minmax(270px, 1fr) minmax(0, 1.3fr) 200px 150px; }
  .staff .srow > .btn { width: 150px; }
}

/* attention row (mockup .h-attn, Host dashboard "Needs attention"): no coloured edge, 10/20 padding, small outline button */
.staff .attn { padding: var(--space-3) var(--space-5); box-shadow: none; }
.staff .attn:hover { background: var(--canvas); }
.staff .attn h3 { font-size: var(--text-card-title-size); line-height: 20px; }
.staff .attn .ref { font-weight: 600; line-height: 20px; }
.staff .attn .meta { gap: var(--space-3); }
.staff .attn .btn { padding: 0 var(--space-3); font-size: var(--text-label-size); line-height: var(--text-label-line); }
@media (min-width: 900px) { .staff .attn .btn { min-height: var(--control-height-sm); } }

/* data table (mockup .v-card > .v-table-wrap > .v-table, Host dashboard "Today's visitors") */
.staff .dt { display: block; }
.staff .dt > * + * { margin-top: var(--space-3); }
.staff .dt-wrap { border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.staff .dt-table thead th:first-child, .staff .dt-table thead th:last-child { border-radius: 0; }
.staff .dt-table thead th { font-weight: var(--text-label-weight); letter-spacing: 0.06em; color: var(--ink-muted); }
.staff .dt-who { display: flex; align-items: center; gap: var(--space-2h); min-width: 0; }
.staff .dt-who .avatar { width: var(--avatar-xs); height: var(--avatar-xs); font-size: var(--text-small-size); line-height: var(--text-small-line); }
.staff .dt-who-t { display: flex; flex-direction: column; min-width: 0; }
.staff .dt-go { width: 40px; color: var(--ink-subtle); text-align: right; }
.staff .dt-go .icon { width: 16px; height: 16px; vertical-align: middle; }
@media (min-width: 900px) {
  .staff .dt-table th, .staff .dt-table td { vertical-align: middle; }
  .staff .dt-table thead th { padding: 9px var(--space-3h); }
  .staff .dt-table td, .staff .dt-table tbody th { padding: var(--space-2) var(--space-3h); }
  .staff .dt-table tr > :first-child { padding-left: var(--space-5); }
  .staff .dt-table tr > :last-child { padding-right: var(--space-5); }
}
@media (max-width: 899px) {
  .staff .dt-go { display: none; }
}

/* expandable person row (mockup .h-grp > .h-vrow + .h-vdet, Host schedule record "Visitors") */
.staff .x-wrap:has(.x-person) { border: 0; border-top: 1px solid var(--line); border-radius: 0; overflow: visible; }
.staff .x-table:has(.x-person) { display: block; }
.staff .x-table:has(.x-person) > thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.staff .x-person { display: block; }
.staff .x-table .x-person + .x-person > .x-prow { border-top: 1px solid var(--line); }
.staff .x-table .x-prow { position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: var(--space-3); align-items: center; min-height: 48px; padding: var(--space-1h) var(--space-3h); background: none; font-size: var(--text-label-size); line-height: 18px; transition: background-color var(--motion-fast) var(--motion-ease); }
.staff .x-table .x-prow:hover, .staff .x-table .x-person:has(.x-tog[aria-expanded="true"]) > .x-prow { background: var(--canvas); }
.staff .x-person.is-unnamed > .x-prow { color: var(--ink-subtle); }
.staff .x-table .x-prow > td, .staff .x-table .x-prow > th { display: block; width: auto; padding: 0; border: 0; font-size: inherit; line-height: inherit; }
.staff .x-prow > th { grid-column: 2; }
.staff .x-prow > td[data-label] { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); }
.staff .x-table .x-prow > td[data-label]::before { content: attr(data-label); display: inline; color: var(--ink-subtle); font-size: var(--text-small-size); line-height: var(--text-small-line); font-weight: 700; letter-spacing: var(--text-overline-tracking); text-transform: uppercase; }
.staff .x-prow > td p { flex: 1 1 100%; margin: 0; }
.staff .x-prow .who { gap: var(--space-3); }
.staff .x-prow .avatar { width: 30px; height: 30px; font-size: var(--text-small-size); line-height: 18px; }
.staff .x-prow .avatar.is-place { border: 1.5px dashed var(--line-strong); box-shadow: none; }
.staff .x-prow .name { font-size: var(--text-label-size); line-height: 17px; }
.staff .x-prow .who-t .ref { font-size: var(--text-small-size); line-height: 15px; }
.staff .x-prow .who-t .sub { font-size: var(--text-small-size); line-height: 15px; }
.staff .x-prow .badge { max-width: 100%; }
.staff .x-tog-c { grid-column: 1; grid-row: 1; align-self: center; }
.staff .x-tog { display: grid; place-items: center; width: 20px; height: 28px; padding: 0; border: 0; border-radius: var(--radius-sm); background: none; color: var(--ink); font: inherit; cursor: pointer; }
.staff .x-tog::after { content: ""; position: absolute; inset: 0; }
.staff .x-tog:focus-visible { outline: none; }
.staff .x-tog:focus-visible::after { outline: var(--focus-width) solid var(--focus-ring); outline-offset: -2px; }
.staff .x-tog .icon { width: 16px; height: 16px; transition: transform var(--motion-fast) var(--motion-ease); }
.staff .x-tog[aria-expanded="true"] .icon { transform: rotate(90deg); }
.staff .x-pdet { display: block; }
.staff .x-pdet[hidden] { display: none; }
.staff .x-table .x-pdet > td { display: block; padding: 0; border: 0; font-weight: 400; }
.staff .x-pdet .x-detbody { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3h); align-items: center; padding: var(--space-2h) var(--space-3h) var(--space-3h); border: 0; border-top: 1px dashed var(--line); border-radius: 0; background: var(--canvas); font-size: var(--text-body-size); line-height: var(--text-body-line); }
.staff .x-pdet .x-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-1) var(--space-2h); align-items: center; margin: 0; font-size: var(--text-support-size); line-height: var(--text-support-line); }
.staff .x-pdet .x-fact { display: contents; }
.staff .x-pdet .x-fact dt { color: var(--ink-muted); font-size: inherit; line-height: inherit; }
.staff .x-pdet .x-fact dd { color: var(--ink); font-size: inherit; line-height: inherit; font-weight: 600; }
.staff .x-pdet .x-fact dd.x-prov { grid-column: 2; color: var(--ink-subtle); font-weight: 400; }
.staff .x-detside { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); }
.staff .x-detside p { color: var(--ink-muted); font-size: var(--text-support-size); line-height: var(--text-support-line); }
.staff .x-detside form { display: contents; }
@media (min-width: 900px) {
  .staff .x-table .x-prow { grid-template-columns: 20px minmax(150px, 1.3fr) repeat(2, minmax(0, 1fr)); padding: var(--space-1h) var(--space-5); gap: var(--space-3); }
  .staff .x-prow > th, .staff .x-prow > td[data-label] { grid-column: auto; grid-row: auto; }
  .staff .x-table .x-prow > td[data-label]::before { content: none; }
  .staff .x-pdet .x-detbody { grid-template-columns: minmax(0, 1fr) auto; padding: var(--space-2h) var(--space-5) var(--space-3h) 82px; }
  .staff .x-detside { align-items: flex-end; text-align: right; max-width: 320px; }
}
@media (forced-colors: active) { .staff .x-tog:focus-visible::after { outline-color: Highlight; } }

/* group header (mockup .h-grp-h, Host schedule record vendor company; .g-grp on the Clinic desk) */
.staff .group, .staff .x-hline, .staff button.x-hline.group-btn { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; width: 100%; padding: 9px var(--space-5); border: 0; border-top: 1px solid var(--line); border-radius: 0; background: var(--surface-sunken); color: var(--ink); font-size: var(--text-body-size); line-height: var(--text-body-line); text-align: left; }
.staff .group.has-tile { grid-template-columns: 34px minmax(0, 1fr) auto; }
.staff button.group-btn, .staff button.x-hline.group-btn { grid-template-columns: 20px minmax(0, 1fr) auto; min-height: var(--target-gate); border-top: 0; cursor: pointer; font: inherit; font-size: var(--text-body-size); }
.staff .group-h { border-top: 1px solid var(--line); }
.staff button.group-btn.has-tile, .staff button.x-hline.group-btn.has-tile { grid-template-columns: 20px 34px minmax(0, 1fr) auto; }
.staff button.group-btn:hover { background: var(--group-hover); }
.staff .group.is-on { background: var(--veridian-soft); border-top-color: var(--veridian-edge); }
.staff .group .tile { width: 34px; height: 34px; }
.staff .group-t { display: block; min-width: 0; }
.staff .group-t strong, .staff .group strong, .staff .x-hline strong { display: block; flex: none; font-size: var(--text-card-title-size); line-height: 19px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.staff .group-t .group-detail, .staff .x-hline .group-t .group-detail { display: inline; color: var(--ink-muted); font-size: var(--text-support-size); line-height: 16px; }
.staff .group-s { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-2); color: var(--ink); font-size: var(--text-body-size); }
.staff .group .group-status, .staff .x-hline .group-status { color: var(--ink-muted); font-size: var(--text-support-size); line-height: var(--text-support-line); font-weight: 600; }
.staff .group .count, .staff .x-hline .count { margin-left: 0; }
.staff .group-chev, .staff .x-hline .group-chev { display: block; margin: 0; color: var(--ink-muted); font-size: var(--text-body-size); transition: transform var(--motion-fast) var(--motion-ease); }
.staff .group-chev .icon { display: block; width: 18px; height: 18px; }
.staff .group-btn[aria-expanded="true"] .group-chev { transform: none; }
.staff .group-btn[aria-expanded="false"] .group-chev { transform: rotate(-90deg); }
@media (max-width: 899px) {
  .staff .group.has-tile { grid-template-columns: minmax(0, 1fr) auto; }
  .staff button.group-btn.has-tile { grid-template-columns: 20px minmax(0, 1fr) auto; }
  .staff .group .tile { display: none; }
}
@media (min-width: 900px) { .staff button.group-btn { min-height: 0; } }

/* month calendar (mockup .h-cal-head, .h-cal, .h-dow, .h-day, .h-dnum, .h-ev on the Host desk calendar) */
.staff .mcal-head { flex-wrap: wrap; gap: var(--space-2h); padding: var(--space-3) var(--space-5); }
.staff .mcal-head .card-title { min-width: 150px; font-size: 17px; line-height: 24px; text-align: center; }
.staff .mcal-step { width: var(--target-min); }
.staff .mcal-prev .icon { transform: rotate(180deg); }
.staff .mcal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1h) var(--space-2); margin-left: auto; padding: 0; border: 0; color: var(--ink-muted); font-size: var(--text-support-size); line-height: 16px; font-weight: 600; }
.staff .mcal-grid { display: block; width: 100%; border-top: 1px solid var(--line); }
.staff .mcal-grid > thead, .staff .mcal-grid > tbody { display: block; }
.staff .mcal-grid tr { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.staff .mcal-grid th { display: block; padding: var(--space-1h) var(--space-2h); border: 0; border-right: 1px solid var(--line); background: var(--surface-sunken); color: var(--ink-subtle); text-align: left; font-size: var(--text-small-size); line-height: 22px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; }
.staff .mcal-grid tr > :nth-child(7n) { border-right: 0; }
.staff .mcal-day { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; min-height: 84px; padding: var(--space-1h); border: 0; border-top: 1px solid var(--line); border-right: 1px solid var(--line); }
.staff .mcal-btn { flex: 1 1 auto; min-height: 0; padding: 0; border-radius: var(--radius-sm); }
.staff .mcal-btn:hover { background: none; }
.staff .mcal-btn:hover .mcal-num { background: var(--surface-sunken); }
.staff .mcal-day.is-selected .mcal-btn { background: none; box-shadow: none; }
.staff .mcal-day.is-selected { background: var(--zest-soft); box-shadow: inset 0 0 0 2px var(--ink); }
.staff .mcal-num { padding: 0 var(--space-1h); font-size: var(--text-support-size); line-height: 18px; color: var(--ink); }
.staff .mcal-day.is-today .mcal-num { background: var(--ink); color: var(--yellow-zest); }
.staff .mcal-today, .staff .mcal-btn .mcal-today { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 699px) {
  .staff .mcal-grid th { overflow: hidden; }
}
@media (min-width: 700px) {
  .staff .mcal-day { min-height: 128px; }
  .staff .mcal-btn { align-items: stretch; min-height: 0; padding: 0; gap: var(--space-1); }
  .staff .mcal-chip { display: block; gap: normal; padding: var(--space-1) 7px 5px; border: 1px solid var(--line); border-left: 3px solid var(--edge, var(--stone)); border-radius: 7px; background: var(--surface); color: var(--ink); font-size: var(--text-body-size); line-height: var(--text-body-line); }
  .staff .mcal-chip.is-success, .staff .mcal-chip.is-info, .staff .mcal-chip.is-warning, .staff .mcal-chip.is-danger, .staff .mcal-chip.is-attention, .staff .mcal-chip.is-ready { background: var(--surface); color: var(--ink); }
  .staff .mcal-chip.is-success { --edge: var(--veridian-deep); }
  .staff .mcal-chip.is-attention, .staff .mcal-chip.is-warning { --edge: var(--yellow-zest); }
  .staff .mcal-chip.is-danger { --edge: var(--red-earth); }
  .staff .mcal-chip.is-info { --edge: var(--bluestone-deep); }
  .staff .mcal-chip.is-ready { --edge: var(--ink); }
  .staff .mcal-btn:hover .mcal-chip { border-color: var(--ink); border-left-color: var(--edge, var(--stone)); }
  .staff .mcal-chip .mcal-w { display: flex; align-items: center; gap: 5px; padding: 0; color: var(--ink-muted); font-size: var(--text-small-size); line-height: 15px; font-weight: 700; }
  .staff .mcal-chip .mcal-w .icon { width: 11px; height: 11px; margin: 0; stroke-width: 2.4; }
  .staff .mcal-chip .mcal-t { display: block; font-size: var(--text-support-size); line-height: 16px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
}
.staff .mcal-btn { align-items: flex-start; }
@media (min-width: 900px) { .staff .mcal-step { width: var(--control-height-sm); min-height: var(--control-height-sm); } }

/* readiness panel (mockup gate record column "VIS checks before arrival": .h-lbl caption, .g-pre check list) */
.staff .x-sec.rdy { display: block; gap: normal; padding: var(--space-3h) var(--space-4); border: 0; border-radius: 0; background: var(--surface-faint); }
.staff .x-sec.rdy > * + * { margin-top: var(--space-2h); }
.staff .rdy-lbl { display: flex; align-items: center; gap: var(--space-2); color: var(--ink-muted); font-size: var(--text-overline-size); line-height: var(--text-overline-line); font-weight: var(--text-overline-weight); letter-spacing: var(--text-overline-tracking); text-transform: uppercase; }
.staff .rdy-lbl .tile { width: 26px; height: 26px; border-radius: 8px; }
.staff .rdy-lbl .tile .icon { width: 15px; height: 15px; }
.staff .rdy-text { font-size: var(--text-label-size); line-height: var(--text-label-line); }
.staff .rdy-list { display: block; margin-bottom: 0; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.staff .rdy-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2); align-items: center; padding: var(--space-1h) var(--space-3); border-top: 1px solid var(--line); font-size: var(--text-label-size); line-height: 19px; }
.staff .rdy-row:first-child { border-top: 0; }
.staff .rdy-row dt { display: flex; align-items: center; gap: var(--space-2); min-width: 0; color: var(--ink); font-weight: 400; overflow-wrap: anywhere; }
.staff .rdy-row dt .icon { flex: none; width: 15px; height: 15px; stroke-width: 2.5; color: var(--ink-muted); }
.staff .rdy-row dd { margin: 0; color: var(--ink-muted); font-weight: 600; text-align: right; }
.staff .rdy-row.is-ok dt .icon { color: var(--veridian-ink); }
.staff .rdy-row.is-need dt .icon, .staff .rdy-row.is-need dd { color: var(--ochre-ink); }
.staff .rdy-row.is-no { background: var(--red-earth-soft); }
.staff .rdy-row.is-no dt .icon, .staff .rdy-row.is-no dd { color: var(--red-earth-ink); }
.staff .rdy-row.is-na { box-shadow: inset 3px 0 0 var(--line-strong); }
.staff .rdy-row dd.rdy-prov { grid-column: 1 / -1; padding-left: calc(15px + var(--space-2)); color: var(--ink-subtle); font-size: var(--text-support-size); line-height: var(--text-support-line); font-weight: 400; text-align: left; }
.staff .rdy-row dd.rdy-prov b { color: var(--ink-muted); font-weight: 700; margin-right: var(--space-1h); }
@media (min-width: 900px) { .staff .x-sec.rdy { padding: var(--space-4) var(--space-7) var(--space-4h); } }

/* progress meter, bar kind (mockup .g-count in the gate schedule group header): words above a 5 px track */
.staff .meter.is-bar { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 3px; color: var(--ink-muted); font-size: var(--text-support-size); line-height: 16px; font-weight: 700; }
.staff .meter.is-bar .meter-text { color: inherit; font-size: inherit; line-height: inherit; font-weight: inherit; }
.staff .meter.is-bar .meter-bar { flex: none; min-width: 0; height: 5px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); color: inherit; font-size: inherit; line-height: inherit; font-weight: inherit; }
.staff .meter.is-bar .meter-bar i { border-right: 0; border-radius: var(--radius-pill); background: var(--bluestone-deep); }
.staff .meter.is-bar.is-full .meter-bar i { background: var(--veridian-deep); }

/* back bar caption (mockup .g-top .h-lbl): small caps place line beside the back button */
.staff .x-back-cap { display: flex; align-items: center; gap: var(--space-2); margin-left: var(--space-1h); color: var(--ink-muted); font-size: var(--text-overline-size); line-height: var(--text-overline-line); font-weight: var(--text-overline-weight); letter-spacing: var(--text-overline-tracking); text-transform: uppercase; overflow-wrap: anywhere; }

/* filter bar: a list-card head that holds the search field uses a 12 px gap (mockup .g-qtop / .r-desk head) */
.staff .card-head:has(.search), .staff .card:has(> .fbar) > .card-head, .staff .card:has(> .lhead.cols-reception) > .card-head { column-gap: var(--space-3); }
.staff .dt-table thead .dt-go { background: var(--surface-sunken); }

/* Staff forms and record actions: mockup fidelity layer (C-FORM-01 to C-FORM-07).
   Loaded after the 10-* group files, so these rules win over the earlier ones for the same components.
   Values are read from the mockup CSS (references/template/css/staff-*.css, base :root plus THEME) and the captures.
   Colour only through var(--token). Lengths the mockup writes in px are written in px.
   Kept on purpose (owner decisions and approved repairs): 44 px phone targets (48 px gate and security row actions), control border
   var(--control-border) (CI-05) instead of the THEME #bfc3ba, the 2 px ink focus ring, and names that wrap instead of truncating. */

/* ---- shared form details inside these components (mockup .v-label, .v-help, textarea .v-input) ---- */
.staff .do .label, .staff [data-vis-fieldgroup] .label, .staff .hc-wrap .label, .staff .pc-found-form .label, .staff .lb-code .label {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2);
}
.staff .do .label .req, .staff .do .label .x-req, .staff [data-vis-fieldgroup] .label .req, .staff .pc-found-form .label .req { margin-left: -4px; }
.staff .do .label .opt, .staff [data-vis-fieldgroup] .label .opt, .staff .pc-found-form .label .opt { margin-left: 0; font-size: var(--text-support-size); font-weight: 500; }
.staff [data-vis-fieldgroup] .label .icon { margin-left: 0; }
/* the reason help is the mockup .v-hint: 14/20, --ink-muted */
.staff .do .field > .help { display: flex; align-items: center; gap: var(--space-2); line-height: 20px; color: var(--ink-muted); }
.staff .do textarea.input, .staff [data-vis-fieldgroup] textarea.input { min-height: 96px; padding: var(--space-2) var(--space-3); }
.staff [data-vis-fieldgroup] .field > .help, .staff .hc-wrap .field > .help {
  display: flex; justify-content: space-between; gap: var(--space-4);
}

/* ---- record action (C-FORM-03), mockup .r-ci: button, then the caption with its icon ---- */
.staff .ra { gap: var(--space-2); align-items: flex-start; }
.staff .ra > .alert, .staff .ra > .btn-block { align-self: stretch; }
.staff .ra .btn.x-go { min-height: var(--target-gate); padding: 0 var(--space-5); font-size: var(--text-body-size); line-height: var(--text-body-line); max-width: 100%; }
.staff .ra-cap { display: flex; align-items: center; gap: var(--space-2); margin: 0; font-size: var(--text-support-size); line-height: var(--text-body-line); color: var(--ink-muted); min-width: 0; }
.staff .ra-cap > span { min-width: 0; overflow-wrap: anywhere; }
.staff .ra-cap .icon { width: 15px; height: 15px; flex: none; }
@media (min-width: 900px) {
  .staff .ra .btn.x-go { min-height: 46px; }
}
/* after decision options the record button is the approval .a-go: full width, 44 px, 16 px sides */
.staff .do ~ .ra .btn.x-go { min-height: var(--target-min); padding: 0 var(--space-4); }

/* ---- decision options (C-FORM-02), mockup .a-opt ---- */
.staff .do .x-choices { gap: var(--space-2); }
.staff .do .x-choice { position: relative; display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-2h) var(--space-3); border-color: var(--control-border); background: transparent; }
.staff .do .x-choice:hover { border-color: var(--zest-deep); }
.staff .do .x-choice > input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.staff .do .x-choice > span { flex: 1 1 auto; }
.staff .do .x-ic { display: grid; box-sizing: border-box; width: 30px; height: 30px; padding: 6px; border-radius: var(--radius-pill); flex: none; background: var(--surface-sunken); color: var(--ink-muted); }
.staff .do .x-choice strong { display: block; font-size: var(--text-card-title-size); line-height: var(--text-body-line); font-weight: 700; }
.staff .do .x-choice small { display: block; font-size: var(--text-support-size); line-height: 17px; color: var(--ink-muted); }
.staff .do .x-choice .x-pick { font-size: var(--text-support-size); line-height: 17px; }
.staff .do .x-choice:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.staff .do .x-choice.is-success:has(input:checked) { background: var(--veridian-soft); }
.staff .do .x-choice.is-success:has(input:checked) .x-ic { background: var(--veridian-deep); color: var(--on-ink); }
.staff .do .x-choice.is-warning:has(input:checked) { background: var(--ochre-soft); }
.staff .do .x-choice.is-warning:has(input:checked) .x-ic { background: var(--ochre-ink); color: var(--on-ink); }
.staff .do .x-choice.is-danger:has(input:checked) { background: var(--red-earth-soft); }
.staff .do .x-choice.is-danger:has(input:checked) .x-ic { background: var(--red-earth-ink); color: var(--on-ink); }
@media (forced-colors: active) {
  .staff .do .x-choice:has(input:checked) { outline: 3px solid Highlight; }
}

/* ---- field group (C-FORM-01), mockup host edit card: 16 px head gap, foot bar across the card ---- */
.staff [data-vis-fieldgroup] .card-head { gap: var(--space-4); }
.staff [data-vis-fieldgroup] .fgrid { gap: var(--space-4); }
.staff [data-vis-fieldgroup] .formfoot { margin: var(--space-1) calc(-1 * var(--space-5)) calc(-1 * var(--space-5)); padding: var(--space-4) var(--space-5); }
@media (min-width: 900px) {
  .staff [data-vis-fieldgroup] .formfoot { margin: var(--space-1) calc(-1 * var(--space-6)) calc(-1 * var(--space-6)); padding: var(--space-4) var(--space-6); }
}

/* ---- lock box (C-FORM-04) ---- */
/* locked states: the clinic record's review panel (mockup .r-act) */
.staff .lockbox:not(.card) { display: block; padding: var(--space-3h) var(--space-4); background: var(--surface-faint); border-top: 1px solid var(--line); min-width: 0; }
.staff .lockbox:not(.card) > * { margin: 0 0 var(--space-2h); }
.staff .lockbox:not(.card) > :last-child { margin-bottom: 0; }
.staff .lockbox:not(.card) > .card-title { display: flex; align-items: center; gap: var(--space-2); margin: 0 0 var(--space-2h); color: var(--ink-muted); font-size: var(--text-overline-size); line-height: var(--text-overline-line); font-weight: var(--text-overline-weight); letter-spacing: var(--text-overline-tracking); text-transform: uppercase; }
.staff .lockbox:not(.card) > .card-title .tile { width: 26px; height: 26px; border-radius: 8px; }
.staff .lockbox:not(.card) > .card-title .tile .icon { width: 14px; height: 14px; }
.staff .lockbox:not(.card) > .lb-why { margin-bottom: var(--space-2); }
.staff .lb-why { display: flex; align-items: flex-start; gap: var(--space-2); font-size: var(--text-label-size); line-height: var(--text-body-line); color: var(--ink); min-width: 0; }
.staff .lb-why > span { min-width: 0; overflow-wrap: anywhere; }
.staff .lb-why .icon { width: 16px; height: 16px; margin-top: 3px; flex: none; color: var(--ink-muted); }
.staff .lockbox .lb-actions { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-0); }
.staff .lockbox .lb-actions .btn { width: 100%; min-height: var(--target-gate); padding: 0 var(--space-4); }
.staff .lockbox .lb-code { background: var(--surface); }
@media (min-width: 900px) {
  .staff .lockbox:not(.card) { padding: var(--space-4) var(--space-7) var(--space-4h); border-top: 0; }
  .staff .lockbox .lb-actions { flex-direction: row; flex-wrap: wrap; }
  .staff .lockbox .lb-actions .btn { width: auto; min-height: 42px; }
}
/* unlocked: the answers card (mockup #c-ans): head without rule, timer banner, answers flush */
.staff .lockbox.card { overflow: hidden; }
.staff .lockbox.card > .card-head { flex-wrap: nowrap; }
.staff .lockbox.card > .card-head, .staff .card:has(> .da) > .card-head { gap: var(--space-4); }
.staff .lockbox .lb-banner { margin: 0 var(--space-5) var(--space-3h); align-items: center; flex-wrap: wrap; border: 1px solid var(--azure-edge); }
.staff .lockbox .lb-banner.is-attention { border-color: var(--zest-edge); }
.staff .lockbox .lb-banner[hidden] { display: none; }
.staff .lockbox .lb-banner > div { flex: 1 1 200px; }
.staff .lockbox .lb-banner strong { display: block; }
.staff .lockbox .lb-banner .btn { background: var(--surface); min-height: var(--target-min); padding: 0 var(--space-3); font-size: var(--text-label-size); line-height: var(--text-label-line); }
.staff .lockbox .lb-banner .btn-primary { background: var(--yellow-zest); }
@media (min-width: 900px) {
  .staff .lockbox .lb-banner .btn { min-height: var(--control-height-sm); }
}

/* ---- declared answers (C-FORM-05), mockup .c-ans-g / .c-qa / .c-yn / .c-med ---- */
.staff .da { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--line); min-width: 0; }
.staff .da > .sec { padding: var(--space-3h) var(--space-5) var(--space-4); gap: 0; border-top: 0; }
.staff .da > .sec + .sec { border-top: 1px solid var(--line); }
.staff .da .sec-head { margin: 0 0 var(--space-2); gap: var(--space-2); }
.staff .da .sec-title { display: flex; align-items: center; gap: var(--space-2); }
.staff .da .sec-title .tile { width: 26px; height: 26px; border-radius: 8px; }
.staff .da .sec-title .tile .icon { width: 14px; height: 14px; }
.staff .da .facts { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: var(--space-6); }
.staff .da .fact { display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-2h); padding: 7px 0; border-top: 0; border-bottom: 1px solid var(--line); font-size: var(--text-label-size); line-height: 19px; }
.staff .da .fact:first-child { padding-top: 7px; }
.staff .da .fact dt { flex: 1 1 0; min-width: 0; color: var(--ink); font-size: var(--text-label-size); line-height: 19px; overflow-wrap: anywhere; }
.staff .da .fact dd { flex: none; }
.staff .da .fact dd:not(.prov) { display: flex; }
.staff .da .fact .prov { flex: 1 0 100%; margin-top: -8px; font-size: var(--text-support-size); line-height: 17px; font-weight: 400; color: var(--ink-muted); }
.staff .da .fact .badge { display: inline-grid; place-items: center; min-width: 38px; height: 22px; min-height: 0; padding: 0 var(--space-2); font-size: var(--text-small-size); line-height: 19px; font-weight: 700; white-space: nowrap; row-gap: normal; column-gap: normal; background: var(--surface-sunken); color: var(--ink-muted); }
.staff .da-med { list-style: none; margin: 0; padding: 0; }
.staff .da-med li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-1) var(--space-2h); padding: var(--space-2) 0; border-bottom: 1px solid var(--line); font-size: var(--text-label-size); line-height: 19px; }
.staff .da-mn { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.staff .da-mn strong { font-weight: 700; }
.staff .da-mn span, .staff .da-mt { color: var(--ink-muted); }
.staff .da-mt { display: flex; flex-wrap: wrap; gap: 0 var(--space-3); margin: 0; text-align: right; }
.staff .da-mt > div { display: flex; gap: var(--space-1); }
.staff .da-mt dt::after { content: ":"; }
.staff .da-mt dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
@media (min-width: 1180px) {
  .staff .da { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .staff .da > .sec + .sec { border-top: 0; border-left: 1px solid var(--line); }
}
@media (min-width: 1367px) {
  .staff .da .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- property check (C-FORM-06), mockup .s-card ---- */
.staff .pc { gap: 0; }
.staff .pc-top { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-3h) var(--space-5) var(--space-3h); }
.staff .pc-top:not(:has(> *)) { display: none; }
.staff .pc .pc-who { padding: 0; background: none; border-radius: 0; }
.staff .pc > .pc-sec { padding: var(--space-3h) var(--space-5) var(--space-4); gap: var(--space-2); border-top: 1px solid var(--line); }
.staff .pc .sec-head { justify-content: space-between; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-1); }
.staff .pc .sec-title { display: flex; align-items: center; gap: var(--space-2); }
.staff .pc .sec-title .tile { width: 26px; height: 26px; border-radius: 8px; }
.staff .pc .sec-title .tile .icon { width: 14px; height: 14px; }
.staff .pc-aggregate { margin: 0; font-size: var(--text-support-size); line-height: 18px; color: var(--ink-muted); text-align: right; }
.staff .pc-aggregate b { font-weight: 400; }
/* the declared items table */
.staff .pc-items { display: flex; flex-direction: column; gap: 0; margin-top: var(--space-1); border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden; }
.staff .pc-th { display: none; }
.staff .pc-item { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); align-items: center; min-height: 54px; padding: 7px 14px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; font-size: var(--text-label-size); line-height: var(--text-body-line); }
.staff .pc-th + .pc-item, .staff .pc-items > .pc-item:first-child { border-top: 0; }
.staff .pc-item:has(input[value="presented"]:checked) { background: linear-gradient(90deg, var(--veridian-soft), transparent 80%); }
.staff .pc-item:has(input[value="notpresented"]:checked) { background: linear-gradient(90deg, var(--red-earth-soft), transparent 80%); }
.staff .pc-item.is-missing { background: var(--red-earth-faint); border-color: var(--line); box-shadow: inset 3px 0 0 var(--red-earth-ink); }
.staff .pc-it { display: flex; align-items: center; gap: var(--space-2h); min-width: 0; overflow-wrap: anywhere; }
.staff .pc-it .tile { width: 30px; height: 30px; }
.staff .pc-it b { font-weight: 700; }
.staff .pc-main { gap: 0; }
.staff .pc-main .ref, .staff .pc-ids { font-size: var(--text-support-size); line-height: 18px; color: var(--ink-muted); }
.staff .pc-main .help { font-size: var(--text-support-size); }
.staff .pc-badges { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: var(--space-1); }
.staff .pc-item .fmsg { grid-column: 1 / -1; }
/* Presented / Not presented: one segmented switch (mockup .s-seg / .s-opt) */
.staff .pc .pc-toggle { display: inline-flex; justify-self: start; gap: normal; border: 1px solid var(--control-border); border-radius: var(--radius-md); overflow: hidden; background: var(--surface); }
.staff .pc .pc-item.is-missing .pc-toggle { border-color: var(--red-earth-ink); box-shadow: 0 0 0 1px var(--red-earth-ink); }
.staff .pc .pc-opt { display: inline-flex; align-items: center; gap: var(--space-1h); min-height: var(--target-gate); padding: 0 var(--space-3); border: 0; border-radius: 0; background: transparent; color: var(--ink-muted); font-size: var(--text-label-size); line-height: var(--text-body-line); font-weight: 600; box-shadow: none; white-space: nowrap; }
.staff .pc .pc-opt + .pc-opt { border-left: 1px solid var(--control-border); }
.staff .pc .pc-opt > span { gap: var(--space-1h); }
.staff .pc .pc-opt .icon { width: 15px; height: 15px; }
.staff .pc .pc-opt:hover { background: var(--surface-sunken); color: var(--ink); }
.staff .pc .pc-opt:has(input:focus-visible) { outline: var(--focus-width) solid var(--focus-ring); outline-offset: -2px; }
.staff .pc .pc-opt.is-yes:has(input:checked) { background: var(--veridian-deep); color: var(--on-ink); border-color: var(--control-border); box-shadow: none; }
.staff .pc .pc-opt.is-no:has(input:checked) { background: var(--red-earth-ink); color: var(--on-ink); border-color: var(--control-border); box-shadow: none; }
@media (forced-colors: active) {
  .staff .pc .pc-opt:has(input:checked) { outline: 3px solid Highlight; outline-offset: -3px; }
}
/* found at the gate (mockup .s-fg, .s-add, .s-none) */
.staff .pc .pc-found-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2h) var(--space-3); align-items: start; padding: 0; border: 0; border-radius: 0; background: none; }
.staff .pc .pc-found-form .field { gap: var(--space-1h); }
.staff .pc .pc-found-form .pc-add { justify-self: start; align-self: start; }
.staff .pc .pc-found-form .pc-span { grid-column: 1 / -1; }
.staff .pc .pc-found-form select.input { padding-left: 14px; padding-right: 36px; }
.staff .pc-found-list { gap: 0; padding: 0; margin: 0; list-style: none; }
.staff .pc-found-list:has(> li) { border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden; }
.staff .pc .pc-found-row { min-height: 54px; padding: 7px 14px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: linear-gradient(90deg, var(--red-earth-soft), transparent 80%); font-size: var(--text-label-size); }
.staff .pc .pc-found-row:first-child { border-top: 0; }
.staff .pc-none { display: flex; align-items: center; gap: var(--space-2); margin: var(--space-1) 0 0; font-size: var(--text-label-size); line-height: 19px; color: var(--ink-muted); }
.staff .pc-none[hidden] { display: none; }
.staff .pc-none .icon { width: 15px; height: 15px; flex: none; }
/* action bar across the card foot (mockup .s-act) */
.staff .pc .pc-act { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--space-3h); padding: var(--space-3h) var(--space-5); border-top: 1px solid var(--line); background: var(--canvas); }
.staff .pc .pc-act .ra { flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3h); flex: 1 1 auto; }
.staff .pc .pc-act .ra > .alert { flex: 1 0 100%; }
.staff .pc .pc-act .ra-cap { flex: 1 1 200px; }
.staff .pc .pc-act .ra .help:not(.ra-cap) { flex: 1 0 100%; }
@media (min-width: 600px) {
  .staff .pc .pc-found-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .staff .pc .pc-found-form .pc-add { grid-column: 1 / -1; }
}
@media (min-width: 900px) {
  .staff .pc-th { display: grid; min-height: 0; grid-template-columns: minmax(110px, .7fr) minmax(0, 1.2fr) auto; gap: var(--space-3); align-items: center; height: 32px; padding: 0 14px; background: var(--azure-soft); color: var(--azure-ink); font-size: var(--text-small-size); font-weight: 700; letter-spacing: var(--text-overline-tracking); text-transform: uppercase; border-bottom: 1px solid var(--azure-edge); }
  .staff .pc-th span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .staff .pc-th span:last-child { text-align: right; min-width: 230px; }
  .staff .pc-item { grid-template-columns: minmax(110px, .7fr) minmax(0, 1.2fr) auto; }
  .staff .pc .pc-toggle { justify-self: end; }
  .staff .pc .pc-opt { min-height: 36px; }
}
@media (min-width: 1180px) {
  .staff .pc .pc-found-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto; }
  .staff .pc .pc-found-form .pc-add { grid-column: auto; margin-top: 26px; }
}

/* ---- host collection (C-FORM-07), mockup .r-hc-top / .r-hc-host / .r-hc-g / .r-hc-v ---- */
.staff .hc-wrap { gap: var(--space-3h); }
.staff .hc-wrap .hc-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3h); align-items: end; }
.staff .hc-wrap select.input { padding-left: 14px; padding-right: 36px; }
.staff .hc-wrap .hostcard { align-self: end; }
.staff .hc-wrap .hc-g { gap: var(--space-3); color: var(--ink); padding: var(--space-2) 14px; }
.staff .hc-wrap .hc-g > .ref, .staff .hc-wrap .hc-g > span { color: var(--azure-ink); font-weight: 600; }
.staff .hc-wrap .hc-g > strong { color: var(--azure-ink); }
.staff .hc-wrap .hc-g { flex-wrap: nowrap; align-items: flex-start; }
.staff .hc-wrap .hc-g > .ref, .staff .hc-wrap .hc-g > span:last-child { flex: none; white-space: nowrap; }
.staff .hc-wrap .hc-g > strong { flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere; }
.staff .hc-wrap .hc-v { grid-template-columns: 20px var(--avatar-sm) minmax(0, 1fr); gap: var(--space-1) 14px; padding: var(--space-2) 14px; }
.staff .hc-wrap .hc-hit { width: var(--target-min); margin: 0 -12px; }
.staff .hc-wrap .hc-v em { font-size: var(--text-support-size); line-height: 17px; font-weight: 600; border-radius: 8px; padding: 5px 9px; }
@media (min-width: 1100px) {
  .staff .hc-wrap .hc-top { grid-template-columns: minmax(260px, 420px) minmax(0, 1fr); gap: var(--space-4); }
  .staff .hc-wrap .hostcard { margin-bottom: 22px; }
}
@media (min-width: 1280px) {
  .staff .hc-wrap .hc-v { grid-template-columns: 20px var(--avatar-sm) minmax(180px, 1.2fr) 150px minmax(200px, 1fr); }
}
.staff .hc-wrap + .dialog-actions { margin-top: var(--space-3h); }

/* ==========================================================================
   20-fix-staff-lists: mockup-fidelity pass 2 for staff lists, rows, calendar,
   stepper, record hero and timeline. Values come from the mockup CSS
   (references/template/css/app-*.css, staff THEME) and its computed styles.
   ========================================================================== */

/* ---- schedule stepper: mockup .h-steps / .h-step pill rail (app-host.css 549-558) ---- */
.staff .stepper { display: block; padding: 0; gap: normal; border-radius: var(--radius-lg); }
.staff .stepper-top { padding: 14px 14px 0; }
.staff .steps { align-items: center; gap: 6px; padding: 10px 14px; overflow-x: auto; }
.staff .step { flex: none; flex-direction: row; align-items: center; gap: 6px; text-align: left; }
.staff .step + .step::before { content: ""; position: static; flex: none; width: 18px; height: 2px; border-radius: 2px; background: var(--line-strong); }
.staff .step.is-done + .step::before { background: var(--veridian-deep); }
.staff .step-link, .staff .step-pill {
  display: inline-flex; flex-direction: row; align-items: center; gap: 8px;
  height: 34px; min-height: 0; padding: 0 5px;
  border-radius: var(--radius-pill); border: 1px solid transparent; background: none;
  font-size: var(--text-label-size); line-height: 22px; font-weight: 600; color: var(--ink-muted); white-space: nowrap;
}
/* the visible pill is 34 px (mockup); the link's hit area stays 44 px via its overlay */
.staff .step-link::after { top: -5px; bottom: -5px; left: 0; right: 0; width: auto; transform: none; }
.staff .step-link:hover { background: var(--surface-sunken); color: var(--ink); }
.staff .step.is-done .step-link, .staff .step.is-done .step-pill { color: var(--ink); }
.staff .step.is-active .step-link, .staff .step.is-active .step-pill { background: var(--zest-soft); border-color: var(--ink); color: var(--ink); font-weight: 700; }
.staff .step-node { width: 24px; height: 24px; flex: none; border-width: 1.5px; font-size: var(--text-small-size); line-height: 22px; font-weight: 800; }
.staff .step-cap { display: block; font-size: inherit; line-height: inherit; font-weight: inherit; color: inherit; overflow-wrap: normal; }
.staff .step.is-active .step-cap { font-weight: inherit; color: inherit; }
.staff .step-note { padding: 0 14px 10px; }
@media (min-width: 900px) {
  .staff .step-link, .staff .step-pill { padding: 0 12px 0 5px; }
}

/* ---- timeline, decision history: mockup .a-hist dot list (app-approval.css) ---- */
.staff .tl-history .sec-title { font-size: 16px; line-height: 24px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--ink); }
.staff .tline.is-history { gap: 12px; }
.staff .tline.is-history > li { display: flex; gap: 10px; align-items: flex-start; padding-bottom: 0; font-size: var(--text-label-size); line-height: 19px; }
.staff .tline.is-history > li::before { display: none; }
.staff .tline.is-history .tmark.tdot { width: 9px; height: 9px; margin-top: 5px; flex: none; display: block; background: var(--bluestone-deep); font-size: var(--text-label-size); line-height: 19px; color: var(--ink); }
.staff .tline.is-history strong { font-size: var(--text-label-size); line-height: 19px; font-weight: 600; }
.staff .tline.is-history .tmeta { color: var(--ink-subtle); font-size: var(--text-support-size); line-height: 19px; }
.staff .tline.is-history .tnote { font-size: var(--text-label-size); line-height: 19px; }

/* ---- record hero: mockup .g-hero > .g-id (app-gate.css) ---- */
.staff .rh-card .hero { display: block; padding: 0; gap: normal; }
.staff .rh-id { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 12px 24px 8px; }
.staff .rh-id .avatar { width: 44px; height: 44px; flex: none; font-size: 16px; line-height: 18px; }
.staff .rh-id .avatar.is-ring { box-shadow: 0 0 0 3px var(--zest-soft), 0 0 0 5px var(--yellow-zest); }
.staff .rh-text { flex: 1 1 220px; }
.staff .rh-line { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 14px; row-gap: 2px; min-width: 0; }
.staff .rh-card .hero .title { font-size: 28px; line-height: 34px; letter-spacing: -0.02em; }
.staff .rh-card .rh-text .sub, .staff .rh-purp { display: block; font-size: 18px; line-height: 24px; font-weight: 700; }
.staff .rh-pipe, .staff .rh-when .rh-pipe { display: none; }
.staff .rh-pipe { align-self: center; flex: none; width: 2px; height: 24px; border-radius: 2px; background: var(--zest-edge-strong); }
.staff .rh-when { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 0; font-weight: 700; color: var(--ink); }
.staff .rh-when .rh-pipe { height: 16px; margin: 0 6px; }
.staff .rh-when-i { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.staff .rh-when-i .icon { width: 16px; height: 16px; flex: none; color: var(--zest-ink); }
@media (min-width: 900px) {
  .staff .rh-pipe, .staff .rh-when .rh-pipe { display: block; }
}

/* ---- data table: mockup .v-table th 9/14, first and last cells 20 (staff THEME) ---- */
.staff .dt-table thead th { padding: 9px 14px; }
.staff .dt-table thead th:first-child { padding-left: 20px; }
.staff .dt-table thead th:last-child { padding-right: 20px; }
@media (min-width: 900px) {
  .staff .dt-table td, .staff .dt-table tbody th { padding: 8px 14px; }
  .staff .dt-table td:first-child, .staff .dt-table tbody th:first-child { padding-left: 20px; }
  .staff .dt-table td:last-child { padding-right: 20px; }
}

/* ---- card heads of month calendar and schedule list: mockup .v-card-head 14/20, gap 16 ---- */
.staff .mcal .card-head, .staff .card:has(.srow) > .card-head { padding-top: 14px; padding-bottom: 14px; gap: 16px; }
.staff .card:has(.srow) > .card-head .card-title { font-size: 18px; }

/* ---- visitor row: mockup .r-row grid gap 14 ---- */
.staff .card .row { row-gap: 14px; column-gap: 14px; }

/* ---- alert banner: the action row wraps under the message on narrow phones (320 px overflow repair) ---- */
.staff .alert:has(> .al-actions) { flex-wrap: wrap; }
.staff .alert:has(> .al-actions) > div:not(.al-actions) { flex: 1 1 180px; }
.staff .alert > .al-actions { flex: none; }

/* Fix pass 2: staff forms, dialog and kiosk card mockup fidelity (collection-list, decision-options, declared-answers,
   property-check-list, form-field-group, dialog, kiosk-card).
   Values come from the mockup CSS (references/template/css/app-*.css) and the computed styles in evidence/fidelity/<id>.diff.json.
   Kept on purpose: 44 px phone targets (48 px gate and record actions), var(--control-border) on controls (OD-21), the focus ring,
   names that wrap instead of truncating. */

/* ---- dialog (C-FDBK-01), mockup .h-dlg: padding 20px 22px, text 14/22; scrim (#scrim) padding 20px at every width ---- */
.staff .dialog { padding-left: 22px; padding-right: 22px; }
.staff .dialog p, .staff .dialog .sub { line-height: 22px; }
/* the mockup keeps a floating dialog on a phone (scrim padding 20 px, height from content), not a full-screen sheet */
.staff .scrim:not(.is-drawer) { padding: 20px; place-items: center; }
.staff .scrim:not(.is-drawer) .dialog { min-height: auto; border-radius: var(--radius-dialog); max-height: calc(100vh - 40px); }
/* mockup dialog buttons are .v-btn-sm: 14/20 type, 12 px sides (targets stay 44/48 px) */
.staff .dialog-actions .btn { padding-left: 12px; padding-right: 12px; font-size: var(--text-label-size); line-height: 20px; }
.staff .dialog .btn-icon { font-size: var(--text-label-size); line-height: 20px; }

/* ---- collection list (C-FORM-07): its actions are the mockup .r-hcdlg footer buttons (.v-btn-sm) ---- */
.staff form:has(.hc-wrap) .btn:not(.btn-icon) {
  padding-left: 12px; padding-right: 12px; font-size: var(--text-label-size); line-height: 20px;
}

/* ---- kiosk card done button, mockup .k-done is a <button>: UA padding 1px 6px, line-height normal ---- */
.kiosk .k-done { padding: 1px 6px; line-height: normal; }

/* ==========================================================================
   22 fix pass 2: portal mockup fidelity (action-card, camera-capture, item-list,
   notice-page, passcode-cells, people-rows, readiness-panel, video-player,
   visitor-pass, waiting-card, progress-meter, stage-progress).
   Values from references/template/css/portal.css computed styles. Colour via tokens only.
   ========================================================================== */

/* visitor-pass: the footer strip is darker than the pass body, not lighter.
   Mockup portal.css:311 .pass-foot{background:rgba(0,0,0,.25)} over --rail #202c2d
   computes to about #182122. No black-wash token exists; --kiosk-bg #161f20 is the
   nearest token (2 levels off per channel). Text --rail-quiet-ink stays above 8:1. */
.portal .pass .pass-foot { background: var(--kiosk-bg); }

/* ==== 23-fix-a11y: accessibility, keyboard and responsive sweep repairs (smallest local changes; look unchanged unless noted) ==== */

/* ---- consent-points, needed-checklist: focus ring on a ticked custom checkbox.
   The portal ring is indigo; on the ticked box (veridian-deep fill) that is 1.55:1. The ticked box takes the ink ring
   (3.5:1 on veridian-deep, 15.8:1 on white and the veridian-soft row), so the ring stays visible in both states (WCAG 2.4.7, 1.4.11). */
.portal .check input:checked:focus-visible { outline-color: var(--ink); }

/* ---- decision-options (radio cards): the radio was a 1 x 1 px focus stop, so the focused control had no visible area of its own.
   The radio now covers its whole card (still transparent, still the real input, still clicked through the label), so the focus stop
   is the card the user sees and the card's existing ring (.x-choice:has(input:focus-visible)) marks it. */
.staff .do .x-choice > input { inset: 0; width: 100%; height: 100%; border-radius: inherit; cursor: pointer; pointer-events: auto; z-index: 1; }
.staff .do .x-choice:has(input:focus-visible) { outline: var(--focus-width) solid var(--focus-ring); outline-offset: var(--focus-offset); }

/* ---- yes-no-question: same repair for the Yes / No answers; the radio covers its answer box, which draws the ring. */
.portal .qs .yn label { position: relative; }
.portal .qs .yn input { inset: 0; width: 100%; height: 100%; cursor: pointer; z-index: 1; }
.portal .qs .yn input:focus-visible { outline: none; } /* the answer box beside it draws the ring (10-portal-a.css) */

/* ---- month-calendar: day buttons were 29-37 px wide at 320-375 px. Below 700 px the day cell gives its padding to the button,
   so the button fills the cell, and the week keeps 7 columns of at least 44 px. Where 7 x 44 px does not fit (320 px) the week
   scrolls sideways inside the calendar's own scroller (a two-dimensional grid, WCAG 1.4.10 exception) instead of shrinking the targets. */
@media (max-width: 699px) {
  .staff .mcal-scroll { overflow-x: auto; }
  .staff .mcal-grid { min-width: calc(7 * var(--target-min)); }
  .staff .mcal-day { padding: 0; }
  .staff .mcal-btn { min-width: var(--target-min); min-height: var(--target-min); padding: var(--space-1h); }
}

/* ---- portal-header: "Not you? Sign out" keeps the mockup's 38 px button from 681 px, with a 44 px tall hit area (WCAG 2.5.8, brief 44 px). */
.portal .hdr .btn { position: relative; }
.portal .hdr .btn::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: var(--target-min); transform: translateY(-50%); }

/* ---- dialog drawer / property-check-list: column headings wrap instead of being cut with an ellipsis. */
.staff .pc-th { height: auto; min-height: 32px; padding-top: var(--space-1); padding-bottom: var(--space-1); }
.staff .pc-th span { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }

/* ---- month-calendar: the day button holds only the day number (named by its aria-label); the count and chips sit beside it in the cell.
   The button's ::after covers the whole cell, so the whole cell stays the click / touch target and shows the focus ring. */
.staff .mcal-day { position: relative; }
.staff .mcal-day > .mcal-btn { position: static; flex: none; }
.staff .mcal-day > .mcal-btn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.staff .mcal-day > .mcal-btn:focus-visible { outline: none; }
.staff .mcal-day > .mcal-btn:focus-visible::after { outline: var(--focus-width) solid var(--focus-ring); outline-offset: -3px; }
.staff .mcal-day:hover .mcal-num { background: var(--surface-sunken); }
.staff .mcal-day.is-today:hover .mcal-num { background: var(--ink); }
@media (max-width: 699px) {
  .staff .mcal-day { align-items: center; }
  .staff .mcal-day > .mcal-btn { align-self: stretch; align-items: center; }
}
@media (min-width: 700px) {
  .staff .mcal-day:hover .mcal-chip { border-color: var(--ink); border-left-color: var(--edge, var(--stone)); }
}

/* ==== 24-fix-a11y-2: second accessibility sweep repairs (smallest local changes; look unchanged unless noted) ==== */

/* ---- Focus rings on filled controls (WCAG 2.4.7, 1.4.11). The ring was the fill's own colour (ink on an ink tab, zest on a zest
   button, 1:1) or too close to it (ink on red-earth danger, 2.3:1; white on the zest kiosk Done, 1.44:1). On a filled control the
   ring now sits just inside the edge in the token that contrasts with the fill, so it is drawn against the fill:
   on-ink on ink 15.8:1, on-ink on red-earth-ink > 3:1, ink on yellow-zest 10.9:1. Width stays 2 px (portal / kiosk 3 px). */
.staff .tab[aria-current="true"]:focus-visible,
.staff .tab[aria-selected="true"]:focus-visible,
.staff .switch a[aria-current="true"]:focus-visible,
.staff .switch button[aria-checked="true"]:focus-visible,
.staff .skip:focus-visible,
.staff .btn-danger:focus-visible { outline: var(--focus-width) solid var(--on-ink); outline-offset: -4px; }
.staff .btn-danger[aria-busy="true"]:focus-visible, .staff .btn-danger[aria-disabled="true"]:focus-visible { outline-color: var(--ink); } /* busy / unavailable danger button has a light fill: ink ring */
.portal .skip:focus-visible,
.portal .btn-danger:focus-visible { outline: var(--focus-width-portal) solid var(--on-ink); outline-offset: -5px; }
.staff .rail .rail-cta:focus-visible { outline: var(--focus-width) solid var(--ink); outline-offset: -4px; }
.kiosk .k-done:focus-visible { outline: var(--focus-width-kiosk) solid var(--ink); outline-offset: -6px; }
.portal .player .pl-big:focus-visible,
.portal .player .pl-again:focus-visible { outline: var(--focus-width-portal) solid var(--ink); outline-offset: -6px; }

/* ---- property-check-list: a marked Presented / Not presented option is filled (veridian-deep / red-earth-ink); the ink ring on the
   red-earth fill was 2.3:1. A marked option takes the on-ink ring just inside its edge (> 3:1 on both fills). The transparent radio
   that covers the option carries the same colour, so its computed ring matches what is drawn. */
.staff .pc .pc-opt:has(input:checked:focus-visible) { outline-color: var(--on-ink); outline-offset: -4px; }
.staff .pc .pc-opt input:checked:focus-visible { outline-color: var(--on-ink); }

/* ---- group-header, person-row: the show-details toggle drew its ring on a ::after that had no positioned box of its own, so no ring
   appeared. The toggle now carries the ink ring itself (15.8:1 on the white / canvas row); forced colours keep it as a system outline. */
.staff .x-tog:focus-visible { outline: var(--focus-width) solid var(--focus-ring); outline-offset: 0; }
@media (forced-colors: active) {
  .staff .x-tog:focus-visible { outline-color: Highlight; }
}

/* ---- staff-shell rail user: the initials avatar is aria-hidden; its letters now come from data-initials, so they are not part of
   the link's visible text and the link's accessible name ("Name, Role") matches what is read on screen (WCAG 2.5.3). */
.staff .rail-user .avatar[data-initials]::before { content: attr(data-initials); }

/* ---- video-player: the small round control takes its hover fill when focused, so the zest ring is measured against the dark player
   (10.0:1) and the focused button stands out the same way as on hover. */
.portal .player .pl-btn:focus-visible { background: var(--rail-outline); }

/* ---- kiosk-card gallery: the case caption beside the state name was --ink-muted on the dark kiosk surface. It takes the kiosk body
   text token (10.3:1 on --rail), as kiosk body copy does. */
.kiosk .ws-case-h span { color: var(--kiosk-ink); }

/* ---- data-table: the narrow-screen sort select had the light field line (2.91:1); it takes the control border token like every other
   field (WCAG 1.4.11). */
.staff .dt-sortsel select.input { border-color: var(--control-border); }

/* 25-fix-a11y-3.css: third accessibility repair pass (data table, group header, person row, yes/no answers, schedule stepper).
   Colours are tokens or forced-colours system colours only. */

/* ---- data-table: the phone sort select sits straight on the page canvas, where --control-border measures 2.9:1.
   Same repair as the table filter in 10-staff-c.css: the subtle ink gives the field edge 3:1 or more (WCAG 1.4.11).
   (24-fix-a11y-2.css set --control-border here; the rule applied, but that token is the one that fails on the canvas.) */
.staff .dt-bar .dt-sortsel select.input { border-color: var(--ink-subtle); }
.staff .dt-bar .dt-sortsel select.input:focus { border-color: var(--ink); }

/* ---- data-table: each sortable head carries its label as plain text too (.th-lbl). From 900 px the sort button names
   the column, so the copy is hidden; below 900 px the button is hidden (the head is visually hidden and the sort select
   takes over) and the copy keeps the header from being empty for screen readers. */
.staff .dt-table thead .th-lbl { display: none; }
@media (max-width: 899px) {
  .staff .dt-table thead .th-lbl { display: inline; }
}

/* ---- group-header and person-row: in forced colours the bare toggles lose their edge; draw one in ButtonText. */
@media (forced-colors: active) {
  .staff button.group, .staff button.group-btn, .staff button.x-hline.group-btn { border: 1px solid ButtonText; }
  .staff .x-tog { border: 1px solid ButtonText; }
}

/* ---- yes-no-question: the answer box draws the focus ring outside itself (outline + offset). When Tab scrolls a
   question onto the bottom edge of the window, the ring below the box was cut off. Keep a margin when focus scrolls. */
.portal .qs .yn input { scroll-margin-block: var(--space-6); }

/* ---- schedule-stepper: the visible pill stays 34 px (mockup), but the link box itself is now at least 44 x 44 px.
   A 5 px / 4 px transparent border pads the box; the background is clipped to the padding box so only the pill shows,
   the pill edge is an inset shadow, and negative margins keep the row layout unchanged. */
.staff .step-link {
  height: 44px; min-width: 44px; justify-content: center;
  border: 5px solid transparent; border-width: 5px 4px; margin: -5px -4px;
  background-clip: padding-box; padding: 0 6px;
}
.staff .step.is-active .step-link { border-color: transparent; box-shadow: inset 0 0 0 1px var(--ink); }
.staff .step-link::after { content: none; }
.staff .step-link:focus-visible { outline-offset: -3px; }
@media (min-width: 900px) {
  .staff .step-link { padding: 0 13px 0 6px; }
}
@media (forced-colors: active) {
  .staff .step.is-active .step-link { outline: 1px solid CanvasText; outline-offset: -6px; }
  .staff .step.is-active .step-link:focus-visible { outline: var(--focus-width) solid Highlight; outline-offset: -3px; }
}

/* Lead, final pass. Passcode cells keep a 44 px minimum width in narrow containers (the 6 cells plus gaps fit 320 px); the gap gives way first. */
.portal .code { grid-template-columns: repeat(6, minmax(44px, 1fr)); gap: clamp(4px, 1.5vw, var(--space-2)); }
/* Reflow at 320 px (WCAG 1.4.10): below 360 px each summary segment takes its own row and its label may wrap, instead of running past the edge; 360 px and wider keep the mockup's nowrap segments. */
@media (max-width: 359px) { .staff .seg { flex: 1 1 100%; white-space: normal; } }

/* 26-fix-phone-info.css: owner note N-01 phone pass.
   Rule: at 320 and 375 px never remove the name, label, status or navigation a person needs to recognise where they are or where
   they can go. Wrapping, scrolling inside a component, a visible short label, or re-flow into one column are allowed.
   The hiding rules themselves were deleted where they lived (10-staff-b, 10-portal-a, 00-base, 10-staff-a, 10-staff-c); this file
   adds the phone layouts that replace them. Tap targets (44-48 px) and the darker control borders are unchanged.
   Colours are tokens only. */

/* ---- schedule-stepper (C-DET-06): the mockup's labelled .h-steps rail at every width (app-host.css 549-560):
   13.5px/600 caption, 34 px pill, 24 px node, 18 px connector, row padding 10px 14px, overflow-x: auto.
   Below 900 px the caption was clipped to a screen-reader-only box; now it shows and the row scrolls sideways.
   vis-staff-b.js scrolls the current step into view inside the row and sets is-more-start / is-more-end. */
.staff .step-cap { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: nowrap; }
.staff .step-pill { padding: 0 12px 0 5px; }               /* mockup .h-step padding, every width */
.staff .step-link { padding: 0 13px 0 6px; }               /* same, inside the 5 px / 4 px transparent 44 px box (25-fix-a11y-3.css) */
.staff .steps { scroll-behavior: auto; overscroll-behavior-x: contain; scroll-padding-inline: 32px; }
.staff .steps:focus-visible { outline: var(--focus-width) solid var(--focus-ring); outline-offset: -3px; }
.staff .stepper.is-more-end .steps { -webkit-mask-image: linear-gradient(to right, var(--ink) calc(100% - 28px), transparent); mask-image: linear-gradient(to right, var(--ink) calc(100% - 28px), transparent); }
.staff .stepper.is-more-start .steps { -webkit-mask-image: linear-gradient(to left, var(--ink) calc(100% - 28px), transparent); mask-image: linear-gradient(to left, var(--ink) calc(100% - 28px), transparent); }
.staff .stepper.is-more-start.is-more-end .steps { -webkit-mask-image: linear-gradient(to right, transparent, var(--ink) 28px, var(--ink) calc(100% - 28px), transparent); mask-image: linear-gradient(to right, transparent, var(--ink) 28px, var(--ink) calc(100% - 28px), transparent); }
.staff .step-note { display: block; }                      /* why later steps are closed: visible at every width */
@media (max-width: 899px) {
  .staff .step-note { display: flex; align-items: flex-start; gap: var(--space-1h); }   /* the lock icon sat against the first word */
  .staff .step-note .icon { margin-top: 1px; }
}
@media (forced-colors: active) {
  .staff .stepper .steps { -webkit-mask-image: none; mask-image: none; }
}

/* ---- journey-steps (portal): no toggle. "Your journey" + count, the segment bar and every step's name and status show at every width.
   The phone keeps the mockup's tighter card padding (10-portal-a.css). */
.portal .journey-h { display: flex; flex-wrap: wrap; row-gap: var(--space-1); }
.portal .journey .seg-wide { display: grid; }
.portal .journey .tl { display: flex; }
.portal .journey-foot { display: block; }
/* the gate row's own connector sat 12 px right of the marker line (the gate li carries a 12 px side margin); put it on the line */
.portal .tl li.gate::before { left: 17px; }
/* the 22 px gate diamond is rotated 45 degrees, so it reaches 17 px above and below its centre and touched the current step's box
   in a 32 px row, and the current step's box (z-index 1, with its drop shadow) painted over the diamond's top half.
   Below 941 px give the row 46 px (12 px above and below) so the diamond clears the highlighted step by about 7 px, and lift the
   diamond above the step boxes so no shadow or border can sit on it. From 941 px the mockup's 5 px rows are unchanged. */
@media (max-width: 940px) {
  .portal .tl li.gate { padding: var(--space-3) 0; }
  .portal .tl li.gate .gate-m { position: relative; z-index: 2; }
}

/* ---- month-calendar (C-LIST-07): below 700 px the month re-flows into a one-column list of its days. Each row shows the weekday and
   day number (the day button, at least 44 x 44 px, whole row clickable) and every schedule chip with its status word and title.
   No day collapses to a bare count. Days of the neighbouring months are left to those months (month links stay at the top). */
.staff .mcal-dow { display: none; }
/* from 700 px the grid keeps the mockup's "+n more" after MaxChips; the extra chips are in the markup for the phone list only */
@media (min-width: 700px) { .staff .mcal-chip.is-extra { display: none; } }
@media (max-width: 699px) {
  .staff .mcal-scroll { overflow-x: visible; }
  .staff .mcal-grid { min-width: 0; }
  .staff .mcal-grid > thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .staff .mcal-grid tr { display: block; }
  .staff .mcal-day { display: grid; grid-template-columns: 108px minmax(0, 1fr); align-items: start; gap: var(--space-1) var(--space-3); min-height: var(--target-min); padding: var(--space-1) var(--space-4); border-right: 0; }
  .staff .mcal-day.is-out { display: none; }
  .staff .mcal-day > .mcal-btn { grid-column: 1; align-self: start; flex-direction: row; align-items: center; justify-content: flex-start; gap: var(--space-1h); min-width: var(--target-min); min-height: var(--target-min); padding: 0; }
  .staff .mcal-dow { display: inline; min-width: 30px; color: var(--ink-muted); font-size: var(--text-small-size); line-height: var(--text-small-line); font-weight: 700; letter-spacing: var(--text-overline-tracking); text-transform: uppercase; }
  .staff .mcal-head .card-title { flex: 1 1 0; min-width: 0; }
  .staff .mcal-btn .mcal-today { display: inline; position: static; width: auto; height: auto; overflow: visible; clip: auto; }   /* "Today" in words, not only the dark dot */
  .staff .mcal-day.is-today .mcal-num { padding: 0 var(--space-2); }
  .staff .mcal-count { display: none; }
  .staff .mcal-chips { grid-column: 2; display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; padding: var(--space-1) 0; }
  .staff .mcal-chip { display: block; padding: var(--space-1) 7px 5px; border: 1px solid var(--line); border-left: 3px solid var(--edge, var(--stone)); border-radius: 7px; background: var(--surface); color: var(--ink); }
  .staff .mcal-chip.is-success, .staff .mcal-chip.is-info, .staff .mcal-chip.is-warning, .staff .mcal-chip.is-danger, .staff .mcal-chip.is-attention, .staff .mcal-chip.is-ready { background: var(--surface); color: var(--ink); }
  .staff .mcal-chip.is-success { --edge: var(--veridian-deep); }
  .staff .mcal-chip.is-attention, .staff .mcal-chip.is-warning { --edge: var(--yellow-zest); }
  .staff .mcal-chip.is-danger { --edge: var(--red-earth); }
  .staff .mcal-chip.is-info { --edge: var(--bluestone-deep); }
  .staff .mcal-chip.is-ready { --edge: var(--ink); }
  .staff .mcal-chip .mcal-w { display: flex; align-items: center; gap: 5px; color: var(--ink-muted); font-size: var(--text-small-size); line-height: 15px; font-weight: 700; }
  .staff .mcal-chip .mcal-w .icon { width: 11px; height: 11px; margin: 0; stroke-width: 2.4; }
  .staff .mcal-chip .mcal-t { display: block; font-size: var(--text-support-size); line-height: 16px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
  .staff .mcal-day:hover .mcal-chip { border-color: var(--ink); border-left-color: var(--edge, var(--stone)); }
  .staff .mcal-more { display: none; }                    /* every chip shows in the list; no "+n more" */
}

/* ---- data-table (C-LIST-04): stacked rows below 900 px. Every cell, the identifier included, shows its column name (data-label).
   When sorting is on, the column-head sort buttons stay visible as a wrapping "Sort by" row, with the direction in visible text
   (aria-sort carries it for assistive technology, so the word is given empty alt text). Column heads that do not sort stay
   available to assistive technology only (their name already shows on every cell). */
@media (max-width: 899px) {
  .staff .x-table tbody th[data-label]::before { content: attr(data-label); display: block; color: var(--ink-subtle); font-size: var(--text-small-size); line-height: var(--text-small-line); font-weight: 700; letter-spacing: var(--text-overline-tracking); text-transform: uppercase; }
  .staff .dt-table.is-sortable thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; display: block; border-bottom: 1px solid var(--line); }
  .staff .dt-table.is-sortable thead tr { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-3); padding: var(--space-1) var(--space-3); }
  .staff .dt-table.is-sortable thead tr::before { content: "Sort by"; color: var(--ink-muted); font-size: var(--text-small-size); line-height: var(--text-small-line); font-weight: 700; letter-spacing: var(--text-overline-tracking); text-transform: uppercase; }
  .staff .dt-table.is-sortable thead th { display: block; width: auto; padding: 0; border: 0; background: none; }
  .staff .dt-table.is-sortable thead th:not([data-key]), .staff .dt-table.is-sortable thead th:not(:has(.th-sort)), .staff .dt-table.is-sortable thead .dt-go {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; padding: 0;
  }
  .staff .dt-table.is-sortable thead .th-sort { visibility: visible; margin: 0; min-height: var(--target-min); text-transform: none; letter-spacing: 0; font-size: var(--text-label-size); line-height: var(--text-label-line); font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
  .staff .dt-table.is-sortable thead th[aria-sort] .th-sort { font-weight: 700; text-decoration-thickness: 2px; }
  .staff .dt-table.is-sortable thead th[aria-sort="ascending"] .th-sort::after { content: "(ascending)" / ""; font-weight: 600; }
  .staff .dt-table.is-sortable thead th[aria-sort="descending"] .th-sort::after { content: "(descending)" / ""; font-weight: 600; }
  .staff .dt-table.is-sortable thead .th-lbl { display: none; }
}

/* ---- portal-header: below 681 px the visitor's name and the "Sign out" words stay visible. The session block takes its own
   wrapping row under the logo and product name: avatar, "Signed in as <name>" (wraps), then the 44 px tall sign-out button. */
@media (max-width: 680px) {
  .portal .hdr-in { flex-wrap: wrap; row-gap: var(--space-1h); }
  .portal .hdr-who { flex: 1 1 100%; min-width: 0; margin-left: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1h) var(--space-2); }
  .portal .hdr-who form { display: contents; }
  .portal .hdr-who .w { display: block; flex: 1 1 0; min-width: 150px; overflow-wrap: anywhere; color: var(--rail-ink); font-size: var(--text-support-size); line-height: var(--text-support-line); }
  .portal .hdr .btn { width: auto; flex: none; margin-left: auto; min-height: var(--target-min); padding: 0 var(--space-3); gap: var(--space-1h); white-space: nowrap; }
  .portal .hdr .btn span { display: inline; }
}

/* ---- staff-shell (C-SHELL-01): below 900 px the system name and site stay visible, open or closed menu. The brand text takes
   its own row under the logo / Menu / account row, so nothing is squeezed at 320 px. */
@media (max-width: 899px) {
  .staff .rail-top { flex-wrap: wrap; gap: var(--space-2); }
  .staff .rail-brand { display: contents; }
  /* the 150 px mockup logo gives up a few px at 320 so logo, Menu and account stay on one row (flex-wrap wraps before it shrinks) */
  .staff .rail-logo { margin-right: auto; width: min(var(--logo-rail-width), calc(100% - 150px)); min-width: 0; object-fit: contain; object-position: left center; }
  .staff .rail-brand > div { order: 9; flex: 1 1 100%; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-2); }
  .staff .rail-name { overflow-wrap: anywhere; }
  .staff .rail-menu { order: 2; }
  .staff .rail-user { order: 3; }
}

/* 27-fix-dialog-phone.css: owner decision (2026-10-14, "Fill the screen on phones").
   Below 700 px a staff dialog fills the screen as a sheet instead of floating as the mockup draws it.
   This restores the sheet that 21-fix-staff-forms.css had replaced with the mockup's floating card.
   768 px and wider keep the mockup's floating dialog (scrim padding 20 px, height from content). */
@media (max-width: 699px) {
  .staff .scrim:not(.is-drawer) { padding: 0; place-items: stretch; }
  .staff .scrim:not(.is-drawer) .dialog { max-width: none; max-height: none; min-height: 100%; border-radius: 0; }
}

/* 28-fix-phone-back.css: owner note N-01 phone pass, action-card (C-PRT-12).
   The mockup shrinks the step bar's back control to a 46 px icon below 681 px ("Previous step" hidden).
   N-01: navigation a person needs keeps its words on phones. Below 681 px the bar's actions wrap: "Back to your visit"
   keeps its words on its own full-width row (44 px tall, same transparent style and darker edge), the primary action
   fills the row under it. DOM order, focus order and visual order stay the same. Desktop is unchanged. */
@media (max-width: 680px) {
  .portal .bar-actions { flex-wrap: wrap; row-gap: var(--space-2); }
  .portal .bar-actions .btn-t { flex: 1 1 100%; width: auto; padding: 0 var(--space-3); justify-content: center; }
  .portal .bar-actions .btn-t span { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; }
  .portal .bar-actions .btn-p { flex: 1 1 100%; }
}

/* gap pass (shell): page-head and back-bar buttons are the mockup's .v-btn-sm on a desktop, 32 px with the light
   edge. Text or icon names each button, so the edge is decoration (WCAG 1.4.11). Phones keep the 44 px target. */
@media (min-width: 900px) {
  .staff .pagehead .btn, .staff .x-back .btn { min-height: var(--control-height-sm); }
  .staff :is(.pagehead, .x-back) .btn:not(.btn-primary, .btn-danger, .btn-danger-ghost, .btn-ghost, [aria-disabled="true"], [aria-busy="true"]):not(:hover) { border-color: var(--line-strong); }
}
