/* fetch-1519: shared Asset condition reader, scoped to its independent Assets mode. */
.asset-condition-reader { min-width: 0; }
.rail-menu-shared > button { display: flex; align-items: center; gap: var(--s-3); min-height: var(--control-height-touch); width: 100%; text-align: left; }
.asset-condition-reader .pgh { margin-bottom: var(--s-3); }
.asset-condition-reader .btn.icon-btn { width: var(--control-height-touch); min-width: var(--control-height-touch); height: var(--control-height-touch); min-height: var(--control-height-touch); }
.asset-condition-reader :is(.btn, .pgh-back, .pgh-search-x, input) { min-height: var(--control-height-touch); }
.asset-condition-row { display: grid; grid-template-columns: minmax(10rem, 1fr) 8rem minmax(14rem, 1.3fr) auto; align-items: center; gap: var(--s-3); width: 100%; min-width: 0; min-height: var(--control-height-touch); padding: var(--s-3) var(--s-4); border: 0; border-bottom: 1px solid var(--line); background: var(--surface-card); color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.asset-condition-row:first-child { border-radius: var(--r-m) var(--r-m) 0 0; }
.asset-condition-row:last-child { border-radius: 0 0 var(--r-m) var(--r-m); }
.asset-condition-row:hover { background: var(--wash); }
.asset-condition-row:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.asset-condition-name { display: block; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-condition-venue { display: block; min-width: 0; color: var(--muted); font-size: var(--t-sub); font-weight: 400; }
.asset-condition-venue .vchip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.asset-condition-status { font-size: var(--t-sub); font-weight: 600; }
.asset-condition-status--bad { color: var(--bad-fg); }
.asset-condition-status--warn { color: var(--warn-fg); }
.asset-condition-counts { display: grid; gap: var(--s-1); min-width: 0; color: var(--muted); font-size: var(--t-sub); font-variant-numeric: tabular-nums; }
.asset-condition-counts > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-condition-loading, .asset-condition-feedback { margin: var(--s-3) 0; font-size: var(--t-body); overflow-wrap: anywhere; }
.asset-condition-more { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); padding: var(--s-4) 0; }
.asset-condition-dialog { box-sizing: border-box; width: min(36rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface-card); color: var(--ink); overflow: auto; }
.asset-condition-dialog::backdrop { background: color-mix(in srgb, var(--navy-dark) 45%, transparent); }
.asset-condition-dialog-head { display: flex; gap: var(--s-3); justify-content: space-between; align-items: flex-start; }
.asset-condition-dialog-head h2 { margin: 0; min-width: 0; font-family: Inter, sans-serif; font-size: var(--t-section); overflow-wrap: anywhere; }
.asset-condition-dialog :is(.btn, .icon-btn) { min-height: var(--control-height-touch); min-width: var(--control-height-touch); }
.asset-condition-detail-venue { margin: var(--s-3) 0; overflow-wrap: anywhere; }
.asset-condition-facts { margin: var(--s-4) 0; }
.asset-condition-facts > div { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
.asset-condition-facts dt { color: var(--muted); font-size: var(--t-sub); }
.asset-condition-facts dd { margin: 0; font-size: var(--t-body); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .asset-condition-row { grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--s-2); padding: var(--s-3); }
  .asset-condition-counts { grid-column: 1 / -1; }
  .asset-condition-row > .ci { grid-column: 3; grid-row: 1; }
  .asset-condition-status { grid-column: 2; grid-row: 1; }
  .asset-condition-name { grid-column: 1; grid-row: 1; }
  .asset-condition-dialog { width: calc(100% - 1rem); max-height: calc(100dvh - 1rem); padding: var(--s-4); }
  .asset-condition-facts > div { grid-template-columns: 6rem minmax(0, 1fr); }
}

/* fetch-1304: CRM calendar matches share the existing header and record doors. */
.cl-fill { min-width: 0; }
.cl-fill h2 { margin: 0 0 var(--s-2); font: 600 var(--t-section)/1.4 Inter, sans-serif; color: var(--text-heading); }
.cl-fill-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--s-4); margin-block: var(--s-4); }
.cl-fill-heading p { margin: 0; font-size: var(--t-body); color: var(--muted); }
.cl-fill-controls { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.cl-fill-controls label { display: grid; gap: var(--s-1); font-size: var(--t-sub); color: var(--muted); }
.cl-fill-controls .sel { min-height: var(--control-height-touch); font-size: var(--t-body); }
.cl-fill-summary { margin: var(--s-3) 0 var(--s-1); font-size: var(--t-body); font-weight: 600; font-variant-numeric: tabular-nums; }
.cl-fill-meta { color: var(--muted); font-size: var(--t-sub); line-height: 1.6; margin: var(--s-1) 0; overflow-wrap: anywhere; }
.cl-fill-explain { margin-block: var(--s-3) var(--s-4); font-size: var(--t-sub); line-height: 1.6; }
.cl-fill-explain summary, .cl-fill-rates summary { cursor: pointer; min-height: var(--control-height-touch); display: list-item; align-content: center; color: var(--navy); }
.cl-fill-list { display: grid; gap: var(--s-3); margin-bottom: var(--s-4); }
.cl-fill-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.42fr); gap: var(--s-4); padding: var(--s-4); background: var(--surface-card); border: 1px solid var(--line); border-radius: var(--r-m); }
.cl-fill-main, .cl-fill-next { min-width: 0; }
.cl-fill-date { font-size: var(--t-sub); font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums; }
.cl-fill-row h3 { margin: var(--s-2) 0 var(--s-1); font-size: var(--t-section); font-weight: 600; color: var(--text-heading); overflow-wrap: anywhere; }
.cl-fill-reason { margin: var(--s-3) 0 var(--s-2); font-size: var(--t-body); line-height: 1.6; }
.cl-fill-rates { font-size: var(--t-sub); line-height: 1.6; }
.cl-fill-rates p { margin: var(--s-1) 0; color: var(--muted); }
.cl-fill-next { border-left: 1px solid var(--line); padding-left: var(--s-4); }
.cl-fill-strength { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2); font-size: var(--t-sub); color: var(--muted); }
.cl-fill-next dl { margin-block: var(--s-3); font-size: var(--t-sub); line-height: 1.6; }
.cl-fill-next dt { color: var(--muted); }
.cl-fill-next dd { margin: 0 0 var(--s-2); overflow-wrap: anywhere; }
.cl-fill .btn { min-height: var(--control-height-touch); }
@media (max-width: 640px) {
  .cl-fill-heading { display: block; }
  .cl-fill-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-top: var(--s-3); }
  .cl-fill-controls .sel { min-width: 0; width: 100%; font-size: 1rem; }
  .cl-fill-row { grid-template-columns: minmax(0, 1fr); padding: var(--s-3); gap: var(--s-3); }
  .cl-fill-next { border-left: 0; border-top: 1px solid var(--line); padding: var(--s-3) 0 0; }
  .cl-fill-next .btn { width: 100%; }
}
/* fetch-1233: one compact header owns the event/venue scope and active tool. */
.readiness-workspace { min-width: 0; }
/* fetch-1280: event identity owns the view chooser; each tool owns its controls. */
.evt-view-switch { display: inline-flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-3); color: var(--muted); font: 500 var(--t-sub)/1.4 Inter, sans-serif; }
.evt-view-switch .sel { width: auto; min-width: 0; min-height: var(--control-height-sm); padding-block: 0; font-size: var(--t-sub); color: var(--text-heading); } /* fetch-1500 (Jack): a small control, the size of its words */
.evt-view-label { display: block; margin-bottom: var(--s-2); color: var(--muted); font-size: var(--t-sub); }
.event-operations-tools { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-4); }
.event-operations-tools .btn { min-height: var(--control-height-touch); white-space: normal; }
/* fetch-1287: the isolated saved timeline keeps every reader control touch-sized. */
.saved-timeline-reader .btn { min-height: var(--control-height-touch); }
.readiness-workspace--embedded { margin: 0; }
.beo-editor.beo-editor--staff { grid-template-columns: minmax(0, 1fr); }
.beo-editor--staff .beo-editor-edge { justify-content: space-between; }
@media (max-width: 640px) {
  .evt-view-switch { display: flex; width: 100%; }
  .evt-view-switch .sel { flex: 1; min-width: 0; min-height: var(--control-height-touch); font-size: 1rem; } /* fetch-1500: small on a desktop, a thumb target here */
  .event-operations-tools .btn { flex: 1 1 auto; }
}
.readiness-header.pgh { display: grid; gap: var(--s-2); padding: var(--s-3); margin: 0 0 var(--s-3); background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.readiness-header.pgh > :is(.pgh-top, .pgh-tabs, .pgh-nav) { margin: 0; min-width: 0; }
.readiness-header.pgh .pgh-top { gap: var(--s-2); align-items: center; flex-wrap: nowrap; }
.readiness-header.pgh .pgh-titles { flex: 1 1 auto; }
.readiness-header.pgh .pgh-h { font-size: var(--t-section); font-family: Inter, sans-serif; }
.readiness-header.pgh .pgh-h--link { min-height: var(--control-height-touch); }
.readiness-header.pgh .pgh-nav { display: flex; flex-wrap: wrap; align-items: end; gap: var(--s-2); }
.readiness-header.pgh .pgh-navfield { flex: 1 1 8rem; min-width: 0; width: auto; }
.readiness-header.pgh .pgh-navfield:has(#readinessEvent) { flex: 2 1 14rem; }
.readiness-header.pgh .sel { min-width: 0; width: 100%; }
.readiness-header.pgh :is(.btn, .pgh-tab, .sel, .pgh-more) { min-height: var(--control-height-touch); }
.readiness-header.pgh .pgh-tabs { gap: var(--s-3); overflow: visible; flex-wrap: wrap; }
.readiness-header.pgh .pgh-tab { font-size: var(--t-body); padding-block: var(--s-2); }
.readiness-header.pgh .pgh-nav--tail .btn { flex: 0 1 auto; white-space: normal; }
.readiness-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); align-items: start; }
.readiness-main, .readiness-reference, .readiness-crew { min-width: 0; }
.readiness-main > .tlw-layout { display: block; }
.readiness-workspace .readiness-reference > .tlb-rail { position: static; margin: 0; }
.readiness-crew .card { margin-top: 0; }
.readiness-crew .grid { grid-template-columns: minmax(0, 1fr); }
.readiness-crew :is(input, select, textarea, .btn) { min-height: var(--control-height-touch); }
.readiness-main .event-diagrams { margin-top: 0; }
#readinessCoveragePanel { margin-top: var(--s-4); }
@media (min-width: 1100px) {
  .readiness-header.pgh { grid-template-columns: minmax(0, 1fr) minmax(26rem, 40rem); gap: var(--s-2) var(--s-4); }
  .readiness-header.pgh > .pgh-top { grid-column: 1; grid-row: 1; }
  .readiness-header.pgh > .pgh-nav:not(.pgh-nav--tail) { grid-column: 2; grid-row: 1; align-self: center; }
  .readiness-header.pgh > .pgh-tabs { grid-column: 1; grid-row: 2; }
  .readiness-header.pgh > .pgh-nav--tail { grid-column: 2; grid-row: 2; justify-content: end; }
  .readiness-header.pgh .pgh-navfield:has(#readinessEvent) { min-width: 19rem; }
  .readiness-layout--reference { grid-template-columns: minmax(0, 1fr) minmax(19rem, 25rem); }
  .readiness-reference, .readiness-crew { position: sticky; top: var(--s-3); }
}
@media (max-width: 640px) {
  .readiness-header.pgh { padding-inline: 0; }
  .readiness-header.pgh .pgh-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-1); }
  .readiness-header.pgh .pgh-tab { min-width: 0; padding: var(--s-2) var(--s-1); white-space: normal; font-size: var(--t-sub); }
  .readiness-header.pgh > .pgh-nav:not(.pgh-nav--tail) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
  #linenHeader .readiness-header.pgh > .pgh-nav:not(.pgh-nav--tail) { grid-template-columns: repeat(auto-fit, minmax(min(100%, 9em), 1fr)); }
  .readiness-header.pgh .pgh-navfield { width: 100%; }
  .readiness-header.pgh .pgh-acts { gap: var(--s-1); }
  .readiness-header.pgh .pgh-acts .btn { padding-inline: var(--s-2); }
  .readiness-header.pgh :is(input, select) { font-size: 1rem; }
  .readiness-workspace .readiness-crew :is(input, select, textarea) { font-size: 1rem; }
}
/* fetch-1235: the approved subject tiles, within the shared header. */
.readiness-header.pgh { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m); padding: var(--s-5); gap: var(--s-4); }
.readiness-header.pgh .pgh-top { display: contents; }
.readiness-header.pgh .pgh-h { font-size: var(--t-title); }
.readiness-header.pgh > :is(.pgh-scope, .pgh-tiles) { margin: 0; min-width: 0; }
.readiness-header.pgh .pgh-scope { display: block; }
.readiness-header.pgh .pgh-scope::before { content: 'Venue'; display: block; color: var(--muted); font-size: var(--t-sub); margin-bottom: var(--s-1); }
.readiness-header.pgh .pgh-scope-choices:empty, .readiness-header.pgh .pgh-acts:empty { display: none; }
.readiness-header.pgh :is(.pgh-picker-trigger, .pgh-picker-list .pgh-chip) { min-height: var(--control-height-touch); font-size: var(--t-body); }
.readiness-header.pgh .pgh-picker-list { right: 0; left: auto; width: 100%; max-width: 100%; }
.readiness-header.pgh .pgh-picker-list .pgh-chip { color: var(--navy-dark); border-color: transparent; gap: var(--s-2); }
.readiness-header.pgh .pgh-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
.readiness-header.pgh .pgh-tile { position: relative; display: flex; align-items: center; gap: var(--s-3); min-height: 4.75rem; padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-s); background: var(--paper); color: var(--navy-dark); text-align: left; font: inherit; cursor: pointer; }
.readiness-header.pgh .pgh-tile > .ci { flex: 0 0 auto; color: var(--navy); }
.readiness-header.pgh .pgh-tile > span { min-width: 0; }
.readiness-header.pgh .pgh-tile strong { display: block; font-size: var(--t-body); font-weight: 600; }
.readiness-header.pgh .pgh-tile small { display: block; font-size: var(--t-sub); color: var(--muted); margin-top: var(--s-1); }
.readiness-header.pgh .pgh-tile:hover { background: var(--wash); }
.readiness-header.pgh .pgh-tile[aria-pressed="true"] { border-color: var(--navy); background: var(--wash); }
.readiness-header.pgh .pgh-tile[aria-pressed="true"]::after { content: ''; position: absolute; bottom: 0; left: var(--s-3); right: var(--s-3); height: 3px; background: var(--gold); border-radius: var(--r-s) var(--r-s) 0 0; }
@media (min-width: 1100px) {
  .readiness-header.pgh { grid-template-columns: minmax(0, 1fr) minmax(19rem, 24rem) minmax(10rem, 13rem) auto; align-items: center; }
  .readiness-header.pgh .pgh-titles { grid-column: 1; grid-row: 1; }
  .readiness-header.pgh .pgh-tiles { grid-column: 2; grid-row: 1; }
  .readiness-header.pgh .pgh-scope { grid-column: 3; grid-row: 1; }
  .readiness-header.pgh .pgh-acts { grid-column: 4; grid-row: 1; }
  .readiness-header.pgh > .pgh-tabs { grid-column: 1; grid-row: 2; gap: var(--s-3); }
  .readiness-header.pgh > .pgh-nav:not(.pgh-nav--tail) { grid-column: 2; grid-row: 2; }
  .readiness-header.pgh > .pgh-nav--tail { grid-column: 3 / 5; grid-row: 2; }
  #linenHeader .readiness-header.pgh > .pgh-nav--tail { grid-column: 4; grid-row: 1; align-self: end; }
  #linenHeader .readiness-header.pgh .pgh-acts { grid-column: 3 / 5; grid-row: 2; justify-content: end; }
  #linenHeader .readiness-header.pgh > .pgh-nav:not(.pgh-nav--tail) { grid-column: 1 / 3; grid-row: 2; max-width: 16rem; }
}
@media (max-width: 1099px) {
  .readiness-header.pgh { grid-template-columns: minmax(0, 1fr); }
  .readiness-header.pgh .pgh-titles { order: 0; }
  .readiness-header.pgh .pgh-tiles { order: 1; }
  .readiness-header.pgh .pgh-scope { order: 2; }
  .readiness-header.pgh > .pgh-nav:not(.pgh-nav--tail) { order: 3; display: flex; }
  .readiness-header.pgh > .pgh-tabs { order: 4; }
  .readiness-header.pgh > .pgh-nav--tail { order: 5; }
  .readiness-header.pgh .pgh-acts { order: 6; justify-content: end; }
  #linenHeader .readiness-header.pgh { grid-template-columns: minmax(0, 1fr) auto; }
  #linenHeader .readiness-header.pgh :is(.pgh-titles, .pgh-tiles, .pgh-acts), #linenHeader .readiness-header.pgh > .pgh-nav:not(.pgh-nav--tail) { grid-column: 1 / -1; }
  #linenHeader .readiness-header.pgh .pgh-scope { grid-column: 1; }
  #linenHeader .readiness-header.pgh > .pgh-nav--tail { grid-column: 2; order: 2; align-self: end; }
}
@media (max-width: 640px) {
  .readiness-header.pgh { padding: var(--s-4); }
  .readiness-header.pgh .pgh-tile { gap: var(--s-2); padding: var(--s-3) var(--s-2); }
  .readiness-header.pgh .pgh-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .readiness-header.pgh .pgh-tab { font-size: var(--t-sub); }
  .readiness-header.pgh .pgh-acts { flex-wrap: wrap; }
}

  :root {
    --navy: #384a61;        /* deep navy — header, primary text accents */
    --navy-dark: #242b42;   /* darker navy for hovers */
    --gold: #c09267;        /* warm gold accent */
    --gold-dark: #8c6145;   /* gold hover */
    --ink: #1a1a1a;
    --muted: #707373;
    --line: #e7dfcf;        /* fetch-145 (audit №2): ONE hairline — the brand-warm one wins */
    --bg: #f0e8e0;          /* warm off-white background */
    /* ---- fetch-145: token layer from Brutal Audit №2 §3. New code references these;
       old literals get swept opportunistically per screen touched. ---- */
    /* fetch-794: the separator below was a COMMA until v5.394, which made this ONE declaration —
       --t-mid took the value "13px , --t-sub: 12px" (not a valid length) and --t-sub was never
       defined at all. 216 rules across portal.css/index.html/timesheets.html/staff.html asked for
       var(--t-sub) and silently inherited their parent's size for 44 builds. Regression from
       fetch-704, which added --t-mid; before that this line was correct. Keep each declaration
       semicolon-terminated and keep comments OUT of the middle of one. */
    --t-display: 27px; --t-title: 22px; --t-section: 17px; --t-body: 14px;
    --t-mid: 13px; /* fetch-704 (Amanda #2): the half-step where a 12px label and a 14px option meet */
    --t-sub: 12px; --t-label: 11px; /* floor: 10.5px */
    /* fetch-1196: the figure a page is ABOUT. The Labor Forecast's largest number was smaller than the caps label over it
       (1.09 : 1); against --t-label this is 2.9 : 1. Two structural rules beside it, as color-mix on tokens - --line is
       1.3 : 1 on white and --hair 1.2 : 1, and neither reads as a line under a table head. */
    --t-figure: 2rem;
    --rule: color-mix(in srgb, var(--brand-blue-traditional) 30%, var(--paper));
    --rule-soft: color-mix(in srgb, var(--brand-blue-traditional) 14%, var(--paper));
    --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px;
    --r-s: 6px; --r-m: 10px; --r-l: 14px;
    --hair: #f0ece4; --wash: #faf8f4;
    --paper: #ffffff;       /* fetch-644: the one white. Panels that must read as "a form" sitting on a --wash card. */
    --pipe-orange: #d97706; /* fetch-400 (Amanda): Hold=orange on calendar/pipeline (hex moved from .st-hold border — ratchet-neutral) */
    --ok-bg: #dcfce7; --ok-fg: #166534; --warn-bg: #fef3c7; --warn-fg: #92400e;
    --bad-bg: #fee2e2; --bad-fg: #991b1b; --info-bg: #dbeafe; --info-fg: #1e40af;
    --mute-bg: #eef1f5; --mute-fg: #475569;
    --w-narrow: 1100px; --w-mid: 1440px; --w-wide: 1900px;
    /* ---- fetch-284 (UI audit Phase 1): brand-semantic aliases over the raw tokens above.
       Additive — nothing is restyled; new/migrated code references these names so intent is
       legible and a future palette change happens in one place. Raw --navy/--gold stay valid. ---- */
    --brand-blue-traditional: #384a61; --brand-blue-deep: #242b42;
    --brand-gold-light: #f5c48a; --brand-gold-dark: #8c6145; --brand-gold-mid: #c09267;
    --brand-pink: #f0e8e0; --brand-stone: #707373;
    --pipe-blue: #2563eb; --pipe-purple: #7c3aed; /* fetch-425: pipeline stage colors tokenized (match cal-chip Tentative/Definite) */
    --surface-nav: var(--brand-blue-traditional); --surface-nav-strong: var(--brand-blue-deep);
    --text-heading: var(--brand-blue-deep); --action-primary: var(--brand-blue-traditional);
    --focus-ring: #b57943; /* gold-forward, meets contrast on both pink page + white cards */
  --to-taken: var(--brand-blue-traditional); --to-booked: var(--muted); --to-left: var(--hair); /* fetch-1312: the balance's bar is progressHTML, which draws taken / booked / left in exactly these three tokens - the key's swatches ride these aliases, so retune the meter and the aliases together or the key stops naming the bar */
  /* fetch-673: time-off lifecycle. Built from existing tokens on purpose — a new
     hex here is a new literal to sweep later. Deliberately NOT the ok/warn/bad ramp:
     taken/booked/left are lifecycle, not status. */
    /* fetch-496: --surface-card was REFERENCED 13 times and never DEFINED — every one of
       those rules has silently been running on its fallback since fetch-284, so a palette
       change would have missed all 13 card surfaces. Defining it costs one raw colour,
       and the stray fallback on .client-card below is dropped in the same change, so the
       debt ratchet nets zero. (The ratchet counts comment text too — it counted the
       example that used to sit in this sentence, which is how I found that out.) */
    --surface-card: #fff;
    --control-height-sm: 32px; --control-height-md: 40px; --control-height-touch: 44px;
    --control-height-icon: 36px; /* fetch-1289: the icon button on a desktop (a phone takes --control-height-touch) */
  }
  /* ---- fetch-284: GLOBAL KEYBOARD FOCUS (audit's most urgent a11y gap — the app had no
     :focus-visible system; only mouse users were served). :focus-visible fires for keyboard/AT
     navigation but NOT mouse clicks, so it adds a clear ring for keyboard users without putting
     outlines on every clicked button. Covers real controls + the many clickable containers. ---- */
  :focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 3px; }
  a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible, [data-workspace]:focus-visible, [data-tab]:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
  .cmd-input:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; } /* command palette input: inset so the ring stays inside the modal edge */
  /* ---- fetch-284: opt-in primitives — the common inline recipes as named classes.
     Pages adopt them as they're touched; nothing legacy is forced to change. ---- */
  .notice { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-m); font-size: 13px; border-left: 3px solid var(--mute-fg); background: var(--wash); }
  .notice--ok { background: var(--ok-bg); color: var(--ok-fg); border-left-color: var(--ok-fg); }
  .notice--warn { background: var(--warn-bg); color: var(--warn-fg); border-left-color: var(--warn-fg); }
  .notice--bad { background: var(--bad-bg); color: var(--bad-fg); border-left-color: var(--bad-fg); }
  .notice--info { background: var(--info-bg); color: var(--info-fg); border-left-color: var(--info-fg); }

  /* ---- fetch-673: THE TIME-OFF BALANCE STRIP. One primitive, used wherever a
     time-off decision is made. Taken / booked / left are LIFECYCLE states, not
     status, so they get their own three colours and never the ok/warn/bad ramp —
     and every one is paired with a number, so the bar is a summary and never the
     record. `--` means NOT TRACKED, which is not zero: vacation is tracked for a
     list of people, and an allowance row is what puts someone on it. ---- */
  .tob { margin-top: var(--s-2); padding-top: var(--s-2); border-top: 1px solid var(--hair); }
  .tob-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-2); margin-bottom: var(--s-1); }
  .tob-head b { font-size: var(--t-label); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
  .tob-head em { font-style: normal; font-size: var(--t-sub); font-weight: 650; color: var(--navy); }
  .tob > .pg { margin-top: 0; } /* fetch-1312: the balance is progressHTML now; the strip's own padding spaces it */
  .tob-key { display: flex; gap: var(--s-3); margin-top: var(--s-1); flex-wrap: wrap; }
  .tob-key span { display: flex; align-items: center; gap: var(--s-1); font-size: var(--t-sub); color: var(--navy); }
  .tob-key i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
  .tob-key .t { background: var(--to-taken); }
  .tob-key .b { background: var(--to-booked); }
  .tob-key .l { background: var(--to-left); border: 1px solid var(--line); }
  .tob-after { margin: var(--s-1) 0 0; font-size: var(--t-sub); line-height: 1.45; color: var(--navy); }
  /* ---- fetch-675 · the allowance screen. Same three-colour vocabulary as .tob
     above, deliberately: this is the screen where the number is SET and that is
     the screen where the number is READ, and two palettes for one fact would
     teach people the wrong thing. ---- */
  .toa-t { width: 100%; border-collapse: collapse; }
  .toa-t th { text-align: left; font-size: var(--t-label); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: var(--s-1) var(--s-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
  .toa-t td { padding: var(--s-2); border-bottom: 1px solid var(--hair); font-size: var(--t-sub); color: var(--navy); vertical-align: middle; }
  .toa-t tr:last-child td { border-bottom: 0; }
  .toa-nm { font-weight: 650; }
  .toa-sub { display: block; color: var(--muted); font-size: var(--t-sub); overflow-wrap: anywhere; }
  .toa-n { font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; }
  .toa-left-ok { color: var(--ok-fg); }
  .toa-left-warn { color: var(--warn-fg); }
  .toa-left-bad { color: var(--bad-fg); }
  .toa-unset { color: var(--warn-fg); font-weight: 650; }
  .toa-mini { display: block; width: 92px; } /* fetch-1312: holds the one meter's drawing (progressHTML o.bare) */
  .toa-mini .dg-meter { margin-top: 0; }
  /* fetch-1336: HR's review flag, her listed dates, and the edit form's check box */
  .toa-flag { display: block; margin-top: var(--s-1); color: var(--warn-fg); font-size: var(--t-sub); font-weight: 650; overflow-wrap: anywhere; }
  .toa-dates { margin-top: var(--s-1); font-size: var(--t-sub); color: var(--muted); }
  .toa-dates summary { cursor: pointer; }
  .toa-date { display: inline-block; margin: var(--s-1) var(--s-1) 0 0; padding: 0 var(--s-1); border: 1px solid var(--line); border-radius: var(--r-s); color: var(--navy); font-variant-numeric: tabular-nums; }
  .toa-date-past { color: var(--muted); border-color: var(--hair); }
  .toa-chk { display: inline-flex; align-items: center; gap: var(--s-1); font-size: var(--t-sub); color: var(--muted); font-weight: 700; min-height: 36px; }
  .my-toa { margin-bottom: var(--s-3); }
  .my-toa-h { font-weight: 700; margin-bottom: var(--s-2); }
  .my-toa-num { font-size: var(--t-body); margin-bottom: var(--s-1); font-variant-numeric: tabular-nums; }
  .my-toa-num strong { font-size: var(--t-section); }
  .my-toa-up { margin-top: var(--s-1); }
  .toa-empty { padding: var(--s-4) var(--s-2); text-align: center; color: var(--muted); font-size: var(--t-sub); line-height: 1.6; }
  .toa-form { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: flex-end; }
  .toa-f { display: flex; flex-direction: column; gap: var(--s-1); min-width: 128px; }
  .toa-f label { font-size: var(--t-sub); color: var(--muted); font-weight: 700; }
  .toa-wrap { overflow-x: auto; }
  /* ---- fetch-676 · SEVEN COLUMNS DO NOT FIT A PHONE.
     Measured at 390px on v5.326: the name cell ran to 85px (three lines), and BOTH the
     "Left" number and the Edit button sat off the right edge. .toa-wrap does scroll — but
     nothing says so, so the number people open this screen FOR reads as missing rather than
     as scrolled. Under 640px the table stops being a table: one stacked card per person,
     the four numbers as labelled pairs, then the bar, then Edit. Nothing off-screen, and
     the page still never scrolls sideways.
     The <thead> is visually hidden, NOT display:none — screen readers keep the column names.
     The edit row keeps its own rule below, because a colspan means nothing once cells are
     display:block and without it Save/Cancel would land in the wrong place. ---- */
  @media (max-width: 640px) {
    .toa-wrap { overflow-x: visible; }
    .toa-t, .toa-t tbody, .toa-t tr, .toa-t td { display: block; width: 100%; }
    .toa-t thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .toa-t tr { padding: var(--s-3) 0; border-bottom: 1px solid var(--hair); }
    .toa-t tr:last-child { border-bottom: 0; }
    .toa-t td { border-bottom: 0; padding: 0; }
    .toa-t td[data-toal] { display: inline-flex; align-items: baseline; gap: var(--s-1); width: auto; margin: var(--s-2) var(--s-3) 0 0; }
    .toa-t td[data-toal]::before { content: attr(data-toal); font-size: var(--t-label); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
    .toa-nm { font-size: var(--t-body); }
    .toa-mini { width: 100%; margin-top: var(--s-2); }
    .toa-t td:last-child { margin-top: var(--s-2); }
    .toa-t td:last-child .btn { width: 100%; }
    .toa-t td[colspan] { margin-top: var(--s-2); }   /* the edit row: already a block, just space it */
    .toa-t td:empty { display: none; }                /* the spacer cell the edit row emits */
  }
  /* fetch-994: guidance gets its own row; controls cannot squeeze it into a phone column. */
  .toa-head-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "intro intro intro" "year search add"; align-items: end; gap: var(--s-3); margin-bottom: var(--s-3); }
  .toa-intro { grid-area: intro; min-width: 0; }
  .toa-year { grid-area: year; }
  .toa-search { grid-area: search; }
  .toa-head-row > .btn { grid-area: add; }
  .toa-head-row .toa-f { min-width: 0; }
  .toa-head-row .sel { width: 100%; min-width: 0; }
  .toa-head-row :is(.sel, .btn) { min-height: var(--control-height-touch); }
  .toa-hint { font-size: var(--t-sub); line-height: 1.5; }
  .toa-note { margin: var(--s-2) 0 0; font-size: var(--t-sub); }
  #toaUnset { min-height: var(--control-height-touch); margin-top: var(--s-2); }
  .toa-f-wide { flex: 1; min-width: 220px; }
  .toa-f-mid { flex: 1; min-width: 180px; }
  .toa-f-wider { flex: 2; min-width: 200px; }
  @media (max-width: 640px) {
    .toa-head-row { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "intro intro" "year search" "add add"; }
    .card .toa-t td { max-width: none; white-space: normal; }
    .card .toa-t td[data-toal] { white-space: nowrap; }
    .toa-t .btn { min-height: var(--control-height-touch); }
    .toa-nm { overflow-wrap: anywhere; }
    .toa-form { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; }
    .toa-form .toa-f { min-width: 0; }
    .toa-form :is(.sel, .btn) { width: 100%; min-width: 0; min-height: var(--control-height-touch); }
  }
  .tob-after b { font-weight: 650; }
  .tob-over { color: var(--bad-fg); font-weight: 700; }
  .tob .notice { margin: 0; }  /* fetch-673: so the strip needs no inline margin */
  .empty-state { text-align: center; padding: 34px 20px; max-width: 460px; margin: 0 auto; color: var(--muted); }
  .empty-state .es-emoji { font-size: 32px; margin-bottom: 8px; }
  .empty-state .es-title { font-size: 16px; font-weight: 600; color: var(--text-heading); margin-bottom: 5px; }
  .tnum { font-variant-numeric: tabular-nums; } /* money/time/counts — audit typography rec */
  /* ---- fetch-285 (UI audit Phase 2): the shared page header. One place for every list/board
     page's title, context, and primary action — the audit's headline fix ("Calendar has almost
     no page-level identity"; "Insights stacks controls before the main heading"). Rendered in
     the shell so it lands on every eligible page at once; pages with their own hero (Home) or
     record title (details) opt out via the render gate. ---- */
  .page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 2px 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--hair); }
  .page-header .ph-titles { min-width: 0; }
  .page-header .ph-title { font-size: 22px; font-weight: 700; color: var(--text-heading); line-height: 1.15; letter-spacing: -0.01em; margin: 0; } /* fetch-441: now an <h1> — reset the UA margin */
  .page-header .ph-context { font-size: 12.5px; color: var(--text-secondary, #5f6872); margin-top: 3px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
  .page-header .ph-context .ph-dot { color: var(--line); }
  .page-header .ph-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
  @media (max-width: 640px) { .page-header .ph-title { font-size: 19px; } .page-header { margin-bottom: 11px; } }
  /* ---- fetch-288: Clients / CRM view ---- */
  .client-list { display: flex; flex-direction: column; gap: 8px; }
  .client-card { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-card); cursor: pointer; transition: .12s; }
  .client-card:hover { border-color: var(--brand-blue-traditional); box-shadow: 0 4px 14px rgba(36,43,66,.07); }
  .cl-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-nav); color: #fff; font-weight: 700; font-size: 17px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; font-family: 'Cormorant Garamond', Georgia, serif; }
  .cl-name { font-weight: 700; font-size: var(--t-body); color: var(--text-heading); overflow-wrap: anywhere; }
  .cl-detail-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
  #clientTitle { margin: 0; }
  .cl-choice { width: 100%; text-align: left; font: inherit; }
  .cl-choice .cl-line2, .cl-choice .cl-line3 { display: block; }
  /* fetch-1010: explain a contact-only Directory match without adding another card action. */
  .cl-contact-match { display: grid; gap: var(--s-1); min-width: 0; margin-top: var(--s-2); padding-top: var(--s-2); border-top: 1px solid var(--hair); overflow-wrap: anywhere; white-space: normal; font-size: var(--t-sub); line-height: 1.5; }
  .cl-contact-match-value { color: var(--text-heading); font-weight: 600; }
  .cl-contact-match-source { color: var(--muted); }
  @media (max-width: 640px) {
    .client-card { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: start; }
    .client-card.cl-choice { grid-template-columns: minmax(0, 1fr); }
    .client-card .cl-main { overflow-wrap: anywhere; }
    .client-card .cl-right { grid-column: 2; text-align: left; white-space: normal; }
  }
  .cl-event-row { display: flex; width: 100%; min-height: var(--control-height-touch); align-items: center; gap: var(--s-3); padding: var(--s-2) 0; border: 0; border-bottom: 1px solid var(--hair); background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
  .cl-event-row:hover { background: var(--wash); }
  .cl-event-date { flex: 0 0 92px; font-size: var(--t-sub); }
  .cl-event-main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
  .cl-event-meta { display: block; font-size: var(--t-sub); }
  .cl-event-quote { font-size: var(--t-sub); white-space: nowrap; }
  @media (max-width: 640px) {
    .btn[data-clientback], .btn.cl-tl-ev, #clientClearFilters { min-height: var(--control-height-touch); }
    .cl-event-row { flex-wrap: wrap; column-gap: var(--s-2); }
    .cl-event-date { flex-basis: 100%; }
    .cl-event-main { flex-basis: calc(100% - 6rem); }
    .cl-event-quote { margin-left: auto; }
  }
  .card .cl-kpis { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
  /* fetch-915: the client profile - the timeline takes the width, What we know sits beside it; one column under 900px */
  .cl-profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, 19rem); gap: var(--s-3); align-items: start; margin-top: var(--s-3); }
  @media (max-width: 900px) { .cl-profile-grid { grid-template-columns: minmax(0, 1fr); } }
  .cl-tl-item { padding: var(--s-2) 0; border-top: 1px solid var(--hair); }
  .card-kicker + .cl-tl-item { border-top: 0; }
  .cl-tl-ev { margin-left: auto; }
  .cl-kpi { flex: 1 1 90px; min-width: 90px; background: var(--wash); border: 1px solid var(--hair); border-radius: 10px; padding: 10px 12px; text-align: center; }
  .cl-kpi-v { font-size: 19px; font-weight: 700; color: var(--text-heading); }
  .cl-kpi-l { font-size: 11px; color: var(--text-secondary, #5f6872); text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }
  /* fetch-1002: relationship profile — upcoming work first, contacts beside events,
     then a readable communication history. Record scope keeps the list and sales dock intact. */
  .cl-record { min-width: 0; }
  .cl-record .cl-record-header { align-items: flex-start; gap: var(--s-3); margin: 0 0 var(--s-3); padding-bottom: var(--s-3); }
  .cl-record-header .ph-titles { flex: 1 1 18rem; }
  .cl-record .cl-record-header .ph-title { font-size: var(--t-title); line-height: 1.25; overflow-wrap: anywhere; }
  .cl-record .cl-record-header .ph-context { font-size: var(--t-sub); line-height: 1.5; overflow-wrap: anywhere; }
  .cl-record .btn { min-height: var(--control-height-touch); min-width: var(--control-height-touch); max-width: 100%; white-space: normal; font-size: var(--t-sub); line-height: 1.4; }
  .cl-record .cl-section-nav { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-3); margin-bottom: var(--s-4); padding-bottom: var(--s-2); border-bottom: 1px solid var(--line); }
  .cl-record .cl-section-nav button { min-height: var(--control-height-touch); padding: var(--s-2) var(--s-1); border: 0; border-radius: var(--r-s); background: transparent; color: var(--navy); font: inherit; font-size: var(--t-sub); font-weight: 600; cursor: pointer; }
  .cl-record .cl-section-nav button:hover { background: var(--wash); }
  .cl-record .cl-next-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); margin-bottom: var(--s-4); }
  .cl-record .cl-next-card { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-2); min-width: 0; margin: 0; padding: var(--s-4); }
  .cl-record .cl-next-card p { margin: 0; font-size: var(--t-body); line-height: 1.5; overflow-wrap: anywhere; }
  .cl-record .cl-next-card .btn { margin-top: auto; }
  .cl-record .cl-next-card .cl-next-title { color: var(--text-heading); font-size: var(--t-section); font-weight: 650; line-height: 1.4; overflow-wrap: anywhere; }
  .cl-record .cl-next-card .cl-next-meta { color: var(--muted); font-size: var(--t-sub); line-height: 1.5; font-variant-numeric: tabular-nums; }
  .cl-record .cl-record-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, 22rem); grid-template-areas: "events contacts" "activity facts"; gap: var(--s-4); align-items: start; }
  .cl-record-layout > .card { min-width: 0; margin: 0; padding: var(--s-5); }
  .cl-record .cl-events { grid-area: events; }
  .cl-record .cl-contacts { grid-area: contacts; }
  .cl-record .cl-timeline { grid-area: activity; }
  .cl-record .cl-facts { grid-area: facts; }
  .cl-record section[id] { scroll-margin-top: var(--s-5); }
  .cl-record .cl-section-title { margin: 0; color: var(--text-heading); font: 650 var(--t-section)/1.35 Inter, sans-serif; text-transform: none; letter-spacing: normal; overflow-wrap: anywhere; }
  .cl-record .cl-section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s-1) var(--s-3); margin-bottom: var(--s-3); }
  .cl-record .cl-section-head > :not(h2) { color: var(--muted); font-size: var(--t-sub); line-height: 1.5; font-variant-numeric: tabular-nums; }
  .cl-record .cl-event-group + .cl-event-group { margin-top: var(--s-5); }
  .cl-record .cl-event-group h3 { margin: 0 0 var(--s-2); color: var(--text-heading); font: 600 var(--t-body)/1.5 Inter, sans-serif; }
  .cl-record .cl-event-row { padding: var(--s-3) var(--s-1); border-radius: var(--r-s); font-size: var(--t-body); line-height: 1.5; }
  .cl-record .cl-event-row:last-child { border-bottom: 0; }
  .cl-record .cl-event-date, .cl-record .cl-event-quote { font-variant-numeric: tabular-nums; }
  .cl-record .cl-event-meta { margin-top: var(--s-1); line-height: 1.5; }
  .cl-record .cl-quote-note { display: block; margin: var(--s-3) 0 0; color: var(--muted); font-size: var(--t-sub); line-height: 1.5; }
  .cl-record .cl-detail-grid { gap: 0; }
  .cl-record .cl-contact { min-width: 0; padding: var(--s-4) 0; border-top: 1px solid var(--hair); overflow-wrap: anywhere; }
  .cl-record .cl-contact:last-child { padding-bottom: 0; }
  .cl-record .cl-contact > strong { display: block; color: var(--text-heading); font-size: var(--t-body); line-height: 1.5; }
  .cl-record .cl-contact-lines { display: grid; gap: var(--s-1); margin-top: var(--s-1); color: var(--muted); font-size: var(--t-sub); line-height: 1.6; }
  .cl-record .cl-contact-lines p { margin: 0; }
  .cl-record .cl-contact-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
  .cl-record .cl-contact-actions a { display: inline-flex; justify-content: center; align-items: center; text-decoration: none; }
  .cl-record .cl-contact-source { display: block; margin-top: var(--s-2); text-align: left; overflow-wrap: anywhere; }
  .cl-record .cl-activity-filters { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: var(--s-3); align-items: end; margin-bottom: var(--s-4); }
  .cl-record .cl-filter-field, .cl-portal-invite--page .cl-filter-field, .pdx-draft .cl-filter-field { display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; color: var(--text-heading); font-size: var(--t-sub); font-weight: 600; line-height: 1.5; }
  .cl-record .cl-filter-field :is(input, select), .cl-portal-invite--page .cl-filter-field :is(input, select), .pdx-draft .cl-filter-field :is(input, select) { width: 100%; min-width: 0; min-height: var(--control-height-touch); height: auto; padding: var(--s-2); border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface-card); color: var(--ink); font: inherit; font-size: var(--t-body); font-weight: 400; }
  .cl-record .cl-tl-item { padding: var(--s-4) 0; }
  .cl-record .cl-tl-item .row { flex-wrap: wrap; align-items: flex-start; gap: var(--s-2); }
  .cl-record .cl-sum { font-size: var(--t-body); line-height: 1.6; overflow-wrap: anywhere; }
  .cl-record .cl-activity-meta { display: block; margin: var(--s-1) 0 0; color: var(--muted); font-size: var(--t-sub); line-height: 1.5; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
  .cl-record .cl-activity-notes { margin: var(--s-2) 0 0; font-size: var(--t-body); line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
  /* fetch-1008: capture outreach beside its relationship history. */
  .cl-record #clientOutreachOpen { color: var(--action-primary); }
  .cl-record .cl-outreach-form { margin: var(--s-3) 0 var(--s-4); padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--wash); }
  .cl-record .cl-outreach-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
  .cl-record .cl-outreach-fields:has(#clientOutreachDate) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cl-record .cl-outreach-note { grid-column: 1 / -1; }
  .cl-record .cl-outreach-form textarea { width: 100%; min-width: 0; min-height: 7rem; padding: var(--s-2); border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface-card); color: var(--ink); font: inherit; font-size: var(--t-body); font-weight: 400; line-height: 1.5; resize: vertical; }
  .cl-record #clientOutreachEffect { margin: var(--s-3) 0; line-height: 1.6; overflow-wrap: anywhere; }
  .cl-record #clientOutreachError { margin: var(--s-3) 0; overflow-wrap: anywhere; }
  .cl-record .cl-outreach-actions, .cl-portal-invite--page .cl-outreach-actions, .pdx-draft .cl-outreach-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
  .cl-record .cl-tl-ev { flex: 0 1 auto; overflow-wrap: anywhere; }
  .cl-record .cl-section-footer { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--hair); }
  /* fetch-1096: the Customer portal card on a client profile - the client record, its event links and its logins */
  .cl-record .cl-portal { margin: 0 0 var(--s-4); padding: var(--s-5); }
  .cl-portal-record + .cl-portal-record { margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--line); }
  .cl-portal-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s-1) var(--s-3); }
  .cl-portal-head strong { display: block; color: var(--text-heading); font-size: var(--t-body); line-height: 1.5; }
  .cl-portal-h { margin: var(--s-4) 0 var(--s-2); color: var(--text-heading); font-size: var(--t-sub); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
  .cl-portal-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); padding: var(--s-2) 0; border-top: 1px solid var(--hair); }
  .cl-portal-main { display: grid; flex: 1 1 14rem; gap: var(--s-1); min-width: 0; overflow-wrap: anywhere; }
  .cl-portal-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
  .cl-portal .btn { min-height: var(--control-height-touch); }
  .cl-portal-link, .cl-portal-invite, .cl-portal-close { display: grid; gap: var(--s-3); margin-top: var(--s-3); padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--wash); }
  .cl-portal-close { flex-basis: 100%; }
  .cl-portal-consequence { margin: 0; color: var(--ink); font-size: var(--t-body); line-height: 1.5; }
  .cl-portal-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: var(--s-3); }
  @media (max-width: 640px) {
    .cl-record .cl-portal { padding: var(--s-4); }
    .cl-portal-fields { grid-template-columns: minmax(0, 1fr); }
    .cl-portal-actions .btn, .cl-portal-row > .btn, .cl-portal .cl-outreach-actions .btn { flex: 1 1 8rem; }
    .cl-docs .cl-portal-actions:has(.btn + .btn) { flex-basis: 100%; }   /* fetch-1154: two presses take their own line, side by side, instead of stacking in the sliver beside the badge */
  }
  @media print {
    .cl-record .cl-portal-link, .cl-record .cl-portal-invite, .cl-record .cl-portal-close, .cl-record .cl-portal .btn { display: none !important; }
  }
  .cl-record .pdx-prop { padding: var(--s-3) 0; }
  .cl-record .pdx-prop-l { font-size: var(--t-sub); line-height: 1.5; text-transform: none; letter-spacing: normal; }
  .cl-record .pdx-prop-v { margin-top: var(--s-1); font-size: var(--t-body); line-height: 1.5; font-variant-numeric: tabular-nums; }
  .cl-record .empty-state { width: 100%; padding: var(--s-4) var(--s-2); font-size: var(--t-sub); line-height: 1.6; }
  .cl-record .empty-state .es-title { font-size: var(--t-body); }
  @media (max-width: 1024px) {
    .cl-record .cl-record-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "events" "contacts" "activity" "facts"; }
  }
  @media (max-width: 640px) {
    .cl-record .cl-record-header { flex-direction: column; }
    .cl-record-header .ph-titles { flex-basis: auto; width: 100%; }
    .cl-record .cl-section-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-1); }
    .cl-record .cl-section-nav button { text-align: left; }
    .cl-record .cl-next-grid { grid-template-columns: minmax(0, 1fr); }
    .cl-record-layout > .card { padding: var(--s-4); }
    .cl-record .cl-activity-filters { grid-template-columns: minmax(0, 1fr); }
    .cl-record .cl-filter-field :is(input, select) { font-size: max(var(--t-body), 1rem); }
    .cl-record .cl-outreach-fields:has(#clientOutreachDate) { grid-template-columns: minmax(0, 1fr); }
    .cl-record .cl-outreach-form textarea { font-size: max(var(--t-body), 1rem); }
    .cl-record .cl-outreach-actions .btn { flex: 1 1 7rem; }
    .cl-record .cl-tl-ev { margin-left: 0; }
    .cl-record .cl-contact-actions .btn { flex: 1 1 5rem; }
    .cl-record .cl-event-main { flex-basis: 100%; }
    .cl-record .cl-event-quote { margin-left: 0; }
    .cl-record .cl-section-footer .btn { flex: 1 1 10rem; }
  }
  @media print {
    .cl-record .cl-section-nav, .cl-record .cl-activity-filters, .cl-record .cl-section-footer, .cl-record-header .ph-actions, .cl-record .cl-contact-actions { display: none !important; }
    .cl-record .cl-outreach-form, .cl-record #clientOutreachOpen, .cl-record #clientOutreachState button { display: none !important; }
    .cl-record .cl-next-grid, .cl-record .cl-record-layout { display: block; }
    .cl-record .cl-next-card, .cl-record-layout > .card { margin-bottom: var(--s-4); padding: var(--s-3); box-shadow: none; }
    .cl-record .cl-next-card, .cl-record .cl-contact, .cl-record .cl-tl-item, .cl-record .cl-event-row, .cl-record .pdx-prop { break-inside: avoid; }
    .cl-record .cl-section-title, .cl-record .cl-event-group h3 { break-after: avoid; }
  }
  * { box-sizing: border-box; }
  body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; margin: 0; background: var(--bg); color: var(--ink); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; } /* fetch-454 (Jacki's phone screenshot): iOS Safari font-boosting inflated table text into overlapping chaos — q.html already had this guard, the portal didn't */
  /* fetch-818 (page-header Phase 1): form controls do not inherit font-family — that is the UA
     stylesheet, not a bug here — and .btn never set one, so every button, input, select and
     textarea in the portal rendered in the browser's default UI font while the body text beside
     it was Inter. Eighteen individual controls in this file already carry `font-family: inherit`
     as one-off hand-fixes; this is the reset that made all of them unnecessary. Element-level
     specificity, declared early, so every existing class rule still wins. */
  button, input, select, textarea, optgroup { font-family: inherit; }

  .wrap { max-width: none; margin: 0 auto; padding: 0 22px 60px; } /* fetch-139: full-screen like Reserve — was capped at 900px */
  @media (min-width: 2000px) { .wrap { max-width: var(--w-wide); } } /* don't go silly on ultrawides */
  .wrap.w-narrow { max-width: var(--w-narrow); } /* fetch-140: reading/form pages keep a comfortable centered column */
  .wrap.w-mid { max-width: var(--w-mid); } /* fetch-145 (audit fix №3): documents-with-chrome — event detail, BEO editor, prep, invoices */
  .brandbar { background: #242b42; margin: 0 -22px 0; padding: 8px 20px; display: flex; align-items: center; gap: 12px; border-bottom: 3px solid transparent; border-image: linear-gradient(90deg, #f5c48a, #8c6145) 1; }
  .brandlogo { height: 34px; width: auto; display: block; } /* fetch-200: real logo in the brandbar · fetch-491: 42→34, the bar earns its height by carrying the workspace now */
  /* fetch-491 (Jack): "the Crystal brand Bar is taking up too much space by itself -
     the department drop down tab has room to live in there as well". Measured at 390px:
     the bar was 72.7px carrying a 42px logo and a logout button, and its content already
     ran 356px wide in a 350px box — so the chip only fits if the mark gives up room. */
  .ws-slot { display: flex; align-items: center; min-width: 0; }
  .wordmark { display: flex; flex-direction: column; line-height: 1; }
  .wm-crystal { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 500; font-size: 27px; letter-spacing: 7px; background: linear-gradient(100deg, #f5c48a 10%, #8c6145 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .wm-sub { font-size: 8.5px; letter-spacing: 4.2px; color: #fff; margin: 3px 0 0 2px; font-weight: 600; }
  /* fetch-514 — THE ACCOUNT MENU (brand bar). Gold as jewelry, not paint.
     Signature Gold (mid) as a FILL on the deep-blue bar reads brown — mid-gold and deep blue sit
     too close in luminance. The bar's own bottom border already solves this: it runs Signature
     Gold light → dark. So the account control uses the LIGHT end as a hairline + text, which is
     unmistakably gold on navy, and keeps Log out from being the loudest thing in the header. */
  .acct { position: relative; display: inline-flex; }
  .brandbar .acct-btn { background: transparent; border: 1px solid var(--brand-gold-mid); color: var(--brand-gold-light); font-weight: 700; letter-spacing: .04em; display: inline-flex; align-items: center; gap: 6px; min-height: var(--control-height-sm); }
  .brandbar .acct-btn:hover { background: rgba(245,196,138,.12); border-color: var(--brand-gold-light); color: var(--brand-gold-light); }
  .brandbar .acct-btn[aria-expanded="true"] { background: rgba(245,196,138,.16); border-color: var(--brand-gold-light); }
  .acct-caret { font-size: var(--t-sub); opacity: .75; }
  .acct-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; min-width: 232px; background: var(--surface-card, White); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: 0 10px 28px rgba(36,43,66,.22); padding: var(--s-1); }
  .acct-who { padding: 8px 10px 6px; font-size: var(--t-sub); color: var(--muted); overflow-wrap: anywhere; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
  .acct-item { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 10px; border-radius: 8px; font: inherit; color: var(--ink); cursor: pointer; min-height: var(--control-height-md); }
  .acct-item:hover { background: var(--wash); }
  .acct-sep { height: 1px; background: var(--line); margin: 4px 2px; }
  .acct-out { color: var(--bad-fg); font-weight: 600; }
  /* fetch-515 — PHONE: the tab row folds into the menu; the chip becomes ☰.
     Both glyphs are always in the DOM and CSS picks one, so rotating the phone needs no
     re-render. Desktop is untouched: tab row visible, chip shows initials, and the menu's
     tab section is hidden (it is still rendered, just not shown). */
  /* fetch-516 (Jack): "my desktop view still has the initials as the drop down tab - i want the
     3 lines there". ☰ everywhere — one control, one meaning, on every screen size. */
  .acct-burger { display: inline-block; font-size: var(--t-section); line-height: 1; }
  .acct-init { display: none; }
  .acct-sec { padding: 6px 10px 4px; font-size: var(--t-sub); font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
  .acct-tab { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
  .acct-tab.on { font-weight: 700; background: var(--wash); }
  .acct-check { color: var(--brand-gold-dark); font-weight: 700; }
  #acctTabs { display: none; }
  @media (max-width: 640px) {
    #tabSlot { display: none; }          /* the row folds away — 44px back on every screen */
    #acctTabs { display: block; }
    .acct-menu { min-width: 244px; max-height: 74vh; overflow-y: auto; }
  }
  @media (min-width: 641px) and (max-width: 900px) { .acct { display: none; } } /* fetch-936: in the tablet band the tab row is on screen and the bottom bar holds the account rows, so the ☰ would open an empty card */
  .brandbar .titles .tagline { color: #c8d4e4; font-size: 10px; letter-spacing: 2.6px; text-transform: uppercase; margin-left: 6px; }
  .brandbar .titles .wm-diamond { background: linear-gradient(100deg, #f5c48a, #8c6145); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 9px; }
  @media (max-width: 560px) { .brandbar .titles { display: none; } }
  /* v1.8 (Jack): loans on the phone — rows wrap instead of jamming, buttons get real tap targets */
  @media (max-width: 640px) {
    .loan-card .row { flex-wrap: wrap; }
    .loan-card .row > div:last-child { justify-content: flex-start; width: 100%; }
    .loan-card .btn { padding: 8px 12px; }
  }
  /* ---- v1.9 (Jack): PHONE HARDENING PASS -----------------------------------------------
     Global net against unwrapped text + sideways scroll on small screens. Desktop untouched
     (everything lives behind the max-width guard). The page-by-page polish list is in the
     PHONE TARGETS project doc — Jack walks each page on his phone, we fix what the net misses. */
  @media (max-width: 640px) {
    html, body { overflow-x: hidden; }
    .row { flex-wrap: wrap; }
    .row > div, .grid > div, .brief-card > *, .attn-row > div { min-width: 0; }
    .card, .brief-card, .attn-block, .brief-item { overflow-wrap: break-word; word-break: break-word; }
    .bi-title, .bi-sub, .be-name, .be-meta, .attn-row strong { overflow-wrap: anywhere; }
    /* v2.0 (Jack's phone screenshots): tables SCROLL SIDEWAYS with readable cells — the v1.9
       word-break was crushing columns into one-letter-per-line stacks and splitting dollar
       amounts mid-number. Cells never break words; the whole table pans instead. */
    .card table, .beo2 table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .card table th, .card table td, .beo2 table th, .beo2 table td { word-break: normal; overflow-wrap: normal; white-space: nowrap; }
    .card table td { max-width: 260px; }
    .rpt-tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .rpt-tbl th, .rpt-tbl td { word-break: normal; overflow-wrap: normal; white-space: nowrap; }
    input, select, textarea { font-size: 16px; } /* stops the iOS zoom-on-focus jump */
    /* fetch-614 (Jack: "Can we eliminate being able to pinch and zoom (or the reason we need to)
       on the phone? It bugs me on almost every page").
       THE RULE ABOVE HAS BEEN LOSING. iOS Safari zooms the page whenever you focus a control
       whose computed font-size is under 16px, and `input` alone is specificity (0,0,1) — every
       component rule that sets its own size beats it. Sixteen of them did, including .field
       input/select/textarea, which is the form primitive used on nearly every screen. So the
       fix was there and it was overridden almost everywhere: tap a field, the page jumps, pinch
       back out. That is the "almost every page" part, and it is not a per-screen bug.
       Three :not()s carry this to (0,3,1), which outranks every class-level rule in the file.
       #pSearch is named because an id beats any number of them. Checkboxes and radios are
       excluded — they have no text and iOS never zooms for them.
       NOT doing user-scalable=no: iOS has ignored it since iOS 10, and taking zoom away from
       someone who needs it is a WCAG failure. Remove the reason, keep the ability.
       tests/phone-zoom.mjs is the gate that keeps this from rotting a seventeenth time. */
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
    select:not([multiple]):not([size]):not([hidden]),
    textarea:not([hidden]):not([disabled]):not([aria-hidden="true"]),
    input#pSearch { font-size: 16px; }
    .grid { grid-template-columns: 1fr; }
    .brief-cols { grid-template-columns: 1fr; }
    .attn-grid { grid-template-columns: 1fr; }
    .spend-cols { grid-template-columns: 1fr; }
    .btn { padding: 8px 12px; } /* real tap targets everywhere */
    img, canvas, svg { max-width: 100%; height: auto; } /* v2.1: asset QR / photos never widen the page */
  }
  /* Cormorant renders lighter/smaller than Georgia — compensate on display elements */
  .brief-hello { font-size: 26px; font-weight: 600; }
  .dash-section-title { font-weight: 700; }
  .qv-title, .wiki-card-title, .be-title { font-weight: 700; }
  .headwrap { padding-top: 18px; }
  h1 { font-size: 20px; margin: 0 0 2px; }
  h1, h2, .empty-state .es-title { text-wrap: balance; } /* fetch-431 (Taste polish): no orphaned words in headings; harmless where nowrap governs */
  .sub { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
  .tabbar { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
  .tabbtn { padding: 8px 14px; font-size: 14px; border: none; background: transparent; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
  .tabbtn.active { color: var(--navy); border-bottom-color: var(--gold); font-weight: 600; }
  /* fetch-497 — the tab row moves into the brand bar and SCROLLS instead of wrapping.
     The wrap was a real bug, not just a preference: between 721px and ~900px the row broke
     onto two lines and a TABLET carried more chrome (160px) than a phone did. nowrap +
     overflow-x kills that at every width, which is why this rule is not inside a query. */
  .tabslot { flex: 1 1 auto; min-width: 0;
    /* a scrolling strip with a hard edge reads as a truncated word, not as "there is more
       this way". The fade is the only affordance a scroller gets on a trackpad, where no
       scrollbar ever appears. Keywords not literals — the debt ratchet counts raw colours. */
    -webkit-mask-image: linear-gradient(to right, Black calc(100% - 22px), transparent);
    mask-image: linear-gradient(to right, Black calc(100% - 22px), transparent); }
  .tabslot .tabbar { border-bottom: 0; margin: 0; gap: 2px;
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tabslot .tabbar::-webkit-scrollbar { display: none; }
  .tabslot .tabbtn { flex: 0 0 auto; white-space: nowrap; color: var(--brand-pink);
    padding: 7px 12px; border-bottom: 2px solid transparent; border-radius: var(--r-s) var(--r-s) 0 0; }
  .tabslot .tabbtn:hover { color: White; background: rgba(255, 255, 255, .07); }
  .tabslot .tabbtn.active { color: White; border-bottom-color: var(--brand-gold-light); font-weight: 600; } /* keyword, not a literal — the debt ratchet counts raw colours and this screen adds none */
  /* phone: the bar wraps and the strip takes its own full-width line — same two rows as
     before, but both navy, and the pink toolbar row above the content is gone. Squeezing
     tabs beside the chip on a 390px screen would leave them ~80px of runway, which is worse
     than the full-width scroller they have today. */
  @media (max-width: 720px) {
    .brandbar { flex-wrap: wrap; row-gap: 2px; padding-bottom: 0; }
    .tabslot { order: 3; flex-basis: 100%; margin: 0 -20px; padding: 0 20px; }
    .tabslot .tabbtn { padding: 12px 14px; min-height: 44px; }
  }
  /* ---- Workspace nav (fetch-68) ---- */
  .wsbar { display: flex; gap: 3px; flex-wrap: wrap; margin: 4px 0 12px; background: var(--navy); border-radius: 11px; padding: 5px; }
  /* fetch-490: the workspace row collapses into a chip on the tab row.
     Measured at a true 390px with the mobile rules live: brandbar 72.7 + wsbar 54
     (+16 margins) + tabbar 45.1 (+16) = 221.8px of chrome above content, 26% of an
     844px phone. The wsbar row is the 70px that leaves. */
  /* fetch-1067: department identity is plain text. Navigation lives in the rail and bottom bar. */
  .wschip { display: inline-flex; align-items: center; min-height: var(--control-height-touch);
    color: var(--brand-pink); font-size: var(--t-section); font-weight: 600; line-height: 1.2;
    white-space: nowrap; }
  .ws-slot { gap: var(--s-2); }
  /* Contextual history remains available on phones and installed apps without a browser Back. */
  .af-backrow { max-width: 640px; margin: 10px auto 0; } /* fetch-550: the recap/QR page's Back-to-portal row (logged-in devices only) */
  .wsback { display: none; flex: 0 0 auto; align-items: center; justify-content: center; gap: var(--s-1);
    min-width: var(--control-height-touch); height: var(--control-height-touch); padding: 0 var(--s-1);
    border: 0; border-radius: var(--r-s); background: transparent;
    color: var(--brand-gold-light); font-family: inherit; cursor: pointer; }
  .wsback:hover, .wsback:active { background: rgba(245, 196, 138, .12); }
  .wsback .wsback-a { font-size: var(--t-section); line-height: 1; }
  .wsback .wsback-t { font-size: var(--t-sub); font-weight: 600; }
  @media (max-width: 359px) { .wsback .wsback-t { display: none; } }
  @media (max-width: 640px) { .wsback { display: inline-flex; } }
  /* fetch-526 — THE INSTALLED APP, AT ANY WIDTH. manifest.json is display:"standalone", so a
     portal added to a home screen or installed on a desktop runs in a window with NO browser
     back button. fetch-526 retires the in-page "← Back to …" buttons at every width on the
     strength of the browser's own control — which is precisely the control a standalone window
     does not have. Hiding them there and showing nothing would strand somebody on a detail page,
     so the chip appears instead. Measured, not assumed: manifest.json line 7. */
  @media (display-mode: standalone) { .wsback { display: inline-flex; } }
  /* ...and the same answer as a CLASS, because the media query alone is not testable here.
     Playwright in this sandbox cannot emulate display-mode (CDP reports false, and headless
     Chromium ignores --app), so a rule that only exists inside that media query can be read
     but never PROVEN. body.is-standalone is set from the same signal in render(), plus
     navigator.standalone for an iOS home-screen portal, and probe526c asserts the chip
     actually appears at 1440px with the class on. Belt and braces, one of which has a gate. */
  body.is-standalone .wsback { display: inline-flex; }
  /* fetch-879 — THE CRYSTAL RAIL (Direction A, ruled 09-01: "A now + B later"). Desktop-only:
     every rule lives behind ≥901px, so phone and tablet pay no inset and keep today's chrome.
     Spec: docs/sidebar-nav/BUILD-TICKET.md · ratified look: docs/sidebar-nav/mockup-A-the-rail.html.
     Grammar: fill/edge-bar = place (this rail), underline = view (the tab row) — never traded. */
  /* fetch-932 — DIRECTION B, THE PHONE/TABLET BOTTOM BAR (Jack's 09-01 "A now + B later", built
     09-04 when retiring Crystal Core made it a blocker: below 901px there was NO department
     switcher except the Crystal chip → Core, measured at zero visible workspace controls across
     six access tiers and every width from 360 to 900px).

     Same markup, two orientations. railHTML() has no width guard, so these buttons already
     shipped to the phone DOM and were hidden by `display:none` alone — this reveals them
     horizontally instead of drawing a second component.

     SEVEN slots is the ceiling: at 320px seven are 45.7px against the 44px touch minimum, eight
     would be 40px, and the desktop's nine would be 43px — already broken. So the three utility
     slots stay hidden here and fold into the .rail-more overflow. */
  .cse-rail { display: none; }
  @media (max-width: 900px) {
    /* GRID, not flex. With `flex: 1 1 0` on all seven the overflow still came out 8px narrower
       than the six departments (measured 38.9 vs 46.9 at 320px) — flex was resolving their
       content differently. `grid-auto-columns: 1fr` makes every track identical no matter how
       many slots the viewer's permissions produce, which is the property that matters here. */
    .cse-rail { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
      display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: stretch;
      gap: 0; padding: 0; background: var(--brand-blue-deep);
      border-top: 1px solid rgba(245, 196, 138, .14);
      padding-bottom: env(safe-area-inset-bottom, 0px); } /* the iOS home indicator sits under the bar, not over the last row of it */
    /* the vertical rail's furniture has no meaning on a horizontal bar */
    .cse-rail .rail-sep, .cse-rail .rail-gap, .cse-rail .rail-tip { display: none; }
    /* .rail-slot, NOT bare [data-workspace]: the overflow's menu items carry data-workspace too
       (so the rail's one binder wires them), and a bare attribute selector hid them as well —
       the menu measured 14px tall with nothing in it. */
    .cse-rail .rail-slot[data-workspace="wiki"], .cse-rail .rail-slot[data-workspace="admin"], .cse-rail .rail-slot[data-workspace="notes"] { display: none; } /* they ride the overflow here */
    /* every rule below restates what the ≥901px block declares, because that block does not
       apply here and a <button> with none of it renders as the browser's grey outset default */
    .cse-rail .rail-slot { position: relative; flex: 1 1 0; min-width: 0; width: auto; height: auto;
      min-height: calc(var(--control-height-touch) + var(--s-3)); padding: var(--s-2) 2px calc(var(--s-2) + 2px); /* fetch-936.1 (Jack, from his phone): a ~58px bar (this is the 56 floor; the 24 + 3 + 12 stack and the paddings set it) - the icon and its word were touching at 44 */
      border: 0; border-radius: 0; appearance: none; -webkit-appearance: none; cursor: pointer;
      background: transparent; color: var(--brand-gold-mid); font: inherit;
      display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; opacity: .72; }
    .cse-rail .rail-slot .ci { width: 24px; height: 24px; } /* fetch-936.1: the glyph grows with the bar (the markup says 22 for the desktop rail) */
    .cse-rail .rail-slot.is-here { opacity: 1; color: var(--brand-gold-light); background: transparent; } /* the edge bar carries "here" — a fill would fight the label */
    .cse-rail .rail-slot.is-here::before { content: ""; position: absolute; background: var(--brand-gold-light);
      left: 22%; right: 22%; top: 0; bottom: auto; width: auto; height: 3px;
      border-radius: 0 0 2px 2px; } /* the place marker rotates with the bar: it hugs the viewport edge, which is now the top of the bar */
    .cse-rail .rail-slot:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; } /* inset — the bar is flush with the viewport edge, an outset ring would clip */
    .cse-rail .rail-lbl { display: block; font-size: var(--t-label); line-height: 1.1;
      max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .cse-rail .rail-dot { position: absolute; top: 4px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 999px;
      background: var(--bad-fg); border: 2px solid var(--brand-blue-deep); } /* status red, never gold — gold means "here" */
    body.has-rail { padding-bottom: calc(var(--control-height-touch) + var(--s-3) + var(--s-4) + env(safe-area-inset-bottom, 0px)); } /* the last row of any page must clear the bar */
    /* the .ver-pill lift lives AFTER the base .ver-pill rule below, not here: probe534 locates the
       pill's z-index by the first occurrence of the selector followed by its opening brace, so a
       has-rail override ahead of the base rule reads as "no z-index" and reddens it. (This comment
       deliberately avoids spelling that exact substring — the first draft of it tripped the probe.) */
    /* the overflow's menu opens UPWARD: .hddm is written for a control with room beneath it,
       and this one has none. Modifier, not a second primitive. */
    .rail-more { position: relative; display: flex; flex: 1 1 0; min-width: 0; }
    .rail-more .rail-slot { flex: 1 1 auto; }
    /* scoped to .rail-more deliberately: the base .hddm sets `top: calc(100% + 4px)` and lives
       LATER in this file, so an equal-specificity .hddm--up would lose on source order. Two
       classes beat one at any position. */
    .rail-more .hddm--up { top: auto; bottom: calc(100% + 4px); right: var(--s-2); left: auto;
      width: min(20rem, calc(100vw - var(--s-4))); max-height: min(72vh, calc(100dvh - var(--phone-nav-height, 80px) - 92px)); overflow: hidden; }
    /* The [hidden] attribute is the menu's closed state, and the browser's own `[hidden] {
       display: none }` is a UA rule that ANY author `display` overrides — .hddm's `display: flex`
       was winning, so the menu rendered open with hidden=true (measured: 148px, visible, on a
       fresh boot). The app has no global [hidden] reset, and adding one to a 2.9 MB file with
       unknown reliance on today's behaviour is not this ticket. Three classes beat one. */
    .rail-more .hddm--up[hidden] { display: none; }
    /* fetch-1070: one bottom Menu, with Notifications beside search in the top bar. */
    #brandActions .bellwrap { display: inline-block; }
    #brandActions .acct { display: none; }
    #brandActions #hdrSearchBtn { min-width: var(--control-height-touch); min-height: var(--control-height-touch); }
    .acct-menu > .acct-who, .acct-menu > #acctSettings, .acct-menu > .acct-sep, .acct-menu > .acct-out, #acctTabs > .acct-sep:last-child { display: none; }
    .acct.acct--empty { display: none; }
    .rail-more .hddm-i { min-height: var(--control-height-touch); display: flex; align-items: center; gap: var(--s-2); color: var(--ink); } /* fetch-936.1: glyph + word (flex, or the gap is inert), and ink - iOS painted every row in its system blue */
    .rail-more .hddm-i.acct-out { color: var(--bad-fg); } /* Log out keeps its red - the ink rule above would out-specify .acct-out */
    .rail-more .hddm { padding: var(--s-1); gap: 2px; min-width: 232px; }
    .rail-more .acct-who { border: 0; margin: 0; padding: var(--s-2) var(--s-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
    #railMenuMain { display: flex; flex-direction: column; min-height: 0; }
    #railMenuMain[hidden], #railAccountPanel[hidden] { display: none; }
    .rail-menu-heading { flex: none; padding: var(--s-3); }
    #railPages { overflow-y: auto; overscroll-behavior: contain; min-height: 0; padding: 0 var(--s-1); scrollbar-width: thin; scrollbar-color: var(--muted) var(--wash); }
    #railPages::-webkit-scrollbar { width: 6px; }
    #railPages::-webkit-scrollbar-track { background: var(--wash); }
    #railPages::-webkit-scrollbar-thumb { background: var(--muted); border-radius: var(--r-s); }
    #railPages .acct-item { min-height: var(--control-height-touch); padding: var(--s-2); font-size: var(--t-body); }
    #railPages .acct-item > span:first-child { flex: 1; }
    .rail-menu-tools { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: center;
      flex: none; border-top: 1px solid var(--line); margin-top: var(--s-2); padding: var(--s-2) var(--s-1); gap: var(--s-1); }
    .rail-more .rail-menu-tools .hddm-i { flex-direction: column; justify-content: center; gap: var(--s-1); padding: var(--s-2) var(--s-1); font-size: var(--t-sub); }
    .rail-more .rail-menu-tools [data-workspace="wiki"] { white-space: normal; overflow-wrap: anywhere; text-align: center; }
    .rail-more .rail-menu-tools .hddm-i .ci { width: 22px; height: 22px; }
    .rail-menu-account { display: flex; justify-content: center; padding: var(--s-1); }
    .rail-more .rail-account-btn { width: var(--control-height-touch); height: var(--control-height-touch); min-height: var(--control-height-touch);
      display: inline-flex; align-items: center; justify-content: center; padding: 0; background: var(--brand-gold-light);
      border: 1px solid var(--brand-gold-mid); border-radius: 50%; color: var(--brand-blue-deep); }
    .rail-more .rail-account-btn:hover { background: var(--brand-gold-mid); }
    .rail-more .rail-account-btn .ci { width: 22px; height: 22px; }
    #railAccountPanel { overflow-y: auto; }
    #railAccountPanel .hddm-i { width: 100%; font-size: var(--t-body); }
    .rail-more .rail-account-back { display: flex; align-items: center; gap: var(--s-2); min-height: var(--control-height-touch); font-size: var(--t-body); }
    .rail-account-back > span { font-size: var(--t-title); }
    .cse-rail .rail-dot { width: 10px; height: 10px; } /* 8px minus the 2px navy border was a 4px core under a thumb; the desktop slot keeps 8px */
  }
  /* fetch-1070: a short phone scrolls the whole Menu, so fixed tools cannot squeeze pages away. */
  @media (max-width: 900px) and (max-height: 600px) {
    .rail-more .hddm--up { overflow-y: auto; }
    #railMenuMain { display: block; }
    #railPages { overflow: visible; }
  }
  @media (min-width: 901px) {
    .rail-more { display: none; } /* desktop lists the utilities as their own slots */
    .cse-rail .rail-lbl { display: none; } /* the tooltip is the label here */
    body.has-rail { padding-left: 60px; } /* body padding, not a .wrap margin — auto-centering and every fixed overlay keep their own math */
    .cse-rail { position: fixed; top: 0; left: 0; bottom: 0; width: 60px; z-index: 30;
      display: flex; flex-direction: column; align-items: center; gap: var(--s-1);
      padding: var(--s-2) 0; background: var(--brand-blue-deep);
      border-right: 1px solid rgba(245, 196, 138, .14); }
    .rail-sep { width: 28px; height: 1px; background: rgba(240, 232, 224, .12); margin: var(--s-1) 0; flex: none; }
    .rail-gap { flex: 1 1 auto; }
    .rail-slot { position: relative; width: 44px; height: 44px; border: 0; border-radius: var(--r-s); flex: none;
      background: transparent; color: var(--brand-gold-mid); opacity: .72; cursor: pointer;
      display: flex; align-items: center; justify-content: center; }
    .rail-slot:hover { opacity: 1; background: rgba(240, 232, 224, .09); }
    .rail-slot.is-here { opacity: 1; color: var(--brand-gold-light); background: rgba(192, 146, 103, .18); }
    .rail-slot.is-here::before { content: ""; position: absolute; left: -8px; top: 12px; bottom: 12px; width: 3px;
      border-radius: 0 2px 2px 0; background: var(--brand-gold-light); } /* the edge bar hugs the viewport edge — place, never an underline */
    .rail-slot:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
    .rail-dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 999px;
      background: var(--bad-fg); border: 2px solid var(--brand-blue-deep); } /* status red, never gold — gold means "here" */
    .rail-tip { position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%);
      background: var(--brand-blue-deep); color: var(--brand-pink); border: 1px solid rgba(245, 196, 138, .25);
      border-radius: var(--r-s); padding: 6px 10px; font-size: var(--t-sub); line-height: 1.4;
      white-space: nowrap; text-align: left; font-variant-numeric: tabular-nums;
      opacity: 0; pointer-events: none; transition: opacity .12s ease; z-index: 320; }
    .rail-tip b { display: block; font-weight: 600; }
    .rail-tip span { color: rgba(240, 232, 224, .72); }
    .rail-slot:hover .rail-tip, .rail-slot:focus-visible .rail-tip { opacity: 1; }
  }
  /* fetch-529: the update pill, moved off inline styles so the ratchet counts down not up */
  .ver-pill { position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 600;
    background: var(--navy); color: var(--wash); border: 1px solid var(--gold); border-radius: 999px;
    padding: 10px 18px; font-size: var(--t-sub); cursor: pointer; box-shadow: 0 8px 24px rgba(36, 43, 66, .35); }
  /* fetch-932: below 901px the phone bar owns the bottom edge, and the pill sat at 18px directly
     under it. Placed after the base rule on purpose (see the note in the rail's phone block);
     `body.has-rail .ver-pill` outranks `.ver-pill` on specificity wherever it sits. */
  @media (max-width: 900px) { body.has-rail .ver-pill { bottom: calc(var(--control-height-touch) + var(--s-3) + var(--s-3) + env(safe-area-inset-bottom, 0px)); } }
  /* fetch-1069: desktop department identity leads the full-width header; the icons start below it.
     The existing observer measures this bar at every width. Reserve its height in the body so
     reading/form width limits stay on .wrap; absolute positioning still scrolls away normally. */
  @media screen and (min-width: 901px) {
    body.has-rail { --desktop-nav-height: max(calc(var(--control-height-touch) + var(--s-4) + 3px), var(--phone-nav-height, 0px));
      padding-top: var(--desktop-nav-height); }
    body.has-rail .brandbar { position: absolute; inset: 0 0 auto; z-index: 40;
      margin: 0; padding-left: var(--s-4); padding-right: var(--s-4); }
    body.has-rail .ws-slot { flex: 0 0 auto; margin-right: var(--s-3); }
    body.has-rail .wschip { order: -1; color: var(--brand-gold-light); font-size: var(--t-title); }
    body.has-rail .wsback { color: var(--brand-pink); }
    body.has-rail .cse-rail { padding-top: calc(var(--desktop-nav-height) + var(--s-2)); }
  }
  /* Short desktop windows scroll the full rail with the page, keeping its utility buttons
     reachable without clipping the labels that extend to the right of the icons. */
  @media screen and (min-width: 901px) and (max-height: 500px) {
    body.has-rail .cse-rail { position: absolute; bottom: auto; min-height: 100dvh; }
  }
  /* fetch-1283 (Jack, 09-24: "i thought i had asked for the whole desktop header to be sticky at one point"): fetch-1059 pinned
     the bar on phones only and fetch-1069 left the desktop bar absolute, so it scrolled away. On a desktop window of normal height
     it is now FIXED where it already sat - the body's padding-top still reserves its measured height, so nothing moves at rest.
     A short window (500px or less, the rail's own threshold above) keeps the old scroll-away bar: 63px of a 400px window is too much.
     --app-sticky-top is that height, and every PAGE-level sticky element below adds it to its own offset so it pins under the bar
     instead of behind it. Sticky heads inside their own scrollers (.sg-scroll, .schd, .calw, .rpt-tbl-wrap) are untouched: their
     top is measured from the scroller, not the window. scroll-padding makes scrollIntoView and #anchors clear the bar too. */
  @media screen and (min-width: 901px) and (min-height: 501px) {
    body.has-rail { --app-sticky-top: var(--desktop-nav-height); }
    /* --desktop-nav-height lives on body, which html cannot inherit from, so the root repeats fetch-1069's formula from :root tokens.
       Exactly the bar's height, no more: a pinned bar that sticks right under it (the event's, Performance's) must sit OUTSIDE the
       padding, or the browser treats its buttons as hidden and scrolls the page to reveal them on focus - which un-pins the bar. */
    html:has(body.has-rail) { scroll-padding-top: max(calc(var(--control-height-touch) + var(--s-4) + 3px), var(--phone-nav-height, 0px)); }
    body.has-rail .brandbar { position: fixed; z-index: 60; }
    body.has-rail .evt-anchors, body.has-rail .evt-workspace-pin, body.has-rail .inv-cat-head, body.has-rail .ros-nav { top: var(--app-sticky-top); }
    body.has-rail .tcw-rail { top: calc(var(--app-sticky-top) + var(--s-2)); }
    body.has-rail .rpt-cat { top: calc(var(--app-sticky-top) + var(--s-2)); }
    body.has-rail .ck-v3-queue, body.has-rail .pdx-list { top: calc(var(--app-sticky-top) + var(--s-3)); }
    body.has-rail .readiness-reference, body.has-rail .readiness-crew { top: calc(var(--app-sticky-top) + var(--s-3)); }
    body.has-rail .readiness-workspace--notebook .readiness-layout--reference > .readiness-reference { top: calc(var(--app-sticky-top) + var(--s-4)); }
    body.has-rail #adminWorkspace .admin-nav { top: calc(var(--app-sticky-top) + var(--s-5)); }
  }
  /* fetch-534: WHAT'S-NEW RELEASE RECEIPT — non-blocking sheet shown once per release per login
     (data + trigger live next to BUILD_CACHE_TAG). No scrim, no focus trap: the page behind
     stays fully usable. Sits UNDER the ver-pill's z-index on purpose — a live newer build
     outranks reading about this one. */
  /* fetch-619 (Jack: "Can the (what's new banner) be a full page that pops up? The small box makes
     it difficult to read when scrolling and will make people click out before reading contents").
     It was a bottom sheet over a live, scrollable dashboard — so it competed with the page behind
     it and read as something to dismiss. A release receipt is read ONCE per deploy; it can afford
     the whole screen for those ten seconds, and taking the screen is what makes it get read.
     Phone: full page. Desktop: a centred dialog on a dimmed backdrop, same idea, not silly-wide.
     The list scrolls INSIDE the page so the header and the Got-it button never leave. */
  .wn-scrim { position: fixed; inset: 0; z-index: 589; background: rgba(20, 33, 61, .46); }
  /* fetch-624: the payroll-only update block. Deliberately NOT dismissable — the one button is
     the only way out, because "remind me later" on a payroll screen is how a punch gets edited
     on a build that cannot close it. */
  .ver-block { position: fixed; inset: 0; z-index: 700; background: rgba(20, 33, 61, .58); display: grid; place-items: center; padding: var(--s-4); }
  .ver-block-card { background: var(--surface-card); border-radius: var(--r-l); border: 1px solid var(--line); max-width: 420px; padding: var(--s-5); text-align: center; box-shadow: 0 18px 48px rgba(36, 43, 66, .3); }
  .ver-block-t { font-size: var(--t-section); font-weight: 700; color: var(--text-heading); }
  .ver-block-p { font-size: var(--t-body); color: var(--muted); margin: var(--s-2) 0 var(--s-4); line-height: 1.5; }
  .ver-block-btn { width: 100%; min-height: var(--control-height-touch); border: 0; border-radius: var(--r-m); background: var(--action-primary); color: var(--surface-card); font: inherit; font-size: var(--t-body); font-weight: 700; cursor: pointer; }
  .ver-block-btn:disabled { opacity: .7; }
  .wn-sheet { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 590;
    width: min(620px, calc(100vw - 20px)); max-height: min(86vh, 780px); display: flex; flex-direction: column;
    background: var(--surface-card); border: 1px solid var(--line);
    border-radius: var(--r-l); box-shadow: 0 18px 48px rgba(36, 43, 66, .28); overflow: hidden; }
  .wn-head { flex: 0 0 auto; display: flex; align-items: baseline; gap: var(--s-2); padding: var(--s-4) var(--s-4) var(--s-3); border-bottom: 1px solid var(--hair); }
  .wn-kicker { font-size: var(--t-label); font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--gold-dark); }
  .wn-title { font-size: var(--t-section); font-weight: 700; color: var(--text-heading); }
  .wn-date { margin-left: auto; font-size: var(--t-sub); color: var(--muted); }
  .wn-list { flex: 1; min-height: 0; overflow: auto; padding: 0 var(--s-4); -webkit-overflow-scrolling: touch; }
  .wn-item { padding: var(--s-3) 0; border-bottom: 1px solid var(--hair); }
  .wn-item:last-child { border-bottom: 0; }
  /* Jack's redline on the first build: pill chips of varying width threw the titles out of
     alignment. The tag is now a small colored LABEL stacked above the title — one text column,
     everything left-aligns. The word itself is the signal, so color is never the only carrier. */
  .wn-tag { display: inline-block; font-size: var(--t-label); font-weight: 700; letter-spacing: .09em; text-transform: uppercase; margin-bottom: 2px; }
  .wn-tag--new { color: var(--ok-fg); }
  .wn-tag--improved { color: var(--info-fg); }
  .wn-tag--fixed { color: var(--mute-fg); }
  .wn-name { font-size: var(--t-body); font-weight: 600; color: var(--ink); }
  .wn-copy { font-size: var(--t-sub); color: var(--muted); line-height: 1.45; margin-top: 2px; }
  .wn-foot { flex: 0 0 auto; display: flex; align-items: center; padding: var(--s-3) var(--s-4); border-top: 1px solid var(--hair); background: var(--wash); }
  .wn-count { font-size: var(--t-sub); color: var(--muted); }
  .wn-done { margin-left: auto; border: 0; border-radius: var(--r-m); min-height: var(--control-height-sm);
    background: var(--action-primary); color: var(--surface-card); font-family: inherit; font-size: var(--t-sub); font-weight: 700;
    padding: 0 var(--s-4); cursor: pointer; }
  .wn-done:hover { background: var(--navy-dark); }
  @media (max-width: 640px) { /* fetch-619: on a phone it IS the page — edge to edge, safe-area aware, nothing behind it to compete with */
    .wn-sheet { left: 0; top: 0; transform: none; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; }
    .wn-head { padding-top: max(var(--s-4), env(safe-area-inset-top)); }
    .wn-foot { padding-bottom: max(var(--s-3), env(safe-area-inset-bottom)); }
    .wn-done { min-height: var(--control-height-touch); font-size: var(--t-body); }
  }
  /* fetch-1067: shared authentication backdrop; department navigation no longer uses a chooser. */
  .core-skybg { position: fixed; inset: 0; background: radial-gradient(circle at 50% 42%, rgba(192,146,103,.16) 0%, rgba(56,74,97,.18) 36%, rgba(0,0,0,0) 68%), var(--brand-blue-deep); z-index: 0; }
  .auth-loading { position: fixed; inset: 0; z-index: 700; background: var(--brand-blue-deep);
    display: grid; place-items: center; color: var(--brand-pink); }
  .auth-loading .core-skybg { position: absolute; }
  .auth-loading-content { position: relative; text-align: center; padding: var(--s-4); }
  .auth-loading-label { margin-top: var(--s-3); font-size: var(--t-body); }
  .core-loginwrap { position: fixed; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--s-4); transition: opacity .45s ease, transform .45s ease; }
  .core-auth-out { opacity: 0; transform: scale(.96); pointer-events: none; }
  .core-login { width: min(92vw, 340px); box-sizing: border-box; background: rgba(240,232,224,.05); border: 1px solid rgba(240,232,224,.16); border-radius: var(--r-l); padding: var(--s-5); text-align: center; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
  .core-login-mark { color: var(--gold); width: 54px; height: 54px; margin: 0 auto; }
  .core-login-mark svg { width: 100%; height: 100%; display: block; }
  .core-login-word { font-family: 'Cormorant Garamond', Georgia, serif; font-size: var(--t-display); font-weight: 700; letter-spacing: .3em; color: var(--brand-pink); margin-top: var(--s-2); }
  .core-login-sub { font-size: var(--t-label); letter-spacing: .3em; color: rgba(240,232,224,.55); margin-bottom: var(--s-4); }
  .core-login .field { text-align: left; }
  .core-login .field label { color: rgba(240,232,224,.65); }
  .core-login input { width: 100%; box-sizing: border-box; background: rgba(240,232,224,.07); border: 1px solid rgba(240,232,224,.22); color: var(--brand-pink); border-radius: var(--r-s); padding: 10px 12px; font-size: var(--t-body); font-family: inherit; }
  .core-login input:focus { outline: 2px solid var(--focus-ring); outline-offset: 1px; border-color: var(--brand-gold-mid); }
  /* Three classes keep generic button hover/mobile rules from repainting the auth action brown. */
  .btn.btn-gold.core-login-btn { width: 100%; min-height: var(--control-height-touch); margin-top: var(--s-4);
    font-size: var(--t-body); background: var(--brand-gold-light); border-color: var(--brand-gold-light);
    color: var(--brand-blue-deep); opacity: 1; }
  .btn.btn-gold.core-login-btn:hover:not(:disabled) { background: var(--brand-gold-mid); border-color: var(--brand-gold-mid); color: var(--brand-blue-deep); }
  .btn.btn-gold.core-login-btn:disabled { cursor: wait; }
  .btn.btn-gold.core-login-btn:focus-visible { outline-color: var(--brand-gold-light); outline-offset: var(--s-1); }

  .core-login-back { width: 100%; margin-top: var(--s-2); background: rgba(240,232,224,.07); color: var(--brand-pink); border-color: rgba(240,232,224,.25); }
  .core-login .err { background: rgba(0,0,0,.25); color: var(--brand-gold-light); border: 1px solid rgba(192,146,103,.5); border-radius: var(--r-s); padding: 8px 10px; margin-bottom: var(--s-3); }
  .core-login--err { animation: coreShake .35s ease; }
  @keyframes coreShake { 0%, 100% { transform: none; } 25% { transform: translateX(-7px); } 55% { transform: translateX(6px); } 80% { transform: translateX(-3px); } }
  .core-login-hint { margin-top: var(--s-4); color: rgba(240,232,224,.45); font-size: var(--t-sub); text-align: center; max-width: 340px; }
  .core-login-forgot { display: block; width: 100%; margin-top: var(--s-3); background: none; border: none; color: rgba(240,232,224,.55); font-size: var(--t-sub); text-align: center; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; } /* fetch-531 */
  .core-login-forgot:hover { color: var(--brand-gold-light); }
  .core-login-note { background: rgba(22,163,74,.14); border: 1px solid rgba(22,163,74,.4); color: rgb(187,247,208); border-radius: 8px; padding: 8px 10px; font-size: var(--t-sub); margin-bottom: var(--s-3); } /* fetch-531 */
  .core-login-para { margin: 6px 0 12px; text-align: center; } /* fetch-531 */
  @media (prefers-reduced-motion: reduce) { .core-loginwrap { transition: none; } .core-login--err { animation: none; } }
  .wsbtn { padding: 9px 17px; font-size: 14px; font-weight: 600; border: none; background: transparent; color: #c8d4e4; cursor: pointer; border-radius: 8px; letter-spacing: .2px; transition: .12s; }
  .wsbtn:hover { color: #fff; background: rgba(255,255,255,.09); }
  .wsbtn.active { color: var(--navy); background: #fff; }
  /* ---- Home briefing ---- */
  .brief-hero { background: linear-gradient(135deg, var(--navy), #4a5f7d); color: #fff; border-radius: 14px; padding: 18px 20px; margin-bottom: 14px; }
  .brief-hello { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 22px; font-weight: 700; margin: 0; }
  .brief-date { color: #c8d4e4; font-size: 13px; margin-top: 2px; }
  .brief-headline { margin-top: 12px; font-size: 15px; line-height: 1.5; color: #eef2f8; }
  .brief-headline .num { color: var(--gold); font-weight: 700; }
  .lens-badge { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); border-radius: var(--r-s); padding: 6px 10px; font-size: var(--t-sub); color: #c8d4e4; } /* fetch-503 */
  .brief-role { margin-left: auto; }
  .brief-role select { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.28); border-radius: 8px; padding: 6px 9px; font-size: 12.5px; font-family: inherit; cursor: pointer; }
  .brief-role select option { color: #1a1a1a; }
  .brief-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 12px; margin-bottom: 14px; }
  .home-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-bottom: 14px; align-items: start; } /* fetch-417: the time layer */
  .home-tier > h2 { font-size: var(--t-label); letter-spacing: .6px; text-transform: uppercase; color: var(--brand-gold-dark); margin: 0 0 8px 2px; height: 18px; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* fixed height — columns align (Jack) */
  .home-tier > h2 .ht-sub { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted); font-size: var(--t-sub); margin-left: 8px; }
  .home-tier .brief-card { margin-bottom: 12px; }
  .home-attn-filter { display: flex; align-items: center; gap: var(--s-2); margin: calc(-1 * var(--s-1)) 0 var(--s-2); }
  .home-attn-filter label { color: var(--muted); font-size: var(--t-sub); font-weight: 600; }
  .home-attn-filter .sel { min-width: 0; flex: 1; }
  /* ---- fetch-538: My Workspace Phase 1a (read-only Operations foundation) ---- */
  .myws-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-4); }
  .myws-title { margin: 0; color: var(--text-heading); font-family: 'Cormorant Garamond', Georgia, serif; font-size: var(--t-title); }
  .myws-sub { margin-top: var(--s-1); color: var(--muted); font-size: var(--t-sub); }
  .myws-chip { flex: 0 0 auto; padding: var(--s-1) var(--s-2); border-radius: var(--r-s); background: var(--mute-bg); color: var(--mute-fg); font-size: var(--t-label); font-weight: 700; }
  /* fetch-620: one compact control where a status pill and a full-size button used to sit. The
     dot is the whole status: gold = this layout is yours, absent = you are on the role default.
     Sized to the small control token so it reads as a tool, not as a call to action — nothing on
     a dashboard should compete with the work for attention. */
  /* .btn.myws-edit-btn, not .myws-edit-btn — .btn is defined LATER in this stylesheet and at the
     same specificity, so the plain class lost the source-order tiebreak and the button kept .btn's
     padding. The whole point of this rule is the size. */
  .btn.myws-edit-btn { flex: 0 0 auto; display: inline-flex; align-items: center; gap: var(--s-1);
    min-height: var(--control-height-sm); padding: 0 var(--s-3); font-size: var(--t-sub); line-height: 1; }
  .myws-edit-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); margin-left: var(--s-1); }
  .myws-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); align-items: start; }
  .myws-lane { min-width: 0; }
  .myws-lane-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-2); min-height: var(--s-5); margin: 0 0 var(--s-2) var(--s-1); }
  .myws-lane-name { color: var(--brand-gold-dark); font-size: var(--t-label); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
  .myws-lane-hint { color: var(--muted); font-size: var(--t-label); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* fetch-620 — WHAT A PHONE READS BEFORE THE FIRST FACT. Counting Jack's screenshot: "My
     Workspace", "Operations · L1", "Saved layout", "Customize", "ACT NOW", "today's exceptions",
     "My Work", "Required", "1 NOW · 8 THIS WEEK" — nine pieces of chrome above one line of work.
     A dashboard is a control surface; on 390px the labels have to earn their line.
     Kept: the lane name (it groups), the workspace/level (it tells you whose queue this is), the
     urgency split (it IS information). Dropped on the phone only: the page title, which repeats
     the workspace chip in the app bar directly above it, and the lane subtitle, which explains a
     heading that is already three plain words. Both stay on the desk, where they cost nothing. */
  @media (max-width: 720px) {
    .myws-head { align-items: center; margin-bottom: var(--s-3); }
    .myws-title { display: none; }
    .myws-sub { margin-top: 0; font-size: var(--t-body); font-weight: 600; color: var(--navy); }
    .myws-lane-hint { display: none; }
    .myws-lane-head { min-height: 0; margin-bottom: var(--s-1); }
    /* a phone still needs a 44px target — smaller is not the goal, QUIETER is: it should read as
       a tool sitting beside the heading, not as the page's call to action */
    .btn.myws-edit-btn { min-height: var(--control-height-touch); }
  }
  .myws-stack { display: flex; flex-direction: column; gap: var(--s-3); }
  .myws-tile { min-width: 0; overflow: hidden; padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface-card); }
  .myws-tile[data-size="compact"] { padding-bottom: var(--s-3); }
  .myws-tile-head { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-2); }
  .myws-tile-icon { display: inline-flex; align-items: center; justify-content: center; width: var(--s-5); height: var(--s-5); border-radius: var(--r-s); background: var(--wash); font-size: var(--t-body); }
  .myws-tile-name { min-width: 0; color: var(--text-heading); font-size: var(--t-body); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .myws-required { margin-left: auto; color: var(--muted); font-size: var(--t-label); }
  /* fetch-1056 (D2) - ONE LINE PER ROW, on every tile on all six dashboards (Jack's rulings 3 and 4: no long text in
     tiles, phone-first at 390px, nothing past the edge at 320px). The title is the only column allowed to shrink, and it
     clips with an ellipsis (min-width: 0 spells out the zero minimum overflow: hidden already gives it). The meta never shrinks - every builder in
     operationsDashboardData keeps it short enough to sit beside a 4.5rem title at 320px - and its max-width is a fence
     for a string no builder should produce: a runaway meta ellipsizes instead of blanking the title or shoving a quick
     action off the card. That matters because .myws-tile clips its overflow and html/body hide sideways overflow on a
     phone, so a row that is too wide scrolls nothing and is simply invisible - no page-width check can see it.
     A tile whose rows carry quick actions reserves the same slot on every row it shows (mywsRows counts it from the rows,
     never the DOM), so the meta column ends at one edge. At 320px the fence leaves a meta 162 / 118 / 82 px with 0 / 1 / 2
     buttons; at 390px 232 / 188 / 152. */
  .myws-row { --myws-title-min: 4.5rem; --myws-acts-w: 0rem; display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); padding: var(--s-2) 0; border-top: 1px solid var(--hair); }
  .myws-row:first-child { border-top: 0; }
  .myws-row-main { flex: 1 1 auto; min-width: 0; color: var(--ink); font-size: var(--t-sub); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .myws-row-meta { flex: 0 0 auto; max-width: calc(100% - var(--myws-title-min) - var(--s-2) - var(--myws-acts-w)); color: var(--muted); font-size: var(--t-label); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .myws-row-meta[data-tone="bad"] { color: var(--bad-fg); }
  .myws-row-meta[data-tone="warn"] { color: var(--warn-fg); }
  .myws-row-meta[data-tone="ok"] { color: var(--ok-fg); }
  .myws-row-meta[data-tone="info"] { color: var(--info-fg); }
  /* fetch-1316: the Readiness row's segment strip (bar.js readinessSegsSVG) sits before its words, on their line */
  .myws-row-meta .rdy-segs { display: inline-block; vertical-align: -2px; margin-right: var(--s-1); }
  .myws-row--jump { cursor: pointer; margin: 0 calc(-1 * var(--s-2)); padding-left: var(--s-2); padding-right: var(--s-2); border-radius: var(--r-s); } /* fetch-542: deep-link rows */
  .myws-row--jump:hover, .myws-row--jump:focus-visible { background: var(--wash); }
  .myws-row--jump .myws-row-main { color: var(--navy); }
  .myws-row-ico { flex: 0 0 auto; display: inline-flex; align-items: center; color: var(--brand-gold-dark); } /* fetch-543 */
  .myws-row-acts { flex: 0 0 auto; display: inline-flex; justify-content: flex-end; gap: var(--s-1); margin-left: var(--s-1); }
  .myws-row--acts1 { --myws-acts-w: calc(var(--control-height-sm) + var(--s-1) + var(--s-2)); }
  .myws-row--acts2 { --myws-acts-w: calc(2 * var(--control-height-sm) + 2 * var(--s-1) + var(--s-2)); }
  .myws-row--acts1 .myws-row-acts { flex-basis: var(--control-height-sm); }
  .myws-row--acts2 .myws-row-acts { flex-basis: calc(2 * var(--control-height-sm) + var(--s-1)); }
  .myws-act { display: inline-flex; align-items: center; justify-content: center; min-width: var(--control-height-sm); min-height: var(--control-height-sm); border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface-card); color: var(--navy); cursor: pointer; }
  .myws-act:hover, .myws-act:focus-visible { background: var(--wash); border-color: var(--gold); }
  /* fetch-544: tile skeleton — loading must never look like a real zero */
  .myws-skel-row { display: flex; justify-content: space-between; gap: var(--s-2); padding: var(--s-2) 0; border-top: 1px solid var(--hair); }
  .myws-skel-row:first-child { border-top: 0; }
  .myws-skel-bar { display: inline-block; height: var(--s-3); flex: 1 1 60%; border-radius: var(--r-s); background: var(--hair); animation: mywsPulse 1.4s ease-in-out infinite; }
  .myws-skel-bar--s { flex: 0 0 20%; animation-delay: .2s; }
  .myws-skel-label { margin-top: var(--s-1); color: var(--muted); font-size: var(--t-label); }
  .myws-err { color: var(--warn-fg); }
  @keyframes mywsPulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
  .myws-metric { padding: var(--s-1) 0; }
  .myws-metric-big { color: var(--text-heading); font-family: 'Cormorant Garamond', Georgia, serif; font-size: var(--t-title); font-weight: 700; line-height: 1; }
  .myws-metric-label, .myws-empty { margin-top: var(--s-1); color: var(--muted); font-size: var(--t-sub); }
  /* fetch-714: praise picker rows on the anon forms */
  .af-pr { grid-column: 1/-1; }
  .af-pr-row { display: flex; gap: var(--s-2); margin-bottom: 6px; }
  .af-pr-row input { flex: 1; }
  .af-pr-note { font-weight: 400; text-transform: none; letter-spacing: 0; }
  .fb-counted { color: var(--ok); }
  .af-warn { margin-top: 10px; text-align: left; }
  /* fetch-1064 (D4): THE ONE DOOR OF A TILE, in its header (mywsDoorHTML). It replaced the .myws-foot footer, which drew only
     when a tile had rows. A 44px target whose negative block margins hand back what it adds past the 24px tile icon, so the
     header is no taller than it was; it reaches into the card right padding the same way. The ring is inset because the
     tile clips its overflow and the top edge of the button sits only 2px inside the card.
     fetch-1058: the old footer ring and the .myws-line one below read var(--focus), which :root never defined (it is
     --focus-ring); an undefined custom property made the outline invalid and keyboard focus drew no ring at all. */
  .myws-door { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: var(--control-height-touch); height: var(--control-height-touch); margin: calc((var(--s-5) - var(--control-height-touch)) / 2) calc(-1 * var(--s-2)) calc((var(--s-5) - var(--control-height-touch)) / 2) auto; padding: 0; border: 0; border-radius: var(--r-s); background: none; color: var(--navy); font-size: var(--t-title); line-height: 1; cursor: pointer; }
  .myws-door:hover { background: var(--wash); color: var(--gold-dark); }
  .myws-door:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
  .myws-split { display: flex; gap: var(--s-1); align-items: baseline; font-size: var(--t-label); font-weight: 700; color: var(--muted); margin-bottom: var(--s-2); letter-spacing: .04em; text-transform: uppercase; }
  .myws-split-now { color: var(--bad-fg); }
  .myws-split-dot { opacity: .5; }
  /* fetch-1055 (D1) — the Action items card groups by urgency rank. The group header REUSES
     .myws-split, the tile's own uppercase micro-label, so the card gains a reading layer without
     gaining a second visual vocabulary; all it adds is the right-aligned count. Scoped to
     .myws-work throughout, so none of this reaches the other 22 tiles that share .myws-row. */
  .myws-grp { justify-content: space-between; margin-top: var(--s-3); }
  .myws-split + .myws-grp { margin-top: 0; } /* the first group sits under the head count, not away from it */
  /* NO LONG TEXT IN A TILE (Jack's ruling 3). The row's prose `sub` is replaced by the kind word, and the kind holds a
     constant 4.5rem column so titles clip against the same edge on every row (Hotjar). fetch-1056 (D2) moved the one-line
     row itself - the clipping title, the meta that never wraps - onto .myws-row for every tile, so the fixed kind column
     is all this card still adds; probe1055 proves it constant. The row jumps to the record, which is where the untruncated
     title lives; the one row class that cannot be opened keeps its own sub instead (below). */
  .myws-work .myws-row-meta { flex: 0 0 4.5rem; }
  /* THE DATE STAYS WHOLE AND THE TITLE CLIPS FIRST (Asana, Todoist) — but only on the row that has
     no door, where the meta is the one place that row's date exists. Clipping it to "duty · due
     to..." would throw away the very fact the row kept its sub for. Every other row's meta is a
     single kind word that fits the column, so this changes nothing for them. */
  .myws-work .myws-row:not(.myws-row--jump) .myws-row-meta { flex: 0 0 auto; max-width: 60%; }
  /* a remainder line: a statement of account, and a 44px door when every item in it opens the
     same place (fetch-710). Never .myws-foot — that class is walked by probe710's nth=0 and this
     tile renders first in the lane, so borrowing it would silently move what that probe clicks. */
  .myws-line { padding: var(--s-2) 0; border-top: 1px solid var(--hair); color: var(--muted); font-size: var(--t-sub); font-variant-numeric: tabular-nums; }
  /* fetch-1066 (D5): Recaps owed's quiet state - the filed count follows the empty sentence as a second statement. The rule a
     remainder line draws above itself sat flush under the sentence and read as an underline, i.e. a link that is not one, so
     after .myws-empty the line drops its rule and its bottom padding and sits one step below. */
  .myws-empty + .myws-line { border-top: 0; padding: var(--s-1) 0 0; }
  .myws-line[data-myws-jump] { display: flex; align-items: center; min-height: var(--control-height-touch); color: var(--navy); font-weight: 600; cursor: pointer; }
  .myws-line[data-myws-jump]:hover { color: var(--gold-dark); text-decoration: underline; }
  .myws-line[data-myws-jump]:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
  /* fetch-540: My Workspace 1b — customize chrome (tokens only, ratchet-neutral) */
  .myws-actions { display: flex; align-items: center; gap: var(--s-2); flex: 0 0 auto; }
  .myws-editnote { color: var(--muted); font-size: var(--t-label); margin: calc(-1 * var(--s-2)) 0 var(--s-3); }
  .myws-tile.is-editable { border-style: dashed; background: var(--wash); }
  .myws-tile-tools { display: flex; align-items: center; gap: var(--s-1); margin-left: auto; }
  .myws-tool--size { gap: var(--s-1); padding: 0 var(--s-2); }
  /* fetch-628: the count that came with Requests when it stopped being a segment */
  .tab-badge { display: inline-block; margin-left: var(--s-1); min-width: 18px; padding: 0 5px; border-radius: 999px;
    background: var(--warn-bg); color: var(--warn-fg); font-size: var(--t-label); font-weight: 700;
    font-variant-numeric: tabular-nums; line-height: 18px; text-align: center; }
  .myws-size { font-size: var(--t-label); font-weight: 700; letter-spacing: .03em; }
  /* fetch-627 (Jack: "A little bit of wrapping problems here"). At 390px the edit header put a
     three-line title beside three buttons and pushed "Save layout" off the right edge, and every
     tile row spent 176px on four 44px controls — so the NAME truncated to "Open mainte…" while
     the buttons had room to spare. The name is the only part that tells you which tile you are
     moving. On a phone the actions get their own full-width row, under the thing they act on. */
  @media (max-width: 720px) {
    .myws-head { flex-direction: column; align-items: stretch; gap: var(--s-2); }
    .myws-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
    .myws-actions .btn { width: 100%; min-height: var(--control-height-touch); }
    .myws-actions .btn-primary { grid-column: 1 / -1; }   /* Save layout gets the full width */
    .myws-tile.is-editable .myws-tile-head { flex-wrap: wrap; }
    /* the icon and the name stay together on the first line — pushing the name to its own row
       left the icon stranded above it, which reads as a rendering fault rather than a layout */
    .myws-tile.is-editable .myws-tile-name { flex: 1 1 auto; white-space: normal; overflow: visible; }
    .myws-tile-tools { flex: 1 1 100%; margin-left: 0; gap: var(--s-2); }
    .myws-tile-tools .myws-tool { flex: 1 1 0; }
    .myws-tile-tools .myws-required { margin-left: auto; align-self: center; }
  }
  .myws-tool { display: inline-flex; align-items: center; justify-content: center; min-width: var(--control-height-touch); min-height: var(--control-height-touch); border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface-card); color: var(--navy); font-size: var(--t-body); cursor: pointer; }
  .myws-tool:disabled { opacity: .35; cursor: default; }
  .myws-tool[data-danger] { color: var(--bad-fg); }
  .myws-addtile { width: 100%; min-height: var(--control-height-touch); border: 1px dashed var(--gold); border-radius: var(--r-m); background: var(--wash); color: var(--gold-dark); font-size: var(--t-sub); font-weight: 700; cursor: pointer; }
  .myws-addtile:disabled { opacity: .5; cursor: default; border-style: solid; }
  .myws-drawer { margin-top: var(--s-2); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface-card); padding: var(--s-2) var(--s-3); }
  .myws-drawer-cat { color: var(--muted); font-size: var(--t-label); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin: var(--s-2) 0 var(--s-1); }
  .myws-drawer-item { display: flex; align-items: center; gap: var(--s-2); width: 100%; min-height: var(--control-height-touch); padding: var(--s-1) var(--s-1); border: 0; border-top: 1px solid var(--hair); background: none; text-align: left; cursor: pointer; color: var(--ink); font-size: var(--t-sub); }
  .myws-drawer-empty { color: var(--muted); font-size: var(--t-sub); padding: var(--s-2) 0; }
  @media (max-width: 900px) { .myws-board { grid-template-columns: 1fr; } .myws-lane { max-width: none; } }
  .bi-snooze { display: none; border: none; background: var(--hair); color: var(--muted); width: 18px; height: 18px; border-radius: 50%; font-size: var(--t-label); line-height: 1; cursor: pointer; flex-shrink: 0; margin-top: 2px; }
  .brief-item:hover .bi-snooze { display: inline-flex; align-items: center; justify-content: center; }
  .bi-snooze:hover { background: var(--bad-bg); color: var(--bad-fg); }
  .attn-more { padding: 8px 2px 0; font-size: var(--t-sub); font-weight: 600; color: var(--muted); cursor: pointer; }
  .be-crew { margin-top: 2px; }
  .brief-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
  .brief-card h3 { margin: 0 0 10px; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 15px; color: var(--navy); display: flex; align-items: center; gap: 8px; }
  .brief-card h3 .cnt { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--gold-dark); background: #f3efe8; border-radius: 20px; padding: 1px 9px; }
  .brief-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f2f1ee; cursor: pointer; }
  .brief-item:last-child { border-bottom: none; }
  .brief-item:hover { background: #faf9f6; }
  .brief-sev { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex: 0 0 auto; }
  .brief-item .bi-title { font-weight: 600; font-size: 13.5px; color: var(--ink); }
  /* fetch-878: .mw-ico retired with the My Work page (fetch-451.2) */
  .brief-item .bi-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
  .brief-empty { color: #9aa3af; font-size: 13px; padding: 6px 0; }
  .brief-evt { border-left: 3px solid var(--vc, var(--gold)); padding: 8px 10px; background: #fcfbf8; border-radius: 6px; margin-bottom: 8px; cursor: pointer; }
  .brief-evt:last-child { margin-bottom: 0; }
  .brief-evt:hover { background: #f7f4ee; }
  .brief-evt .be-name { font-weight: 700; color: var(--navy); font-size: 14px; }
  .brief-evt .be-meta { font-size: 12px; color: var(--muted); margin-top: 1px; }
  .brief-evt .be-flag { font-size: 12px; color: #b91c1c; margin-top: 5px; font-weight: 600; }
  .brief-evt .be-ok { font-size: 12px; color: #166534; margin-top: 5px; font-weight: 600; }
  .rep-actions { display: flex; gap: 10px; flex-wrap: wrap; }
  /* ---- Crystal Wiki (fetch-81) ---- */
  .wiki-top { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
  .wiki-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
  .wiki-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 15px 16px; cursor: pointer; border-top: 3px solid var(--gold); transition: .12s; }
  .wiki-card:hover { border-color: var(--navy); box-shadow: 0 3px 10px rgba(56,74,97,.08); transform: translateY(-1px); }
  /* fetch-668 (Jack): "a calm (+) sign in the empty space next to (sales) to let people know you can
     add a new category". Deliberately the QUIET twin of .wiki-card — dashed, no gold top rule, muted
     until hovered — because it is an invitation, not a sixth destination competing with the real ones. */
  .wiki-card--new { background: transparent; border: 1px dashed var(--line); border-top: 1px dashed var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--muted); min-height: var(--control-height-touch); }
  .wiki-card--new:hover { background: var(--wash); border-color: var(--navy); border-style: dashed; color: var(--text-heading); box-shadow: none; transform: none; }
  .wiki-newcat-plus { font-size: var(--t-title); line-height: 1; }
  .wiki-newcat-lbl { font-size: var(--t-sub); font-weight: 600; margin-top: var(--s-1); }
  .wiki-card-title { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 16px; font-weight: 700; color: var(--navy); }
  .wiki-card-blurb { font-size: 12.5px; color: var(--muted); margin-top: 4px; line-height: 1.45; }
  .wiki-card-count { font-size: 11.5px; font-weight: 700; color: var(--gold-dark); margin-top: 10px; }
  /* fetch-641: wiki attachments. A picture reads as a picture and a video plays where the
     article is, rather than being a link called IMG_4471.HEIC. */
  .wiki-att-none { font-size: var(--t-sub); }
  .wiki-f { margin-bottom: var(--s-3); }
  .wiki-f--sec { max-width: 340px; }
  .wiki-f--pri { max-width: 260px; }
  .wiki-f--att { margin-top: var(--s-3); }
  .wiki-secnew { margin-top: var(--s-2); }
  .wiki-uprow { margin-top: var(--s-2); align-items: center; gap: var(--s-2); flex-wrap: wrap; }
  .wiki-upmsg, .wiki-att-go { font-size: var(--t-sub); }
  .wiki-atts { display: flex; flex-direction: column; gap: var(--s-1); }
  .wiki-att { display: flex; align-items: center; gap: var(--s-2); border: 1px solid var(--line); border-radius: var(--r-s); padding: var(--s-1) var(--s-2); background: var(--paper); font-size: var(--t-sub); }
  .wiki-att--link { text-decoration: none; color: inherit; }
  .wiki-att--link:hover { border-color: var(--gold); }
  .wiki-att-i { flex: 0 0 auto; }
  .wiki-att-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .wiki-attview { margin-top: var(--s-4); border-top: 1px solid var(--line); padding-top: var(--s-3); }
  .wiki-att-h { font-size: var(--t-label); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s-2); }
  .wiki-media { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s-2); margin-bottom: var(--s-2); }
  .wiki-media img, .wiki-media video { width: 100%; height: auto; max-height: 320px; object-fit: cover; border-radius: var(--r-s); border: 1px solid var(--line); display: block; background: var(--wash); }
  .wiki-crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
  .wiki-crumbs a { color: var(--navy); text-decoration: none; font-weight: 600; }
  .wiki-crumbs a:hover { text-decoration: underline; }
  /* fetch-616: the owner type-ahead. position:fixed and parented to <body> on purpose — it is
     used inside the Action Items drawer, and a dropdown that lives inside a scrolling panel
     gets clipped by it. Sizes come from tokens; the option is a 44px touch target. */
  .own-ta { position: fixed; z-index: 200; background: var(--surface-card); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: 0 10px 28px rgba(36,43,66,.18); overflow: hidden; max-height: 46vh; overflow-y: auto; }
  .own-ta-o { display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: left; border: none; border-bottom: 1px solid var(--hair); background: none; padding: var(--s-2) var(--s-3); min-height: var(--control-height-touch); cursor: pointer; font: inherit; }
  .own-ta-o:last-child { border-bottom: none; }
  .own-ta-o:hover { background: var(--wash); }
  .own-ta-n { font-size: var(--t-body); font-weight: 600; color: var(--ink); }
  .own-ta-s { font-size: var(--t-label); color: var(--muted); }
  /* fetch-1408: the Action Items Person(s) field - the picked people as chips, then the Add box on the same line (it wraps
     under them when there is no room). Global, not in the Action Items screen's own style block: the same composer also
     opens on the Pipeline record and on the Timesheets task sheet, where that block does not reach (the fetch-863 trap). */
  .af-people { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); }
  .af-pchip { display: inline-flex; align-items: center; gap: var(--s-1); max-width: 100%; min-height: var(--control-height-icon); padding-left: var(--s-3); border: 1px solid var(--line); border-radius: 999px; background: var(--wash); color: var(--ink); font-size: var(--t-body); font-weight: 600; box-sizing: border-box; }
  .af-pchip-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .af-pchip .btn.icon-btn { border-radius: 999px; }
  .af-people .af-padd { flex: 1 1 12rem; min-width: 0; }
  .af-pmsg { color: var(--bad-fg); }
  /* fetch-1408: the Action Items venue field is the header's venue picker (.pgh-picker, design rule C5). In a form it fills
     its field, and the trigger and every choice are 44px targets. */
  .af-vpick { display: block; }
  .af-vpick :is(.pgh-picker-trigger, .pgh-picker-list .pgh-chip) { min-height: var(--control-height-touch); font-size: var(--t-body); box-sizing: border-box; }
  .af-vpick .pgh-picker-list { width: 100%; max-width: 100%; }
  .wiki-art, .wiki-hit { padding: 10px 4px; border-bottom: 1px solid #f2f1ee; cursor: pointer; }
  .wiki-art:last-child, .wiki-hit:last-child { border-bottom: none; }
  .wiki-art:hover, .wiki-hit:hover { background: #faf9f6; }
  .wiki-art-title, .wiki-hit-title { font-weight: 600; font-size: 14px; color: var(--navy); }
  .wiki-art-sub, .wiki-hit-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
  .wiki-body { font-size: 14px; line-height: 1.6; color: var(--ink); }
  .wiki-body li { margin-bottom: 3px; }
  /* ===== fetch-1242: the QR directory. Tokens only — the .wiki-* rules above predate the
     type scale and are grandfathered, not a licence. The printable repair poster needs no
     rules at all: it rides the .aqr-* sheet the borrow posters already print through. ===== */
  .wiki-card--qr { border-top-color: var(--navy); }
  .wiki-qr-count { font-size: var(--t-sub); margin: var(--s-2) 2px var(--s-3); }
  .wiki-qr-group { margin-bottom: var(--s-4); }
  .wiki-qr-gh { font-family: 'Cormorant Garamond', Georgia, serif; font-size: var(--t-section); font-weight: 700; color: var(--navy); margin: 0; padding-bottom: var(--s-1); border-bottom: 1px solid var(--gold); }
  .wiki-qr-gs { font-size: var(--t-sub); color: var(--muted); line-height: 1.45; margin: var(--s-2) 0 var(--s-3); }
  .wiki-qr-row { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) 0; border-top: 1px solid var(--hair); }
  .wiki-qr-row:first-of-type { border-top: 0; }
  .wiki-qr-box, .wiki-qr-fam { flex: 0 0 auto; width: 72px; height: 72px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-s); overflow: hidden; }
  /* The quiet twin of a real code — a family has no single subject to encode, and saying so
     with a dashed box is the same argument .wiki-card--new already makes against .wiki-card. */
  .wiki-qr-fam { border: 1px dashed var(--line); background: var(--wash); }
  .wiki-qr-famn { font-size: var(--t-section); font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
  .wiki-qr-main { flex: 1; min-width: 0; }
  .wiki-qr-name { font-size: var(--t-body); font-weight: 600; color: var(--navy); }
  .wiki-qr-chip { margin-left: var(--s-2); }
  .wiki-qr-who { font-size: var(--t-sub); color: var(--muted); margin-top: 2px; }
  .wiki-qr-url { font-size: var(--t-sub); color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; margin-top: var(--s-1); }
  .wiki-qr-note { font-size: var(--t-sub); color: var(--muted); line-height: 1.45; margin-top: var(--s-1); }
  .wiki-qr-meta { font-size: var(--t-label); color: var(--muted); margin-top: var(--s-1); }
  .wiki-qr-acts { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-2); }
  /* Open is a real anchor so right-click-copy and middle-click work; an <a class="btn"> does
     not centre its own text the way a <button> does, so say it here rather than per row. */
  .wiki-qr-acts .btn { min-height: var(--control-height-touch); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
  .wiki-qr-big { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--hair); }
  .wiki-qr-big .btn { min-height: var(--control-height-touch); display: inline-flex; align-items: center; justify-content: center; }
  .wiki-qr-subs { list-style: none; margin: var(--s-2) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-1); }
  .wiki-qr-subs li { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
  .wiki-qr-subn { font-size: var(--t-sub); font-weight: 600; }
  .wiki-qr-mgr { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-2); }
  .wiki-qr-mgr li { display: flex; flex-direction: column; gap: 2px; }
  .wiki-qr-poster { text-align: center; }
  .wiki-qr-poster-brand { font-family: 'Cormorant Garamond', Georgia, serif; font-size: var(--t-section); letter-spacing: .12em; color: var(--navy); margin-bottom: var(--s-3); }
  .wiki-qr-poster-url { font-size: var(--t-sub); color: var(--muted); margin-top: var(--s-2); overflow-wrap: anywhere; }
  /* A sheet of ONE poster. The .aqr-cards grid is two columns because it was written for a
     stack of asset cards; a single poster in a two-column grid sits in the left half of the
     paper and of the phone. */
  .aqr-sheet.aqr-cards--one { grid-template-columns: minmax(0, 420px); justify-content: center; }
  @media print { .wiki-qr-poster { border: 0; } .aqr-sheet.aqr-cards--one { grid-template-columns: 1fr; } }
  /* ===== fetch-480: notification rule builder. Jack, on the old form: "i dont understand
     the add new notification function you created at all ... if im creating a custom rule
     shouldnt i be able to set (cadence/to whom/how)". It was three unlabelled selects and
     two fields marked (optional) — the only words on screen described the least important
     inputs. Rebuilt as a sentence you can read. Tokens only, classes not inline styles. ===== */
  .nrb { border: 1px solid var(--line); border-radius: var(--r-m); background: var(--wash); padding: var(--s-4); }
  .nrb-legend { font-weight: 700; font-size: var(--t-body); margin-bottom: var(--s-3); }
  .nrb-line { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; margin-bottom: var(--s-2); }
  .nrb-word { font-size: var(--t-body); color: var(--muted); min-width: 54px; }
  .nrb-line .sel { max-width: 100%; min-width: 0; }
  .nrb-hint { font-size: var(--t-sub); color: var(--muted); margin: 0 0 var(--s-3) 62px; }
  .nrb-hint--flush { margin-left: 0; }
  .nrb-prev { border: 1px dashed var(--line); border-radius: var(--r-s); padding: var(--s-3); margin: var(--s-3) 0; }
  .nrb-prow { display: flex; gap: var(--s-2); align-items: flex-start; font-size: var(--t-sub); line-height: 1.5; padding: 2px 0; }
  .nrb-prow b { font-weight: 600; }
  .nrb-pgrow { flex: 1; }
  .nrb-picon { flex: 0 0 auto; width: 18px; text-align: center; }
  .nrb-msg { font-size: var(--t-sub); background: var(--hair); border-left: 3px solid var(--gold); padding: var(--s-2) var(--s-3); border-radius: 0 var(--r-s) var(--r-s) 0; margin-top: var(--s-1); }
  .nrb-fine { font-size: var(--t-sub); margin-top: var(--s-1); color: var(--muted); }
  .nrb-note { font-size: var(--t-sub); }
  .nrb-chip { display: inline-block; font-size: var(--t-label); font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
  .nrb-chip--instant { background: var(--ok-bg); color: var(--ok-fg); }
  .nrb-chip--hourly, .nrb-chip--daily { background: var(--info-bg); color: var(--info-fg); }
  .nrb-chip--weekly { background: var(--mute-bg); color: var(--mute-fg); }
  .nrb-chip--pending { background: var(--warn-bg); color: var(--warn-fg); }
  .nrb-more { margin: var(--s-3) 0; }
  .nrb-more summary { font-size: var(--t-sub); color: var(--muted); cursor: pointer; }
  .nrb-acts { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; margin-top: var(--s-3); }
  .nrb-acts .muted { font-size: var(--t-sub); }
  .nrb-modal { max-width: 560px; text-align: left; }
  .nrb-mhead { flex: 1; font-weight: 700; }
  .nrb-line.nrb-hide, .nrb-more.nrb-hide { display: none; } /* fetch-1104: "how often" and the wording box follow the rule's event */
  .recap-linked { box-shadow: 0 0 0 2px var(--gold); } /* fetch-1104: the recap a recap email's button opened */
  /* the saved list, grouped by event */
  .nrl-grp { border-top: 1px solid var(--hair); padding: var(--s-3) 0 var(--s-2); }
  .nrl-grp:first-of-type { border-top: 0; }
  /* fetch-508 (Jack's phone tier-walk, Action Items): the goal/action button strip was an
     inline nowrap flex — plan ▾ + S.M.A.R.T. + Check-in + Hit + Missed + × is wider than a
     phone, so the tail clipped off-screen (✕ Missed unreachable). Hoisted to a class
     (inline ▼) and allowed to WRAP on phones. Same fetch-501/507 defect class. */
  .goal-acts { white-space: nowrap; display: flex; gap: 5px; align-items: flex-start; }
  @media (max-width: 640px) { .goal-acts { white-space: normal; flex-wrap: wrap; } }
  /* fetch-532: the SHARED primitive for card-header button groups — the BEO header and the
     trainee Capture-links header were both inline nowrap flexes, so their tail buttons
     ("View / Print BEO →", "↻ Regenerate") clipped off-screen at phone widths. Same
     fetch-501/507/508 defect class; one class so every future header inherits the fix. */
  .card-acts { display: flex; gap: 6px; align-items: flex-start; }
  @media (max-width: 640px) { .card-acts { flex-wrap: wrap; justify-content: flex-end; } }
  /* fetch-509: the survey row's merged ⋯ menu (Share items + Edit/Delete). Hoisted from inline
     so phones can pin it INSIDE the viewport — the old Share menu anchored right:0 on whatever
     side of the screen its button wrapped to, and opened half off-screen (Jack's screenshot). */
  .hddm { position: absolute; right: 0; top: calc(100% + 4px); background: var(--surface-card, White); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgba(0, 0, 0, .16); padding: 6px; z-index: 300; min-width: 190px; display: flex; flex-direction: column; gap: 4px; }
  .hddm-sep { border-top: 1px solid var(--hair); margin: 2px 0; }
  @media (max-width: 640px) { .svy-row .hddm, .cse-modal .hddm { position: fixed; left: var(--s-3); right: var(--s-3); top: auto; margin-top: 4px; } } /* fetch-874: the groups modal's per-group ⋯ needs the same phone pin — .cse-modal is overflow:auto and would clip an absolute menu */
  .nrl-head { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; margin-bottom: var(--s-1); }
  .nrl-name { font-weight: 700; font-size: var(--t-body); }
  .nrl-when { font-size: var(--t-sub); color: var(--muted); margin-bottom: var(--s-2); }
  .nrl-row { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2); border-radius: var(--r-s); border: 1px solid var(--hair); margin-bottom: var(--s-1); }
  .nrl-row.is-off { opacity: .55; }
  .nrl-row.is-new { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(192, 146, 103, .22); }
  .nrl-what { flex: 1; min-width: 0; font-size: var(--t-sub); }
  .nrl-says { color: var(--muted); }
  /* fetch-507 (Jack's phone screenshot, HR → Onboarding): the fetch-501 crush class again —
     .nrl-row is a no-wrap flex line whose buttons can't shrink, so on a phone the name column
     collapsed to one character per line. On phones the text takes the full first line and the
     actions wrap beneath it. Fixes the notification-rules list the same way for free. */
  @media (max-width: 640px) {
    .nrl-row { flex-wrap: wrap; }
    .nrl-row > .nrl-what { flex: 1 1 100%; }
    .nrl-row .nh-idin { flex: 1 1 90px; min-width: 90px; }
  }
  /* fetch-481: New Hires card bits */
  .nh-toprow { align-items: center; gap: var(--s-2); }
  .nh-head { flex: 1; }
  .nh-sub { font-size: var(--t-sub); }
  .nh-empty { padding: var(--s-1) 0; font-size: var(--t-sub); }
  .nh-dates { width: 100%; font-family: inherit; }
  .nh-idin { width: 90px; flex: none; }
  /* fetch-485: system-populated formal-serve training options */
  .nh-fnwrap { max-height: 300px; overflow-y: auto; border: 1px solid var(--hair); border-radius: var(--r-s); padding: var(--s-2); margin-top: var(--s-1); }
  .nh-fngrp { font-size: var(--t-sub); color: var(--muted); font-weight: 700; margin: var(--s-3) 0 var(--s-1); }
  .nh-fngrp:first-child { margin-top: 0; }
  .nh-fn { display: block; width: 100%; text-align: left; margin-bottom: var(--s-1); font-size: var(--t-sub); }
  .nh-fn.is-on { border-color: var(--gold); background: rgba(192, 146, 103, .16); font-weight: 600; }
  .nh-fnnote { color: var(--muted); font-weight: 400; }
  .nh-fnnone { font-size: var(--t-sub); color: var(--muted); padding: var(--s-1) 0; }
  .nh-count { font-size: var(--t-sub); color: var(--muted); margin-left: var(--s-2); }
  .nh-fnchips { display: flex; flex-wrap: wrap; gap: var(--s-1); margin-top: var(--s-1); align-items: center; }
  .nh-days { display: flex; flex-wrap: wrap; gap: var(--s-1); margin-top: var(--s-1); }
  .nh-day { display: inline-flex; align-items: center; gap: var(--s-1); font-size: var(--t-sub); border: 1px solid var(--hair); border-radius: var(--r-pill); padding: 1px var(--s-2); }
  .nh-dayok { color: var(--muted); }
  .nh-shiftmodal { max-width: 460px; }
  .nh-tplrow { display: flex; flex-wrap: wrap; gap: var(--s-1); margin-top: var(--s-1); }
  .nh-vchip { font-size: var(--t-sub); padding: 2px var(--s-2); border-radius: var(--r-pill); border: 1px solid var(--hair); background: transparent; cursor: pointer; color: inherit; font-family: inherit; }
  .nh-vchip.is-on { border-color: var(--gold); background: rgba(192, 146, 103, .18); font-weight: 700; }
  .nh-vchip b { font-weight: 700; }
  .nh-vchip .nh-vn { color: var(--muted); margin-left: 3px; }
  .nh-vchip.is-on .nh-vn { color: inherit; }
  /* fetch-484: roster archive */
  .ros-archmeta { font-size: var(--t-sub); color: var(--muted); margin-top: var(--s-1); display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
  @media (max-width: 640px) {
    .nrb-word { min-width: 0; }
    .nrb-hint { margin-left: 0; }
    .nrb-line .sel { flex: 1 1 100%; }
  }
  /* ---- Calendar quick-view (fetch-81) ---- */
  .qv-backdrop { position: fixed; inset: 0; background: rgba(20,33,61,.35); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; }
  .qv-card { background: #fff; border-radius: 14px; max-width: 380px; width: 100%; box-shadow: 0 18px 50px rgba(0,0,0,.3); border-top: 4px solid var(--gold); overflow: hidden; }
  .ros-modal { max-width: 900px; width: 100%; max-height: 88vh; overflow-y: auto; border-radius: 14px; } /* fetch-455 (Jack): roster edit opens OVER the list (calendar quick-view pattern) — no more scroll-to-top; the form's own cards paint the surface · fetch-868: a little wider for the left rail */
  /* fetch-868 — the WIW-shaped left rail (Jack's Roster-UX card). Gold is the one active
     indicator (jewelry); on a phone the rail becomes a horizontal chip row. */
  .ros-shell { display: flex; gap: var(--s-4); align-items: flex-start; }
  .ros-nav { flex: 0 0 168px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; }
  /* fetch-1459: retained-save review uses phone-sized targets. */
  #rosSaveFeedback .btn, #rosReadFeedback .btn { min-height: var(--control-height-touch); white-space: normal; }
  .ros-nav-btn { text-align: left; border: none; background: none; padding: var(--s-2) var(--s-3); border-radius: var(--r-s); font-size: var(--t-body); font-family: inherit; color: var(--muted); cursor: pointer; border-left: 2px solid transparent; min-height: 44px; }
  .ros-nav-btn:hover { background: var(--wash); }
  .ros-nav-btn.on { color: var(--ink); background: var(--wash); border-left-color: var(--gold); font-weight: 600; }
  .ros-panes { flex: 1; min-width: 0; }
  .ros-panes .form-sec.fm-first, .ros-panes .form-sec { margin-top: 0; }
  .ros-pane--off { display: none; }
  .ros-ro { border: 0; padding: 0; margin: 0; min-width: 0; } /* fetch-1305: the view-only person is one disabled fieldset */
  .ros-to-row { display: flex; gap: var(--s-3); padding: var(--s-1) 0; border-top: 1px solid var(--hair); font-size: var(--t-sub); align-items: baseline; flex-wrap: wrap; }
  .ros-to-row:first-of-type { border-top: none; }
  /* fetch-1416: the I-9 ticks on a roster person - a 44px row each: the box, what it means, who ticked it and when */
  .ros-i9-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s-1) var(--s-3); min-height: var(--control-height-touch); padding: var(--s-1) 0; border-top: 1px solid var(--hair); font-size: var(--t-body); cursor: pointer; }
  .ros-i9-row:first-of-type { border-top: 0; }
  .ros-i9-ck { width: 20px; height: 20px; margin: 0; accent-color: var(--navy); }
  .ros-i9-m { color: var(--muted); font-size: var(--t-sub); font-variant-numeric: tabular-nums; text-align: right; }
  .ros-i9-n { margin-left: var(--s-2); padding: 0 var(--s-2); border: 1px solid var(--line); border-radius: var(--r-l); font-size: var(--t-sub); font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink); }
  .ros-i9-n--done { color: var(--ok-fg); border-color: currentColor; }
  .ros-i9-note, .ros-dob-note { min-height: 1.5em; margin-top: var(--s-2); font-size: var(--t-sub); line-height: 1.5; color: var(--muted); }
  .ros-i9-note--ok, .ros-dob-note--ok { color: var(--ok-fg); font-weight: 600; }
  .ros-i9-note--err, .ros-dob-note--err { color: var(--bad-fg); font-weight: 600; }
  .ros-i9-wait { margin: 0; color: var(--muted); font-size: var(--t-sub); }
  .ros-i9-chip { margin-left: var(--s-1); }
  /* fetch-1504: the date of birth beside the I-9 ticks - the date box, Save and Remove on one 44px row, who entered it after */
  .ros-dob-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); min-height: var(--control-height-touch); }
  .ros-dob-in { min-height: var(--control-height-touch); padding: 0 var(--s-2); border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface-card); color: var(--ink); font-family: inherit; font-size: var(--t-body); font-variant-numeric: tabular-nums; }
  .ros-dob-in:disabled { color: var(--muted); background: var(--wash); }
  .ros-dob-row .btn { min-height: var(--control-height-touch); }
  .ros-dob-m { color: var(--muted); font-size: var(--t-sub); }
  .ros-dob-warn { margin: var(--s-2) 0 0; font-size: var(--t-sub); line-height: 1.5; color: var(--warn-fg); }
  /* fetch-867: the ADP position-codes screen */
  .apc-acts { display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; }
  .apc-acts .sel { max-width: 340px; }
  .apc-title { margin-top: var(--s-3); }
  @media (max-width: 640px) {
    .ros-shell { flex-direction: column; }
    .ros-nav { position: static; flex-direction: row; flex-wrap: wrap; width: 100%; border-bottom: 1px solid var(--line); padding-bottom: var(--s-2); }
    .ros-nav-btn { border-left: none; border-bottom: 2px solid transparent; }
    .ros-nav-btn.on { border-bottom-color: var(--gold); }
  }
  /* fetch-546: Sync-from-WIW preview rows */
  .wiws-sub { font-size: var(--t-sub); margin: var(--s-1) 0 var(--s-2); }
  .wiws-row { display: flex; align-items: baseline; gap: var(--s-2); padding: var(--s-1) var(--s-1); border-bottom: 1px solid var(--line); cursor: pointer; }
  .wiws-row:last-child { border-bottom: none; }
  .wiws-row input { flex: 0 0 auto; transform: translateY(2px); }
  .wiws-row--info { cursor: default; opacity: .85; }
  .wiws-meta { display: block; color: var(--muted); font-size: var(--t-sub); }
  .wiws-empty { font-size: var(--t-sub); padding: var(--s-1) 0; }
  /* fetch-1181: Confirm identity. A row is a label (the tap target) plus its own small action, and
     it has to work one-handed on a phone: 44px controls, the evidence chips wrap, nothing clips. */
  .wiws-row--ident { cursor: default; flex-wrap: wrap; align-items: flex-start; padding: var(--s-2) var(--s-1); }
  .wiws-pick { display: flex; align-items: baseline; gap: var(--s-2); flex: 1 1 16rem; min-width: 0; min-height: var(--control-height-touch); cursor: pointer; }
  .wiws-pick .badge { margin-left: var(--s-1); }
  .wiws-ident { display: block; flex: 1 1 100%; min-width: 0; }
  .wiws-ident .field { display: grid; gap: var(--s-1); margin: var(--s-2) 0; min-width: 0; }
  .wiws-ident .field input.sel { transform: none; }
  .wiws-choice { display: flex; align-items: center; gap: var(--s-2); min-height: var(--control-height-touch); cursor: pointer; }
  .wiws-tools { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-1) 0 var(--s-2); }
  .wiws-note { margin: var(--s-2) 0; }
  #wiwBackdrop :is(.sel, .btn) { min-height: var(--control-height-touch); }
  .qv-head { padding: 14px 16px 10px; }
  .qv-title { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 18px; font-weight: 700; color: var(--navy); margin: 0; }
  .qv-meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
  .qv-rows { padding: 4px 16px 12px; }
  .qv-row { display: flex; gap: 10px; padding: 5px 0; font-size: 13px; border-bottom: 1px solid #f4f3f0; }
  .qv-row:last-child { border-bottom: none; }
  .qv-row .k { color: var(--muted); min-width: 84px; flex: 0 0 auto; }
  .qv-row .v { color: var(--ink); font-weight: 600; }
  .qv-foot { display: flex; gap: 8px; padding: 12px 16px; background: #fbfaf8; border-top: 1px solid var(--line); }
  .qv-hint { font-size: 11px; color: var(--muted); text-align: center; padding: 0 16px 12px; margin-top: -4px; }
  /* ---- fetch-84: hospitality skin ---- */
  body { background: #f0e8e0; }
  .card { border-radius: 14px; box-shadow: 0 1px 5px rgba(56,74,97,.06); border-color: #e7dfcf; }
  .dash-section-title { font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif; letter-spacing: .2px; }
  .brief-card h3, .qv-title, .wiki-card-title { letter-spacing: .2px; }
  .btn { border-radius: 9px; }
  .fin-table thead th { background: #faf6ee; }
  .brief-hero.h-morning { background: linear-gradient(135deg, #384a61 0%, #8c6145 100%); }
  .brief-hero.h-afternoon { background: linear-gradient(135deg, #384a61 0%, #4a5f7d 100%); }
  .brief-hero.h-evening { background: linear-gradient(135deg, #242b42 0%, #43305e 100%); }
  /* ---- fetch-84: venue color identity ---- */
  .vchip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--vc); background: color-mix(in srgb, var(--vc) 11%, #fff); border: 1px solid color-mix(in srgb, var(--vc) 32%, #fff); border-radius: 20px; padding: 1px 9px; white-space: normal; max-width: 100%; flex-wrap: wrap; } /* fetch-139: long venue·room chips wrap inside their cell instead of overrunning the next column */
  .vchip .vdot, .cal-vdot { width: 7px; height: 7px; border-radius: 50%; background: var(--vc); flex: 0 0 auto; display: inline-block; }
  .cal-vdot { margin-right: 3px; vertical-align: middle; }
  .cal-chip-venue { font-weight: 700; }
  /* ---- fetch-84: friendlier team cards ---- */
  .user-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: #fdfcf9; }
  .user-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
  summary.user-head { cursor: pointer; list-style: none; margin-bottom: 0; }
  summary.user-head::-webkit-details-marker { display: none; }
  details.user-card:not([open]) { padding-top: 9px; padding-bottom: 9px; }
  details.user-card[open] summary.user-head { margin-bottom: 10px; }
  details.user-card[open] .uc-caret { transform: rotate(180deg); display: inline-block; }
  .user-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; font-size: 16px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; font-family: 'Cormorant Garamond', Georgia, serif; }
  .user-selects { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
  .user-sel-lbl { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .4px; display: flex; flex-direction: column; gap: 3px; }
  .user-sel-lbl .sel { min-width: 160px; }
  .cap-pills { display: flex; gap: 6px; flex-wrap: wrap; }
  .cappill { border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 20px; padding: 4px 12px; font-size: 12px; cursor: pointer; font-weight: 600; transition: .12s; }
  .cappill:hover { border-color: var(--navy); color: var(--navy); }
  .cappill.on { background: #eaf3ea; color: #166534; border-color: #a7d3ae; }
  /* ---- fetch-286 (UI audit Phase 3, Admin → Users): capability source distinction ----
     inherited = on from tier/dept default (quiet green); granted = explicit per-person add
     (gold, stands out); revoked = explicit per-person removal of a default (struck through). */
  .cappill--granted { background: #fbf3e2; color: #8a5a1a; border-color: var(--brand-gold-mid); }
  .cappill--granted::after { content: " ★"; }
  /* fetch-346: staffing feature adopts tokens (ratchet sweep) */
  .stf-row { padding: 5px 0; border-bottom: 1px solid var(--hair); }
  /* fetch-630: coverage badges — one per role, so an over-covered bar never rides inside a red "short" */
  .stf-cov { display: flex; gap: var(--s-1); flex-wrap: wrap; justify-content: flex-end; }
  /* fetch-1315 (Six-Control pass 4c.3): the roles' pickup meters, under the "Picked up on WIW" row - side by side where they fit,
     stacked on a phone; a card with no graded role draws no block */
  .stf-meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: var(--s-2) var(--s-4); padding: var(--s-2) 0; border-bottom: 1px solid var(--hair); }
  .stf-meters:empty { display: none; }
  .stf-meters > .pg { margin-top: 0; }
  .stf-sub { font-size: var(--t-sub); }
  /* fetch-1367: after an event, worked vs planned crew hours (event-labor.js) - its own card under the forecast; a plain
     table, signed differences with no colour (a variance is not a status); notes in the muted sub size */
  .ela-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-2); flex-wrap: wrap; }
  .ela-title { margin: 0; font-size: var(--t-body); }
  .ela-table { width: 100%; border-collapse: collapse; margin-top: var(--s-2); font-size: var(--t-sub); }
  .ela-table th, .ela-table td { padding: var(--s-1) 0; text-align: right; font-weight: 400; }
  .ela-table th:first-child { text-align: left; padding-right: var(--s-2); }
  .ela-table thead th { color: var(--muted); border-bottom: 1px solid var(--line); }
  .ela-table tfoot th, .ela-table tfoot td { border-top: 1px solid var(--line); font-weight: 600; }
  .ela-note { margin: var(--s-1) 0 0; font-size: var(--t-sub); color: var(--muted); }
  /* fetch-451: To-review card (training review loop, staff app) */
  .rv-item { padding: 10px 0; border-top: 1px solid var(--hair); }
  .rv-done { opacity: .6; }
  .rv-head { display: flex; gap: var(--s-2); align-items: center; }
  .rv-name { flex: 1; min-width: 0; }
  .rv-blurb { font-size: var(--t-body); margin-top: var(--s-1); }
  .rv-ack { padding: 7px 14px; }
  .stf-lab { font-size: var(--t-label); }
  /* fetch-1162: readable staffing context for Sales and Culinary. */
  .event-staffing-reader .stf-lab { font-size: var(--t-sub); }
  .staffing-calculation { margin-top: var(--s-2); border-top: 1px solid var(--line); }
  .staffing-calculation > summary { min-height: var(--control-height-touch); padding-block: var(--s-3); font-size: var(--t-sub); cursor: pointer; }
  .staffing-calculation > p { margin: 0 0 var(--s-2); line-height: 1.5; }
  .btn.staffing-reader-cards { min-height: var(--control-height-touch); }
  .lock-note { display: block; margin-top: var(--s-1); } /* fetch-398: own-row access lock caption */
  .stf-flex { display: flex; gap: 12px; flex-wrap: wrap; }
  .stf-note { font-size: var(--t-sub); margin: 10px 0 4px; }
  .stf-barsel { font-size: var(--t-label); padding: 1px 4px; margin-left: 6px; vertical-align: middle; }
  .rowlink { cursor: pointer; }
  .stf-total { border-top: 2px solid var(--line); font-weight: 700; }
  .stf-head { flex-wrap: wrap; gap: 8px; }
  .x-scroll { overflow-x: auto; }
  /* fetch-350: calm staffing page — settings accordion + card roll-ups */
  .acc { border: 1px solid var(--hair); border-radius: var(--r-m); margin-bottom: var(--s-2); background: var(--wash); }
  .acc[open] { background: transparent; border-color: var(--line); }
  .acc > summary { cursor: pointer; padding: var(--s-2) var(--s-3); display: flex; gap: var(--s-2); align-items: baseline; flex-wrap: wrap; list-style: none; border-radius: var(--r-m); }
  .acc > summary::-webkit-details-marker { display: none; }
  .acc > summary::before { content: "▸"; color: var(--brand-gold-mid); font-size: var(--t-sub); }
  .acc[open] > summary::before { content: "▾"; }
  .acc > summary .acc-t { font-weight: 600; font-size: var(--t-body); color: var(--text-heading); }
  .acc > summary .acc-v { color: var(--muted); font-size: var(--t-sub); }
  .acc-body { padding: 0 var(--s-3) var(--s-3); }
  /* fetch-1172: section navigation inside the existing Staffing formula card. */
  .stf-formula-title { margin: 0; font: 650 var(--t-section)/1.4 Inter, sans-serif; color: var(--text-heading); }
  .stf-formula-head { margin-bottom: var(--s-4); }
  .stf-formula-head p { margin: var(--s-1) 0 0; }
  .stf-formula-layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: var(--s-5); align-items: start; }
  .stf-formula-nav { display: flex; flex-direction: column; gap: var(--s-1); padding-right: var(--s-4); border-right: 1px solid var(--line); }
  .stf-formula-nav button { display: flex; align-items: center; width: 100%; min-height: var(--control-height-touch); padding: var(--s-2) var(--s-3); border: 1px solid transparent; border-radius: var(--r-s); background: transparent; text-align: left; font: 500 var(--t-sub)/1.4 Inter, sans-serif; color: var(--text-heading); cursor: pointer; }
  .stf-formula-nav button:hover { background: var(--wash); }
  .stf-formula-nav button[aria-current="page"] { background: var(--wash); border-color: var(--line); font-weight: 700; }
  .stf-formula-mobile { display: none; }
  .stf-formula-fields { min-width: 0; border: 0; margin: 0; padding: 0; }
  .stf-formula-panel[hidden] { display: none; }
  .stf-formula-panel-head { margin-bottom: var(--s-4); padding-bottom: var(--s-3); border-bottom: 1px solid var(--line); }
  .stf-formula-panel-head h3 { margin: 0; font: 650 var(--t-section)/1.4 Inter, sans-serif; color: var(--text-heading); }
  .stf-formula-summary { display: grid; gap: var(--s-1); margin: var(--s-2) 0 0; font-size: var(--t-sub); color: var(--muted); overflow-wrap: anywhere; }
  .stf-formula-summary > span { font-weight: 600; color: var(--text-heading); }
  .stf-formula-panel-body { min-width: 0; }
  .staffing-formulas .stf-flex { gap: var(--s-4); }
  .staffing-formulas .stf-field { flex: 0 1 12rem; max-width: 100%; }
  .staffing-formulas .stf-field input { width: 100%; box-sizing: border-box; }
  .staffing-formulas input, .staffing-formulas textarea { min-height: var(--control-height-touch); box-sizing: border-box; }
  .staffing-formulas .stf-kw { min-width: min(240px, 100%); }
  .staffing-formulas > .stf-formula-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--line); }
  .staffing-formulas > .stf-formula-actions .btn { min-height: var(--control-height-touch); }
  .staffing-formulas > .stf-formula-actions > span { flex: 1 1 18rem; }
  @media (max-width: 800px) {
    .stf-formula-layout { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
    .stf-formula-nav { display: none; }
    .stf-formula-mobile { display: grid; gap: var(--s-2); }
    .stf-formula-mobile label { font-size: var(--t-sub); font-weight: 600; color: var(--text-heading); }
    .stf-formula-mobile .sel { width: 100%; min-height: var(--control-height-touch); }
    .staffing-formulas .stf-field { flex-grow: 1; }
  }
  .roll-sum { display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; font-size: var(--t-sub); color: var(--muted); margin-top: var(--s-1); }
  .roll-btn { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: var(--r-s); font-size: var(--t-sub); padding: 4px 10px; cursor: pointer; font-weight: 600; white-space: nowrap; }
  .roll-btn:hover { border-color: var(--brand-gold-mid); color: var(--text-heading); }
  .stf-field { min-width: 110px; }
  .stf-field--w { min-width: 150px; }
  .stf-kw { flex: 1; min-width: 240px; }
  .stf-kw textarea { width: 100%; box-sizing: border-box; }
  .stf-pair { display: flex; gap: var(--s-1); }
  .stf-ctl { display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; }
  /* fetch-692: one truthful doorway across the three schedule engines. This is navigation,
     not a fake shared filter: Manager + Event staff are native portal grids, while Culinary
     remains Matt's separately authenticated app. Options render only when jumpWs says the
     current login can actually enter that destination. */
  .schedule-family { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-3);
    padding: var(--s-2) var(--s-3); border: 1px solid var(--line); border-radius: var(--r-m);
    background: var(--surface-card, White); }
  .schedule-family__label { color: var(--text-heading); font-size: var(--t-sub); font-weight: 700; white-space: nowrap; }
  .schedule-family__tabs { display: flex; gap: var(--s-1); min-width: 0; padding: var(--s-1);
    border-radius: var(--r-s); background: var(--wash); overflow-x: auto; scrollbar-width: none; }
  .schedule-family__tabs::-webkit-scrollbar { display: none; }
  .schedule-family__tab { min-height: var(--control-height-sm); padding: var(--s-1) var(--s-3);
    border: 1px solid transparent; border-radius: var(--r-s); background: transparent; color: var(--muted);
    font: inherit; font-size: var(--t-sub); font-weight: 700; white-space: nowrap; cursor: pointer; }
  .schedule-family__tab:hover { color: var(--text-heading); background: var(--surface-card, White); }
  .schedule-family__tab--on { color: White; background: var(--action-primary, var(--navy)); }
  .schedule-family__tab--on:hover { color: White; background: var(--action-primary, var(--navy)); }
  .schedule-family__context { margin-left: auto; color: var(--muted); font-size: var(--t-sub); text-align: right; }
  .stf-tblwrap { overflow-x: auto; max-width: 1560px; }
  .card--gold { border-left: 3px solid var(--brand-gold-mid); }
  .mb-2 { margin-bottom: var(--s-2); }
  .t-bad { color: var(--bad-fg); } /* fetch-444: bad-state text utility */
  .mt-3 { margin-top: var(--s-3); }
  .self-c { align-self: center; }
  .ta-l { text-align: left; }
  .ta-c { text-align: center; }
  /* fetch-356: Timesheets (WIW-shape rollup on the Time Clock segment) */
  .stf-grow { flex: 1; min-width: 220px; }
  .tc-title { color: var(--text-heading); }
  .tc-wkpick { display: inline-flex; gap: var(--s-1); align-items: center; }
  .tc-wkbtn { padding: 2px 10px; font-size: var(--t-body); }
  .tc-wkbtn:disabled { opacity: .4; cursor: default; }
  .tc-wklabel { font-size: var(--t-sub); color: var(--muted); min-width: 150px; text-align: center; }
  /* ---- fetch-1196 · DATA GRAPHICS (dg-) - the portal's first marks drawn from data. Inline SVG: a presentation
     attribute is not an inline style, and a 0-100 viewBox makes a share of the scale the width, so nothing here changes
     per render and there is no width ladder. overflow: visible is load-bearing - a target tick at exactly 100% stands
     proud of the track and would be clipped to a stub without it. ---- */
  .dg { display: block; width: 100%; overflow: visible; }
  .dg-meter { height: 8px; margin-top: var(--s-1); }
  .dg-dev { height: 10px; margin-top: var(--s-1); }
  .dg-cols { height: 64px; }
  .dg-stack { height: 12px; }
  .dg-key { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); margin-top: var(--s-2); font-size: var(--t-sub); color: var(--muted); }
  .dg-key span { display: inline-flex; align-items: center; gap: var(--s-1); }
  .dg-key b { color: var(--ink); font-weight: 600; }
  .dg-sw { width: 9px; height: 9px; flex: none; }
  @media print { .dg { break-inside: avoid; } }
  /* fetch-1310 (Six-Control pass 4a): progressHTML - the words over dgMeter's drawing, in tabular figures. The target is
     said beside its gold tick; an exception is the bad token in words beside the bar, never the bar's colour. It is all
     spans (phrasing content, so it may sit inside a button), so .pg is made a block here. */
  .pg { display: block; margin-top: var(--s-2); min-width: 0; }
  .pg-live { display: block; } /* a live job's progressbar - the bar alone; its words are its name and valuetext */
  .pg-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s-2); }
  .pg-label { flex: 1 1 auto; min-width: 0; font-size: var(--t-mid); color: var(--text-heading); }
  .pg-val { font-size: var(--t-mid); font-weight: 600; color: var(--text-heading); font-variant-numeric: tabular-nums; }
  .pg-foot { display: flex; flex-wrap: wrap; gap: 0 var(--s-3); margin-top: 2px; font-size: var(--t-sub); color: var(--muted); font-variant-numeric: tabular-nums; }
  .pg-exc { color: var(--bad-fg); font-weight: 600; }
  /* ---- fetch-1196 · THE LABOR FORECAST PAGE (lf-). NOT stf-: that prefix already belongs to the event page's Staffing
     card and the formulas editor (28 selectors), and a second meaning for .stf-row or .stf-head restyles both. Two text
     greys, one structural rule, one figure size - the old cards ran six to eight greys and seven rules for four rows. ---- */
  .lf-h { font-size: var(--t-section); font-weight: 700; color: var(--text-heading); margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
  .lf-hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-5) var(--s-6); align-items: start; margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--rule-soft); }
  .lf-hero--one { grid-template-columns: minmax(0, 1fr); }
  .lf-hero .card-kicker { margin-bottom: var(--s-2); }
  .lf-fig { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-1) var(--s-2); }
  .lf-fig-n { font-size: var(--t-figure); font-weight: 600; line-height: 1.05; letter-spacing: -.01em; color: var(--text-heading); }
  .lf-fig-u { font-size: var(--t-mid); color: var(--muted); margin-right: var(--s-3); }
  .lf-say { margin: var(--s-2) 0 0; font-size: var(--t-body); line-height: 1.5; max-width: 60ch; }
  .lf-say.muted { font-size: var(--t-sub); }
  .lf-exc { border: 0; background: transparent; padding: 0; min-height: var(--control-height-touch); font: inherit; font-weight: 600; color: var(--bad-fg); text-align: left; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
  .lf-exc[aria-pressed="true"] { text-decoration-thickness: 2px; }
  .lf-colsx { display: flex; margin-top: var(--s-1); font-size: var(--t-label); color: var(--muted); }
  .lf-colsx span { flex: 1 1 0; text-align: center; overflow: hidden; }
  .lf-table thead th { background: transparent; border-bottom: 1px solid var(--rule); white-space: nowrap; }
  .lf-table thead th.ta-l { text-align: left; } /* .fin-table thead th right-aligns at (0,1,2) and out-ranks a bare .ta-l */
  .lf-card .roll-btn, .lf-card .tc-wkbtn, .lf-card .btn, .lf-card .sel { min-height: var(--control-height-touch); }
  .lf-card .tc-wkbtn { min-width: var(--control-height-touch); }
  .lf-note { margin-top: var(--s-1); line-height: 1.5; max-width: 110ch; }
  .lf-note summary { display: inline-flex; align-items: center; min-height: var(--control-height-touch); cursor: pointer; font-weight: 600; color: var(--text-heading); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
  .lf-table tbody td { border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
  .lf-table tbody tr:hover { background: transparent; }
  .lf-table tr.stf-total td { border-top: 1px solid var(--rule); border-bottom: 0; }
  .lf-mark { min-width: 120px; }
  .lf-var { font-weight: 600; }
  .lf-words { font-size: var(--t-sub); }
  .lf-x { width: var(--control-height-touch); padding-left: 0; padding-right: 0; }
  .lf-xbtn { width: var(--control-height-touch); height: var(--control-height-touch); margin: -6px 0; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--paper); color: var(--text-heading); font-size: var(--t-section); line-height: 1; cursor: pointer; }
  .lf-xbtn:hover, .lf-xbtn[aria-expanded="true"] { border-color: var(--brand-gold-mid); }
  .lf-date { white-space: nowrap; color: var(--muted); }
  .lf-evt { display: inline-flex; align-items: center; min-height: var(--control-height-touch); margin: -12px 0; border: 0; background: transparent; padding: 0; font: inherit; font-weight: 600; color: var(--text-heading); text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
  .lf-evt:hover { text-decoration-color: var(--brand-gold-mid); }
  .lf-table tr.lf-row--open td { border-bottom-color: transparent; }
  .lf-table tr.lf-why td { padding-top: 0; }
  .lf-whybox { border-left: 2px solid var(--rule); padding: var(--s-1) 0 var(--s-1) var(--s-3); display: grid; gap: var(--s-1); max-width: 96ch; }
  .lf-whybox--over { border-left-color: var(--bad-fg); }
  .lf-roles { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); font-size: var(--t-sub); }
  @media (max-width: 760px) {
    .lf-hero { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
    /* both tables become one card per row: what is staffed on top, the comparison under it */
    .lf-table--cards, .lf-table--cards tbody { display: block; }
    .lf-table--cards thead { display: none; }
    .lf-table--cards tr.lf-row { display: grid; gap: var(--s-1) var(--s-2); padding: var(--s-3) 0; border-bottom: 1px solid var(--rule-soft); }
    .lf-table--cards tr.lf-row td { display: block; padding: 0; border: 0; text-align: left; min-width: 0; }
    .lf-table--cards tr.lf-row--open { border-bottom-color: transparent; }
    .lf-table--cards td[data-l]::before { content: attr(data-l); display: block; font-size: var(--t-label); font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
    .lf-table--events tr.lf-row { grid-template-columns: var(--control-height-touch) repeat(4, minmax(0, 1fr)); grid-template-areas: "x date date ven ven" "x evt evt evt evt" "x g s b c" "x hrs hrs fund fund" "x vs vs usd usd"; }
    .lf-table--events .lf-x { grid-area: x; width: auto; } .lf-table--events .lf-xbtn { margin: 0; }
    .lf-table--events .lf-date { grid-area: date; } .lf-table--events .lf-ven { grid-area: ven; justify-self: end; }
    .lf-table--events .lf-evtc { grid-area: evt; } .lf-table--events .lf-evt { margin: 0; }
    .lf-table--events .lf-g { grid-area: g; } .lf-table--events .lf-s { grid-area: s; } .lf-table--events .lf-b { grid-area: b; } .lf-table--events .lf-c { grid-area: c; }
    .lf-table--events .lf-hrs { grid-area: hrs; } .lf-table--events .lf-fund { grid-area: fund; } .lf-table--events .lf-vs { grid-area: vs; } .lf-table--events .lf-usd { grid-area: usd; }
    .lf-table--venues tr.lf-row { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "venue venue" "ops funded" "diff sal" "total train" "usd usd"; }
    .lf-table--venues td[data-la="venue"] { grid-area: venue; } .lf-table--venues td[data-la="ops"] { grid-area: ops; } .lf-table--venues td[data-la="funded"] { grid-area: funded; }
    .lf-table--venues td[data-la="diff"] { grid-area: diff; } .lf-table--venues td[data-la="sal"] { grid-area: sal; } .lf-table--venues td[data-la="total"] { grid-area: total; }
    .lf-table--venues td[data-la="train"] { grid-area: train; } .lf-table--venues td[data-la="usd"] { grid-area: usd; }
    .lf-table--months tr.lf-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } /* nine cells auto-place as month / servers / bar */
    .lf-table--months tr.lf-row--empty td:nth-child(n+4) { display: none; } /* nothing booked: the month and its zeroes, not two rows of dashes */
    .lf-table--cards tr.lf-why, .lf-table--cards tr.stf-total { display: block; padding: var(--s-2) 0 var(--s-3); border-bottom: 1px solid var(--rule-soft); }
    .lf-table--cards tr.lf-why td:first-child, .lf-table--cards tr.stf-total td:empty { display: none; }
    .lf-table--cards tr.lf-why td, .lf-table--cards tr.stf-total td { display: inline-block; padding: 0 var(--s-3) 0 0; border: 0; }
    .lf-table--cards tr.stf-total td[data-l]::before { display: inline; margin-right: var(--s-1); }
  }
  .tc-sheethead { display: flex; justify-content: flex-end; align-items: center; min-height: 42px; margin-bottom: var(--s-2); padding: 0 var(--s-1) var(--s-2); border-bottom: 1px solid var(--hair); }
  .tc-sheethead .stf-ctl { justify-content: flex-end; }
  /* fetch-581: the week bar — the pay week is the page identity, stated once, ‹ › + actions on
     one line, venue chips beneath. Replaces the old right-aligned control strip + venue select. */
  .tc-wkbar { justify-content: center; gap: var(--s-1); border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
  .tc-wkmain { flex: 0 1 auto; min-width: 0; text-align: center; padding: 0 var(--s-2); }
  .tc-wkmain strong { display: block; font-size: var(--t-body); letter-spacing: -.01em; }
  .tc-wksub { display: block; font-size: var(--t-label); color: var(--muted); margin-top: 1px; }
  .tc-wkbar .tc-wkbtn { min-width: var(--control-height-sm, 32px); min-height: var(--control-height-sm, 32px); }
  .tc-chips { display: flex; gap: var(--s-1); overflow-x: auto; padding: var(--s-2) var(--s-1); margin-bottom: var(--s-2); border-bottom: 1px solid var(--hair); scrollbar-width: none; }
  .tc-chips::-webkit-scrollbar { display: none; }
  .tc-chip { border-radius: 999px; font-size: var(--t-sub); font-weight: 600; padding: var(--s-1) var(--s-3); white-space: nowrap; flex: 0 0 auto; min-height: var(--control-height-sm, 32px); }
  .btn.tc-chip--on { background: var(--action-primary, var(--navy)); color: White; border-color: var(--action-primary, var(--navy)); } /* fetch-846: was .tc-chip--on alone — the later .btn rule (background:#fff, no color) beat its background at equal specificity, so the ACTIVE chip rendered white-on-white on Timesheets since the chips shipped (visible as the blank first chip in Jack's 08-30 screenshot). .btn.tc-chip--on outranks .btn regardless of file order. */
  .tc-notex { border-color: transparent; background: none; color: inherit; padding: 0 var(--s-1); min-height: 0; margin-left: auto; flex: 0 0 auto; font-weight: 700; opacity: .6; }
  .tc-notex:hover { opacity: 1; }
  /* fetch-585 (Jack): the BEO prints in RESERVE'S layout — "our BEO looks nothing like what
     reserve generates - this is an almost instant turn-off for my sales girls". Same doc, two
     copies: priced (Qty/Price/Total + CHARGES) and staff (identical minus the money). B2 print
     family exception; colors are CSS named colors and sizes are pt on purpose — a print
     document, and the UI-debt ratchet counts hex + px, not these. */
  .bR { font-family: Arial, Helvetica, sans-serif; color: black; page: beoDoc; }
  /* fetch-588 geometry (spec TABLE 3): the PAGE is the authority, not the viewport. Letter,
     33pt margins (36 bottom), tables inset 12pt each side => the canonical 522pt table width
     the column percentages are defined against. Named page so no other print surface moves. */
  @page beoDoc { size: letter; margin: 33pt 33pt 36pt; }
  .bR table { border-collapse: collapse; width: calc(100% - 24pt); margin-left: 12pt; margin-right: 12pt; font-size: 9pt; margin-bottom: 10pt;
    table-layout: fixed; } /* fetch-587: auto layout treats width:100% as a MINIMUM — one
    unbreakable row inflates the whole table past the printed page. Fixed layout makes
    overflow impossible; column widths come from the <colgroup> each table now carries,
    because the band rows are colspans and would otherwise flatten the widths. */
  .bR td { overflow-wrap: anywhere; }
  .bR-chg { break-inside: avoid; page-break-inside: avoid; } /* Balance Due never strands on its own page */
  .bR tr { break-inside: avoid; page-break-inside: avoid; } /* a row never splits across printed pages */
  .bR .bR-cQ { width: 10%; } .bR .bR-cP { width: 13%; } .bR .bR-cT { width: 15%; }
  .bR table.bR-nom .bR-cQ { width: 15%; } /* money=false: Menu 85 / Qty 15 (spec TABLE 5) */
  .bR .bR-cLab { width: 22%; } .bR .bR-cN { width: 15%; } .bR .bR-cW { width: 16%; }
  .bR .bR-cXL { width: 30%; } .bR .bR-cXN { width: 20%; } /* tax-exempt charges: 30/20/20/30 */
  .bR .bR-c8 { width: 8%; } .bR .bR-c15 { width: 15%; } .bR .bR-c16 { width: 16%; }
  .bR .bR-c24 { width: 24%; } .bR .bR-c28 { width: 28%; } .bR .bR-c33 { width: 33.3%; }
  .bR .bR-c36 { width: 36%; }
  /* fetch-588 pagination (spec TABLE 10) — all CSS-native; no JS paginator in v1 */
  @media print {
    .bR thead { display: table-header-group; }
    .bR tr { break-inside: avoid; page-break-inside: avoid; }
    .bR .bR-band, .bR .bR-sub, .bR .beo-course { break-after: avoid; page-break-after: avoid; }
    .bR tbody.beo-group { break-inside: avoid; page-break-inside: avoid; }
    .bR .bR-chg { break-inside: avoid; page-break-inside: avoid; }
    .bR .bR-pay { break-before: avoid; page-break-before: avoid; }
  }
  .bR th, .bR td { border: 0.75pt solid black; padding: 2pt 5pt; vertical-align: top; }
  .bR th { background: Gainsboro; font-weight: 700; text-align: center; }
  .bR .bR-band { background: Gainsboro; font-weight: 700; text-align: center; font-size: 10pt; }
  .bR th { font-size: 10pt; }
  .bR .bR-sub { font-size: 10pt; }
  /* parsed note block (spec primitives noteGroup/noteLabel/noteLine) */
  /* fetch-756: A LABELLED NOTE IS STILL A MENU LINE.
     This was text-align:left at 9.5pt against a table centred at 9pt, so any
     line carrying a "LABEL:" -- MADE TO ORDER:, MEATS:, SAUCES:, TOPPINGS: --
     came out left-aligned, half a point larger and indented, while everything
     around it stayed centred. Two alignments and two sizes inside one column,
     which is what Matt saw on Eight Eleven 25466-1.

     Reserve makes no such distinction: in its Stir Fry block "MADE TO ORDER:
     Steamed Rice (GF,DF,V) or Yakisoba Noodles" wraps to a CENTRED second line
     at the same size as "Sesame Tofu (GF, Vegan)" beside it. The label is
     content, not a change of register.

     Inherits now rather than overriding. The bold on the label itself
     (bR-nlab) stays -- it aids scanning and is applied consistently. */
  .bR .bR-note { text-align: center; }
  .bR .bR-nseg { margin: 1pt 0; }
  .bR .bR-nlab { font-weight: 700; }
  .bR .bR-nline { margin-top: 1pt; }   /* fetch-756: no hanging indent under centred text */
  .bR .bR-nbul { }   /* fetch-756: was a 12pt hang, which pulls a centred line off centre */
  .bR .bR-ngap { height: 2pt; }
  .bR .bR-sub { background: WhiteSmoke; font-weight: 700; text-align: center; }
  .bR .bR-item { text-align: center; }
  .bR .bR-d { font-weight: 400; font-size: 7.5pt; }
  .bR .bR-svc { font-weight: 600; font-size: 7.5pt; color: DimGray; }
  .bR td.bR-n { text-align: center; white-space: nowrap; }
  .bR .bR-schedule td.bR-n { white-space: normal; overflow-wrap: anywhere; }
  .bR td.bR-r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .bR .bR-wm { text-align: center; margin: 0 0 14pt; }
  .bR .bR-wm1 { font-family: Georgia, 'Times New Roman', serif; font-size: 14pt; letter-spacing: .35em; font-weight: 600; }
  .bR .bR-wm2 { font-size: 6pt; letter-spacing: .3em; margin-top: 2pt; color: DimGray; }
  .bR .bR-hdr { display: flex; justify-content: space-between; font-size: 8.5pt; line-height: 1.5; margin-bottom: 10pt; }
  .bR .bR-hdr .r { text-align: right; }
  .bR .bR-pay { font-size: 8pt; font-style: italic; margin-top: 8pt; line-height: 1.5; }
  .bR .bR-lab { font-weight: 700; }
  .bR td.bR-nob { border: 0; }
  /* fetch-1080: Food follows the reference's continuous columns and quiet item text.
     Other BEO sections retain their existing table treatment. */
  .bR table.bR-food { font-size: 10.5pt; line-height: 1.15; }
  .bR .bR-food .bR-cQ { width: 9%; }
  .bR .bR-food .bR-cP, .bR .bR-food .bR-cT { width: 13%; }
  .bR .bR-food.bR-nom .bR-cQ { width: 15%; }
  .bR .bR-food th, .bR .bR-food td { border-top: 0; border-bottom: 0; padding: 2pt 5pt; }
  .bR .bR-food th { background: var(--hair); font-size: inherit; border-top: 0.75pt solid black; border-bottom: 0.75pt solid black; padding: 3pt 5pt; }
  .bR .bR-food td { font-weight: 400; }
  .bR .bR-food .bR-food-title, .bR .bR-food td.bR-n, .bR .bR-food td.bR-r { text-align: center; }
  .bR .bR-food tbody > tr:last-child > td { border-bottom: 0.75pt solid black; }
  .bR .bR-food .beo-course > td { padding-top: 3pt; padding-bottom: 5pt; }
  .bR .bR-food .bR-d { font-size: inherit; }
  .bR .bR-beverage .bR-d, .bR .bR-setup .bR-d { color: inherit; }
  /* fetch-1082: Reserve separates courses, while dishes share a continuous grid. */
  .bR .bR-food-source .beo-course > td { border-top: 0.75pt solid black; }
  .bR .bR-food-source .bR-food-menu { font-weight: 700; }
  .bR .bR-food-source td.bR-band { border-bottom: 0.75pt solid black; font-weight: 700; }
  /* fetch-1086: venue identity and three readable levels within the source grid.
     Weight and spacing retain the hierarchy in monochrome printouts. */
  .beo2 .beo-brand { text-align: center; margin-bottom: 10pt; }
  .beo2 .beo-brand-logo { display: inline-block; width: auto; height: auto; max-width: min(160pt, 100%); max-height: 54pt; object-fit: contain; }
  .beo2 .beo-brand-name { font-size: 11pt; font-weight: 700; margin-top: 5pt; color: var(--text-heading); }
  .beo2 .beo-doc-meta { font-size: 10.5pt; line-height: 1.4; letter-spacing: .1em; color: var(--muted); margin-top: 5pt; }
  .beo2 .beo-doc-dateline { font-size: 11pt; color: var(--muted); text-align: center; }
  .beo2 .beo-client-masthead { padding-bottom: 14pt; margin-bottom: 12pt; border-bottom: 1pt solid var(--brand-gold-dark); text-align: center; }
  .bR .bR-wm { padding-bottom: 12pt; border-bottom: 1pt solid var(--brand-gold-dark); }
  .bR table { font-size: 10.5pt; line-height: 1.25; }
  .bR th, .bR .bR-food th { font-size: 10.5pt; background: var(--wash); }
  .bR td.bR-band, .bR .bR-food td.bR-band { font-size: 12pt; letter-spacing: .035em; padding-top: 5pt; padding-bottom: 5pt; background: var(--hair); color: var(--text-heading); }
  .bR .bR-sub, .bR .bR-food .bR-food-title { font-size: 10.5pt; font-weight: 700; background: var(--wash); }
  .bR .bR-food-source .bR-food-menu { font-size: 10.5pt; font-weight: 400; margin-top: 2pt; }
  .bR .beo-course > td { font-size: 11pt; }
  .bR .bR-d, .bR .bR-svc { font-size: 10.5pt; line-height: 1.25; }
  /* fetch-1078: a phone BEO is a reading document. Its labeled fields keep all
     values visible without panning each section; the Reserve print matrices stay intact. */
  @media print {
    .beo2 table { display: table; overflow: visible; }
    .beo2 table th, .beo2 table td { white-space: normal; }
  }
  @media screen {
    .beo2 .bR-chg td.bR-lab { white-space: normal; overflow-wrap: normal; }
  }
  @media screen and (max-width: 640px) {
    .beo2 { padding: var(--s-3) !important; overflow-wrap: anywhere; }
    .beo2 [style*="white-space:nowrap"] { white-space: normal !important; }
    .beo2 [style*="display:flex"] { flex-wrap: wrap; }
    .beo2 [style*="display:flex"] > * { min-width: 0; max-width: 100%; }
    .beo2 img { max-width: 100%; }
    .beo2 .bR-hdr { display: block; overflow-wrap: anywhere; }
    .beo2 .bR-hdr > div { margin-bottom: var(--s-3); }
    .beo2 .bR-hdr .r { text-align: left; }
    .beo2 .bR-wm1 { font-size: var(--t-title); letter-spacing: .08em; overflow-wrap: anywhere; }
    .beo2 .bR-wm2, .beo2 .bR-hdr, .beo2 .bR-pay,
    .beo2 .bR-d, .beo2 .bR-svc { font-size: var(--t-sub); }
    .beo2 [style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
    .beo2 > div:last-child { flex-wrap: wrap; gap: var(--s-2); }
    .beo2 .beo-readable-table { display: block; overflow: visible; width: 100%; margin: var(--s-3) 0; border: 0; table-layout: auto; }
    .beo2 .beo-readable-table colgroup { display: none; }
    .beo2 .beo-readable-table thead, .beo2 .beo-readable-table tbody { display: block; }
    .beo2 .beo-readable-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2) var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
    .beo2 .beo-readable-table [data-beo-head], .beo2 .beo-readable-table [data-beo-empty], .beo2 .beo-readable-table [data-beo-summary-label] { display: none; }
    .beo2 .beo-readable-table th, .beo2 .beo-readable-table td { display: block; min-width: 0; width: auto !important; max-width: none; padding: 0 !important; border: 0 !important; font-size: var(--t-body) !important; text-align: left !important; white-space: normal !important; overflow-wrap: anywhere; word-break: normal; }
    .beo2 .beo-readable-table [data-beo-wide], .beo2 .beo-readable-table [data-beo-band] > td { grid-column: 1 / -1; }
    .beo2 .beo-readable-table [data-beo-band] { grid-template-columns: minmax(0, 1fr); background: var(--wash); padding: var(--s-3); }
    .beo2 .beo-readable-table [data-beo-band] > td { background: transparent !important; font-weight: 700; }
    .beo2 .beo-readable-table td[data-beo-label]::before { content: attr(data-beo-label); display: block; margin-bottom: var(--s-1); color: var(--muted); font-size: var(--t-sub); font-weight: 600; }
    .beo2 .bR-food [data-beo-band] > th { grid-column: 1 / -1; background: transparent; }
    .beo2 .bR-food .beo-course { background: transparent; }
  }
  /* fetch-1199: the phone BEO reads by section. index.html draws this layer only for a phone
     render of the staff copy (beoqDocHTML), so none of it reaches a desktop document. Every
     rule that CLOSES something sits under `@media screen`: Print / Save as PDF from a phone
     with all sections shut still prints the whole order, and the row buttons and the header
     carry .noprint. No filled bars (Jack 09-19): a section is a plain label over a hairline,
     and the paper's own band row is hidden inside an open section because the row above it
     already says "Food". */
  .beoq-head { margin-bottom: var(--s-3); padding: var(--s-3); }
  .beoq-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
  .beoq-bar .btn { gap: var(--s-1); }
  .beoq-menu { position: relative; }
  .beoq-menu .hddm { min-width: 232px; }
  .beoq-menu .hddm .hddm-i { gap: var(--s-2); justify-content: flex-start; text-align: left; } /* out-specifies .beo-pdf-toolbar .btn's centring, which sits later in this file */
  .beoq-title { margin: var(--s-3) 0 0; font-size: var(--t-section); font-weight: 700; line-height: 1.25; color: var(--text-heading); overflow-wrap: anywhere; }
  .beoq-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); margin-top: var(--s-1); font-size: var(--t-sub); color: var(--muted); font-variant-numeric: tabular-nums; }
  .beoq-tools { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); margin-top: var(--s-1); }
  .beoq-tools .beoq-meta { margin-top: 0; }
  .beoq-tools .btn { min-height: var(--control-height-touch); margin-left: auto; }
  .beoq-h { margin: 0; font: inherit; }
  @media screen {
    .beo2.beoq { padding-top: var(--s-1) !important; padding-bottom: var(--s-2) !important; }
    .beoq-sec { border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--phone-nav-height, 55px) + var(--s-2)); } /* closing a long section brings its row back under the sticky phone header (the asset page's offset, fetch-1059) */
    .beoq-sec:last-of-type { border-bottom: 0; }
    .beoq-sec:not(.is-open) > .beoq-body { display: none; }
    .beoq-sec.is-open > .beoq-body { padding-bottom: var(--s-3); }
    /* an OPEN section's row rides under the phone's top bar (the event page's offset), so a
       reader forty rows into Food can still see which section it is and close it */
    .beoq-sec.is-open > .beoq-h { position: sticky; top: var(--phone-nav-height, 55px); z-index: 2; background: var(--surface-card); border-bottom: 1px solid var(--hair); }
    .beoq-toggle { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t c" "s c"; align-items: center; column-gap: var(--s-3); width: 100%; min-height: 56px; padding: var(--s-2) 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
    .beoq-t { grid-area: t; font-family: Inter, Arial, sans-serif; font-size: var(--t-body); font-weight: 700; color: var(--text-heading); }
    .beoq-s { grid-area: s; font-family: Inter, Arial, sans-serif; font-size: var(--t-sub); color: var(--muted); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
    .beoq-chev { grid-area: c; width: 9px; height: 9px; margin: 0 var(--s-2) 4px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s ease; }
    .beoq-sec.is-open .beoq-chev { margin-bottom: -4px; transform: rotate(-135deg); }
    .beoq-sec.is-open .beoq-t { color: var(--brand-gold-dark); }
    .beoq .beoq-body tr:has(> .bR-band) { display: none; }
    .beoq .beoq-body .beo-readable-table { margin-top: 0; }
    .beoq .beoq-body .bR-wm { padding-bottom: var(--s-3); margin-bottom: var(--s-3); }
  }
  /* An open section is still a list, so it is set tighter than the flat phone document was:
     the item's own name needs no "Menu" label above it, and Qty / Price / Total share one row
     (auto-fill, so a 320px phone falls back to two columns rather than breaking a dollar
     amount). Width-scoped like the fetch-1078 cards it adjusts - a phone turned sideways past
     640px gets its tables back, and these rules must not reach them. */
  @media screen and (max-width: 640px) {
    .beoq .beoq-body table[aria-label] tr:not([data-beo-band]), .beoq .beoq-body .bR-chg tr { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
    .beoq .beoq-body td.bR-item[data-beo-label]::before { display: none; }
    .beoq .beoq-body > .beo-readable-table:last-child tr:last-child { border-bottom: 0; }
  }
  @media (prefers-reduced-motion: reduce) { .beoq-chev { transition: none; } }
  .tc-sheet { min-width: 640px; margin-top: var(--s-2); width: 100%; }
  .tc-caret { color: var(--brand-gold-mid); font-size: var(--t-sub); }
  /* fetch-456: the per-person timesheet workbench (read-only half) */
  .tcp-name { font-family: 'Cormorant Garamond', Georgia, serif; font-size: var(--t-title); color: var(--text-heading); margin-left: var(--s-2); }
  .tcp-sum { display: flex; gap: var(--s-5); flex-wrap: wrap; padding: var(--s-2) 2px var(--s-3); font-size: var(--t-body); align-items: baseline; }
  .tcp-sum strong { font-size: var(--t-section); }
  .tcp-lab { color: var(--muted); margin-right: var(--s-1); font-size: var(--t-sub); }
  /* fetch-841: the person's inline Timeline feed — the Employee Timeline page, transferred */
  .tcp-timeline { margin: var(--s-2) 0 var(--s-3); padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--wash); }
  .tcp-tl-day { margin-top: var(--s-3); padding-top: var(--s-2); border-top: 1px solid var(--hair); }
  .tcp-tlbtn--on { border-color: var(--gold); color: var(--gold-dark); }
  .tcp-table { min-width: 880px; width: 100%; }
  .tcp-table td { vertical-align: middle; }
  .tcp-chip { display: inline-block; border: 1px solid var(--line); background: var(--surface-card, White); border-radius: 8px; padding: 2px 9px; font-size: var(--t-sub); }
  .tcp-ic { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; border-radius: 6px; font-size: var(--t-sub); font-weight: 700; vertical-align: middle; }
  .tcp-ic-warn { background: var(--warn-bg); color: var(--warn-fg); }
  .tcp-ic-bad { background: var(--bad-bg); color: var(--bad-fg); }
  .tcp-bad { color: var(--bad-fg); }
  .tcp-warn { color: var(--warn-fg); }
  .tcp-dash { color: var(--muted); }
  .tcp-flagged td { background: var(--warn-bg); }
  .tcp-empty td { color: var(--muted); }
  .tcp-editbtn { padding: 3px 10px; font-size: var(--t-sub); }
  .tcp-actcell { white-space: nowrap; } .tcp-actcell .tcp-editbtn + .tcp-editbtn { margin-left: 4px; } /* fetch-459: Edit + ✂ side by side */
  .tcp-tags { display: flex; flex-wrap: wrap; gap: var(--s-1); align-items: center; margin-top: var(--s-2); } /* fetch-462: position chips + quick-add on the person pane */
  .tcp-tagin { max-width: 220px; padding: 4px 8px; font-size: var(--t-sub); }
  .grp-hint { margin-left: var(--s-2); } /* fetch-467: untouched-rule hint */
  .svy-wide { grid-column: 1/-1; } /* fetch-465: full-width field, tokenized (the anon shell's inline habit stops here) */
  .svy-mulbl { display: flex; gap: 9px; align-items: center; font-weight: 400; text-transform: none; letter-spacing: 0; font-size: var(--t-body); padding: 3px 0; cursor: pointer; } /* fetch-465: multi-checkbox question rows */
  .svy-mulbl input { width: 17px; height: 17px; flex-shrink: 0; accent-color: var(--gold); }
  .tcp-schednote { font-size: var(--t-sub); }
  .tcp-sortable { cursor: pointer; user-select: none; }
  .tcp-sortable:hover { color: var(--gold-dark); }
  /* fetch-457: Timesheets two-pane — WIW's one-page model (rail of people + person pane) */
  .tcw { display: flex; gap: var(--s-3); align-items: flex-start; }
  .tcw-rail { width: 280px; /* fetch-937: was 232 - the All row carries the four lenses and the pill now */ flex-shrink: 0; background: var(--surface-card, White); border: 1px solid var(--line); border-radius: 14px; padding: var(--s-2); position: sticky; top: var(--s-2); display: flex; flex-direction: column; max-height: 82vh; }
  .tcw-search { width: 100%; margin-bottom: var(--s-2); }
  .tcw-list { overflow-y: auto; flex: 1; }
  .tcw-item { appearance: none; width: 100%; font: inherit; text-align: left; color: var(--ink); background: transparent; border: 0; display: flex; align-items: center; gap: var(--s-2); padding: 8px 10px; border-radius: 9px; cursor: pointer; font-size: var(--t-body); border-left: 3px solid transparent; }
  .tcw-item:hover { background: var(--wash); }
  .tcw-item.on { background: var(--wash); border-left-color: var(--gold); font-weight: 600; }
  .tcw-item .tcw-nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tcw-flag { color: var(--warn-fg); }
  .tcw-all { border-bottom: 1px solid var(--hair); border-radius: 9px 9px 0 0; margin-bottom: var(--s-1); }
  .tcw-main { flex: 1; min-width: 0; }
  .tcw-nrbanner { border-left: 3px solid var(--warn-fg); }
  .tcw-nrhead { align-items: center; cursor: pointer; gap: var(--s-2); }
  .tcw-nrcaret { color: var(--muted); }
  .tcw-nrrow { padding: 8px 0; border-bottom: 1px solid var(--hair); align-items: center; gap: var(--s-2); }
  .tcw-nrsub { font-size: var(--t-body); margin-top: var(--s-1); }
  .tcw-nrbody { margin-top: var(--s-2); }
  /* fetch-937: the rail lenses - three icon buttons between All people and the count pill. Not .btn: the rail
     is compact, so this is its own reset with the colour SET (a bare <button> paints iOS system blue). */
  .tcw-lens { appearance: none; display: inline-flex; align-items: center; gap: var(--s-2); width: 100%; min-height: var(--control-height-touch, 44px); padding: var(--s-2); border: 1px solid transparent; border-radius: var(--r-m); background: transparent; color: var(--muted); font: inherit; font-size: var(--t-sub); font-weight: 600; line-height: 1.3; text-align: left; cursor: pointer; }
  .tcw-lens-label { flex: 1; min-width: 0; }
  .tcw-lens .tnum { flex-shrink: 0; }
  .tcw-lens .ci { width: 14px; height: 14px; flex-shrink: 0; }
  .tcw-lens:hover { background: var(--wash); color: var(--ink); }
  .tcw-lens--review { color: var(--warn-fg); }
  .tcw-lens--live:not(.tcw-lens--zero) { color: var(--ok-fg); }
  .tcw-lens.on { border-color: var(--gold); background: var(--surface-card, White); color: var(--text-heading); }
  .tcw-all { gap: var(--s-1); flex-wrap: wrap; } .tcw-all .tcw-nm { flex: 1 0 auto; } /* the label never truncates: when the lens group does not fit beside it, the group wraps under it, right-aligned */
  .tcw-lenses { display: grid; gap: var(--s-1); padding-bottom: var(--s-2); margin-bottom: var(--s-1); border-bottom: 1px solid var(--hair); }
  .tcw-lenshead { align-items: center; gap: var(--s-2); }
  .tcw-lenshead .ci { width: 16px; height: 16px; vertical-align: -3px; }
  .tcw-lenspane--inset { padding: 0; }
  .tcm-lens { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); margin: 0 0 var(--s-3); }
  .tcm-lens .tcw-lens.on { border-color: var(--gold); background: var(--wash); } /* (0,3,0): the strip's own --line border used to win over .tcw-lens.on, so the armed lens looked like the other three */
  .tcm-lens .tcw-lens { flex: 1; justify-content: center; gap: var(--s-1); min-height: var(--control-height-touch, 44px); border-color: var(--line); border-radius: var(--r-m); font-size: var(--t-sub); }
  /* fetch-1542: the Needs a code lens - the row is the editor (a position picker + Save), feedback inside the row */
  .tcw-lens--code:not(.tcw-lens--zero) { color: var(--warn-fg); }
  .tcw-codegrp { margin-top: var(--s-4); }
  .tcw-codegrph { align-items: baseline; gap: var(--s-2); flex-wrap: wrap; padding-bottom: var(--s-1); border-bottom: 1px solid var(--line); }
  .tcw-codegrph h3 { margin: 0; font-size: var(--t-label); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  .tcw-codesub { align-items: center; gap: var(--s-2); flex-wrap: wrap; padding: var(--s-2) 0 0; color: var(--muted); font-size: var(--t-sub); }
  .tcw-coderow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(14rem, 22rem) auto; gap: var(--s-3); align-items: center; padding: var(--s-2) 0; border-bottom: 1px solid var(--hair); }
  .tcw-coderow--done { grid-template-columns: minmax(0, 1fr); }
  .tcw-codewho { min-width: 0; }
  .tcw-codepick { display: grid; gap: 2px; }
  .tcw-codepick .sel { min-height: var(--control-height-touch, 44px); }
  .tcw-codefb { grid-column: 1 / -1; color: var(--ok-fg); font-size: var(--t-sub); }
  .tcw-codefb--bad { color: var(--bad-fg); }
  .tcw-codeinfo { display: flex; gap: var(--s-3); align-items: baseline; flex-wrap: wrap; padding: var(--s-2) 0; border-bottom: 1px solid var(--hair); }
  .tcw-codeapply { display: flex; gap: var(--s-3); align-items: center; flex-wrap: wrap; margin-top: var(--s-3); padding: var(--s-3); background: var(--wash); border-radius: var(--r-m); }
  @media (max-width: 640px) {
    .tcw-coderow { grid-template-columns: minmax(0, 1fr); gap: var(--s-2); }
    .tcw-coderow .btn { width: 100%; min-height: var(--control-height-touch, 44px); }
    .tcw-codeapply .btn { width: 100%; min-height: var(--control-height-touch, 44px); }
  }
  .tc-sheet tbody tr.rowlink:hover td, .tcp-table tbody tr:hover td { background: var(--wash); } /* fetch-457 (Jack): the Manager-Schedule hover feel — you can see where your cursor is */
  .tcp-flagged:hover td { background: var(--warn-bg); }
  .tcp-editrow td { background: var(--wash); border-bottom: 2px solid var(--gold); }
  .tcp-editcard { padding: var(--s-2) var(--s-1); }
  .tcp-voidbtn { color: var(--bad-fg); border-color: var(--bad-bg); }
  @media (max-width: 900px) { .tcw { display: block; } .tcw-rail { width: auto; position: static; max-height: 200px; margin-bottom: var(--s-3); } }
  /* fetch-513 — THE PHONE TIMESHEET STACK (roster → person → entry → edit).
     Only rendered at ≤640px, where timeclock.js swaps the two-pane for tcmHTML().
     Row heights are deliberately thumb-sized: WIW's rows are ~64px and that is why
     they are usable one-handed mid-shift. */
  .tcm-card { padding: var(--s-3) var(--s-3) var(--s-4); }
  .tcm-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); margin-bottom: var(--s-3); }
  .tcm-title { font-size: var(--t-section); }
  .tcm-wk { color: var(--muted); font-size: var(--t-sub); }
  .tcm-back { padding: 6px 12px; font-weight: 600; }
  /* .notice is display:flex, which turns an inline <strong> into a flex item and wraps it one
     character per line at 390px ("4 3 . 5 0 h" — caught in probe shot 02). These read as prose. */
  .tcm-note { display: block; margin: 0 0 var(--s-3); font-size: var(--t-sub); line-height: 1.45; }
  .tcm-note strong, .tcp-noclock strong { white-space: nowrap; }
  .tcm-search { width: 100%; margin-bottom: var(--s-2); }
  .tcm-list { display: flex; flex-direction: column; }
  .tcm-item { appearance: none; width: 100%; font: inherit; text-align: left; color: var(--ink); background: transparent; border: 0; }
  .tcm-item, .tcm-entry { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-3) 2px; border-top: 1px solid var(--hair); cursor: pointer; min-height: 56px; }
  .tcm-item:first-child { border-top: 0; }
  .tcm-item:active, .tcm-entry:active { background: var(--wash); }
  .tcm-item-main, .tcm-entry-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .tcm-nm, .tcm-times { font-weight: 600; font-size: var(--t-body); overflow-wrap: anywhere; }
  .tcm-sub { font-size: var(--t-sub); overflow-wrap: anywhere; }
  .tcm-hrs { font-weight: 700; font-size: var(--t-body); }
  .tcm-chev { color: var(--muted); font-size: var(--t-section); flex-shrink: 0; }
  .tcm-flag { color: var(--warn-fg); font-weight: 600; }
  .tcm-bad { color: var(--bad-fg); font-weight: 600; }
  .tcm-personhead { margin-bottom: var(--s-2); display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
  .tcm-sum { display: flex; gap: var(--s-4); flex-wrap: wrap; padding: 0 2px var(--s-3); align-items: baseline; }
  .tcm-sum strong { font-size: var(--t-body); display: block; }
  .tcm-days { margin-top: var(--s-2); }
  .tcm-dayhead { display: flex; justify-content: space-between; gap: var(--s-2); padding: var(--s-2) 2px; margin-top: var(--s-2); background: var(--wash); border-radius: 8px; font-size: var(--t-sub); font-weight: 700; letter-spacing: .02em; }
  .tcm-blank { padding: var(--s-2) 2px; font-size: var(--t-sub); color: var(--muted); border-top: 1px solid var(--hair); overflow-wrap: anywhere; }
  .tcm-blank--bad { color: var(--bad-fg); }
  /* fetch-580 (Jack, "edit the right fields from this page w/out having to click into another"):
     THE ROW IS THE EDITOR. Tapping a punch opens it in place instead of navigating to the entry
     screen and then to a second edit screen. Four fields — times, venue, position, break — cover
     every correction a manager actually makes on a phone; void / split / date-change / full audit
     stay on the entry screen behind "Full entry", so nothing is removed, only shortened.
     This is a DISCLOSURE, not a dialog: aria-expanded + Escape + focus return, no focus trap.
     That is why it can ship ahead of the shared modal contract (fetch-579) without borrowing it. */
  /* fetch-1191: the phone correction form has the same field rhythm in both manager shells. */
  .tcr { display: grid; gap: var(--s-2); min-width: 0; border-top: 2px solid var(--navy); background: var(--wash); padding: var(--s-3); }
  .tcr-hd { display: flex; align-items: center; justify-content: flex-end; gap: var(--s-2); }
  .tcr-hd strong { font-size: var(--t-sub); color: var(--muted); }
  .tcr-f { min-width: 0; }
  .tcr-f label { display: block; font-size: var(--t-sub); color: var(--muted); font-weight: 600; margin-bottom: var(--s-1); }
  .tcr-in { box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; min-height: var(--control-height-touch, 44px); border: 1px solid var(--line); border-radius: var(--r-s); padding: var(--s-2); font: inherit; font-size: var(--t-body); font-weight: 600; line-height: 1.35; color: var(--ink); background: var(--surface-card, White); }
  .tcr-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); min-width: 0; }
  .tcr-prev { background: var(--info-bg); color: var(--info-fg); border-radius: var(--r-s); padding: var(--s-2); font-size: var(--t-sub); font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
  .tcr-prev--bad { background: var(--bad-bg); color: var(--bad-fg); }
  .tcr-sugs { display: flex; gap: var(--s-2); flex-wrap: wrap; }
  .tcr-sug { border: 1px dashed var(--gold-dark); background: var(--surface-card, White); color: var(--gold-dark); border-radius: var(--r-m); padding: var(--s-1) var(--s-3); font-size: var(--t-sub); font-weight: 600; }
  .tcr-acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
  .tcr :is(.tcr-hd, .tcr-sugs, .tcr-acts) .btn { min-height: var(--control-height-touch, 44px); min-width: var(--control-height-touch, 44px); white-space: normal; }
  .tcm-pend { color: var(--gold-dark); }
  .tcm-pend s { color: var(--muted); font-weight: 500; margin-right: var(--s-1); }
  @media (max-width: 640px) { .tcr-in { font-size: max(1rem, var(--t-body)); } }
  .tcm-kvs { display: flex; flex-direction: column; }
  .tcm-kv { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) 2px; border-top: 1px solid var(--hair); min-height: 52px; }
  .tcm-kv:first-child { border-top: 0; }
  .tcm-k { color: var(--muted); font-size: var(--t-sub); flex-shrink: 0; }
  .tcm-v { text-align: right; overflow-wrap: anywhere; }
  .tcm-form .tcm-kv { cursor: pointer; }
  .tcm-in { flex: 1; max-width: 62%; text-align: right; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; background: var(--surface-card, White); }
  /* fetch-1193: Add stays visible beside the date. Split retains the existing
     hover/focus reveal on desktop and stays visible on touch. */
  .tcp-addbtn, .tcp-splitbtn { border-color: transparent; background: none; color: var(--muted);
    padding: 2px var(--s-2); min-height: 0; line-height: 1.4; }
  .tcp-addbtn:hover, .tcp-splitbtn:hover { color: var(--ink); background: var(--wash); border-color: var(--line); }
  @media (hover: hover) {
    .tcp-table tbody tr .tcp-splitbtn { opacity: 0; transition: opacity .12s ease; }
    .tcp-table tbody tr:hover .tcp-splitbtn,
    .tcp-table tbody tr .tcp-splitbtn:focus-visible { opacity: 1; }
  }
  /* fetch-559: the plain-English time preview is its own line under the fields, never a grid cell. */
  .tcf-span { grid-column: 1 / -1; }
  /* fetch-553/567: the embedded kitchen schedule. It is a whole app, not a
     widget, so it gets the space below the tab bar rather than sitting in a
     card inside it -- no border, no radius, no shadow. The viewport cap stays:
     the frame must scroll INTERNALLY rather than growing the page, or his
     sticky week header scrolls away and the grid stops being readable. */
  /* fetch-629: the three new embeds (Kitchen Inventory counts, Venue Menus,
     Recipe Box) are the same kind of thing -- a whole app given the space
     below the tab bar. They JOIN these selectors rather than copying the
     numbers, so the viewport cap stays a single decision. */
  .ksched-wrap, .cse-embed-wrap { padding: 0; overflow: hidden; border: 0; border-radius: 0;
    background: none; box-shadow: none; }
  .ksched-frame, .cse-embed-frame { display: block; width: 100%; height: calc(100vh - 120px); min-height: 420px; border: 0; }
  .ksched-actions, .cse-embed-actions { justify-content: center; }
  /* A segment bar above a frame eats into that height. These two are only the
     PRE-MEASUREMENT fallback: bindCseAppEmbed measures the frame's own top and
     sizes it to the viewport, because fetch-578 measured this exact constant
     32px out on a phone. A constant here is a starting point, not the answer. */
  .cse-embed-wrap--segged .cse-embed-frame { height: calc(100vh - 166px); }

  /* fetch-629: THE EMBED REACHES THE TAB'S OWN EDGES. Matt on the live tab,
     about the Kitchen Schedule: "can it be more seemless where the app butts
     right up against the headers?" These are whole apps, not pages, so the
     page's own inset is a border around somebody else's window.

     THE SIDES NEED A NEGATIVE MARGIN, NOT padding:0. .brandbar lives inside
     .wrap and already breaks out with its own margin: 0 -22px. Zero .wrap's
     padding and the bar's -22px has nothing left to cancel — it hangs off both
     edges and the whole page gains a horizontal scrollbar. Matching the bar's
     trick also keeps the two agreeing on ultrawides, where .wrap caps at
     --w-wide.

     THE BOTTOM NEEDS THE OPPOSITE. The obvious symmetry, margin: 0 -22px -60px,
     is wrong: what sits under the frame is not .wrap's padding, it is the
     VERSION FOOTER, .headwrap's next sibling. A negative margin hauls the
     footer up and prints it across the middle of the embedded app — every
     measurement stays green and only a screenshot shows it. So the bottom
     zeroes the padding instead.

     TWO CLASSES, because the tabs are not the same shape. w-bleed is a bare
     frame (Venue Menus, Recipe Box) and drops the top gap too. w-bleed-x is
     Kitchen Inventory, which has a segment bar above the frame -- a normal page
     element that keeps its inset, so only the sides and the bottom give way.

     kitchenSched IS here now (fetch-650). fetch-629 left it out because the
     fetch-578 PR was going to do it and Jack said he would rebase that himself.
     Two days on it had not landed, and it had gone 50 builds stale carrying
     v5.249 -- and by then this machinery existed, so its hardcoded
     calc(100vh - 56px) would have been a step backwards. .ksched-wrap simply
     joins these selectors, exactly as the old comment predicted.
     (Named "fetch-578" rather than by its PR number with a hash in front: the
     UI-debt ratchet counts /#[0-9a-fA-F]{3,8}/ as a raw hex colour, so a bare
     PR reference in a COMMENT fails the build. It caught this one.) */
  .wrap.w-bleed .headwrap { padding-top: 0; }
  .wrap.w-bleed, .wrap.w-bleed-x { padding-bottom: 0; }
  /* fetch-1330 (Matt): "get rid of that bottom border". Under an embedded app the version
     footer is a cream band between the app and the window's edge -- the frame is sized to
     stop above it. On these tabs it goes, and the frame runs to the bottom. Every other tab
     still shows the version. */
  .wrap.w-bleed > .footer, .wrap.w-bleed-x > .footer { display: none; }
  .wrap.w-bleed .toolbar, .wrap.w-bleed-x .toolbar { margin-bottom: 0; }
  .wrap.w-bleed .cse-embed-wrap, .wrap.w-bleed-x .cse-embed-wrap,
  .wrap.w-bleed .ksched-wrap { margin: 0 -22px; }
  /* On paper the negative margin would hang off the sheet. */
  @media print { .wrap.w-bleed .cse-embed-wrap, .wrap.w-bleed-x .cse-embed-wrap,
                 .wrap.w-bleed .ksched-wrap { margin: 0; } }
  /* The phone override is GONE, not forgotten. It existed because the header
     row wrapped to two lines on a narrow screen and pushed the frame down
     further than on desktop -- measured at 273px vs 168px. With the row
     removed the frame starts at 88px on both, so a second number would only
     be a phone-shaped hole at the bottom of the page. */
  /* fetch-557 (Jack): a pick-or-type field has to LOOK like a dropdown. The caret sits over the
     input's right edge (sibling, not wrapper — wrapping would break .field/.grid layouts). */
  .combo-in { padding-right: var(--s-5); }
  .combo-caret { position: absolute; margin-left: calc(var(--s-5) * -1); width: var(--s-5);
    border: 0; background: none; color: var(--muted); cursor: pointer; line-height: 1;
    padding: var(--s-1) 0; font-size: var(--t-sub); }
  .combo-caret:hover { color: var(--ink); }
  /* fetch-556 (Jack): the timesheet edits in place — the WIW model. A time cell IS the edit
     control, an empty day IS the add button, and each day carries a ＋. Affordances are quiet
     (a dotted underline, a hover wash) so a payroll sheet still reads as a sheet. */
  .tcp-cell--edit { cursor: pointer; border-bottom: 1px dashed var(--line); }
  .tcp-cell--edit:hover { background: var(--wash); }
  .tcp-addable { cursor: pointer; }
  .tcp-addable:hover { background: var(--wash); }
  .tcp-addbtn { padding: 2px var(--s-2); min-height: 0; line-height: 1.4; }
  .tc-minihead { padding: var(--s-2) 0; }
  .tc-minihead .tc-wklabel { font-size: var(--t-sub); }
  .tcm-span { padding: var(--s-2) 2px; font-size: var(--t-sub); color: var(--muted); }
  .tcm-span--bad { color: var(--bad-fg); font-weight: 600; }
  .tcm-aud { margin-top: var(--s-3); padding: var(--s-3); background: var(--wash); border-radius: 10px; font-size: var(--t-sub); line-height: 1.5; }
  .tcm-audh { font-weight: 700; margin-bottom: 4px; }
  .tcm-actions { margin-top: var(--s-3); display: flex; gap: var(--s-2); flex-wrap: wrap; }
  .tcm-actions .btn { flex: 1; min-width: 140px; padding: 11px 14px; }
  .tcp-noclock { display: block; margin: 0 0 var(--s-3); font-size: var(--t-sub); line-height: 1.45; }
  .tc-detail > td { background: var(--wash); border-bottom: 1px solid var(--line); }
  .tc-posline { padding: 6px 4px 2px; }
  .tc-punch { display: flex; gap: var(--s-3); align-items: center; flex-wrap: wrap; padding: 6px 4px; border-top: 1px solid var(--hair); font-size: var(--t-sub); }
  .tc-pwhen { min-width: 86px; font-weight: 600; }
  .tc-punch .tc-editbtn { margin-left: auto; padding: 2px 9px; font-size: var(--t-sub); }
  .tc-foot { margin-top: var(--s-2); }
  /* fetch-364: staff app v2 (My Events + praise + drop requests) — token-clean utilities */
  .mt-1 { margin-top: var(--s-1); }
  .mt-2 { margin-top: var(--s-2); }
  .sa-line { display: flex; gap: var(--s-2); align-items: center; }
  .sa-main { flex: 1; min-width: 0; }
  .sa-right { text-align: right; flex-shrink: 0; }
  .sa-drop { padding: 6px 10px; font-size: var(--t-sub); color: var(--bad-fg); flex-shrink: 0; }
  .sa-keep { padding: 4px 8px; font-size: var(--t-label); margin-top: 3px; }
  .sa-in { width: 100%; font-size: var(--t-body); padding: 9px; box-sizing: border-box; margin-top: var(--s-2); }
  .sa-wide { flex: 1; padding: 10px; }
  .sa-read-notice { display: block; }
  .sa-read-notice .actions { flex-wrap: wrap; }
  .sa-read-notice .btn { min-height: var(--control-height-touch); white-space: normal; }
  .sa-grow { flex: 1; min-width: 180px; }
  .sa-menuhead { margin-top: var(--s-2); letter-spacing: .5px; }
  /* fetch-365: staff BEO view (food / bev / timeline only) */
  .sb-title { font-weight: 700; font-size: var(--t-section); color: var(--text-heading); }
  .sb-row { display: flex; gap: var(--s-2); padding: 6px 0; border-bottom: 1px solid var(--hair); align-items: baseline; }
  .sb-t { min-width: 70px; font-weight: 600; white-space: nowrap; }
  .sb-qty { color: var(--muted); white-space: nowrap; font-weight: 600; }
  .sb-svc { font-size: var(--t-label); color: var(--gold-dark); }
  .sb-fn { margin-top: var(--s-2); font-weight: 700; color: var(--navy); font-size: var(--t-sub); letter-spacing: .5px; }
  .sb-note { font-size: var(--t-sub); color: var(--muted); font-style: italic; }
  .sb-nm { font-weight: 500; } /* fetch-367: every BEO line reads the same — no more bold-items-vs-italic-notes */
  /* fetch-368: birthday rows on the Home Team card */
  .bsev-gold { background: var(--gold); }
  .bsev-stone { background: var(--brand-stone); }
  .brief-note { color: var(--brand-stone); font-size: var(--t-label); padding: var(--s-1) 0 var(--s-2); } /* fetch-519: the "already handled above" line — a class, not an inline style */
  .bsev-red { background: var(--bad-fg); }   /* fetch-440: urgency family (fetch-413) on brief rows */
  .bsev-amber { background: var(--warn-fg); }
  .rcp-btns { display: flex; gap: var(--s-1); flex-wrap: wrap; flex-shrink: 0; }
  .bi-main { flex: 1; min-width: 0; }
  .bi-venue { color: var(--muted); font-weight: 400; }
  .sb-openbtn { padding: 11px; }
  .sb-course { margin-top: var(--s-2); font-weight: 700; font-size: var(--t-sub); color: var(--gold-dark); letter-spacing: .04em; text-align: center; }
  /* fetch-366: service-pass extras */
  .svc-h { font-weight: 700; }
  .svc-in { width: 100%; padding: 5px 6px; font-size: var(--t-sub); box-sizing: border-box; }
  .tc-err { border-left: 3px solid var(--bad-fg); color: var(--bad-fg); }
  /* fetch-357: Staff Schedule grid (WIW-shape) */
  .sg-grid { min-width: 980px; }
  .sg-scroll { max-height: 72vh; overflow: auto; border: 1px solid var(--hair); border-radius: var(--r-s); }
  .sg-row { display: grid; grid-template-columns: 170px repeat(7, minmax(104px, 1fr)); border-bottom: 1px solid var(--hair); }
  .sg-head { border-bottom: 2px solid var(--line); position: sticky; top: 0; background: var(--surface-card, White); z-index: 3; }
  .sg-name { padding: 6px 8px; font-weight: 600; font-size: var(--t-sub); border-right: 1px solid var(--line); position: sticky; left: 0; background: var(--surface-card, White); z-index: 1; }
  .sg-head .sg-name { z-index: 4; }
  /* fetch-1419: a person's name is the door to Message and Assign task - it reads as the name it always was */
  .sg-persondoor { display: block; width: 100%; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
  .sg-persondoor:hover { text-decoration: underline; }
  .sgp-persondoor { margin: var(--s-2) 0; min-height: var(--control-height-touch); }
  .cse-modal.sg-person { overflow: visible; } /* the Message choices hang below the sheet; the composer scrolls inside its own box */
  .sg-person .tc-task-sheet { max-height: 60vh; overflow: auto; }
  @media (max-width: 640px) { .cse-modal.sg-person { overflow: auto; } .sg-person .tc-task-sheet { max-height: none; overflow: visible; } } /* a phone sheet is the whole screen: it scrolls as one */
  .sg-cell { border-right: 1px solid var(--hair); padding: 3px; min-height: 40px; position: relative; }
  .sg-cell:not(:has(.sg-form)):hover { background: var(--wash); cursor: pointer; }
  .sg-today { background: var(--brand-blue-deep); color: var(--paper); }
  .sg-paint { outline: 1px dashed var(--brand-gold-mid); outline-offset: -2px; cursor: copy; }
  .sg-chip { border: 1px solid var(--line); border-left: 3px solid var(--vc, var(--muted)); border-radius: var(--r-s); padding: 2px 5px; margin-bottom: 2px; font-size: var(--t-label); background: var(--surface-card, White); display: flex; gap: 4px; align-items: center; flex-wrap: wrap; cursor: pointer; }
  .sg-chip .sg-t { font-weight: 700; }
  .sg-chip .sg-r { color: var(--muted); }
  .sg-draft { background: repeating-linear-gradient(45deg, var(--wash), var(--wash) 5px, var(--hair) 5px, var(--hair) 10px); }
  .sg-copybtn { margin-left: auto; border: 1px solid var(--line); background: var(--surface-card, White); border-radius: 4px; cursor: pointer; font-size: var(--t-label); padding: 0 4px; color: var(--muted); }
  .sg-copybtn:hover { border-color: var(--brand-gold-mid); color: var(--text-heading); }
  .sg-form { padding: 4px; background: var(--wash); border-radius: var(--r-s); }
  /* fetch-1305: the view-only staff schedule wears the grid without its edit cues */
  .sg-ro-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); padding: var(--s-3) var(--s-3) 0; margin-bottom: var(--s-2); }
  .sg-ro-bar #sgRoQ { flex: 1 1 180px; min-width: 0; }
  .sg-ro-note { margin: 0 var(--s-3) var(--s-3); }
  .sg-ro .sg-cell:not(:has(.sg-form)):hover { cursor: default; }
  .sg-ro .sg-cell:not(.sg-today):hover { background: none; }
  .sg-ro .sg-chip, .sg-ro .sgp-row { cursor: default; }
  /* fetch-560: compact live-state and stale-editor conflict UI; state lives in SG/cseLive. */
  .sg-live-state { display: inline-flex; align-items: center; gap: var(--s-1); margin-left: var(--s-1); }
  .sg-live-conflict { display: flex; flex-direction: column; gap: var(--s-1); margin-bottom: var(--s-2); }
  .sg-live-actions { display: flex; flex-wrap: wrap; gap: var(--s-1); }
  .sg-trlab { display: flex; align-items: center; gap: 5px; font-size: var(--t-sub); cursor: pointer; user-select: none; } /* fetch-533 */
  .sg-trbadge { font-size: var(--t-sub); } /* fetch-533 */
  .sg-form input, .sg-form select { width: 100%; box-sizing: border-box; font-size: var(--t-sub); padding: 3px 5px; margin-top: 3px; }
  .sg-sugg { display: flex; flex-direction: column; gap: 2px; }
  .sg-suggbtn { border: 1px solid var(--line); background: var(--surface-card, White); border-radius: 4px; font-size: var(--t-label); padding: 2px 5px; cursor: pointer; text-align: left; }
  .sg-suggbtn:hover { border-color: var(--brand-gold-mid); background: var(--wash); }
  .sg-formbtns { display: flex; gap: 3px; margin-top: 4px; }
  .sg-formbtns .btn { padding: 2px 8px; font-size: var(--t-label); flex: 1; }
  .sg-paintbar { margin-bottom: var(--s-2); align-items: center; }
  .sg-osrow .sg-cell, .sg-osrow .sg-name { background: var(--brand-blue-deep); color: var(--paper); }
  .sg-osrow .sg-name { font-weight: 700; }
  .sg-oscell { cursor: pointer; }
  .sg-oscell:hover { outline: 1px dashed var(--paper); outline-offset: -2px; }
  .sg-backrow { margin-bottom: var(--s-2); }
  .sg-lens { display: inline-flex; gap: 0; }
  .sg-lensbtn { border-radius: 0; }
  .sg-lens .sg-lensbtn:first-child { border-radius: var(--r-s) 0 0 var(--r-s); }
  .sg-lens .sg-lensbtn:last-child { border-radius: 0 var(--r-s) var(--r-s) 0; margin-left: -1px; }
  .sg-lens .sg-lensbtn--on { background: var(--navy); color: White; border-color: var(--navy); }
  .sg-chip--away { opacity: .55; border-style: dashed; }
  .sg-awayv { color: var(--muted); font-size: var(--t-label); }
  /* fetch-692: saved Staff Schedule views replace the wall of venue / lens / position /
     roster controls. The week and publish action remain visible; view scope stays readable
     as chips; the complete editor uses the existing render-driven modal primitive. */
  .sg-viewbar { display: flex; align-items: flex-end; gap: var(--s-2); flex-wrap: wrap; margin-top: var(--s-3); }
  .sg-viewfield { display: flex; flex-direction: column; gap: var(--s-1); flex: 1 1 220px; min-width: 180px; }
  .sg-viewlabel { color: var(--muted); font-size: var(--t-sub); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
  .sg-viewfield .sel { width: 100%; min-height: var(--control-height-md); }
  .sg-view-actions { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
  .sg-view-edit { min-height: var(--control-height-md); }
  .sg-view-chip { display: inline-flex; align-items: center; gap: var(--s-1); min-height: var(--control-height-sm);
    padding: var(--s-1) var(--s-2); border: 1px solid var(--line); border-radius: 999px;
    background: var(--wash); color: var(--text-heading); font: inherit; font-size: var(--t-sub); cursor: pointer; }
  .sg-view-chip:hover { border-color: var(--brand-gold-mid); background: var(--surface-card, White); }
  .sg-view-chip--quiet { cursor: default; color: var(--muted); }
  .sg-view-chip--quiet:hover { border-color: var(--line); background: var(--wash); }
  /* fetch-844: saved views activate from a chip row inside the Edit-filters dialog */
  .sg-view-chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-bottom: var(--s-3); }
  .sg-view-chip--on { border-color: var(--gold); color: var(--gold-dark); font-weight: 600; }
  .sg-view-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
  .sg-view-field { display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; }
  .sg-view-field--wide { grid-column: 1 / -1; }
  .sg-view-field label, .sg-view-field legend { color: var(--text-heading); font-size: var(--t-sub); font-weight: 700; }
  .sg-view-field .sel { width: 100%; min-height: var(--control-height-md); box-sizing: border-box; }
  .sg-view-fieldset { margin: 0; padding: 0; border: 0; }
  .sg-view-fieldset .sg-lens { margin-top: var(--s-1); }
  .sg-view-check { display: flex; align-items: flex-start; gap: var(--s-2); min-height: var(--control-height-md); cursor: pointer; }
  .sg-view-check input { margin-top: var(--s-1); }
  .sg-view-check > span, .sg-view-check .sg-view-help { display: block; }
  .sg-view-check .sg-view-help { margin-top: var(--s-1); }
  .sg-view-help { color: var(--muted); font-size: var(--t-sub); line-height: 1.45; }
  .sg-loadnotice { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; margin: var(--s-2) 0; }
  .sg-loadnotice .btn { margin-left: auto; }
  .sg-view-save { margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--hair); }
  .sg-view-save-row { display: flex; align-items: flex-end; gap: var(--s-2); flex-wrap: wrap; }
  .sg-view-save-row .sg-viewfield { min-width: 220px; }
  .sg-view-dialog-actions { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; margin-top: var(--s-4); }
  .sg-view-dialog-actions .sg-view-apply { margin-left: auto; }
  .sg-manager-viewbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); align-items: end; gap: var(--s-4); }
  .sg-manager-viewcopy { display: flex; flex-direction: column; gap: var(--s-1); padding-bottom: var(--s-1); color: var(--muted); font-size: var(--t-sub); line-height: 1.45; }
  .sg-manager-viewcopy strong { color: var(--text-heading); font-size: var(--t-body); }
  .sg-statusline { display: flex; align-items: center; gap: var(--s-1); flex-wrap: wrap; }
  .sg-statuscopy { margin-top: var(--s-1); }
  /* fetch-968: one desktop control header, with the roster as its own work surface. */
  .sg-desktop-header .pgh { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-4); border: 0; background: none; padding: 0; margin: 0; box-shadow: none; }
  .sg-desktop-header .pgh-top { flex: 1 1 16rem; }
  .sg-desktop-header .pgh-row { margin: 0; min-width: 0; }
  .sg-desktop-header .pgh-seg { flex-wrap: wrap; width: auto; overflow: visible; mask-image: none; -webkit-mask-image: none; }
  .sg-desktop-header .pgh.pgh--compact .pgh-nav { display: flex; flex-wrap: wrap; align-items: center; margin: 0; gap: var(--s-1); }
  .sg-desktop-header .pgh .pgh-navlabel { flex: 0 1 auto; font-family: Inter, sans-serif; font-size: var(--t-sub); line-height: 1.35; font-variant-numeric: tabular-nums; }
  .sg-desktop-header .pgh-nav .btn, .sg-desktop-header .sg-view-chip, .sg-desktop-header .sg-live-state .btn { min-height: var(--control-height-touch); min-width: var(--control-height-touch); }
  /* Schedule status and contextual notices stay below the control row. */
  .sg-desktop-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: var(--s-2); }
  .sg-desktop-header > .sg-live-state { margin: 0; max-width: 10rem; justify-content: flex-end; flex-wrap: wrap; }
  .sg-desktop-header > .notice { grid-column: 1 / -1; }
  .sg-desktop-header .sg-view-chip--quiet { border: 0; border-radius: 0; background: none; padding: 0; min-height: 0; }
  .sg-desktop-header .sg-live-state .badge { border-radius: 0; padding: 0; background: none; }
  /* fetch-666: venue identity on the staff band, matching the Manager Schedule (fetch-84).
     --vc is set on the row in scheduling.js; the tint is derived from it so one constant
     (VENUE_COLORS) stays the single source of truth for venue colour portal-wide. */
  .sg-eventrow .sg-name, .sg-eventrow .sg-cell { background: color-mix(in srgb, var(--vc, var(--muted)) 13%, var(--surface-card)); }
  .sg-eventrow .sg-name { color: var(--vc, var(--text-heading)); font-weight: 700; border-left: 3px solid var(--vc, transparent); }
  /* fetch-667: the band pins under the sticky date header when the lens is on ONE venue.
     z-index sits below .sg-head (3) so the header always wins, and above .sg-name (1) so the
     pinned row draws over the people scrolling beneath it. */
  .sg-eventrow--pin { position: sticky; top: var(--sg-head-h, 34px); z-index: 2; }
  .sg-eventrow--pin .sg-name { z-index: 3; }
  .sgp-event-venue { color: var(--vc, var(--muted)); }
  .sg-eventcell { display: flex; flex-direction: column; gap: var(--s-1); min-height: 54px; }
  .sg-event-chip { border: 1px solid var(--line); border-left: 3px solid var(--vc, var(--muted)); border-radius: var(--r-s); padding: var(--s-1) var(--s-2); background: var(--surface-card, White); cursor: pointer; min-height: var(--control-height-touch); }
  .sg-event-chip:hover, .sg-event-chip:focus-visible { border-color: var(--brand-gold-mid); outline: 2px solid var(--focus-ring); outline-offset: 1px; }
  .sg-event-chip--on { background: var(--brand-pink); border-color: var(--brand-gold-mid); }
  .sg-event-chip--loadin { border-left-style: dashed; opacity: .85; } /* fetch-973 */
  .sg-event-title { display: block; font-size: var(--t-sub); font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
  .sg-event-meta { display: block; color: var(--muted); font-size: var(--t-sub); line-height: 1.35; }
  /* fetch-968: coverage is quiet type; venue and staffing status keep separate meanings. */
  .sg-event-cov { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--s-1); row-gap: 0; margin-top: var(--s-1); font-size: var(--t-sub); line-height: 1.35; }
  .sg-event-count { color: var(--mute-fg); }
  .sg-event-count strong { font-weight: 600; }
  .sg-event-count--short { color: var(--bad-fg); }
  .sg-event-count--short strong { font-weight: 700; }
  .sg-event-sep { color: var(--muted); }
  .sg-shortpost { padding: 1px 5px; font-size: var(--t-label); }
  .sg-event-unknown { color: var(--muted); font-size: var(--t-sub); line-height: 1.35; }
  .sg-setup-short { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s-1); border-left: 2px dashed var(--vc, var(--muted)); padding: var(--s-1) var(--s-2); font-size: var(--t-sub); line-height: 1.3; overflow-wrap: anywhere; }
  .sg-setup-label { color: var(--mute-fg); font-weight: 600; }
  .sg-setup-title { order: 1; flex-basis: 100%; color: var(--text-heading); }
  .sg-setup-count { color: var(--bad-fg); margin-inline-start: auto; }
  .sg-focus-note { margin: var(--s-2) 0 0; }
  .sgp-events { margin-top: var(--s-2); padding-top: var(--s-2); border-top: 1px solid var(--line); }
  .sgp-event-venue { font-size: var(--t-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin: var(--s-1) 0; }
  /* fetch-359: the shared MODAL primitive (WIW-style: new box, old frame dimmed behind).
     Render-driven — a state var decides it exists; Esc / ✕ / backdrop click close it. */
  .cse-modal-bg { position: fixed; inset: 0; background: rgba(26, 26, 26, 0.45); z-index: 600; display: flex; align-items: flex-start; justify-content: center; padding: 7vh var(--s-4) var(--s-4); }
  .cse-modal { background: var(--surface-card, White); border-radius: var(--r-l); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3); max-width: 660px; width: 100%; max-height: 84vh; overflow: auto; padding: var(--s-4) var(--s-5); }
  .cse-modal-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); margin-bottom: var(--s-3); font-size: var(--t-section); }
  .cse-modal-head h2 { margin: 0; font: inherit; font-weight: 700; }
  .sg-sugg--modal { flex-direction: row; flex-wrap: wrap; }
  .sg-sugg--modal .sg-suggbtn { flex: 1 1 45%; font-size: var(--t-sub); padding: 6px 8px; }
  .cse-modal--wide { max-width: 720px; }
  .sg-tplsaved { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: none; background: none; }
  .sg-tplsaved .sg-tpluse { flex: 1; border: 1px solid var(--brand-gold-mid); background: var(--wash); border-radius: 4px; font-size: var(--t-sub); padding: 6px 8px; cursor: pointer; text-align: left; }
  .sg-tplsaved .sg-tpluse:hover { background: var(--surface-card, White); }
  .sg-tplsaved .sg-tpldel { border: 1px solid var(--line); background: var(--surface-card, White); border-radius: 4px; cursor: pointer; color: var(--muted); font-size: var(--t-label); padding: 4px 6px; }
  /* fetch-504: THE PHONE STAFF SCHEDULE — WIW-shaped day list (scheduling.js sgPhoneHTML).
     Rendered ONLY at ≤640px (JS gate isPhoneVp). Tokens only — the ratchet counts this file.
     The phone full-screen rule for .cse-modal rides the shared 640 media block below. */
  .sgp-ctl { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; margin-top: var(--s-2); }
  .sgp-ctl .sel { flex: 1; min-width: 0; }
  .sgp-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin-top: var(--s-2); }
  .sgp-day { border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface-card, White); padding: 5px 2px; display: flex; flex-direction: column; align-items: center; gap: 1px; cursor: pointer; font-family: inherit; }
  .sgp-day .sgp-dow { font-size: var(--t-label); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
  .sgp-day .sgp-dom { font-size: var(--t-body); font-weight: 700; color: var(--text-heading); }
  .sgp-day .sgp-n { font-size: var(--t-label); font-weight: 700; color: var(--gold-dark); }
  .sgp-day .sgp-n--zero { color: var(--muted); font-weight: 400; }
  .sgp-day--today { background: var(--brand-pink); }
  .sgp-day--on { border-color: var(--brand-gold-mid); outline: 1px solid var(--brand-gold-mid); background: var(--wash); }
  .sgp-group { margin-bottom: var(--s-3); }
  .sgp-gh { display: flex; align-items: center; gap: var(--s-2); font-weight: 700; font-size: var(--t-sub); color: var(--text-heading); text-transform: uppercase; letter-spacing: .05em; padding: 4px 0; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
  .sgp-group--open .sgp-gh { color: var(--ok-fg); }
  .sgp-gh .sgp-post { margin-left: auto; }
  .sgp-row { display: flex; align-items: center; gap: var(--s-2); border: 1px solid var(--hair); border-radius: var(--r-s); padding: 8px 10px; margin-bottom: 4px; background: var(--surface-card, White); cursor: pointer; min-height: 30px; }
  .sgp-row:active { background: var(--wash); }
  .sgp-t { font-weight: 700; font-size: var(--t-sub); white-space: nowrap; }
  .sgp-who { flex: 1; min-width: 0; font-size: var(--t-sub); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sgp-who .sgp-sub { display: block; font-weight: 400; font-size: var(--t-label); overflow: hidden; text-overflow: ellipsis; }
  .sgp-add { width: 100%; margin-top: var(--s-2); }
  .sgp-sheet { position: fixed; inset: 0; z-index: 650; background: var(--surface-card, White); overflow: auto; padding: var(--s-4); }
  .sgp-sheet .sg-form input, .sgp-sheet .sg-form select { font-size: var(--t-body); padding: 9px 10px; }
  .sgp-sheet .sg-formbtns .btn { padding: 10px 8px; font-size: var(--t-sub); }
  .sgp-sheet .sg-sugg { flex-direction: row; flex-wrap: wrap; }
  .sgp-sheet .sg-suggbtn { flex: 1 1 45%; font-size: var(--t-sub); padding: 8px; }
  .sgp-pickq { width: 100%; box-sizing: border-box; margin: var(--s-2) 0; }
  .sgp-picklist .sgp-row { min-height: 40px; }
  /* fetch-948: phone agenda controls stay usable; names and times have their own space. */
  .sgp-context { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-2) 0; font-size: var(--t-sub); }
  .sgp-identity { font-weight: 700; color: var(--text-heading); }
  .sgp-scope { color: var(--muted); }
  .sgp-context .sg-live-state:has(.b-green) { display: none; }
  :is(#sgPhoneDays, #schedAgendaDays) { width: calc(100vw - var(--s-2)); max-width: none; margin-inline: calc((100% - (100vw - var(--s-2))) / 2); }
  :is(#sgPhoneDays, #schedAgendaDays) .sgp-strip { grid-template-columns: repeat(auto-fit, minmax(max(var(--control-height-touch), 3.2em), 1fr)); font-size: var(--t-label); gap: 0; margin-top: 0; }
  :is(#sgPhoneDays, #schedAgendaDays) .sgp-day > span { max-width: 100%; overflow-wrap: anywhere; }
  :is(#sgPhoneDays, #schedAgendaDays) .sgp-day { min-width: 0; min-height: var(--control-height-touch); border-radius: 0; border-inline-end-width: 0; padding-block: var(--s-2); }
  :is(#sgPhoneDays, #schedAgendaDays) .sgp-day:last-child { border-inline-end-width: 1px; }
  :is(#sgPhoneDays, #schedAgendaDays) .sgp-day--on { outline-offset: -2px; }
  .sgp-count-key { padding: var(--s-1) var(--s-2); font-size: var(--t-label); color: var(--muted); }
  #sgPhoneList { padding: var(--s-3); }
  .sgp-listhead { position: relative; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-2); }
  .sgp-listhead h2 { margin: 0; font: inherit; font-size: var(--t-body); font-weight: 700; }
  /* fetch-951: two creation paths share one phone control; the choices overlay the list. */
  .sgp-addmenu { max-width: 100%; }
  .sgp-addmenu > summary { display: flex; align-items: center; gap: var(--s-2); list-style: none; min-height: var(--control-height-touch); cursor: pointer; }
  .sgp-addmenu > summary::-webkit-details-marker { display: none; }
  .sgp-addmenu-options { position: absolute; top: calc(100% + var(--s-1)); right: 0; z-index: 30; display: grid; gap: var(--s-1); width: 100%; min-width: 0; max-width: 100%; padding: var(--s-1); box-sizing: border-box; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: 0 6px 20px color-mix(in srgb, var(--navy-dark) 16%, transparent); }
  .sgp-addmenu-options .btn { width: 100%; min-height: var(--control-height-touch); white-space: normal; text-align: left; font-size: var(--t-body); padding: var(--s-2) var(--s-3); }
  .sgp-addmenu :is(summary,button):focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
  #sgPhoneList .btn, .sgp-context .btn, .sgp-sheet .btn, .sgp-sheet .sg-suggbtn { min-height: var(--control-height-touch); min-width: var(--control-height-touch); }
  .sgp-coverage { margin-bottom: var(--s-3); border-block: 1px solid var(--line); }
  .sgp-coverage > summary { min-height: var(--control-height-touch); padding-block: var(--s-2); box-sizing: border-box; cursor: pointer; font-size: var(--t-sub); }
  .sgp-coverage > summary > span { margin-inline-end: var(--s-2); }
  .sgp-coverage-warn { color: var(--warn-fg); font-weight: 600; }
  .sgp-coverage .sgp-events { margin: 0; padding: 0 0 var(--s-2); border: 0; }
  .sgp-coverage .sgp-events > strong { display: none; }
  .sgp-coverage .sg-event-title { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
  .sgp-focus { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-2); font-size: var(--t-sub); }
  .sgp-focus > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
  .sgp-focus .btn { flex-shrink: 0; }
  .sgp-row { width: 100%; box-sizing: border-box; font: inherit; color: var(--text); text-align: left; min-height: var(--control-height-touch); }
  .sgp-row[data-sgedit], .sgp-row[data-sgos] { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who badge" "time badge"; gap: var(--s-1) var(--s-2); padding: var(--s-3); }
  .sgp-row .sgp-who { grid-area: who; white-space: normal; overflow: visible; overflow-wrap: anywhere; font-size: var(--t-body); }
  .sgp-row .sgp-t { grid-area: time; white-space: normal; font-size: var(--t-sub); color: var(--muted); }
  .sgp-row > .badge { grid-area: badge; justify-self: end; }
  .sgp-row .sgp-sub { white-space: normal; overflow: visible; font-size: var(--t-sub); }
  .sgp-help { font-size: var(--t-sub); line-height: 1.4; }
  dialog.sgp-sheet { margin: 0; border: 0; box-sizing: border-box; width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: none; color: var(--text); padding-bottom: max(var(--s-4), env(safe-area-inset-bottom)); }
  .sgp-sheet .cse-modal-head { gap: var(--s-2); }
  .sgp-sheet .cse-modal-head > strong { min-width: 0; overflow-wrap: anywhere; }
  .sgp-sheet .cse-modal-head .btn { flex-shrink: 0; }
  #eventStaffStrip .pgh-navlabel { font-family: Inter, sans-serif; }
  .sgp-draft-summary { font-size: var(--t-sub); color: var(--text-heading); }
  .sgp-sheet .sg-trlab { display: flex; align-items: center; justify-content: flex-start; gap: var(--s-2); }
  .sgp-sheet .sg-form .sg-trlab input[type="checkbox"] { width: auto; min-width: 0; flex: 0 0 auto; margin: 0; }
  .sgp-fieldlabel { display: block; margin-top: var(--s-3); margin-bottom: var(--s-1); font-size: var(--t-sub); font-weight: 600; }
  .sgp-sheet .sg-form input:not([type="checkbox"]), .sgp-sheet .sg-form select, .sgp-sheet .sgp-pickq { min-height: var(--control-height-touch); font-size: max(1rem, var(--t-body)); width: 100%; box-sizing: border-box; }
  .sgp-sheet .sg-trlab { min-height: var(--control-height-touch); font-size: var(--t-sub); }
  .sgp-sheet .sg-formbtns { display: flex; flex-wrap: wrap; gap: var(--s-2); }
  .sgp-sheet .sg-formbtns .btn { flex: 1 1 auto; }
  :is(:is(#sgPhoneDays, #schedAgendaDays), #sgPhoneList, .sgp-sheet) :is(button, summary, input, select):focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
  @media (max-width: 640px) {
    /* fetch-504: the shared modal primitive becomes a FULL-SCREEN SHEET on phones — this was
       the standing "open-shift modal renders half off-screen" bug on the grid, and it fixes
       the templates manager and recipe modal the same way for free. */
    .cse-modal-bg { padding: 0; align-items: stretch; }
    .cse-modal { max-width: none; max-height: none; border-radius: 0; width: 100%; }
    .cse-modal .stf-flex { flex-direction: column; }
    .cse-modal .stf-field, .cse-modal .stf-field--w { width: 100%; }
    .schedule-family { align-items: stretch; flex-direction: column; gap: var(--s-2); }
    .schedule-family__tabs { width: 100%; box-sizing: border-box; }
    .schedule-family__tab { flex: 1 0 auto; min-height: var(--control-height-touch); }
    .schedule-family__context { margin-left: 0; text-align: left; }
    .sg-viewbar { align-items: stretch; }
    .sg-viewfield { flex-basis: 100%; min-width: 0; }
    .sg-view-edit { min-height: var(--control-height-touch); }
    .sg-viewfield .sel, .sg-view-field .sel, .sg-view-chip, .sg-view-check, .sg-lensbtn, #sgViewClose, .empty-state .btn[data-sgemptyedit], .empty-state .btn[data-sgemptyreset] { min-height: var(--control-height-touch); }
    #sgViewClose { min-width: var(--control-height-touch); }
    .sg-loadnotice .btn { min-height: var(--control-height-touch); }
    .sg-view-grid { grid-template-columns: 1fr; }
    .sg-view-field--wide { grid-column: auto; }
    .sg-view-dialog-actions .btn, .sg-view-save-row .btn { min-height: var(--control-height-touch); }
    .sg-view-dialog-actions .sg-view-apply { margin-left: 0; }
    .sg-manager-viewbar { grid-template-columns: 1fr; gap: var(--s-2); }
    .sg-manager-viewbar .sel { min-height: var(--control-height-touch); }
    /* fetch-697: the duty-grid date owns a full row on phones; actions stay large enough
       to tap and wrap below it instead of squeezing the week into a four-line column. */
    .cal-controls.schd-controls .cal-title { order: -1; flex: 1 0 100%; margin: 0 0 var(--s-1); text-align: left; }
    .schd-controls .btn { min-height: var(--control-height-touch); }
  }
  .cappill--revoked { background: #fff; color: #b0a9a0; border-color: #ece7dd; text-decoration: line-through; }
  /* fetch-525: the filter-bar clear button used to carry its padding and size inline.
     Moving it to a class is why this change lands ratchet-NEGATIVE instead of neutral. */
  .uf-clear { padding: 1px var(--s-2); font-size: var(--t-sub); }
  /* fetch-530: deactivate controls — classes, not inline (the standing ratchet rule) */
  .ulock-btn { margin-top: var(--s-2); font-size: var(--t-sub); color: var(--bad-fg); border-color: var(--bad-fg); }
  .ulock-row { display: flex; gap: var(--s-2); align-items: center; padding-top: var(--s-1); flex-wrap: wrap; }
  .cap-group { margin-top: 10px; }
  .cap-group-lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-secondary, #5f6872); margin-bottom: 5px; display: flex; align-items: center; gap: 6px; }
  .cap-group-lbl.risk-high { color: var(--bad-fg); }
  .user-filterbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
  .user-filterbar input, .user-filterbar select { font-size: 13px; }
  .user-filterbar .uf-count { margin-left: auto; font-size: 12px; color: var(--text-secondary, #5f6872); }
  /* ---- fetch-87: managers schedule grid ---- */
  /* fetch-846: .schd becomes its own scroller (the .sg-scroll precedent). The old overflow-x:auto
     made .schd the scroll container for BOTH axes while vertical scroll stayed on the window —
     which is why the .schd-head sticky rule below had been dead since fetch-87. min-width rows
     still need horizontal scroll, so the internal scroller is the only shape that works. */
  .schd { border: 1px solid var(--line); border-radius: 10px; overflow: auto; max-height: 72vh; background: #fff; }
  .schd-band { position: sticky; top: var(--schd-head-h, 34px); z-index: 2; } /* fetch-846: ONE wrapper — stacked sticky rows at one offset would overlap; offset is measured in bindSchedule */
  .schd-row { display: grid; grid-template-columns: 150px repeat(7, minmax(96px, 1fr)); border-bottom: 1px solid #f1efe9; min-width: 860px; }
  .schd-row:last-child { border-bottom: 0; }
  .schd-head { background: #242b42; color: #fff; position: sticky; top: 0; z-index: 3; } /* fetch-846: z above the band — mirrors the staff grid's 3/2/1 ladder */
  .schd-head .schd-name { color: #fff; }
  .schd-head .muted { color: #b9c2d0; }
  .schd-name { padding: 6px 9px; font-weight: 600; font-size: 12.5px; border-right: 1px solid var(--line); display: flex; align-items: center; gap: 5px; color: var(--vc, inherit); }
  /* fetch-942 (Jack: "like a blank tile under someones name with a +"): adding a manager is the
     grid's last row, where the next name would go — not a button in the banner. Dashed so it reads
     as a placeholder rather than a person; the day cells beside it stay empty for the same reason. */
  .schd-addrow .schd-name { padding: var(--s-1) var(--s-2); }
  .schd-addtile { width: 100%; min-height: var(--control-height-touch); border: 1px dashed var(--line);
                  border-radius: var(--r-s); background: none; cursor: pointer; color: var(--muted);
                  font-family: inherit; font-size: var(--t-section); line-height: 1; padding: 0; }
  .schd-addtile:hover { border-color: var(--brand-gold-mid); color: var(--text-heading); background: var(--wash); }
  .schd-cell { padding: 4px 6px; border-right: 1px solid #f6f4ef; min-height: 34px; font-size: 12px; position: relative; }
  .schd-cell:last-child { border-right: 0; }
  .schd-today { background: #fdf9ef; }
  .schd-click { cursor: pointer; }
  .schd-click:hover { background: #f4efe5; box-shadow: inset 0 0 0 1px var(--gold, #c09267); border-radius: 4px; }
  .schd-evrow { background: #faf8f4; }
  .schd-evrow .schd-cell { min-height: 26px; }
  .schd-ev { font-size: 10.5px; font-weight: 600; line-height: 1.25; cursor: pointer; margin-bottom: 2px; }
  .schd-ev:hover { text-decoration: underline; }
  .schd-crewhead { background: #f0ece4; }
  .schd-crewhead .schd-name { font-size: 10.5px; letter-spacing: .06em; color: #707373; }
  .schd-crewhead .schd-cell { min-height: 18px; }
  .schd-time { font-weight: 700; font-size: 12px; }
  .schd-code { font-size: 10.5px; font-weight: 700; }
  .schd-state { font-weight: 700; font-size: 11px; color: #9aa3af; }
  .schd-state.schd-v { color: #0891b2; }
  .schd-state.schd-ro { color: #d97706; }
  .schd-state.schd-tbd { color: #b45309; }
  .schd-blank { color: #d8d4cb; }
  .schd-ro { color: #d97706; font-weight: 700; font-size: 10.5px; }
  .schd-rocell { background: #fff7ea; }
  .schd-editing { background: #fffdf7; box-shadow: inset 0 0 0 2px var(--gold, #c09267); border-radius: 4px; z-index: 3; min-width: 130px; }
  .schd-form { padding: 2px 0; }
  .schd-qbtn { border: 1px solid var(--line); background: #fff; border-radius: 5px; font-size: 10.5px; padding: 2px 5px; cursor: pointer; font-weight: 700; color: #707373; }
  .schd-qbtn:hover { background: #f0ece4; }
  .schd-pedit { border: 0; background: none; cursor: pointer; font-size: 10px; color: #c8c2b6; padding: 0 2px; }
  .schd-pedit:hover { color: var(--gold, #c09267); }
  /* ---- fetch-88: schedule + ops timelines polish ---- */
  .schd-wrap { position: relative; }
  .schd-wrap::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 26px; border-radius: 0 10px 10px 0; background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.92)); pointer-events: none; opacity: 0; z-index: 4; }
  .schd .schd-name { position: sticky; left: 0; z-index: 1; background: #fff; }
  .schd .schd-head .schd-name { background: #242b42; z-index: 4; } /* fetch-846: corner cell tops the ladder */
  .schd .schd-crewhead { background: #ece6da; border-top: 2px solid #ddd5c5; }
  .schd .schd-crewhead .schd-name { background: #ece6da; color: #5c5346; letter-spacing: .08em; }
  .schd .schd-evrow { background: #faf8f4; background: color-mix(in srgb, var(--vc, #8a8577) 7%, #fff); }
  .schd .schd-evrow .schd-name { background: #faf8f4; background: color-mix(in srgb, var(--vc, #8a8577) 10%, #fff); }
  /* fetch-1525 (Jack 10-10: "the column that highlights what day it is on the manager schedule is tan - it should be
     navy just like in the event staff schedule"): today wears the Event staff grid's .sg-today - every people cell navy
     with paper text and a --brand-blue-traditional hover. This heading row is navy on every day already, so today's
     heading keeps the navy and marks itself with a gold underline (jewelry, not paint); the event band keeps its venue
     tint on today, as the Event staff band does. A shift code's venue colour moves from its text to a left edge, the
     Event staff chip's cue: Roof red and Off Premise blue cannot be read as text on navy. */
  .schd-personrow .schd-code { color: var(--vc); }
  .schd :is(.schd-head, .schd-personrow) > .schd-cell.schd-today { background: var(--brand-blue-deep); color: var(--paper); }
  .schd .schd-evrow > .schd-cell.schd-today { background: none; }
  .schd .schd-head > .schd-cell.schd-today { box-shadow: inset 0 -3px 0 var(--brand-gold-mid); }
  .schd .schd-cell.schd-today.schd-click:is(:hover, :active) { background: var(--brand-blue-traditional); }
  .schd :is(.schd-head, .schd-personrow) > .schd-cell.schd-today :is(.muted, .schd-time, .schd-state, .schd-ro) { color: var(--paper); }
  .schd .schd-personrow > .schd-cell.schd-today .schd-blank { color: color-mix(in srgb, var(--paper) 55%, var(--brand-blue-deep)); }
  .schd .schd-personrow > .schd-cell.schd-today .schd-code { color: var(--paper); border-left: 3px solid var(--vc, transparent); padding-left: var(--s-1); }
  .schd .schd-warn { display: inline-flex; align-items: center; gap: 3px; margin-top: 2px; font-size: 10.5px; font-weight: 700; color: #8f2d3c; background: rgba(143,45,60,.08); border: 1px solid rgba(143,45,60,.22); border-radius: 20px; padding: 1px 7px; letter-spacing: .02em; }
  .schd .schd-form input:focus { outline: 2px solid rgba(192,146,103,.45); outline-offset: -1px; border-color: var(--gold, #c09267); }
  .schd .schd-qbtn { min-height: 24px; }
  /* fetch-1217: the pre-fetch-1092 Timeline skin came out. .opstl-hero-title / .opstl-time /
     .opstl-form had no emitter left at all, and .card .opstl-row was WINNING on specificity over
     the .tlw-step rule that replaced it - so the draft rows were still drawing a raw-hex hairline
     and 9px padding instead of the tokens. The gold outline on Add BEO steps / Save as template
     went with them: gold is jewelry (a focus ring, a selected metric), not paint on two ordinary
     buttons, and these two were the page's only painted ones. */
  .calw .calw-venue { box-shadow: inset 3px 0 0 var(--vc, transparent); }
  .calw .calw-row:hover .calw-cell { background-color: #fcfaf5; }
  .calw .calw-cell.cal-today { background-image: linear-gradient(rgba(192,146,103,.10), rgba(192,146,103,.10)); }
  @media (max-width: 720px) {
    .schd-wrap::after { opacity: 1; }
    .schd .schd-row:not(.schd-crewhead):not(.schd-head) .schd-cell { min-height: 44px; padding: 8px; }
    .schd .schd-row:not(.schd-crewhead):not(.schd-head) .schd-name { min-height: 44px; }
    .card .opstl-row { padding: 11px 0; }
  }
  /* ---- fetch-86: week calendar board ---- */
  .calw { border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; background: #fff; }
  .calw-row { display: grid; grid-template-columns: 130px repeat(7, minmax(110px, 1fr)); border-bottom: 1px solid var(--line); min-width: 900px; }
  .calw-row:last-child { border-bottom: 0; }
  .calw-head { background: #faf8f4; position: sticky; top: 0; }
  .calw-venue { padding: 8px 10px; font-weight: 700; font-size: 12.5px; display: flex; align-items: center; gap: 6px; border-right: 1px solid var(--line); color: var(--vc, #384a61); }
  .calw-cell { padding: 5px 6px; border-right: 1px solid #f1efe9; min-height: 40px; }
  .calw-cell:last-child { border-right: 0; }
  .calw-cell.cal-today { background: #fdf9ef; }
  /* ---- fetch-84: Build an Event hero ---- */
  .build-evt { background: linear-gradient(135deg, var(--navy) 0%, #2c4a7c 100%); border-radius: 14px; padding: 16px 18px; margin-bottom: 14px; border-bottom: 3px solid var(--gold); }
  .build-evt .be-title { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 18px; font-weight: 700; color: #fff; }
  .build-evt .be-sub { color: #c8d4e4; font-size: 12.5px; margin: 2px 0 10px; }
  .build-evt .be-row { display: flex; gap: 8px; flex-wrap: wrap; }
  .build-evt input, .build-evt select { border: none; border-radius: 8px; padding: 9px 11px; font-size: 14px; font-family: inherit; }
  .build-evt input#beTitle { flex: 2; min-width: 180px; }
  .build-evt input#beDate { min-width: 140px; }
  .build-evt select#beVenue { min-width: 130px; }
  .build-evt .btn-gold { font-size: 14.5px; font-weight: 700; padding: 9px 20px; }
  /* ---- fetch-84: wiki back buttons ---- */
  .wiki-back { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--navy); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; cursor: pointer; margin-bottom: 10px; }
  .wiki-back:hover { border-color: var(--gold); }
  /* ---- Button loading state (fetch-82) ---- */
  button.is-loading { position: relative; color: transparent !important; pointer-events: none; }
  button.is-loading::after { content: ""; position: absolute; top: 50%; left: 50%; width: 13px; height: 13px; margin: -7px 0 0 -7px; border: 2px solid rgba(56,74,97,.25); border-top-color: var(--navy); border-radius: 50%; animation: btnspin .6s linear infinite; }
  .btn-primary.is-loading::after, .btn-gold.is-loading::after { border-color: rgba(255,255,255,.35); border-top-color: #fff; }
  @keyframes btnspin { to { transform: rotate(360deg); } }
  body.app-busy button:not(.is-loading) { opacity: .65; pointer-events: none; }
  /* ---- Sales pipeline (fetch-71) ---- */
  .pipe-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
  .pipe-col { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; border-top: 3px solid var(--pipe-accent, var(--gold)); }
  .pipe-head { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--navy); }
  .pipe-hint { font-size: 11.5px; color: var(--muted); margin: 3px 0 8px; }
  .pipe-def { cursor: help; border-bottom: 1px dotted var(--muted); }
  .pipe-actrow { display: flex; gap: 4px; align-items: center; margin-top: 3px; }
  .pipe-row { padding: 7px 8px; border: 1px solid #f0f0ee; border-radius: 8px; margin-bottom: 6px; cursor: pointer; background: #fcfcfb; }
  .pipe-row:hover { background: #f5f3ee; border-color: var(--gold); }
  .pipe-title { font-weight: 600; font-size: 13px; color: var(--ink); }
  .pipe-sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
  .pipe-val { font-size: 12.5px; font-weight: 700; color: var(--gold-dark); margin-top: 2px; }
  /* fetch-898: The Queue - unassigned inquiries above the Pipeline board. Tokens only. The pq- prefix is also worn
     by the orphaned fetch-102 phone quick-action island further down (.pq-grid / .pq-tile / .pq-ic; nothing emits
     them) - those three names are not reused here, and a sweep of that island must leave these four alone. */
  .pq-sub { font-size: var(--t-sub); color: var(--muted); margin-top: 1px; }
  /* ---- Venue P&L (fetch-73) ---- */
  .fin-table { width: 100%; border-collapse: collapse; }
  .fin-table thead th { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 700; padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: right; background: #fcfcfb; }
  .fin-table thead th:first-child { text-align: left; }
  .fin-table tbody td { padding: 9px 12px; border-bottom: 1px solid #f0f0ee; font-size: 14px; }
  .fin-table tbody tr:last-child td { border-bottom: none; }
  .fin-table tbody tr:hover { background: #fafaf8; }
  .fin-num { text-align: right; font-variant-numeric: tabular-nums; }
  .fin-editable { cursor: pointer; }
  .fin-editable:hover { background: #eef4ff; box-shadow: inset 0 0 0 2px #bfdbfe; border-radius: 4px; }
  /* ---- Asset picker (fetch-77 clean-up) ---- */
  .pbox { border: 1px solid var(--line); border-radius: 10px; background: #fcfcfb; padding: 10px; }
  .pbox-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
  .pbox-top input#pSearch { flex: 1; min-width: 150px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; background: #fff; }
  .pbox-chips { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px; }
  .pchip { border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 20px; padding: 3px 11px; font-size: 12px; cursor: pointer; font-weight: 600; }
  .pchip:hover { border-color: var(--navy); color: var(--navy); }
  .pchip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
  /* Performance scorecard: page-local hierarchy, venue data marks and source rows. Each phone row keeps every
     labelled figure; a graphic supplements its literal value. All selectors stay inside this page's wrapper. */
  .sd-scorecard { min-width: 0; }
  .sd-scorecard .sd-panel { min-width: 0; margin: 0 0 var(--s-4); padding: var(--s-5); border-color: var(--line); border-radius: var(--r-l); background: var(--surface-card); }
  .sd-scorecard .sd-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-4); }
  .sd-scorecard .sd-panel-head > div { min-width: 0; }
  .sd-scorecard .sd-panel-head h2 { margin: 0; font-size: var(--t-section); line-height: 1.3; font-weight: 700; color: var(--text-heading); }
  .sd-scorecard .sd-panel-head p { margin: var(--s-1) 0 0; font-size: var(--t-sub); line-height: 1.5; color: var(--muted); }
  .sd-scorecard .sd-scope-label { font-size: var(--t-sub); line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
  .sd-scorecard .sd-panel-head > .sd-scope-label { max-width: 22rem; text-align: right; }
  .sd-scorecard .sd-kicker { font-size: var(--t-sub); line-height: 1.5; font-weight: 600; letter-spacing: .055em; text-transform: uppercase; color: var(--muted); }
  .sd-scorecard .sd-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; gap: var(--s-6); }
  .sd-scorecard .sd-figure { min-width: 0; }
  .sd-scorecard .sd-figure-value { display: block; margin: var(--s-2) 0; font-size: clamp(var(--t-figure), 3.3vw, 3rem); line-height: 1.08; letter-spacing: -.035em; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-heading); overflow-wrap: anywhere; }
  .sd-scorecard .sd-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: var(--s-5); padding-left: var(--s-6); border-left: 1px solid var(--rule-soft); }
  .sd-scorecard .sd-fact { min-width: 0; font-size: var(--t-sub); line-height: 1.5; color: var(--muted); }
  .sd-scorecard .sd-fact > strong, .sd-scorecard .sd-fact > b, .sd-scorecard .sd-fact > .sd-amount { display: block; margin: var(--s-1) 0; font-size: var(--t-figure); line-height: 1.2; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-heading); }
  .sd-scorecard .sd-note { margin: var(--s-2) 0 0; font-size: var(--t-sub); line-height: 1.6; color: var(--muted); overflow-wrap: anywhere; }
  .sd-scorecard .sd-note strong { color: var(--text-heading); font-weight: 600; }
  .sd-scorecard .sd-coverage { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-1) var(--s-2); margin: var(--s-3) 0 0; font-size: var(--t-sub); line-height: 1.5; color: var(--muted); }
  .sd-scorecard .sd-coverage strong { font-weight: 600; color: var(--text-heading); }
  .sd-scorecard .sd-coverage .sd-missing, .sd-scorecard .sd-missing { color: var(--warn-fg); font-weight: 600; }
  .sd-scorecard .sd-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: var(--s-4); margin-bottom: var(--s-4); }
  .sd-scorecard .sd-columns > .sd-panel { margin-bottom: 0; }
  .sd-scorecard .sd-table, .sd-scorecard .sd-ledger { display: table; width: 100%; max-width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; overflow: visible; }
  .sd-scorecard .sd-table caption, .sd-scorecard .sd-ledger caption { width: 100%; padding: 0 0 var(--s-3); text-align: left; font-size: var(--t-sub); line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
  .sd-scorecard .sd-table > thead > tr > th, .sd-scorecard .sd-ledger > thead > tr > th { padding: 0 var(--s-3) var(--s-2); border-bottom: 1px solid var(--rule); background: transparent; text-align: left; font-size: var(--t-sub); line-height: 1.4; font-weight: 600; color: var(--muted); white-space: normal; }
  .sd-scorecard .sd-table > tbody > tr > td, .sd-scorecard .sd-table > tfoot > tr > td, .sd-scorecard .sd-ledger > tbody > tr > td, .sd-scorecard .sd-ledger > tfoot > tr > td { max-width: none; padding: var(--s-4) var(--s-3); border-bottom: 1px solid var(--rule-soft); vertical-align: top; text-align: left; font-size: var(--t-mid); line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
  .sd-scorecard .sd-table > thead > tr > :first-child, .sd-scorecard .sd-table > tbody > tr > :first-child, .sd-scorecard .sd-table > tfoot > tr > :first-child, .sd-scorecard .sd-ledger > thead > tr > :first-child, .sd-scorecard .sd-ledger > tbody > tr > :first-child, .sd-scorecard .sd-ledger > tfoot > tr > :first-child { padding-left: 0; }
  .sd-scorecard .sd-table > thead > tr > :last-child, .sd-scorecard .sd-table > tbody > tr > :last-child, .sd-scorecard .sd-table > tfoot > tr > :last-child, .sd-scorecard .sd-ledger > thead > tr > :last-child, .sd-scorecard .sd-ledger > tbody > tr > :last-child, .sd-scorecard .sd-ledger > tfoot > tr > :last-child { padding-right: 0; }
  .sd-scorecard .sd-table > tbody > tr:hover, .sd-scorecard .sd-ledger > tbody > tr:hover { background: transparent; }
  .sd-scorecard .sd-table > tfoot > tr > td, .sd-scorecard .sd-ledger > tfoot > tr > td, .sd-scorecard .sd-table-total > td { border-top: 1px solid var(--rule); border-bottom: 0; font-weight: 600; color: var(--text-heading); }
  .sd-scorecard .sd-table .sd-value-cell { width: 28%; }
  .sd-scorecard .sd-table .sd-num, .sd-scorecard .sd-ledger .sd-num { text-align: right; }
  .sd-scorecard .sd-person { font-size: var(--t-body); font-weight: 600; color: var(--text-heading); overflow-wrap: anywhere; }
  .sd-scorecard .sd-person-meta { display: block; margin-top: var(--s-1); font-size: var(--t-sub); line-height: 1.5; font-weight: 400; color: var(--muted); }
  .sd-scorecard .sd-amount { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-heading); }
  .sd-scorecard .sd-bar { display: block; width: 100%; height: 10px; margin-top: var(--s-2); overflow: visible; }
  .sd-scorecard .sd-venue-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: var(--s-1) var(--s-3); width: 100%; min-height: var(--control-height-touch); margin: 0; padding: var(--s-3) 0; border: 0; border-bottom: 1px solid var(--rule-soft); border-radius: 0; background: transparent; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
  .sd-scorecard .sd-venue-row:last-of-type { border-bottom: 0; }
  .sd-scorecard .sd-venue-row:hover { background: var(--wash); }
  .sd-scorecard .sd-venue-row[aria-pressed="true"] { padding-left: var(--s-3); border-left: 2px solid var(--gold); background: var(--wash); }
  .sd-scorecard .sd-venue-label { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); min-width: 0; font-size: var(--t-mid); line-height: 1.5; font-weight: 600; color: var(--text-heading); overflow-wrap: anywhere; }
  .sd-scorecard .sd-venue-value { font-size: var(--t-mid); line-height: 1.5; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-heading); }
  .sd-scorecard .sd-venue-row > .sd-bar, .sd-scorecard .sd-venue-row > .sd-note, .sd-scorecard .sd-venue-row > .sd-person-meta { grid-column: 1 / -1; }
  .sd-scorecard .sd-venue-row .sd-bar { margin-top: var(--s-1); }
  .sd-scorecard .sd-legend, .sd-scorecard .sd-chart-key { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); margin-top: var(--s-3); font-size: var(--t-sub); line-height: 1.5; color: var(--muted); }
  .sd-scorecard .sd-legend > span, .sd-scorecard .sd-chart-key > span { display: inline-flex; align-items: center; gap: var(--s-1); min-width: 0; }
  .sd-scorecard .sd-legend svg, .sd-scorecard .sd-chart-key svg, .sd-scorecard .sd-swatch { width: var(--s-3); height: var(--s-3); flex: none; }
  .sd-scorecard .sd-trend { display: block; width: 100%; max-width: 100%; height: auto; overflow: visible; }
  .sd-scorecard .sd-trend svg { display: block; width: 100%; max-width: 100%; height: auto; overflow: visible; }
  .sd-scorecard .sd-trend text { font-family: inherit; fill: var(--muted); }
  .sd-scorecard .sd-chart-scroll { min-width: 0; max-width: 100%; }
  .sd-scorecard .sd-chart-scale { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); min-width: 0; margin: var(--s-1) 0; font-size: var(--t-sub); line-height: 1.5; font-variant-numeric: tabular-nums; color: var(--muted); }
  .sd-scorecard .sd-chart-axis { display: flex; align-items: baseline; min-width: 0; margin-top: var(--s-2); font-size: var(--t-sub); line-height: 1.5; font-variant-numeric: tabular-nums; color: var(--muted); }
  .sd-scorecard .sd-chart-axis > span { flex: 1 1 0; min-width: 0; text-align: center; white-space: nowrap; }
  .sd-scorecard .sd-chart-axis > span > span { display: block; }
  .sd-scorecard .sd-source-controls { display: flex; flex-wrap: wrap; align-items: end; gap: var(--s-3); min-width: 0; max-width: 100%; margin: var(--s-3) 0; font-size: var(--t-sub); line-height: 1.5; color: var(--muted); }
  .sd-scorecard .sd-source-controls > label { display: grid; flex: 1 1 14rem; gap: var(--s-1); min-width: 0; max-width: 100%; font-weight: 600; }
  .sd-scorecard .sd-source-controls select { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
  .sd-scorecard .sd-source-controls :is(button, select) { min-height: var(--control-height-touch); max-width: 100%; }
  .sd-scorecard .sd-source-controls > span { align-self: center; }
  .sd-scorecard .sd-source > .sd-ledger-total { max-width: none; margin: var(--s-4) 0; font-size: var(--t-sub); line-height: 1.6; color: var(--muted); }
  .sd-scorecard .sd-ledger-total strong { font-weight: 600; color: var(--text-heading); }
  .sd-scorecard .pgh :is(.btn, .sel, .pgh-chip) { min-height: var(--control-height-touch); max-width: 100%; }
  .sd-scorecard .pgh .sel { min-width: 0; }
  .sd-scorecard .pgh .pgh-nav { flex-wrap: wrap; min-width: 0; }
  .sd-scorecard .pgh .pgh-nav .btn { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
  .sd-scorecard .pgh .pgh-chips { flex-wrap: wrap; overflow: visible; mask-image: none; }

  .sd-scorecard .sd-disclosure { margin-top: var(--s-4); border-top: 1px solid var(--rule-soft); }
  .sd-scorecard .sd-disclosure > summary { min-height: var(--control-height-touch); padding: var(--s-3) 0; font-size: var(--t-sub); line-height: 1.5; font-weight: 600; color: var(--text-heading); cursor: pointer; }
  .sd-scorecard .sd-disclosure > summary::marker { color: var(--gold-dark); }
  .sd-scorecard .sd-source { min-width: 0; padding: var(--s-1) 0 var(--s-3); }
  .sd-scorecard .sd-source > p { max-width: 95ch; margin: 0 0 var(--s-3); font-size: var(--t-sub); line-height: 1.6; color: var(--muted); }
  .sd-scorecard .sd-source > p:last-child { margin-bottom: 0; }
  .sd-scorecard .sd-sources { min-width: 0; max-width: 100%; }
  .sd-scorecard .sd-record { display: inline-flex; align-items: center; min-height: var(--control-height-touch); max-width: 100%; margin: 0; padding: var(--s-2) 0; border: 0; background: transparent; font: inherit; font-weight: 600; color: var(--action-primary); text-align: left; line-height: 1.5; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: .2em; cursor: pointer; overflow-wrap: anywhere; }
  .sd-scorecard .sd-record:hover { text-decoration-color: var(--gold-dark); }
  .sd-scorecard .sd-empty { margin: 0; padding: var(--s-5) 0; max-width: 70ch; font-size: var(--t-body); line-height: 1.6; color: var(--muted); }
  .sd-scorecard .sd-panel :is(button, .btn, .sel) { min-height: var(--control-height-touch); }
  /* fetch-1283 (Sales: "make the venue icons smaller"): the venue chips draw a 28px pill inside the same 44px tap target, so the
     row reads half as heavy and a phone takes two rows instead of three. The pill is the ::before; the button box stays the hit area. */
  .sd-scorecard .pgh .pgh-chips { gap: 0 var(--s-1); margin-top: var(--s-1); }
  .sd-scorecard .pgh .pgh-chip { position: relative; z-index: 0; padding: 0 var(--s-3); border: 0; background: transparent; font-size: var(--t-sub); }
  .sd-scorecard .pgh .pgh-chip::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 28px; transform: translateY(-50%); z-index: -1; box-sizing: border-box; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); transition: border-color .12s; }
  .sd-scorecard .pgh .pgh-chip:hover { transform: none; }
  .sd-scorecard .pgh .pgh-chip:hover::before { border-color: var(--vc, var(--action-primary)); }
  .sd-scorecard .pgh .pgh-chip.on { background: transparent; }
  .sd-scorecard .pgh .pgh-chip.on::before { background: var(--vc, var(--action-primary)); border-color: var(--vc, var(--action-primary)); }
  .sd-scorecard .pgh .pgh-chip:focus-visible { outline: none; }
  .sd-scorecard .pgh .pgh-chip:focus-visible::before { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
  /* fetch-1283: the section links (the header's jump row, and the pinned bar's copy of it). */
  .pgh-jumps { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s-1); margin-top: var(--s-3); padding-top: var(--s-2); border-top: 1px solid var(--rule-soft); }
  .pgh-jumps-label { flex: none; margin-right: var(--s-2); font-size: var(--t-sub); font-weight: 600; color: var(--muted); white-space: nowrap; }
  :is(.pgh-jump, .sd-jump) { min-height: var(--control-height-touch); padding: 0 var(--s-2); border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--navy); font: 600 var(--t-sub)/1.4 Inter, sans-serif; white-space: nowrap; cursor: pointer; }
  :is(.pgh-jump, .sd-jump):hover { background: var(--wash); color: var(--navy-dark); }
  :is(.pgh-jump, .sd-jump)[aria-current="true"] { border-bottom-color: var(--gold-dark); color: var(--navy-dark); }
  :is(.pgh-jump, .sd-jump):focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
  /* fetch-1283 (Sales: "make the header sticky"): the header card is ~300px on a laptop and ~470px on a phone - pinned whole it
     would take a third of the screen. So, as on the event page (fetch-1256), a compact bar stands in for it once it has scrolled
     off: the section links plus period, venue and My deals. The anchor is a zero-height sticky block right under the header, so
     it takes no room and moves nothing; the bar hangs from it and stays hidden (and out of the tab order) until the header is gone. */
  .sd-scorecard .sd-pin-anchor { position: sticky; top: var(--app-sticky-top, 0px); z-index: 35; height: 0; }
  .sd-scorecard .sd-pin { position: absolute; top: 0; left: 0; right: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s-3); padding: 0 var(--s-3); visibility: hidden; background: var(--paper); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r-m) var(--r-m); box-shadow: 0 2px 10px color-mix(in srgb, var(--navy-dark) 14%, transparent); }
  .sd-scorecard .sd-pin.is-pinned { visibility: visible; }
  /* scrollIntoView (Explore / Show them) must land a section BELOW the bar, not under it; sdPinSync measures --sd-pin-h */
  .sd-scorecard :is(.sd-panel, .sd-disclosure) { scroll-margin-top: calc(var(--sd-pin-h, 0px) + var(--s-2)); }
  .sd-scorecard .sd-pin-jumps { display: flex; flex: 1 1 32rem; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .sd-scorecard .sd-pin-jumps::-webkit-scrollbar { display: none; }
  .sd-scorecard .sd-pin-scope { display: flex; flex: 0 1 auto; flex-wrap: wrap; align-items: center; gap: var(--s-2); min-width: 0; padding: var(--s-1) 0; }
  .sd-scorecard .sd-pin-scope .sel { min-height: var(--control-height-touch); max-width: 12rem; font-size: var(--t-sub); }
  .sd-scorecard .sd-pin-scope .btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: var(--control-height-touch); font-size: var(--t-sub); white-space: nowrap; cursor: pointer; }
  .sd-scorecard .sd-sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .sd-scorecard :is(.sd-panel, .sd-hero) h2[tabindex], .sd-scorecard .sd-kicker[tabindex] { outline-offset: var(--s-1); }
  /* fetch-1283 (Sales: "sortable situations or people where possible"): every Performance table sorts from its column heads;
     a phone reads rows as cards with no heads, so it gets one Sort select per table instead. */
  .sd-scorecard .sd-sort { display: inline-flex; align-items: center; gap: var(--s-1); min-height: var(--control-height-touch); margin: 0; padding: 0; border: 0; background: transparent; font: inherit; font-weight: 600; color: inherit; text-align: left; cursor: pointer; }
  .sd-scorecard .sd-sort:hover { color: var(--navy-dark); }
  .sd-scorecard .sd-sort-mark { color: var(--muted); font-size: var(--t-sub); }
  .sd-scorecard [aria-sort="ascending"] .sd-sort-mark, .sd-scorecard [aria-sort="descending"] .sd-sort-mark { color: var(--gold-dark); }
  .sd-scorecard .sd-table > thead > tr > th:has(.sd-sort), .sd-scorecard .sd-ledger > thead > tr > th:has(.sd-sort) { padding-bottom: 0; }
  .sd-scorecard .sd-sortpick { display: none; }
  .sd-scorecard .sd-sortbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s-2); margin: 0 0 var(--s-2); font-size: var(--t-sub); color: var(--muted); }
  .sd-scorecard .sd-sortbar .sd-sort { padding: 0 var(--s-2); border-bottom: 2px solid transparent; font-size: var(--t-sub); color: var(--navy); }
  .sd-scorecard .sd-sortbar .sd-sort[aria-pressed="true"] { border-bottom-color: var(--gold-dark); color: var(--navy-dark); }
  .sd-scorecard .sd-gap-none { color: var(--muted); }
  @media (max-width: 640px) {
    body.has-rail .sd-scorecard .sd-pin-anchor { top: var(--phone-nav-height, 55px); }
    body.has-rail .sd-scorecard :is(.sd-panel, .sd-disclosure) { scroll-margin-top: calc(var(--phone-nav-height, 55px) + var(--sd-pin-h, 0px) + var(--s-2)); }
    .sd-scorecard .sd-pin { padding: 0 var(--s-2); gap: 0 var(--s-2); }
    .sd-scorecard .sd-pin-jumps { flex-basis: 100%; mask-image: linear-gradient(to right, black calc(100% - 24px), transparent); -webkit-mask-image: linear-gradient(to right, black calc(100% - 24px), transparent); }
    .sd-scorecard .sd-pin-scope { flex: 1 1 100%; flex-wrap: nowrap; padding-top: 0; }
    .sd-scorecard .sd-pin-scope .sel { flex: 1 1 0; min-width: 0; max-width: none; }
    .sd-scorecard .sd-pin-mine { flex: 0 0 auto; min-width: var(--control-height-touch); padding: 0 var(--s-2); }
    .sd-scorecard .sd-pin-mine > span { display: none; } /* the icon carries it here; the button's aria-label says which */
    .pgh-jumps { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; mask-image: linear-gradient(to right, black calc(100% - 24px), transparent); -webkit-mask-image: linear-gradient(to right, black calc(100% - 24px), transparent); }
    .pgh-jumps::-webkit-scrollbar { display: none; }
    .sd-scorecard .sd-sortpick { display: grid; gap: var(--s-1); margin: 0 0 var(--s-3); font-size: var(--t-sub); font-weight: 600; color: var(--muted); }
    .sd-scorecard .sd-sortpick .sel { width: 100%; }
  }
  @media (max-width: 1000px) {
    .sd-scorecard .sd-columns { grid-template-columns: minmax(0, 1fr); }
    .sd-scorecard .sd-hero { gap: var(--s-5); }
    .sd-scorecard .sd-facts { gap: var(--s-4); padding-left: var(--s-5); }
  }
  @media (max-width: 640px) {
    .sd-scorecard .sd-panel { padding: var(--s-4); }
    .sd-scorecard .sd-panel-head { flex-wrap: wrap; gap: var(--s-2); }
    .sd-scorecard .sd-panel-head > .sd-scope-label { max-width: 100%; text-align: left; }
    .sd-scorecard .sd-hero { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
    .sd-scorecard .sd-facts { gap: var(--s-3); padding: var(--s-4) 0 0; border-left: 0; border-top: 1px solid var(--rule-soft); }
    .sd-scorecard .sd-fact > strong, .sd-scorecard .sd-fact > b, .sd-scorecard .sd-fact > .sd-amount { font-size: var(--t-display); }
    .sd-scorecard .sd-table, .sd-scorecard .sd-table > tbody, .sd-scorecard .sd-table > tfoot, .sd-scorecard .sd-ledger, .sd-scorecard .sd-ledger > tbody, .sd-scorecard .sd-ledger > tfoot { display: block; width: 100%; max-width: 100%; overflow: visible; }
    .sd-scorecard .sd-table > caption, .sd-scorecard .sd-ledger > caption { display: block; width: 100%; max-width: none; margin: 0; text-align: left; }
    .sd-scorecard .sd-table > thead, .sd-scorecard .sd-ledger > thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .sd-scorecard .sd-table > tbody > tr, .sd-scorecard .sd-table > tfoot > tr, .sd-scorecard .sd-ledger > tbody > tr, .sd-scorecard .sd-ledger > tfoot > tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); padding: var(--s-4) 0; border-bottom: 1px solid var(--rule-soft); }
    .sd-scorecard .sd-table > tbody > tr:first-child, .sd-scorecard .sd-ledger > tbody > tr:first-child { padding-top: 0; }
    .sd-scorecard .sd-table > tbody > tr > td, .sd-scorecard .sd-table > tfoot > tr > td, .sd-scorecard .sd-ledger > tbody > tr > td, .sd-scorecard .sd-ledger > tfoot > tr > td { display: block; min-width: 0; width: auto; max-width: none; padding: 0; border: 0; text-align: left; white-space: normal; overflow-wrap: anywhere; }
    .sd-scorecard .sd-table > tbody > tr > td[data-label]::before, .sd-scorecard .sd-table > tfoot > tr > td[data-label]::before, .sd-scorecard .sd-ledger > tbody > tr > td[data-label]::before, .sd-scorecard .sd-ledger > tfoot > tr > td[data-label]::before { content: attr(data-label); display: block; margin-bottom: var(--s-1); font-size: var(--t-sub); line-height: 1.4; font-weight: 600; color: var(--muted); }
    .sd-scorecard .sd-table > tbody > tr > td:first-child, .sd-scorecard .sd-ledger > tbody > tr > td:first-child, .sd-scorecard .sd-table > tbody > tr > td[colspan], .sd-scorecard .sd-ledger > tbody > tr > td[colspan], .sd-scorecard .sd-table > tfoot > tr > td[colspan], .sd-scorecard .sd-ledger > tfoot > tr > td[colspan] { grid-column: 1 / -1; }
    .sd-scorecard .sd-table > tbody > tr > td:first-child::before, .sd-scorecard .sd-ledger > tbody > tr > td:first-child::before { display: none; }
    .sd-scorecard .sd-table > tbody > tr > .sd-value-cell, .sd-scorecard .sd-table > tbody > tr > td:has(.sd-bar), .sd-scorecard .sd-table > tbody > tr > td:has(.sd-disclosure), .sd-scorecard .sd-ledger > tbody > tr > td:has(.sd-disclosure) { grid-column: 1 / -1; }
    .sd-scorecard .sd-table > tbody > tr > td:has(.sd-bar) .sd-amount { font-size: var(--t-section); }
    .sd-scorecard .sd-table > tfoot > tr, .sd-scorecard .sd-ledger > tfoot > tr, .sd-scorecard .sd-table > tbody > .sd-table-total { border-top: 1px solid var(--rule); border-bottom: 0; }
    .sd-scorecard .sd-table .sd-num, .sd-scorecard .sd-ledger .sd-num { text-align: left; }
    .sd-scorecard .sd-table .sd-value-cell { width: auto; }
    .sd-scorecard .sd-table .sd-disclosure, .sd-scorecard .sd-ledger .sd-disclosure { margin-top: 0; }
    .sd-scorecard .sd-venue-row { padding-block: var(--s-4); }
    .sd-scorecard .sd-venue-row > .sd-venue-value { max-width: 100%; overflow-wrap: anywhere; }
    .sd-scorecard .sd-legend, .sd-scorecard .sd-chart-key { gap: var(--s-2) var(--s-3); }
  }
  @media (max-width: 480px) {
    .sd-scorecard .sd-chart-axis--dense { align-items: flex-start; }
    .sd-scorecard .sd-chart-axis--dense > span:nth-child(even) { padding-top: 1.5em; }
  }
  @media print {
    .sd-scorecard .sd-panel { break-inside: avoid; box-shadow: none; }
    .sd-scorecard .sd-bar, .sd-scorecard .sd-trend { break-inside: avoid; }
  }
  /* fetch-425 (One Portal Wave 3): calls-queue styles hoisted out of whoToCallHTML's private <style> — tokenized, byte-identical rendering */
  .wtc-intro { margin: 0 0 var(--s-3); color: var(--muted); font-size: var(--t-sub); line-height: 1.5; }
  .pgh:has(#wtcMine) { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s-3); }
  .pgh:has(#wtcMine) .pgh-top { grid-column: 1; grid-row: 1; align-self: center; }
  .pgh:has(#wtcMine) .pgh-scope { grid-column: 2; grid-row: 1; margin-top: 0; }
  .pgh:has(#wtcMine) .pgh-scope-choices { flex: 0 0 auto; border: 0; overflow: visible; }
  .pgh:has(#wtcMine) .pgh-tabs, .pgh:has(#wtcMine) .pgh-tiles, .pgh:has(#wtcMine) .pgh-meta { grid-column: 1/-1; } /* fetch-1250: the tile row spans both columns, like the tab row it replaced */
  .pgh .pgh-scope-choice[data-wtcmine] { min-height: var(--control-height-touch); padding: var(--s-2); background: transparent; font-size: var(--t-sub); }
  .wtc-card { padding: 12px 14px; margin-bottom: 14px; }
  .wtc-hd { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2); margin-bottom: var(--s-2); }
  .wtc-hd h3 { margin: 0; font-size: var(--t-section); flex-shrink: 0; }
  .wtc-hd .wtc-tot { margin-left: auto; font-size: var(--t-sub); color: var(--muted); font-variant-numeric: tabular-nums; }
  .wtc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-3); align-items: center; padding: var(--s-3) 0; border-top: 1px solid var(--line); }
  .wtc-record { display: grid; grid-template-columns: minmax(0, 1fr) minmax(11rem, .65fr) auto; align-items: center; gap: var(--s-5); min-width: 0; min-height: var(--control-height-touch); width: 100%; padding: var(--s-2); border: 0; border-radius: var(--r-s); background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
  .wtc-record:hover { background: var(--wash); }
  .wtc-record:hover .wtc-name { color: var(--action-primary); text-decoration: underline; text-underline-offset: .2em; }
  .wtc-main, .wtc-history, .wtc-contact { display: grid; min-width: 0; gap: var(--s-1); overflow-wrap: anywhere; }
  .wtc-name { font-weight: 600; font-size: var(--t-body); color: var(--text-heading); }
  .wtc-contact, .wtc-owner, .wtc-history { font-size: var(--t-sub); line-height: 1.5; color: var(--muted); }
  .wtc-contact:empty { display: none; }
  .wtc-reason { color: var(--text-heading); font-weight: 600; }
  .wtc-val { text-align: right; font-weight: 700; font-size: var(--t-body); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .wtc-vall { display: block; font-weight: 400; font-size: var(--t-sub); color: var(--muted); }
  .wtc-acts { display: flex; gap: var(--s-1); justify-content: flex-end; }
  .wtc-action { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 var(--control-height-touch); width: var(--control-height-touch); min-height: var(--control-height-touch); padding: 0; border: 0; border-radius: var(--r-s); background: transparent; color: var(--action-primary); cursor: pointer; }
  .wtc-action > span { display: flex; }
  .wtc-action:hover, .wtc-action[aria-expanded="true"] { background: var(--wash); }
  .wtc-action:disabled { opacity: .5; cursor: wait; }
  .wtc-also { font-weight: 600; color: var(--brand-blue-traditional); }
  .wtc-nn-reason { display: grid; gap: var(--s-1); flex: 1 1 200px; min-width: 0; font-size: var(--t-sub); }
  .wtc-nn-reason .wtc-nn-r { width: 100%; min-width: 0; }
  @media (max-width: 640px) {
    .wtc-hd > .muted, .wtc-hd .wtc-tot { flex-basis: 100%; margin-left: 0; }
    .wtc-row { grid-template-columns: minmax(0, 1fr); gap: var(--s-1); }
    .wtc-record { grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-3); padding: var(--s-1) 0; }
    .wtc-main { grid-column: 1/-1; }
    .wtc-val { align-self: end; }
    .wtc-nn .btn, .wtc-nn input { min-height: var(--control-height-touch); }
    .wtc-nn-reason { flex-basis: 100%; }
  }
  .wtc-nn { grid-column: 1/-1; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; background: var(--wash); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 2px 0 6px; }
  .wtc-nn-r { flex: 1; min-width: 200px; font-size: var(--t-sub); padding: 5px 8px; }
  .wtc-nn-l { display: flex; gap: 6px; align-items: center; font-size: var(--t-sub); color: var(--muted); white-space: nowrap; }
  .wtc-nn-l input { font-size: var(--t-sub); padding: 4px 6px; }
  .wtc-nn .btn { padding: 3px 12px; font-size: var(--t-sub); }
  .wtc-nn-hint { flex-basis: 100%; font-size: var(--t-sub); color: var(--muted); }
  @media (min-width: 641px) and (max-width: 1024px) {
    .wtc-record { grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-3); }
    .wtc-history { grid-column: 1; }
    .wtc-val { grid-column: 2; grid-row: 1/3; }
  }
  /* fetch-1513: Who to call A. Keep the native record opener and shared menu; compact only this surface. */
  .wtc-row { gap: var(--s-2); align-items: start; }
  .wtc-row > .cmenu { align-self: center; justify-self: end; }
  .wtc-row .btn.cmenu-trigger, .wtc-row .cmenu-i, .wtc-result .btn.icon-btn { min-height: var(--control-height-touch); min-width: var(--control-height-touch); }
  .wtc-record { gap: var(--s-3); padding: var(--s-2) 0; }
  .wtc-contact { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-2); }
  .wtc-editor { padding: var(--s-3); gap: var(--s-3); }
  .wtc-editor h3 { margin: 0; flex-basis: 100%; font-size: var(--t-section); }
  .wtc-editor .wtc-nn-hint { margin: 0; line-height: 1.6; }
  .wtc-card .wtc-editor .sel, .wtc-editor .btn, .cl-outreach-form .btn, .cl-outreach-form .cl-filter-field .sel { min-height: var(--control-height-touch); }
  .wtc-editor input, .wtc-editor select, .wtc-editor textarea { width: 100%; min-width: 0; }
  .wtc-editor textarea { resize: vertical; min-height: 5rem; }
  .wtc-note-field, .wtc-form-actions, .wtc-inline-error { flex-basis: 100%; }
  .wtc-form-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
  .wtc-inline-error { color: var(--bad-fg); font-size: var(--t-sub); overflow-wrap: anywhere; }
  .wtc-return { font-size: var(--t-sub); color: var(--text-heading); font-variant-numeric: tabular-nums; }
  .wtc-result { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) 0; border-top: 1px solid var(--line); font-size: var(--t-sub); line-height: 1.6; overflow-wrap: anywhere; }
  .wtc-result .icon-btn { flex-shrink: 0; }
  @media (max-width: 640px) {
    .wtc-row { grid-template-columns: minmax(0, 1fr) auto; }
    .wtc-main { grid-column: 1; }
    .wtc-val { grid-column: 2; grid-row: 1; align-self: start; font-size: var(--t-sub); }
    .wtc-history { grid-column: 1/-1; grid-row: 2; }
    .wtc-contact, .wtc-detail { display: none; }
    .wtc-reason { font-weight: 400; }
    .wtc-card .wtc-editor .sel, .cl-outreach-form .cl-filter-field .sel { font-size: 1rem; }
    .wtc-form-actions .btn-primary { flex: 1; }
    .wtc-header.pgh { padding: var(--s-3); }
    .wtc-header .pgh-tiles--square .pgh-tile { min-height: var(--control-height-touch); padding: var(--s-2); gap: var(--s-1); }
    .wtc-header .pgh-tile strong, .wtc-header .pgh-tiles--square .pgh-tile small { font-size: var(--t-sub); }
    .wtc-header .pgh-tiles--square .pgh-tile > .ci { width: var(--s-5); height: var(--s-5); }
  }
  /* fetch-426 (One Portal Wave 3 batch 2): Clients list (the Sales Tasks queue half retired with its tab, fetch-876) — inline styles to classes, byte-identical values */
  /* fetch-876: the Sales Tasks page island retired; event-level next steps use the shared evt-task-* rows below. */
  .cl-main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
  .muted.cl-org { font-weight: 400; font-size: 12.5px; }
  .muted.cl-line2 { font-size: var(--t-sub); margin-top: 2px; }
  .muted.cl-line3 { font-size: var(--t-sub); margin-top: 3px; }
  .cl-right { text-align: right; white-space: nowrap; }
  .cl-count { font-weight: 700; font-size: 15px; }
  .muted.cl-life { font-size: 12.5px; }
  .muted.cl-hero { font-size: 12.5px; margin-bottom: 10px; }

  .pbox-note { font-size: 12px; color: var(--gold-dark); font-weight: 600; margin-bottom: 6px; }
  .pbox-list { max-height: 240px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
  .pbox label.prow { display: flex; align-items: center; gap: 9px; padding: 7px 10px; font-size: 13.5px; cursor: pointer; border-bottom: 1px solid #f4f3f0; color: var(--ink); margin: 0; }
  .pbox label.prow:last-child { border-bottom: none; }
  .pbox label.prow:hover { background: #f7f6f2; }
  .pbox label.prow input { width: 15px; height: 15px; accent-color: var(--navy); flex: 0 0 auto; margin: 0; }
  .pbox .prow-name { font-weight: 600; color: var(--ink); flex: 1 1 auto; min-width: 0; font-size: 13.5px; }
  .pbox .prow-meta { font-size: 11.5px; color: var(--muted); margin-left: auto; text-align: right; white-space: nowrap; flex: 0 0 auto; }
  .pbox-foot { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
  /* ---- Kitchen (fetch-78) ---- */
  .kit-day { margin-bottom: 16px; }
  .kit-day-head { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 15px; font-weight: 700; color: #0f5c50; border-bottom: 2px solid #0f5c50; padding-bottom: 4px; margin-bottom: 8px; display: flex; align-items: center; }
  .kit-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; cursor: pointer; }
  .kit-card:hover { border-color: #0f5c50; }
  .kit-card.kit-tasting { border-left: 4px solid #0d9488; }
  .kit-head { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; }
  .kit-title { font-weight: 700; font-size: 15.5px; color: var(--navy); }
  .kit-plan { text-align: right; white-space: nowrap; color: var(--muted); font-size: 11px; }
  .kit-plan-num { font-size: 22px; font-weight: 800; color: #0f5c50; }
  .kit-meta { font-size: 12.5px; color: var(--muted); margin: 2px 0 8px; }
  .kit-fn { display: flex; gap: 10px; align-items: baseline; padding: 4px 8px; background: #f6faf9; border-radius: 6px; margin-bottom: 3px; font-size: 13px; }
  .kit-fn-time { font-weight: 700; color: #0f5c50; font-size: 12px; min-width: 118px; white-space: nowrap; }
  .kit-fn-name { font-weight: 600; color: var(--ink); flex: 1; }
  .kit-fn-att { color: var(--muted); font-size: 12px; white-space: nowrap; }
  .kit-notes { margin-top: 8px; padding: 7px 9px; background: #fdf9ee; border-left: 3px solid var(--gold); border-radius: 5px; font-size: 12.5px; white-space: pre-wrap; }
  .kit-low { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; border-radius: 10px; padding: 10px 14px; font-size: 13.5px; margin-bottom: 12px; cursor: pointer; }
  .kit-low:hover { background: #fee8e8; }
  .btn.btn-gold { background: var(--gold); color: #fff; border-color: var(--gold); font-weight: 600; }
  .btn.btn-gold:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: #fff; }
  /* ---- Events calendar (R2) ---- */
  .cal-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 10px; align-items: center; }
  .cal-legend > span { display: inline-flex; align-items: center; gap: 5px; }
  .cal-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
  .cal-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
  /* fetch-939: .cal-venuebar / .cal-vchip retired — the venue chips are .pgh-chips inside the header card */
  .cal-title { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 18px; font-weight: 700; color: var(--navy); margin: 0 6px; background: none; border: 0; padding: 0; cursor: pointer; } /* fetch-501: the date IS the Today button */
  .cal-title:hover { color: var(--gold-dark); }
  .cal-grid-head { display: grid; grid-template-columns: repeat(7, 1fr); }
  .cal-dow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); text-align: center; padding: 6px 0; }
  .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
  .cal-cell { min-height: 96px; border-right: 1px solid #f0f0ee; border-bottom: 1px solid #f0f0ee; padding: 4px; background: #fff; }
  .cal-cell:nth-child(7n) { border-right: none; }
  .cal-empty { background: #fafaf8; }
  .cal-today { background: #f5f9ff; box-shadow: inset 0 0 0 2px var(--gold); }
  .cal-daynum { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 3px; }
  .cal-today .cal-daynum { color: var(--gold-dark); }
  /* fetch-93: today is unmissable on every calendar mode */
  .cal-grid .cal-cell.cal-today { background: #fdf8ef; box-shadow: inset 0 0 0 2px var(--gold); }
  .cal-grid .cal-cell.cal-sel { background: #f4f6fb; box-shadow: inset 0 0 0 2px var(--navy); cursor: pointer; } /* fetch-254: clicked-day anchor */
  .cal-grid .cal-cell:not(.cal-empty) { cursor: pointer; }
  .cal-grid .cal-cell.cal-today .cal-daynum::after { content: "TODAY"; margin-left: 6px; font-size: 10px; letter-spacing: .08em; background: var(--gold); color: #fff; padding: 1px 6px; border-radius: 999px; vertical-align: 1px; }
  .calw .calw-cell.cal-today { background: #fdf8ef; box-shadow: inset 2px 0 0 var(--gold), inset -2px 0 0 var(--gold); }
  .calw .calw-head .calw-cell.cal-today { color: var(--gold-dark); box-shadow: inset 2px 0 0 var(--gold), inset -2px 0 0 var(--gold), inset 0 3px 0 var(--gold); }
  .cal-chip { font-size: 11px; line-height: 1.25; border-radius: 5px; padding: 2px 5px; margin-bottom: 3px; cursor: pointer; overflow: hidden; }
  .cal-chip:hover { filter: brightness(0.94); }
  .cal-chip.is-loadin { opacity: .78; outline: 1px dashed currentColor; outline-offset: -2px; } /* fetch-973: the load-in day of a multi-day event */
  .cal-chip-venue { display: block; font-size: 10.5px; opacity: 1; }
  .cal-chip.st-tasting { background: #d2f0e8; color: #0f5c50; border-left: 3px solid #0d9488; }
  .cal-chip.st-inquiry { background: var(--mute-bg); color: var(--mute-fg); border-left: 3px solid var(--brand-stone); } /* fetch-400 (Amanda): Inquiry=gray */
  .cal-chip.st-pending { background: var(--mute-bg); color: var(--navy); border: 1px dashed var(--navy); } /* fetch-1425: Pending = replied, waiting on the client - between Inquiry's gray and Lead's green */
  .cal-chip.st-lead { background: var(--ok-bg); color: var(--ok-fg); border: 1px dashed var(--ok-fg); } /* fetch-400 (Amanda): Lead=green (was gray-dashed) */
  .cal-chip.st-hold { background: #fef3c7; color: #92400e; border-left: 3px solid var(--pipe-orange); }
  .cal-chip.st-tentative { background: #2563eb; color: #fff; }
  .cal-chip.st-definite { background: #7c3aed; color: #fff; }
  .cal-chip.st-complete { background: #ece9f8; color: #5b21b6; }
  .cal-chip.st-cancelled { background: #f3f4f6; color: #9ca3af; text-decoration: line-through; }
  .cal-chip.is-closed, .cal-chip.is-closed[style*="--vc"] { background: var(--ink); color: var(--surface-card); border-left: 3px solid var(--ink); } /* fetch-911: closed out (events.planning.closed) - black like Reserve's calendar; the CLOSED prefix carries the meaning, the color repeats it */
  /* fetch-145 (audit fix №2): venue-colored chips = tint + dark text + color bar. AA everywhere; the grid goes quiet. */
  .cal-chip[style*="--vc"] { background: color-mix(in srgb, var(--vc) 13%, #fff); color: color-mix(in srgb, var(--vc) 72%, #000); border-left: 3px solid var(--vc); }
  .cal-chip[style*="--vc"] .cal-chip-venue { opacity: .8; }
  /* fetch-145 (audit fix №4): BEO editor line items get real columns; actions on hover (always-on under 720px) */
  .beo-line { display: grid; grid-template-columns: minmax(0,1fr) 56px 86px 92px 92px; gap: 12px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--hair); }
  .beo-line .qty, .beo-line .price, .beo-line .amt { text-align: right; font-variant-numeric: tabular-nums; }
  .beo-line .qty, .beo-line .price { font-size: var(--t-sub); color: var(--muted); }
  .beo-line .amt { font-weight: 600; }
  .beo-line .acts { visibility: hidden; text-align: right; }
  .beo-line:hover .acts { visibility: visible; }
  /* fetch-421 (Amanda): BEO revenue-center section bands + column header row; centered Date/Time on Functions */
  .beo-sec { margin-top: 16px; border-top: 2px solid var(--line); }
  .beo-sec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 8px 0 2px; flex-wrap: wrap; }
  .beo-sec-nm { font-family: 'Cormorant Garamond', Georgia, serif; font-size: var(--t-section); font-weight: 700; color: var(--navy); }
  .beo-sec-nm::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--gold); margin-right: 8px; vertical-align: 1px; }
  .beo-sec-sub { font-size: var(--t-sub); color: var(--muted); }
  .beo-sec-sub strong { color: var(--text-heading); font-variant-numeric: tabular-nums; }
  .beo-cols { display: grid; grid-template-columns: minmax(0,1fr) 56px 86px 92px 92px; gap: 12px; padding: 5px 0 4px; border-bottom: 1px solid var(--line); font-size: var(--t-label); text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 700; }
  .beo-cols .r { text-align: right; }
  .fin-table th.ta-c, .fin-table td.ta-c { text-align: center; }

  /* ── fetch-520: THE phoneStack PRIMITIVE ────────────────────────────────────────────────
     Jack, on the Menu Catalog at 390px: "Found another wrap bug - we can clean that list up".
     It is not a wrap bug — it is the sideways-scroll problem he named on the timesheet ("our
     data list is sideways scroll with not very good functionality"). A 5-column table in a
     390px window scrolls RIGHT, and the first thing to leave the screen is the item NAME, so
     you are reading prices attached to nothing.

     This is the third phone table (after fetch-513 timesheet and fetch-504 staff schedule), and
     the fetch-518 backlog said: build the shared primitive BEFORE the third hand-conversion.
     So: add class="pstack" to any .fin-table and it becomes a stacked card list on phones.
     Desktop is untouched — every rule lives inside the 640px block.

     Contract, deliberately tiny so it is cheap to adopt:
       <table class="fin-table pstack">
       <tr class="pstack-sec"><td colspan=N>       → a section heading
       <td data-l="Price">                          → becomes "Price $12.00" on its own chip
       <td class="pstack-title">                    → the row's headline, always first, never cut
       <td class="pstack-act">                      → actions, pinned to the row's top-right
     Cells with no marker stack as plain lines. Nothing is hidden — the fetch-513 lesson was that
     a phone view which DROPS columns makes people distrust the number. */
  @media (max-width: 640px) {
    table.pstack, table.pstack tbody, table.pstack tr, table.pstack td { display: block; width: 100%; }
    table.pstack { border-collapse: separate; }
    table.pstack thead { display: none; } /* the labels move onto the cells */
    /* the action gutter is RESERVED on the whole row, not just the title. First build only padded
       .pstack-title, so the labelled chips on line 2 ran underneath the absolutely-positioned
       button — "PAR 6" rendered with the 6 hidden behind the ×. Caught in a screenshot; probe-520
       now asserts geometric non-overlap between every chip and the action button. */
    table.pstack tbody tr { position: relative; padding: var(--s-3) 46px var(--s-3) 0;
      border-bottom: 1px solid var(--line); }
    table.pstack tbody tr:hover { background: transparent; } /* no hover state on a touch screen */
    /* .card table td sets white-space:nowrap globally (0,1,2). A stacked row MUST wrap, so this
       needs to out-specify it — hence .card table.pstack td (0,2,2) rather than !important.
       Diagnosed, not guessed: the first build left menu descriptions running 214px off the edge
       and under the Recipe button. A screenshot showed it; scrollWidth confirmed it. */
    .card table.pstack td, table.pstack tbody td { border: 0; padding: 0; font-size: var(--t-body);
      white-space: normal; overflow-wrap: anywhere; word-break: normal; min-width: 0; }
    table.pstack .pstack-title { font-weight: 700; color: var(--navy); line-height: 1.3; } /* gutter now lives on the row */
    table.pstack .pstack-title .muted { font-weight: 400; }
    .card table.pstack td[data-l], table.pstack td[data-l] { display: inline-block; width: auto;
      margin: var(--s-2) var(--s-3) 0 0; font-size: var(--t-sub); color: var(--ink);
      text-align: left; white-space: nowrap; } /* a number must never break mid-figure */
    table.pstack td[data-l]::before { content: attr(data-l) " "; color: var(--brand-stone);
      text-transform: uppercase; letter-spacing: .3px; font-size: var(--t-label); }
    table.pstack .pstack-act { position: absolute; top: var(--s-3); right: 0; width: auto; text-align: right; }
    table.pstack tr.pstack-sec { padding-right: 0; } /* section headings have no action to dodge */

    table.pstack .pstack-note:not(:empty) { display: block; margin-top: var(--s-2);
      font-size: var(--t-sub); color: var(--brand-stone); } /* free text gets its own full line */
    table.pstack .pstack-note:empty { display: none; }      /* ...and no blank gap when there is none */
    table.pstack tr.pstack-sec { padding: var(--s-4) 0 var(--s-1); border-bottom: 0; }
    table.pstack tr.pstack-sec td { font-size: var(--t-label); text-transform: uppercase;
      letter-spacing: .6px; color: var(--brand-stone); font-weight: 700; }
  }

  /* ── fetch-521 → fetch-526: the per-page "← Back to …" buttons retire EVERYWHERE ──────────────────────
     Jack: "why would we not use that function around the entire site rather than using more
     screen space for buttons like (back to trainees)?" — the chip now covers all of these,
     because it drives the same history that already tracks viewTrainee / viewEvent / viewAsset
     / viewVendor / wikiArticle / the print documents.

     THE GUARD THAT MATTERS: this only applies under body.has-navback, i.e. only when there IS
     an in-app history entry to go back to. A deep link — ?event=ID from a text message, a
     shared ?timeline= run sheet — lands at depth 0 with nothing behind it. Those pages keep
     their own button, because a hidden back with no chip is a person stranded on a detail page.

     ── fetch-526 (Jack): "if the back button works on browser why do we still have these (back
     to events) buttons — we need to do a sweep and get rid of those types". Right, and the
     fetch-521 note that "desktop keeps every one of them" was the timid half of a finished idea.
     The 640px wrapper is GONE: the same fourteen controls now retire at every width.

     What replaces them at each width, so nothing is removed without a successor:
       phone, in a browser      → the ‹ chip (revealed ≤640px) AND the OS/browser back gesture
       desktop, in a browser    → the browser's own back button, which drives the same fetch-84
                                  history the chip does — identical behaviour, by construction
       installed app, any width → the ‹ chip, revealed by @media (display-mode: standalone) above,
                                  because a standalone window has no browser back button at all
       depth 0 (a deep link)    → the page keeps its own button. body.has-navback is never set.

     KNOWN, ACCEPTED: #opsTlBack reads "All timelines" (no arrow) when you arrived from an event
     — in that branch it is a lateral link, not a back, and it now hides on desktop as it has
     hidden on phones since fetch-521. The Timelines tab is one click away. Logged, not fixed.

     WHERE THIS RULE LIVES, AND WHY THAT IS THE WHOLE FIX. fetch-521 wrote this as a media query
     NESTED INSIDE fetch-520's `@media (max-width: 640px)` pstack block. Nested @media is legal
     and it worked, so nothing complained. But deleting the inner wrapper did NOT free the rule:
     it just left it inside the OUTER phone block, still phone-only, and the first probe run
     measured `inpage: true` at 1440px with `has-navback` set. The rule had to MOVE, past the
     pstack block's closing brace, to top level. Assertion caught it; reading the diff would not
     have. If a future edit ever drags this back inside a media query, probe526 fails at 1440.

     Nothing is DELETED — wrapping this list in `@media (max-width: 640px)` restores fetch-521. */
  body.has-navback [data-backvendor],
  body.has-navback [data-backevent],
  body.has-navback [data-trainback],
  body.has-navback [data-back],
  body.has-navback .wiki-back,
  body.has-navback #svcBack,
  body.has-navback #pkDocBack,
  body.has-navback #pullDocBack,
  body.has-navback #beoDocBack,
  body.has-navback #invDocBack,
  body.has-navback #evtSheetBack,
  body.has-navback #ctrDocBack,
  body.has-navback #savedTimelineBack, /* fetch-1287: the shared history chip owns Back when present. */
  body.has-navback #assetConditionBack, /* fetch-1519: the shell owns Back for the shared reader. */
  body.has-navback #opsTlBack,
  body.has-navback #opsTlBackEv { display: none; }
  @media (max-width: 720px) { .beo-line, .beo-cols { grid-template-columns: minmax(0,1fr) 34px 60px 70px; } .beo-line .acts { visibility: visible; grid-column: 2 / -1; } .beo-cols .r:last-child { display: none; } }
  /* fetch-399: function-first menu panel (Reserve "Function Services" parity) — token-only, no inline styles */
  .ta-r { text-align: right; white-space: nowrap; }
  .fnm-panel { margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: var(--wash); }
  /* fetch-427: projected-F&B estimate strip (dashed = estimate, replaced by real lines) */
  .beo-proj { font-size: var(--t-sub); color: var(--muted); border: 1px dashed var(--line); border-radius: var(--r-s); padding: var(--s-2) var(--s-3); margin-top: var(--s-2); background: var(--wash); }
  .beo-proj strong { color: var(--text-heading); }
  /* fetch-427: House-rules card headings/grid onto classes (were inline — ratchet down) */
  .setrule-h { font-weight: 700; margin: var(--s-4) 0 var(--s-2); }
  .setrule-h:first-child { margin-top: 0; }
  .setrule-sub { margin-bottom: var(--s-3); }
  .grid--settings { max-width: 700px; }
  .fnm-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
  .fnm-cgrp { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
  .fnm-ctitle, .fnm-sub { font-weight: 700; color: var(--navy); }
  .fnm-secname { font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; font-size: var(--t-label); margin-top: 6px; }
  .fnm-desc, .fnm-rownote { font-size: var(--t-sub); }
  .fnm-rownote { color: var(--muted); white-space: nowrap; }
  .fnm-line { display: grid; grid-template-columns: minmax(0,1fr) 128px 84px 52px 34px; gap: 10px; align-items: baseline; padding: 5px 0; border-bottom: 1px solid var(--hair); }
  .fnm-line .fnm-r { text-align: right; font-variant-numeric: tabular-nums; }
  .fnm-xbtn { padding: 2px 7px; font-size: var(--t-sub); }
  .fnm-add { margin-top: 8px; }
  /* fetch-1113: desktop function/menu composition with a persistent item library. */
  .fn-editor h4, .fnm-panel h4, .fnm-panel h5 { margin: 0; color: var(--navy-dark); font-family: inherit; }
  .fn-editor h4, .fnm-panel h4 { font-size: var(--t-section); }
  .fnm-panel h5 { font-size: var(--t-body); }
  .fn-wide { grid-column: 1 / -1; }
  .fnm-panel .fnm-desc { white-space: pre-wrap; overflow-wrap: anywhere; }
  .fnm-menu-card { margin-top: var(--s-3); padding: var(--s-3); border: 1px solid var(--hair); background: var(--surface-card); border-radius: var(--r-s); }
  .fnm-menu-card .fnm-head { margin-bottom: var(--s-2); }
  .fnm-add-actions { display: flex; align-items: end; gap: var(--s-2); flex-wrap: wrap; margin-block: var(--s-3); }
  .fnm-add-actions .field { min-width: 12rem; }
  .fnm-builder { margin-block: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface-card); overflow: hidden; }
  .fnm-builder-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s-2); padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--hair); }
  .fnm-draft-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
  .fn-recovery { display: block; font-size: var(--t-sub); margin-bottom: var(--s-3); }
  .fn-recovery .actions { flex-wrap: wrap; margin-top: var(--s-2); }
  .fn-recovery .actions > span { flex-basis: 100%; overflow-wrap: anywhere; }
  .fn-recovery .btn { min-height: var(--control-height-touch); }
  .fnm-menu-details { display: grid; grid-template-columns: 3fr 2fr; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--hair); }
  .fnm-workbench { display: grid; grid-template-columns: minmax(15rem, 0.85fr) minmax(0, 2fr); }
  .fnm-library { padding: var(--s-3); background: var(--wash); border-right: 1px solid var(--hair); min-width: 0; }
  .fnm-library > .field { margin-block: var(--s-2); }
  .fnm-library-filters { display: grid; grid-template-columns: 1fr; gap: var(--s-2); }
  .fnm-results { max-height: 38rem; overflow-y: auto; overscroll-behavior: contain; padding-right: var(--s-1); }
  .fnm-results-count { font-size: var(--t-sub); margin-block: var(--s-2); }
  .fnm-choice { display: flex; flex-direction: column; gap: var(--s-1); width: 100%; padding: var(--s-3); margin-bottom: var(--s-2); text-align: left; border: 1px solid var(--hair); background: var(--surface-card); color: var(--ink); border-radius: var(--r-s); cursor: pointer; font: inherit; }
  .fnm-choice:hover { border-color: var(--navy); }
  .fnm-choice:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
  .fnm-choice-title { font-size: var(--t-sub); font-weight: 650; }
  .fnm-choice-meta, .fnm-choice-desc { font-size: var(--t-sub); color: var(--muted); overflow-wrap: anywhere; }
  .fnm-choice-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .fnm-choice-price { display: flex; justify-content: space-between; gap: var(--s-2); font-size: var(--t-sub); font-variant-numeric: tabular-nums; }
  .fnm-composition { padding: var(--s-3); min-width: 0; }
  .fnm-draft-row { padding: var(--s-3); border: 1px solid var(--hair); border-radius: var(--r-s); margin-bottom: var(--s-3); }
  .fnm-draft-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); margin-bottom: var(--s-2); font-size: var(--t-sub); }
  .fnm-draft-heading .actions { margin: 0; }
  .fnm-row-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.6fr) minmax(0, .8fr) minmax(0, 1fr); gap: var(--s-2); }
  .fnm-row-detail { display: grid; grid-template-columns: 3fr 2fr; gap: var(--s-2); margin-top: var(--s-2); }
  .fnm-builder .field { min-width: 0; }
  .fnm-builder .field > span { display: block; margin-bottom: var(--s-1); font-size: var(--t-sub); color: var(--muted); }
  .fnm-builder input, .fnm-builder textarea, .fnm-builder select { width: 100%; max-width: 100%; min-width: 0; font-size: var(--t-sub); }
  .fnm-builder input[type=checkbox] { width: auto; }
  .fnm-builder textarea { resize: vertical; }
  .fnm-draft-row > .muted { font-size: var(--t-sub); margin-block: var(--s-2); }
  .fnm-row-options { margin-top: var(--s-2); font-size: var(--t-sub); }
  .fnm-row-options summary { cursor: pointer; color: var(--navy); padding-block: var(--s-2); }
  .fnm-flags { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-2); }
  .fnm-flags label { display: flex; gap: var(--s-1); align-items: center; }
  .fnm-savebar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; padding: var(--s-3) var(--s-4); border-top: 1px solid var(--line); background: var(--wash); font-size: var(--t-sub); }
  .fnm-savebar .actions { margin: 0; }
  .fnm-builder > .notice { margin: var(--s-3); }
  @media (max-width: 1100px) { .fnm-row-main { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 720px) {
    .fnm-workbench, .fnm-menu-details, .fnm-row-detail { grid-template-columns: minmax(0, 1fr); }
    .fnm-library { border-right: 0; border-bottom: 1px solid var(--hair); }
    .fnm-results { max-height: 20rem; }
    .fnm-menu-details, .fnm-builder-head, .fnm-savebar { padding: var(--s-3); }
    .fnm-draft-heading { align-items: start; flex-wrap: wrap; }
    .fnm-panel .btn, .fnm-builder input, .fnm-builder select { min-height: var(--control-height-touch); }
    .fnm-menu-card .fnm-line { display: flex; flex-wrap: wrap; gap: var(--s-2); }
    .fnm-menu-card .fnm-line > :first-child { flex-basis: 100%; }
  }
  .fnm-item { display: grid; grid-template-columns: minmax(0,1fr) 92px 92px; gap: 8px; align-items: center; margin-top: 6px; }
  /* fetch-401: inquiry details page (token-only — no inline styles, no px fonts, no raw hex) */
  .mb-3x { margin-bottom: var(--s-3); }
  .mt-1x { margin-top: var(--s-1); } .mt-2x { margin-top: var(--s-2); } .mt-3x { margin-top: var(--s-3); } .mt-4x { margin-top: var(--s-4); }
  .mb-1x { margin-bottom: var(--s-1); }
  .ml-autox { margin-left: auto; }
  .card-goldtop { border-top: 3px solid var(--gold); }
  .row-wrapc { flex-wrap: wrap; align-items: center; }
  .btnrow { display: flex; gap: 6px; flex-wrap: wrap; }
  .inq-main { flex: 1 1 260px; min-width: 200px; }
  .inq-title { font-size: var(--t-section); }
  .inq-sub { font-size: var(--t-sub); margin: 2px 0 var(--s-2); }
  .inq-contact { font-size: var(--t-sub); margin-top: 2px; }
  .inq-h { font-size: var(--t-body); }
  .inq-notes { font-size: var(--t-sub); }
  .inq-decline { border-left: 3px solid var(--bad-fg); margin-top: var(--s-3); }
  .inq-chiprow { margin-top: var(--s-2); justify-content: flex-start; gap: 6px; flex-wrap: wrap; }
  .t-subx { font-size: var(--t-sub); }
  .btn.btn-on { background: var(--navy); color: #fff; border-color: var(--navy); }
  /* fetch-496 — THE SWITCH. Jack: "I like how the iPhone does the on/off switch being a
     clickable sliding dot." The deeper reason to build it: .btn-on currently carries TWO
     unrelated meanings that render identically — "this rule is ON" (notification rules) and
     "this is the view you're looking at" (Action Items Table/Boards, Documents, Vendors,
     Team). A filled pill cannot say state and selection at once. A switch says state; .btn-on
     goes back to meaning selection only.
     A <button role="switch"> and NOT a checkbox: portal state lives in DATA and render()
     redraws wholesale, so a checkbox's DOM state would desync on the next paint.
     Honest by construction — the binder writes to Supabase on click, so there is no save
     step for the switch position to lie about. */
  .sw { position: relative; display: inline-flex; align-items: center; flex: none;
    width: 44px; height: 26px; border-radius: 99px; border: 1px solid var(--line);
    background: var(--mute-bg); cursor: pointer; padding: 0;
    transition: background .18s ease, border-color .18s ease; }
  .sw::after { content: ""; position: absolute; left: 2px; width: 20px; height: 20px;
    border-radius: 50%; background: var(--surface-card); box-shadow: 0 1px 3px rgba(20, 33, 61, .28);
    transition: transform .18s cubic-bezier(.3, .9, .4, 1); }
  .sw[aria-checked="true"] { background: var(--brand-blue-traditional); border-color: var(--brand-blue-traditional); }
  .sw[aria-checked="true"]::after { transform: translateX(18px); }
  /* 44x26 visual, 44x44 hit area — clears the touch floor without looking chunky */
  .sw::before { content: ""; position: absolute; left: 0; right: 0; top: -9px; bottom: -9px; }
  @media (min-width: 721px) { /* pointer guaranteed — the touch floor no longer applies */
    .sw { width: 38px; height: 22px; }
    .sw::after { width: 16px; height: 16px; }
    .sw[aria-checked="true"]::after { transform: translateX(16px); }
    .sw::before { top: 0; bottom: 0; }
  }
  @media (prefers-reduced-motion: reduce) { .sw, .sw::after { transition: none; } }
  /* fetch-402: planning tab */
  .pln-head { cursor: pointer; }
  .pln-caret { color: var(--muted); font-size: var(--t-sub); }
  .pln-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--s-4); }
  .pln-sec { font-weight: 700; color: var(--navy); font-size: var(--t-sub); text-transform: uppercase; letter-spacing: .4px; margin-bottom: var(--s-1); }
  .pln-item { display: flex; justify-content: space-between; align-items: center; gap: var(--s-2); padding: 6px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
  .pln-l { font-size: var(--t-body); min-width: 0; }
  .pln-item--auto { cursor: default; }
  .pln-evidence { display: block; margin-top: var(--s-1); color: var(--muted); font-size: var(--t-sub); line-height: 1.5; overflow-wrap: anywhere; }
  .pdx-planning [data-planrefresh] { min-height: var(--control-height-touch); }
  .pln-appointment { padding: var(--s-3) 0; border-bottom: 1px solid var(--line); min-width: 0; }
  .pln-appointment-head { display: flex; justify-content: space-between; align-items: start; gap: var(--s-2); }
  .pln-appointment-head > div { min-width: 0; }
  .pln-appointment-head strong { font-size: var(--t-body); font-weight: 600; }
  .pln-appointment-actions { flex-wrap: wrap; margin-top: var(--s-2); }
  .pln-appointment-actions .btn, .pln-appointment-form .actions .btn, .pdx-planning [data-appointment-refresh] { min-height: var(--control-height-touch); }
  .pln-appointment-prep { font-size: var(--t-sub); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; margin: var(--s-2) 0; }
  .pln-appointment-form { margin: var(--s-3) 0 0; padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-s); min-width: 0; }
  .pln-appointment-form legend { font-size: var(--t-sub); font-weight: 600; padding: 0 var(--s-1); }
  .pln-appointment-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
  .pln-appointment-fields .field { min-width: 0; }
  .pln-appointment-fields input, .pln-appointment-fields select, .pln-appointment-fields textarea { box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; font: inherit; min-height: var(--control-height-touch); }
  .pln-appointment-fields input[type="date"], .pln-appointment-fields input[type="time"] { appearance: none; }
  .pln-appointment-wide { grid-column: 1 / -1; }
  .pln-appointment-share { display: flex; align-items: center; gap: var(--s-2); min-height: var(--control-height-touch); margin-top: var(--s-2); }
  /* fetch-1161: appointment entry keeps dates whole and AM/PM controls readable. */
  .pln-appointment-form .pln-appointment-fields { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
  .pln-appointment-time { min-width: 0; }
  .pln-appointment-time-toggle { display: flex; align-items: center; gap: var(--s-2); min-height: var(--control-height-touch); font-size: var(--t-body); cursor: pointer; }
  .pln-appointment-time-toggle input { width: auto; min-height: 0; flex: none; }
  .pln-appointment-time-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: var(--s-3); margin-top: var(--s-2); }
  .pln-appointment-time-grid[hidden] { display: none; }
  .pln-appointment-time-entry { display: grid; grid-template-columns: minmax(0, 1fr) 6.5rem; gap: var(--s-2); }
  .pln-appointment-time-entry input { font-variant-numeric: tabular-nums; }
  .pln-appointment-time > p { margin: var(--s-2) 0 0; }
  .pln-appointment-contact-help p { margin: 0 0 var(--s-2); }
  .pln-appointment-contact-help .btn { min-height: var(--control-height-touch); }
  /* fetch-1164: compact meeting actions, with the same touch targets on phones. */
  .pln-meetings { margin-top: var(--s-4); padding-top: var(--s-3); border-top: 2px solid var(--gold); }
  .pln-meetings-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s-2); }
  .pln-meetings-toolbar h3 { margin: 0; font-size: var(--t-body); font-weight: 600; }
  .pln-meetings .pln-meeting-action { display: inline-flex; align-items: center; gap: var(--s-1); box-sizing: border-box; min-height: var(--control-height-sm); padding: var(--s-1) var(--s-2); border: 1px solid transparent; border-radius: var(--r-s); background: transparent; color: var(--navy); font: inherit; font-size: var(--t-sub); text-align: left; cursor: pointer; }
  .pln-meetings-toolbar .pln-meeting-action { border-color: var(--line); background: var(--surface-card); }
  .pln-meetings .pln-meeting-action:hover:not(:disabled) { background: var(--wash); border-color: var(--line); }
  .pln-meetings .pln-meeting-action:disabled { opacity: .55; cursor: default; }
  .pln-meeting-action:focus-visible, .pln-calendar-options :is(a, button):focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
  .pln-meetings .pln-appointment-actions { gap: var(--s-2); align-items: start; }
  .pln-meeting-disclosure { border-bottom: 1px solid var(--line); font-size: var(--t-sub); }
  .pln-meeting-disclosure > summary { padding: var(--s-2) 0; min-height: var(--control-height-sm); box-sizing: border-box; cursor: pointer; color: var(--navy); }
  .pln-meeting-pending { margin: 0 0 var(--s-2); padding: 0; list-style: none; }
  .pln-meeting-pending li { padding: var(--s-1) 0; }
  .pln-meeting-empty { margin: var(--s-3) 0; }
  .pln-calendar-menu { position: relative; }
  .pln-calendar-menu > summary { list-style: none; }
  .pln-calendar-menu > summary::-webkit-details-marker { display: none; }
  .pln-calendar-menu > summary::after { content: ""; width: .4rem; height: .4rem; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: translateY(-.1rem) rotate(45deg); margin-left: var(--s-1); }
  .pln-calendar-menu[open] > summary::after { transform: translateY(.1rem) rotate(225deg); }
  .pln-calendar-options { position: absolute; z-index: 3; top: 100%; left: 0; min-width: 12rem; padding: var(--s-1); background: var(--surface-card); border: 1px solid var(--line); border-radius: var(--r-s); }
  .pln-calendar-options :is(a, button) { display: flex; align-items: center; gap: var(--s-2); width: 100%; min-height: var(--control-height-touch); box-sizing: border-box; padding: var(--s-2); border: 0; border-radius: var(--r-s); background: transparent; font: inherit; font-size: var(--t-sub); color: var(--navy); text-decoration: none; text-align: left; cursor: pointer; }
  .pln-calendar-options :is(a, button):hover { background: var(--wash); }
  .pln-meetings .appointment-calendar-help { margin-top: var(--s-2); }
  .pln-meetings .appointment-calendar-help .ci { margin-right: var(--s-1); }
  .pln-appointment-form .btn { display: inline-flex; align-items: center; gap: var(--s-1); }
  .pln-appointment-form .actions { flex-wrap: wrap; }
  @media (max-width: 640px), (pointer: coarse) { .pln-meetings .pln-meeting-action, .pln-meeting-disclosure > summary { min-height: var(--control-height-touch); } .pln-calendar-options { position: static; margin-top: var(--s-1); } }
  @media print { .pln-meetings-toolbar .pln-meeting-action, .pln-appointment-actions, [data-appointment-editor], .pln-meeting-disclosure, .pln-meetings .appointment-calendar-help { display: none; } }
  @media (max-width: 640px) { .pdx-planning .pln-grid, .pln-appointment-fields { grid-template-columns: minmax(0, 1fr); } }
  .pln-date { padding: 4px 6px; border: 1px solid var(--line); border-radius: var(--r-s); font-size: var(--t-sub); font-family: inherit; }
  .pln-past { border-left: 3px solid var(--warn-fg); }
  .pln-closehead { margin: var(--s-5) 0 var(--s-3); padding-top: var(--s-3); border-top: 2px solid var(--line); justify-content: flex-start; gap: var(--s-2); align-items: center; } /* fetch-403: section divider, NOT a card — cards are events here */
  .inq-task { padding: 5px 0; border-bottom: 1px solid var(--hair); align-items: center; }
  .inq-task-n { font-size: var(--t-body); font-weight: 600; min-width: 0; }
  .inq-task-r { white-space: nowrap; display: flex; gap: 6px; align-items: center; }
  /* fetch-1023: event playbook rows survived the Sales Tasks tab, so they own a small shared primitive. */
  .evt-task-row { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); padding: var(--s-2) 0; border-bottom: 1px solid var(--hair); }
  .evt-task-row.inq-task { align-items: flex-start; padding: var(--s-2) 0; }
  .evt-task-main { flex: 1 1 auto; min-width: 0; }
  .evt-task-name { display: block; color: var(--text-heading); font-size: var(--t-body); font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
  .evt-task-meta { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-1); margin-top: var(--s-1); }
  .evt-task-actions { display: flex; align-items: center; justify-content: flex-end; flex: 0 0 auto; gap: var(--s-1); }
  .btn.evt-task-action { display: inline-flex; align-items: center; justify-content: center; width: var(--control-height-sm); min-width: var(--control-height-sm); height: var(--control-height-sm); min-height: var(--control-height-sm); padding: 0; border-radius: var(--r-s); }
  .evt-task-action .ci { display: block; }
  .evt-task-row--done { color: var(--muted); font-size: var(--t-sub); }
  .evt-task-done-name { min-width: 0; overflow-wrap: anywhere; }
  .evt-task-details { margin-top: var(--s-2); }
  .evt-task-done-summary { cursor: pointer; padding: var(--s-2) 0; font-size: var(--t-sub); }
  .inq-check { display: flex; gap: 8px; align-items: center; font-size: var(--t-body); padding: 4px 0; cursor: pointer; }
  /* fetch-1443: the Reserve types switch on the Events import - a block, not .notice's flex row, so the counts read as prose under the box */
  .ri-types { display: block; margin-top: var(--s-2); }
  .ri-types .inq-check { font-weight: 600; }
  .ri-types p { margin: var(--s-1) 0 0; line-height: 1.45; }
  .inq-ro { font-size: var(--t-body); padding: 7px 0; }
  .inq-lostnote { margin-top: 6px; font-size: var(--t-sub); color: var(--bad-fg); background: var(--bad-bg); border-radius: var(--r-s); padding: 6px 10px; display: inline-block; }
  .fnm-itemhead { margin-top: 8px; }
  @media (max-width: 720px) { .fnm-line { grid-template-columns: minmax(0,1fr) 64px 56px 44px 30px; } .fnm-item { grid-template-columns: minmax(0,1fr) 64px 64px; } }
  .cal-more { font-size: 10.5px; color: var(--muted); padding: 1px 5px; }
  @media (max-width: 720px) {
    .cal-cell { min-height: 64px; padding: 2px; }
    .cal-chip { font-size: 9.5px; padding: 1px 3px; }
    .cal-chip-venue { display: none; }
  }
  .brief-fin { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin-top: 14px; }
  .finstat { background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.16); border-radius: 10px; padding: 10px 12px; }
  .finstat .fl { font-size: 10.5px; color: #c8d4e4; text-transform: uppercase; letter-spacing: .4px; }
  .finstat .fv { font-size: 19px; font-weight: 700; color: #fff; margin-top: 3px; }
  .finstat .fsub { font-size: 11px; color: #aebdd2; margin-top: 1px; }
  .tabmore-wrap { position: relative; display: inline-block; }
  .tabmore-menu { position: absolute; top: 100%; left: 0; z-index: 50; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 20px rgba(20,33,61,0.12); padding: 4px; min-width: 180px; margin-top: 2px; }
  .tabmore-item { display: block; width: 100%; text-align: left; padding: 8px 12px; font-size: 14px; border: none; background: transparent; color: var(--muted); cursor: pointer; border-radius: 6px; }
  .tabmore-item:hover { background: var(--bg); color: var(--navy); }
  .tabmore-item.active { color: var(--navy); font-weight: 600; background: var(--bg); }
  .toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 8px; flex-wrap: wrap; }
  .btn { padding: 8px 14px; border: 1px solid #d1d5db; background: #fff; border-radius: 8px; cursor: pointer; font-size: 14px; }
  :where(.btn) { color: var(--ink); } /* fetch-936.1: .btn never set a colour, so iOS Safari painted every one in its system blue (Jack's phone: Customize, the More rows) while Chromium's buttontext read black. ZERO specificity on purpose: an author declaration still beats the UA sheet, but this loses to every class rule in the file whatever its position - the review found a plain `.btn { color }` here would have out-ordered .tcp-voidbtn (Void punch), .t-bad, .sa-drop, .ulock-btn and .tc-notex and turned four destructive reds to ink. Plain a.btn links go from UA blue to ink everywhere too. */
  a.btn { text-decoration: none; display: inline-block; } /* fetch-389: link-styled-as-button primitive (trainer card) — color comes from .btn-primary etc. */
  .pre-line { white-space: pre-line; } /* fetch-390: manager-entered multi-line text (trainee orientation) */
  .sum-link { cursor: pointer; font-weight: 600; color: var(--navy); } /* fetch-390: tappable <summary> (orientation disclosure) */
  .btn-block { display: block; width: 100%; box-sizing: border-box; } /* fetch-391: full-width stacked button/link (trainer's trainee list) */
  .btn:hover { background: #f3f4f6; }
  .btn-primary { background: var(--navy); color: #fff; border-color: var(--navy); }
  .btn-primary:hover { background: var(--navy-dark); }
  .btn-danger { color: #b91c1c; border-color: #fca5a5; }
  .sel { padding: 7px 8px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; background: #fff; }
  .card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
  /* ---- Dashboard facelift ---- */
  .dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 10px; margin-bottom: 18px; }
  /* fetch-91: command palette */
  .cmd-backdrop { position: fixed; inset: 0; background: rgba(20,24,36,.5); backdrop-filter: blur(2px); z-index: 600 /* fetch-431: top-layer tier (scale: 1-4 card, 30 sticky, 300-320 menus, 500 modals, 600 top overlays) */; display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh; animation: cmdFade .12s ease; }
  @keyframes cmdFade { from { opacity: 0; } to { opacity: 1; } }
  .cmd-box { width: min(640px, 92vw); background: #fff; border-radius: 14px; box-shadow: 0 24px 60px rgba(20,24,36,.35); overflow: hidden; border: 1px solid var(--line); }
  .cmd-input { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 16px 18px; font-size: 16px; font-family: inherit; outline: none; color: var(--navy); }
  .cmd-list { max-height: 52vh; overflow-y: auto; padding: 6px; }
  .cmd-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; cursor: pointer; }
  .cmd-row:hover { background: #f4efe5; }
  .cmd-row.cmd-sel { background: var(--navy); }
  .cmd-row.cmd-sel .cmd-label { color: #fff; }
  .cmd-row.cmd-sel .cmd-sub { color: #c8d4e4; }
  .cmd-label { font-size: 14px; font-weight: 600; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cmd-sub { font-size: 12px; color: #707373; }
  .cmd-empty { padding: 26px 16px; text-align: center; color: #9aa3af; font-size: 13.5px; }
  .cmd-foot { display: flex; justify-content: space-between; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 11px; color: #9aa3af; background: #faf8f4; }
  .badge.b-gold { background: #f3e4cf; color: #8c6145; }
  /* fetch-92: arrive-glow — the card you navigated to identifies itself */
  #content .cse-arrive { position: relative; z-index: 1; animation: cseArrivePulse 2.2s ease-out; border-radius: 10px; }
  @keyframes cseArrivePulse {
    0% { box-shadow: 0 0 0 3px rgba(192,146,103,.95), 0 6px 26px rgba(192,146,103,.35); background-color: #f7efe3; }
    65% { box-shadow: 0 0 0 3px rgba(192,146,103,.4), 0 3px 12px rgba(192,146,103,.14); background-color: #fbf7f0; }
    100% { box-shadow: 0 0 0 0 rgba(192,146,103,0); }
  }
  @media (prefers-reduced-motion: reduce) {
    #content .cse-arrive { animation: none; box-shadow: 0 0 0 3px rgba(192,146,103,.6); }
  }
  /* fetch-97: change control rows */
  .chg-row { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid #f2ece3; }
  .chg-row:last-child { border-bottom: none; }
  .chg-main { flex: 1; min-width: 0; font-size: 13.5px; }
  .chg-old { color: #9a8a7a; text-decoration: line-through; }
  .chg-new { color: var(--navy); font-weight: 700; }
  .chg-res { font-size: 12px; color: #166534; margin-top: 3px; }
  .chg-actions { flex: 0 0 auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
  /* fetch-95: drag & drop */
  .pipe-col.drop-hot, .cal-cell.drop-hot, .calw-cell.drop-hot, .schd-cell.drop-hot { outline: 2px dashed var(--gold); outline-offset: -2px; background: #fdf8ef; }
  .card.drop-hot, .toolbar.drop-hot { outline: 2px dashed var(--gold); outline-offset: 2px; background: #fdf8ef; }
  .pipe-row[draggable="true"], .cal-chip[draggable="true"], .schd-cell[draggable="true"] { cursor: grab; }
  .pipe-row.cse-dragging, .cal-chip.cse-dragging, .schd-cell.cse-dragging, [data-svyqrow].cse-dragging { opacity: .45; } /* fetch-420 */
  /* fetch-94: collapsible asset groups */
  #content .card.grp-head { cursor: pointer; padding: 11px 14px; margin: 8px 0 6px; user-select: none; }
  #content .card.grp-head:hover { background: #faf7f2; }
  #content .card.grp-head .grp-chev { display: inline-block; transition: transform .15s ease; color: var(--gold-dark); }
  #content .grp-body { margin-left: 6px; border-left: 2px solid #eee5d8; padding-left: 8px; }
  .stat-tile { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; position: relative; overflow: hidden; transition: transform .12s ease, box-shadow .12s ease; }
  .stat-tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--tile-accent, var(--gold)); }
  .stat-tile .stat-label { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 6px; }
  .stat-tile .stat-value { font-size: 27px; font-weight: 700; line-height: 1; }
  .stat-tile .stat-sub { font-size: 12px; color: var(--muted); font-weight: 500; }

  .dash-section-title { font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif; font-size: 17px; color: var(--navy); font-weight: 700; }
  .attn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(256px, 1fr)); gap: 12px; }
  .attn-block { border: 1px solid var(--line); border-radius: 10px; padding: 12px 13px; background: #fcfcfb; position: relative; }
  .attn-block.has-items { border-left: 3px solid var(--block-accent, var(--gold)); }
  .attn-head { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
  .attn-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--block-accent, var(--gold)); flex: 0 0 auto; }
  .attn-head .attn-name { font-weight: 700; font-size: 13px; color: var(--ink); letter-spacing: .2px; }
  .attn-head .attn-count { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--block-accent, var(--gold)); background: var(--block-accent-bg, #f3efe8); border-radius: 20px; padding: 1px 9px; }
  .attn-row { display: flex; padding: 7px 0; border-bottom: 1px solid #f0f0ee; }
  .attn-row:last-child { border-bottom: none; }
  .attn-row[data-attnjump] { cursor: pointer; margin: 0 -6px; padding: 7px 6px; border-radius: 6px; }
  .attn-row[data-attnjump]:hover { background: #f3f2ef; }
  .attn-empty { color: #9ca3af; font-size: 13px; padding: 4px 0 2px; }

  .spend-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
  .spend-col { border: 1px solid var(--line); border-radius: 10px; padding: 12px 13px; background: #fcfcfb; }
  .spend-col h4 { margin: 0 0 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--gold-dark); }
  .spend-line { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #f0f0ee; font-size: 14px; }
  .spend-line:last-child { border-bottom: none; }
  .spend-total-pill { margin-left: auto; font-size: 13px; color: var(--muted); }
  .spend-total-pill strong { color: var(--navy); font-size: 15px; }
  /* ---- Inventory (spreadsheet layout) ---- */
  .inv-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
  /* (bubble jump bar replaced by the Jump-to dropdown in the toolbar) */
  .inv-cat { margin-bottom: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
  .inv-cat-head { border-radius: 10px 10px 0 0; }
  .inv-cat.collapsed .inv-cat-head { border-radius: 10px; }
  .inv-cat-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; background: #fbfaf8; border-bottom: 1px solid var(--line); user-select: none; position: sticky; top: 0; z-index: 20; }
  .inv-cat-head:hover { background: #f5f3ee; }
  .inv-chev { transition: transform .15s; color: var(--gold-dark); font-size: 13px; width: 14px; }
  .inv-cat.collapsed .inv-chev { transform: rotate(-90deg); }
  .inv-cat.collapsed .inv-cat-body { display: none; }
  .inv-cat.collapsed .inv-cat-head { border-bottom: none; }
  .inv-cat-name { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 15px; font-weight: 700; color: var(--navy); }
  .inv-cat-count { font-size: 11px; font-weight: 700; color: var(--gold-dark); background: #f3efe8; border-radius: 20px; padding: 1px 8px; }
  .inv-cat-sub { margin-left: auto; font-size: 12px; color: var(--muted); }
  .inv-table { width: 100%; border-collapse: collapse; }
  .inv-table thead th { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 700; text-align: center; padding: 7px 4px; border-bottom: 1px solid var(--line); background: #fcfcfb; }
  .inv-table thead th.inv-item-col { text-align: left; padding-left: 14px; }
  .inv-table tbody td { padding: 0; border-bottom: 1px solid #f0f0ee; font-size: 14px; height: 40px; vertical-align: middle; line-height: 1.2; }
  .inv-table tbody tr:last-child td { border-bottom: none; }
  .inv-table tbody tr:hover { background: #f9f8f5; }
  .inv-item-cell { padding: 4px 14px; cursor: pointer; }
  .inv-item-cell:hover .inv-name { color: var(--navy); text-decoration: underline; }
  .inv-name { font-weight: 600; line-height: 1.2; }
  .inv-sub { font-size: 11px; color: var(--muted); line-height: 1.1; }
  .inv-cnt { text-align: center; width: 72px; cursor: pointer; }
  .inv-cnt-val { display: block; padding: 4px; font-weight: 600; color: var(--navy); }
  .inv-cnt-val.empty { color: #cbd5e1; font-weight: 400; }
  .inv-cnt.na { background: #fafafa; cursor: default; }
  .inv-cnt.na .inv-cnt-val { color: #e5e7eb; }
  .inv-cnt:not(.na):hover { background: #eef4ff; box-shadow: inset 0 0 0 2px #bfdbfe; }
  .inv-cnt-input { width: 100%; border: 2px solid var(--navy); border-radius: 4px; padding: 4px 2px; text-align: center; font-size: 14px; font-weight: 600; }
  .inv-tot { text-align: center; width: 64px; background: #fbfaf8; }
  .inv-tot-val { display: block; padding: 4px; font-weight: 700; color: var(--navy); }
  .inv-pick-venue { text-align: center; padding: 36px 20px; max-width: 420px; margin: 0 auto; }
  .inv-venue-btns { display: flex; flex-direction: column; gap: 8px; }
  @media (max-width: 640px) {
    .inv-table thead th { font-size: 10px; }
    .inv-cnt { width: 60px; }
    .inv-item-cell { padding: 9px 8px; }
    .inv-cat-sub { display: none; }
  }
  .inv-count-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
  /* ---- Training ---- */
  /* fetch-1194: the four-day spine, and only it, survives the old .train-card row — the list rows are .trl-row
     now (below). A filled dot means a trainer EVALUATED that day (fetch-1190's rule), never that someone signed. */
  .train-dot, .train-dot-done, .train-dot-current { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
  .train-dot { background: var(--line); }
  .train-dot-done { background: var(--gold); }
  .train-dot-current { background: var(--surface-card); border: 2px solid var(--gold); box-sizing: border-box; }
  /* fetch-1190: THE TRAINEE RECORD IS A STAGE BOARD (Direction B, docs/trainee-redesign/). One header
     with one primary action, the obligation card, four day steps filled from trainer evaluations, the
     latest shift, what is still building, earlier days as a fold. Tokens only. The 45x4 grid, the
     pts/poss chips, the per-day sign buttons and the section nav left with it (zero boxes ever ticked). */
  .training-recpage { min-width: 0; }
  .training-recpage .pgh-morelist .btn { white-space: normal; min-height: var(--control-height-touch); }
  .training-recpage .pgh-meta { color: var(--ink); font-size: var(--t-sub); line-height: 1.5; }
  .training-record { display: grid; gap: var(--s-3); min-width: 0; }
  .training-record > .card, .training-record .trec-card { margin: 0; min-width: 0; }
  .trec-num { font-variant-numeric: tabular-nums; }
  .trec-card-h { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: var(--s-1) var(--s-3); margin: 0 0 var(--s-3); }
  .trec-card-h h2 { margin: 0; font: 700 var(--t-body)/1.4 Inter, sans-serif; color: var(--text-heading); }
  .trec-card-h .muted { font-size: var(--t-sub); }
  .trec-card-h + .trec-ev { padding-top: 0; }
  .trec-card-f { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s-2) var(--s-3); margin-top: var(--s-3); font-size: var(--t-sub); }
  .trec-card-f b { color: var(--ink); }
  .trec-quiet { margin: var(--s-3) 0 0; font-size: var(--t-sub); line-height: 1.5; color: var(--muted); }
  .trec-quiet b { color: var(--ink); }
  .trec-bad { color: var(--bad-fg); font-weight: 600; }
  .trec-warn { color: var(--warn-fg); font-weight: 600; }
  .trec-todo { color: var(--ink); font-weight: 600; }
  /* the obligation card: the one thing that holds completion up */
  .trec-ob { border-radius: var(--r-l); padding: var(--s-4); background: var(--bad-bg); }
  .trec-ob-h { margin: 0; font: 700 var(--t-body)/1.35 Inter, sans-serif; color: var(--bad-fg); }
  .trec-ob-q { margin: var(--s-2) 0 0; font-size: var(--t-body); line-height: 1.5; color: var(--ink); max-width: 90ch; overflow-wrap: anywhere; }
  .trec-ob-m { margin: var(--s-2) 0 0; font-size: var(--t-sub); line-height: 1.5; color: var(--mute-fg); }
  .trec-ob-m b { color: var(--ink); font-weight: 600; }
  /* the four days */
  .trec-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
  /* fetch-1190.1: the days are the timeline you tap - each day with something on file is a button that opens in place */
  .trec-step { position: relative; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface-card); min-width: 0; }
  .trec-step + .trec-step::before { content: ""; position: absolute; left: calc(var(--s-3) + 11px); top: calc(-1 * var(--s-2) - 1px); width: 2px; height: var(--s-2); background: var(--line); }
  .trec-stepbtn { display: flex; align-items: flex-start; gap: var(--s-3); width: 100%; min-height: var(--control-height-touch); box-sizing: border-box; padding: var(--s-3); border: 0; border-radius: var(--r-m); background: none; font: inherit; text-align: left; color: inherit; }
  button.trec-stepbtn { cursor: pointer; }
  button.trec-stepbtn:hover { background: var(--wash); }
  button.trec-stepbtn:focus-visible, .trec-foldbtn--sub:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
  .trec-step-chev { flex: 0 0 auto; margin-left: auto; align-self: center; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; color: var(--navy); font-size: var(--t-body); background: var(--surface-card); }
  button.trec-stepbtn:hover .trec-step-chev { border-color: var(--navy); }
  .trec-step-detail { padding: 0 var(--s-3) var(--s-3); border-top: 1px solid var(--hair); }
  .trec-step--open { border-color: var(--navy); }
  .trec-ev-review { padding-top: var(--s-3); }
  .trec-rates { list-style: none; margin: var(--s-2) 0 0; padding: 0; }
  .trec-rate { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); padding: var(--s-1) 0; border-top: 1px solid var(--hair); font-size: var(--t-sub); color: var(--ink); }
  .trec-rate span { min-width: 0; overflow-wrap: anywhere; }
  .trec-rate b { flex: 0 0 auto; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .trec-rate--low b { color: var(--warn-fg); font-weight: 700; }
  .trec-rate--na, .trec-rate--na b { color: var(--muted); font-weight: 500; }
  .trec-allrates h4 { margin: var(--s-3) 0 0; font: 700 var(--t-sub)/1.4 Inter, sans-serif; color: var(--text-heading); }
  .trec-foldbtn.trec-foldbtn--sub { margin-top: var(--s-2); font-size: var(--t-sub); color: var(--mute-fg); text-decoration: underline; text-underline-offset: .2em; }
  .trec-main { display: grid; gap: var(--s-3); align-content: start; min-width: 0; }
  .trec-step--now { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
  .trec-step--todo { background: var(--wash); }
  .trec-step--gap { background: var(--warn-bg); border-color: transparent; }
  .trec-step-mark { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); font-size: var(--t-sub); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); background: var(--surface-card); }
  .trec-step--done .trec-step-mark { background: var(--navy); border-color: var(--navy); color: var(--surface-card); }
  .trec-step--gap .trec-step-mark { border-color: var(--warn-fg); color: var(--warn-fg); }
  .trec-step-b { display: block; min-width: 0; }
  .trec-step-l, .trec-step-s { display: block; }
  .trec-step-l { font-size: var(--t-mid); font-weight: 700; color: var(--text-heading); }
  .trec-step--todo .trec-step-l { color: var(--muted); font-weight: 600; }
  .trec-step-s { margin-top: 2px; font-size: var(--t-sub); line-height: 1.45; color: var(--muted); overflow-wrap: anywhere; }
  .trec-step--now .trec-step-s, .trec-step--gap .trec-step-s { color: var(--ink); }
  .trec-undo { border: 0; background: none; padding: var(--s-1) var(--s-2); margin: calc(-1 * var(--s-1)) 0; font: inherit; font-size: var(--t-sub); color: var(--muted); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; border-radius: var(--r-s); }
  .trec-undo:focus-visible, .trec-skill:focus-visible, .trec-foldbtn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
  /* one evaluation */
  .trec-ev { padding: var(--s-3) 0 0; }
  .trec-ev + .trec-ev { margin-top: var(--s-3); border-top: 1px solid var(--hair); }
  .trec-ev-h { margin: 0; font-size: var(--t-sub); line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
  .trec-ev-h b { color: var(--ink); font-weight: 600; }
  .trec-ev-n { margin: var(--s-2) 0 0; font-size: var(--t-mid); line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; white-space: pre-wrap; }
  .trec-ev-acts { margin: var(--s-2) 0 0; }
  /* still building */
  .trec-skills { list-style: none; margin: 0; padding: 0; }
  .trec-skills li + li { border-top: 1px solid var(--hair); }
  .trec-skill { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--s-3); width: 100%; min-height: var(--control-height-touch); padding: var(--s-2) 0; border: 0; background: none; font: inherit; text-align: left; color: var(--ink); cursor: pointer; border-radius: var(--r-s); }
  .trec-skill-n { font-size: var(--t-body); font-weight: 600; color: var(--text-heading); overflow-wrap: anywhere; }
  .trec-skill-r { font-size: var(--t-sub); font-weight: 700; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
  .trec-skill-m, .trec-skill-x { grid-column: 1 / -1; font-size: var(--t-sub); line-height: 1.45; color: var(--muted); }
  .trec-skill-x { margin-top: var(--s-1); padding: var(--s-2) var(--s-3); background: var(--wash); border-radius: var(--r-m); color: var(--ink); }
  .trec-trend { display: inline-flex; gap: var(--s-1); vertical-align: middle; }
  .trec-trend i { min-width: 24px; padding: 0 var(--s-1); border-radius: var(--r-s); text-align: center; font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
  .trec-trend .trec-low { background: var(--warn-bg); color: var(--warn-fg); }
  .trec-trend .trec-good { background: var(--ok-bg); color: var(--ok-fg); }
  .trec-trend .trec-none { background: var(--mute-bg); color: var(--mute-fg); }
  /* earlier days */
  .trec-fold, .trec-files { list-style: none; margin: 0; padding: 0; }
  .trec-fold > li { border-top: 1px solid var(--hair); padding-bottom: var(--s-2); }
  .trec-foldbtn { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); width: 100%; min-height: var(--control-height-touch); padding: var(--s-1) 0; border: 0; background: none; font: inherit; font-size: var(--t-body); font-weight: 600; text-align: left; color: var(--text-heading); cursor: pointer; border-radius: var(--r-s); }
  .trec-fold-n { font-size: var(--t-sub); font-weight: 500; color: var(--muted); }
  .trec-files li { padding: var(--s-1) 0; }
  /* fetch-1415: upcoming training shifts - a date and time, then where and in which position */
  .trec-shifts { list-style: none; margin: 0; padding: 0; }
  .trec-shift { display: grid; gap: 0 var(--s-2); padding: var(--s-2) 0; border-top: 1px solid var(--hair); font-size: var(--t-sub); line-height: 1.5; }
  .trec-shift:first-child { border-top: 0; padding-top: 0; }
  .trec-shift b { font-size: var(--t-body); font-weight: 600; color: var(--ink); }
  .trec-shift span { color: var(--muted); overflow-wrap: anywhere; }
  .trec-shift .vchip { vertical-align: -1px; }
  .trec-rail { display: grid; gap: var(--s-3); }
  .trec-docs .ros-i9-n { margin-left: 0; } /* fetch-1418: in the card header the count sits at the far edge, not beside a title */
  /* DOM order is the phone's order (latest shift, still building, earlier days); from 1000px the rail takes column 2 */
  .trec-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); min-width: 0; align-items: start; }
  .trec-rail { min-width: 0; }
  @media (min-width: 1000px) { .trec-cols--rail { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } .trec-cols--rail > * { grid-column: 1; } .trec-cols--rail > .trec-rail { grid-column: 2; grid-row: 1 / span 3; } }
  /* the two sheets (and the early-completion reason) ride the shared modal */
  .trec-sheet h2 { margin: 0; font: 700 var(--t-section)/1.3 Inter, sans-serif; color: var(--text-heading); }
  .trec-sheet p { margin: var(--s-2) 0 0; font-size: var(--t-mid); line-height: 1.5; }
  .trec-sheet .field { margin-top: var(--s-3); }
  .trec-sheet textarea { width: 100%; box-sizing: border-box; padding: var(--s-2); border: 1px solid var(--line); border-radius: var(--r-m); font: inherit; }
  .trec-sheet-by { font-size: var(--t-sub); color: var(--muted); }
  .trec-sheet-by b { color: var(--ink); }
  .trec-after { margin-top: var(--s-3); padding: var(--s-3); background: var(--wash); border-radius: var(--r-m); font-size: var(--t-sub); line-height: 1.55; color: var(--mute-fg); }
  .trec-after b { color: var(--ink); }
  .trec-sheet .err { margin-top: var(--s-3); }
  .trec-sheet .actions { margin-top: var(--s-4); }
  .trec-cks { margin-top: var(--s-3); }
  .trec-ck { display: flex; align-items: flex-start; gap: var(--s-3); min-height: var(--control-height-touch); padding: var(--s-2) 0; border-top: 1px solid var(--hair); cursor: pointer; }
  .trec-ck input { width: 20px; height: 20px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--navy); }
  .trec-ck b { display: block; color: var(--text-heading); }
  .trec-ck small { display: block; font-size: var(--t-sub); color: var(--muted); }
  /* ---- Roster (employee list + 6-bubble stage) ---- */
  .ros-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-bottom: 1px solid var(--hair); }
  .ros-row:last-child { border-bottom: none; }
  .ros-row:hover { background: var(--wash); }
  .ros-id { flex: 1 1 auto; min-width: 0; }
  .ros-name { font-weight: 600; color: var(--navy); }
  .ros-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
  .ros-stages { display: flex; gap: 5px; align-items: flex-start; flex: 0 0 auto; }
  .ros-bub { display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; width: 58px; background: none; border: none; padding: 0; }
  .ros-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #d8dbe1; background: #fff; display: flex; align-items: center; justify-content: center; transition: .12s; }
  .ros-bub:hover .ros-dot { border-color: var(--navy); }
  .ros-dot.done { background: var(--gold); border-color: var(--gold); }
  .ros-dot.current { background: var(--navy); border-color: var(--navy); }
  .ros-dot svg { width: 11px; height: 11px; opacity: 0; }
  .ros-dot.current svg, .ros-dot.done svg { opacity: 1; }
  .ros-blabel { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; } /* fetch-145: 8px was below any legibility floor */
  .ros-bub.on .ros-blabel { color: var(--navy); font-weight: 700; }
  .ros-actions { flex: 0 0 auto; }
  @media (max-width: 720px) {
    .ros-blabel { display: none; }
    .ros-bub { width: 28px; }
    .ros-sub { display: none; }
  }
  .inv-count-input { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: #fcfcfb; border: 1px solid var(--line); border-radius: 8px; }
  .inv-carry-label { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; min-width: 96px; cursor: pointer; }
  .inv-diff-neg { color: #dc2626; font-weight: 600; }
  .inv-diff-pos { color: #16a34a; font-weight: 600; }
  .row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
  .muted { color: #707373; font-size: 13px; margin-top: 2px; }
  .badge { font-size: 11px; padding: 3px 9px; border-radius: 20px; font-weight: 600; white-space: nowrap; }
  .b-green { background: #dcfce7; color: #166534; }
  .b-red { background: #fee2e2; color: #991b1b; }
  .b-amber { background: #fef3c7; color: #92400e; }
  .b-blue { background: #dbeafe; color: #1e40af; }
  .b-gray { background: #eef1f5; color: #475569; }
  .b-purple { background: #f1eafe; color: #6b21a8; }
  .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
  .field label { display: block; font-size: 12px; color: #707373; margin-bottom: 3px; }
  /* fetch-863: radios join the checkbox exemption. fetch-644 exempted checkboxes only — no radio
     ever sat inside a .field until the fetch-860 Teams editor, where this width:100% stretched
     the radio itself to 525px (measured) and shoved its label text to the far edge of the card. */
  .field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea { width: 100%; padding: 7px 8px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; font-family: inherit; }
  .field input[type="checkbox"], .field input[type="radio"] { width: 16px; height: 16px; margin: 0; padding: 0; }
  .empty { padding: 40px; text-align: center; color: #9ca3af; font-size: 14px; }
  .err { background: #fee2e2; color: #991b1b; padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; font-size: 13px; }
  .ok { background: #dcfce7; color: #166534; padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; font-size: 13px; }
  /* fetch-354: the top-level ok/err banners FLOAT — they were plain top-of-page divs,
     invisible whenever the user was scrolled down ("nothing happens"). */
  .flash-wrap { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 500; width: min(92vw, 560px); pointer-events: none; }
  .flash-wrap .ok, .flash-wrap .err { box-shadow: 0 10px 28px rgba(0,0,0,.18); pointer-events: auto; }
  .actions { margin-top: 12px; display: flex; gap: 8px; }
  .pfx-chip { font-size: 10px; letter-spacing: .05em; background: #eef0f3; color: #5b6472; border-radius: 4px; padding: 1px 6px; font-weight: 700; vertical-align: 1px; } /* fetch-158 */
  /* fetch-154: Reserve staleness banner */
  .rsync-banner { display: block; padding: 11px 16px; border-radius: 10px; margin-bottom: 14px; font-size: 13.5px; line-height: 1.45; border: 1px solid; }
  .rsync-banner strong { font-weight: 700; }
  .rsync-amber { background: #fef6e7; border-color: #f0d9a8; color: #8a5a00; }
  .rsync-red { background: #fdeeee; border-color: #f2c4c4; color: #9f1d1d; }
  .footer { margin-top: 30px; text-align: center; color: #c3c7cc; font-size: 11px; }
  /* ---- BEO (fetch-79) ---- */
  .beo-doc { background: #fff; color: #1a1a1a; }
  .beo-doc table { width: 100%; border-collapse: collapse; }
  .beo-doc td, .beo-doc th { border: 1px solid #cfd2d6; padding: 5px 8px; font-size: 12.5px; vertical-align: top; text-align: left; }
  .beo-doc td.n, .beo-doc th.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .beo-doc .beo-cat-band { background: #8a8f98; color: #fff; font-weight: 700; text-align: center; letter-spacing: 1px; text-transform: uppercase; font-size: 11.5px; }
  .beo-doc .beo-fn-band { background: #eceae2; font-weight: 700; text-align: center; font-size: 12.5px; }
  .beo-doc .beo-plain, .beo-doc .beo-plain td { border: none; }
  .beo-sec { page-break-inside: avoid; margin-bottom: 10px; }
  @media print {
    /* fetch-1242: `.no-print` (hyphen) joins `.noprint`. Two class names one letter apart,
       and only the hyphenless one was ever hidden here — its only other definition in all
       thirteen stylesheets is `.linen-page .no-print`, scoped to a page the posters are not
       on. So every QR poster has been printing its own Back/Print toolbar: worst on the
       asset sticker sheet, where a toolbar at the top of an Avery 5163 page pushes all ten
       labels off their die-cuts. Adding the selector cannot regress anything — the Linen
       rule already resolves to this same display:none, and .loan-qr-controls (which carried
       its own rule to work around exactly this) becomes redundant rather than wrong. */
    .brandbar, .wsbar, .toolbar, .footer, .flash-wrap, .noprint, .no-print, #brandActions, .headwrap .sub, .cse-rail { display: none !important; }
    body.has-rail { padding-left: 0 !important; } /* fetch-879: the rail's desktop inset must never indent a printed BEO */
    .beo2 { border: none !important; border-radius: 0 !important; padding: 0 !important; max-width: none !important; } /* fetch-135 */
    .wrap { max-width: none !important; padding: 0 !important; }
    html, body, #app { background: #fff !important; } /* fetch-156.1: no warm app wash bleeding into printed docs */
    .beo2, .beo2 * { -webkit-print-color-adjust: exact; print-color-adjust: exact; } /* brand golds/creams print true */
    .card { border: none !important; margin: 0 !important; padding: 0 !important; }
  }

  /* ================================================================
     fetch-85: motion & polish pass (additive only).
     No ids / data-* renamed; no data, auth, or permission code touched.
     ================================================================ */
  /* -- structural polish (motion-independent) -- */
  .tabbar, .wsbar { position: relative; }
  .brief-hero { position: relative; overflow: hidden; }
  .brief-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 100% at 88% -12%, rgba(176,141,87,.30), transparent 55%), radial-gradient(80% 110% at 6% 112%, rgba(255,255,255,.08), transparent 60%); }
  .brief-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5; background-image: repeating-linear-gradient(115deg, rgba(255,255,255,.03) 0 2px, transparent 2px 7px); }
  .brief-hero > * { position: relative; z-index: 1; }
  /* -- friendlier empty states (typographic, on-brand) -- */
  .empty:not(.inv-cnt-val) { font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif; font-style: italic; font-size: 14.5px; color: #a89f8d; }
  .empty:not(.inv-cnt-val)::before { content: "\2726"; display: block; font-style: normal; font-size: 15px; color: var(--gold); letter-spacing: 4px; margin-bottom: 9px; opacity: .85; }
  .brief-empty { font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif; font-style: italic; }
  /* -- initial-load skeleton (extends the fetch-82 busy system) -- */
  .skel-wrap { padding-top: 4px; }
  .skel { position: relative; overflow: hidden; background: #eae2d2; border-radius: 10px; }
  .skel-hero { height: 96px; border-radius: 14px; margin-bottom: 12px; }
  .skel-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; }
  .skel-tile { height: 72px; border-radius: 12px; }
  .skel-card { height: 110px; border-radius: 12px; margin-bottom: 10px; }
  .skel-note { text-align: center; color: #a89f8d; font-size: 12.5px; font-style: italic; font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif; padding-top: 10px; }
  /* -- global busy: thin gold sweep along the top (extends body.app-busy) -- */
  body.app-busy::after { content: ""; position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 400; pointer-events: none; background: linear-gradient(90deg, transparent, var(--gold) 35%, var(--gold) 65%, transparent); background-size: 45% 100%; background-repeat: no-repeat; background-position: 0 0; }
  /* -- Definite celebration layer -- */
  .celebrate-layer { position: fixed; inset: 0; z-index: 500; pointer-events: none; overflow: hidden; }
  .celebrate-piece { position: absolute; top: -14px; left: var(--cx, 50%); width: 7px; height: 13px; border-radius: 2px; background: var(--cc, var(--gold)); opacity: 0; }
  .celebrate-toast { position: absolute; left: 50%; top: 34%; transform: translate(-50%,-50%); background: var(--navy); color: #fff; border: 1px solid var(--gold); border-radius: 40px; padding: 12px 26px; font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif; font-size: 17px; letter-spacing: .4px; white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 14px 40px rgba(20,33,61,.35); }
  .celebrate-toast .gold { color: var(--gold); }
  @media (max-width: 480px) { .celebrate-toast { font-size: 14.5px; padding: 10px 18px; } }
  /* -- mobile tab ergonomics: one-row scroll, >=44px touch targets -- */
  @media (max-width: 720px) {
    .tabbar { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .tabbar::-webkit-scrollbar { display: none; }
    .tabbtn { flex: 0 0 auto; white-space: nowrap; padding: 13px 15px; min-height: 44px; }
    /* the chip's 44px touch target sets the bar's height, so the padding is all that's
       left to give — 8px top/bottom keeps the strip honest without cramping it */
    .brandbar { gap: var(--s-2); padding: var(--s-1) var(--s-3); }
    /* fetch-492: the wordmark leaving the bar gave back ~100px, so the ⌘K search button
       returns to the header on phones. It stays in the sheet too — two doors, one palette. */
  }
  @media (max-width: 400px) {
    /* measured: at 360px the row ran 11px past the bar. The mark yields — it is the one
       element whose job survives being smaller. */
    .brandbar { padding-left: var(--s-2); padding-right: var(--s-2); gap: var(--s-1); }
    .wsbar { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .wsbar::-webkit-scrollbar { display: none; }
    .wsbtn { flex: 0 0 auto; white-space: nowrap; min-height: 44px; padding: 11px 16px; }
  }
  /* fetch-1059: keep the existing manager phone bar in the document flow.
     clip contains horizontal overflow without making body a sticky scroll container.
     Page anchors sit below the measured bar; dialogs (200+) remain above it. */
  @media (max-width: 640px) {
    html:has(body.has-rail), body.has-rail { overflow-x: clip; }
    body.has-rail .brandbar {
      position: sticky; top: 0; z-index: 60;
      padding-top: calc(var(--s-1) + env(safe-area-inset-top, 0px));
      padding-left: max(var(--s-2), env(safe-area-inset-left, 0px));
      padding-right: max(var(--s-2), env(safe-area-inset-right, 0px));
    }
    body.has-rail .acct-menu { max-height: calc(100dvh - var(--phone-nav-height, 55px) - 100px - env(safe-area-inset-bottom, 0px)); }
    body.has-rail .evt-anchors { top: var(--phone-nav-height, 55px); }
    body.has-rail .inv-cat-head { top: calc(var(--phone-nav-height, 55px) + var(--s-2)); } /* fetch-1256: the event rail that shared this rule is gone */
    body.has-rail .evt-section { scroll-margin-top: calc(7rem + var(--phone-nav-height, 55px) + var(--s-2)); }
    body.has-rail .asset-detail-section-head { scroll-margin-top: calc(var(--phone-nav-height, 55px) + var(--s-5)); }
  }
  /* -- all motion lives behind prefers-reduced-motion -- */
  @media (prefers-reduced-motion: no-preference) {
    @keyframes viewIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
    @keyframes cardIn { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
    #content.view-anim { animation: viewIn .25s cubic-bezier(.22,.9,.35,1) both; }
    #content.view-anim :is(.card, .stat-tile, .brief-card, .wiki-card, .pipe-col, .attn-block, .user-card, .brief-evt) { animation: cardIn .32s cubic-bezier(.22,.9,.35,1) both; }
    #content.view-anim :is(.card, .stat-tile, .brief-card, .wiki-card, .pipe-col, .attn-block, .user-card, .brief-evt):nth-child(2) { animation-delay: .04s; }
    #content.view-anim :is(.card, .stat-tile, .brief-card, .wiki-card, .pipe-col, .attn-block, .user-card, .brief-evt):nth-child(3) { animation-delay: .08s; }
    #content.view-anim :is(.card, .stat-tile, .brief-card, .wiki-card, .pipe-col, .attn-block, .user-card, .brief-evt):nth-child(4) { animation-delay: .12s; }
    #content.view-anim :is(.card, .stat-tile, .brief-card, .wiki-card, .pipe-col, .attn-block, .user-card, .brief-evt):nth-child(5) { animation-delay: .16s; }
    #content.view-anim :is(.card, .stat-tile, .brief-card, .wiki-card, .pipe-col, .attn-block, .user-card, .brief-evt):nth-child(6) { animation-delay: .2s; }
    #content.view-anim :is(.card, .stat-tile, .brief-card, .wiki-card, .pipe-col, .attn-block, .user-card, .brief-evt):nth-child(7) { animation-delay: .24s; }
    #content.view-anim :is(.card, .stat-tile, .brief-card, .wiki-card, .pipe-col, .attn-block, .user-card, .brief-evt):nth-child(n+8) { animation-delay: .28s; }
    .btn { transition: background .15s ease, border-color .15s ease, box-shadow .18s ease, transform .1s ease; }
    .btn:active { transform: scale(.965); }
    .btn-primary:hover, .btn-gold:hover { box-shadow: 0 3px 12px rgba(56,74,97,.20); }
    .tabbtn { transition: color .15s ease, border-bottom-color .15s ease; }
    .wsbtn:active, .tabbtn:active { transform: scale(.94); }
    .cal-chip { transition: transform .12s ease, box-shadow .12s ease; }
    .cal-chip:hover { transform: translateY(-1px); box-shadow: 0 2px 6px rgba(20,33,61,.22); }
    .cappill { transition: background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease; }
    .cappill:active { transform: scale(.92); }
    .ros-bub:active .ros-dot { transform: scale(.85); }
    .pipe-row { transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background .14s ease; }
    .pipe-row:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(20,33,61,.10); }
    .card[data-gsopen] { transition: transform .14s ease, box-shadow .14s ease; }
    .card[data-gsopen]:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(20,33,61,.10); }
    .brief-evt { transition: transform .14s ease, background .14s ease; }
    .brief-evt:hover { transform: translateX(2px); }
    .brief-item { transition: background .14s ease; }
    .wiki-card { transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
    @keyframes qvIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
    @keyframes cseFadeIn { from { opacity: 0; } to { opacity: 1; } }
    .qv-backdrop { animation: cseFadeIn .16s ease both; }
    .qv-card { animation: qvIn .22s cubic-bezier(.22,.9,.35,1) both; }
    .ok, .err { animation: viewIn .25s ease both; }
    .brief-hero { background-size: 165% 165%; animation: heroDrift 24s ease-in-out infinite alternate; }
    @keyframes heroDrift { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
    .skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); animation: skShimmer 1.5s ease infinite; }
    @keyframes skShimmer { to { transform: translateX(100%); } }
    body.app-busy::after { animation: busySweep 1.15s ease-in-out infinite; }
    @keyframes busySweep { from { background-position: -50% 0; } to { background-position: 150% 0; } }
    .celebrate-piece { animation: confettiFall var(--cd, 1.8s) var(--cdel, 0s) cubic-bezier(.25,.4,.6,1) forwards; }
    @keyframes confettiFall { 0% { opacity: 0; transform: translate3d(0,-16px,0) rotate(0deg); } 10% { opacity: 1; } 100% { opacity: 0; transform: translate3d(var(--cxs, 0px), 76vh, 0) rotate(var(--cr, 540deg)); } }
    .celebrate-toast { animation: toastIn 2.4s ease both; }
    @keyframes toastIn { 0% { opacity: 0; transform: translate(-50%,-46%) scale(.9); } 12%, 82% { opacity: 1; transform: translate(-50%,-50%) scale(1); } 100% { opacity: 0; transform: translate(-50%,-56%) scale(.98); } }
    /* fetch-88: schedule + ops timelines motion */
    @keyframes editPop { from { opacity: 0; transform: translateY(3px) scale(.98); } to { opacity: 1; transform: none; } }
    .schd .schd-editing { animation: editPop .16s cubic-bezier(.22,.9,.35,1) both; }
    @keyframes schdSavedPulse { 0% { box-shadow: inset 0 0 0 2px var(--gold, #c09267); background-color: #f8ecd8; } 100% { box-shadow: inset 0 0 0 2px rgba(192,146,103,0); } }
    .schd .schd-cell.schd-saved { animation: schdSavedPulse .9s ease both; border-radius: 4px; }
    .schd .schd-click { transition: background .12s ease, box-shadow .12s ease, transform .08s ease; }
    .schd .schd-click:active { transform: scale(.985); background: #efe6d6; }
    /* fetch-1217: data-opstlopen has been on a ROW, not a card, since fetch-130 - the lift and
       the row hover had no element to match. The landing's own row hover lives with .tll-row. */
    .tll-row { transition: background .14s ease; }
    .tll-row:hover { background: var(--wash); }
    .card .opstl-row:nth-child(2) { animation-delay: .03s; }
    .card .opstl-row:nth-child(3) { animation-delay: .06s; }
    .card .opstl-row:nth-child(4) { animation-delay: .09s; }
    .card .opstl-row:nth-child(5) { animation-delay: .12s; }
    .card .opstl-row:nth-child(6) { animation-delay: .15s; }
    .card .opstl-row:nth-child(n+7) { animation-delay: .18s; }
    .calw .calw-row .calw-cell { transition: background-color .14s ease; }
  }
  /* -- keep print pristine: no animation, no overlays, no masks -- */
  @media print {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .celebrate-layer, .skel-wrap { display: none !important; }
    body.app-busy::after { display: none !important; }
    .tabbar, .wsbar { mask-image: none !important; -webkit-mask-image: none !important; }
    .brief-hero::before, .brief-hero::after { display: none !important; }
    .schd-wrap::before, .schd-wrap::after { display: none !important; }
  }
  /* ---- fetch-99: Reports module ---- */
  .rpt-wrap { display:grid; grid-template-columns: 262px 1fr; gap:16px; align-items:start; }
  @media (max-width: 820px){ .rpt-wrap { grid-template-columns:1fr; } }
  .rpt-cat { position:sticky; top:8px; }
  /* fetch-200: compact chip picker replaces the tall rail — table gets the full width */
  .rpt-pickbar { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:8px; }
  .rpt-pickbar2 { margin-bottom:14px; padding-bottom:12px; border-bottom:1px solid var(--line); }
  .rpt-rchip { padding:5px 12px; font-size:12.5px; border:1px solid #e7e3db; background:#fff; border-radius:999px; cursor:pointer; }
  .rpt-rchip:hover { border-color:var(--gold); background:#fffdf8; }
  .rpt-rchip.active { background:#f2e7cf; border-color:var(--gold); font-weight:600; }
  .rpt-group-h { font-size:11px; letter-spacing:.6px; text-transform:uppercase; color:#8a94a3; margin:14px 4px 6px; font-weight:700; }
  .rpt-scope { font-size:12px; color:#6b7480; background:#f4f1ea; border:1px solid #e7e3db; border-radius:8px; padding:7px 11px; margin-bottom:12px; }
  .rpt-filters { display:flex; gap:10px; flex-wrap:wrap; align-items:flex-end; margin:12px 0; }
  .rpt-filters .field { margin:0; }
  .rpt-presets { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:12px; }
  .rpt-actions { margin-left: auto; display: flex; gap: 8px; } /* fetch-510: hoisted from inline so the phone rule can reach it */
  .rpt-chip { padding:4px 10px; font-size:12px; border:1px solid #e7e3db; background:#fff; border-radius:999px; cursor:pointer; }
  .rpt-chip:hover { border-color:var(--gold); }
  .rpt-tbl-wrap { overflow:auto; border:1px solid #e7e3db; border-radius:10px; background:#fff; max-height:70vh; }
  table.rpt-tbl { border-collapse:collapse; width:100%; font-size:13px; }
  table.rpt-tbl th { position:sticky; top:0; background:#f4f1ea; text-align:left; padding:8px 11px; font-size:11px; letter-spacing:.4px; text-transform:uppercase; color:#6b7480; border-bottom:1px solid #e7e3db; white-space:nowrap; z-index:1; }
  table.rpt-tbl td { padding:7px 11px; border-bottom:1px solid #f3f2ef; }
  table.rpt-tbl td.rpt-num, table.rpt-tbl th.rpt-num { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
  table.rpt-tbl tr:hover td { background:#fffdf8; }
  table.rpt-tbl tfoot td { position:sticky; bottom:0; background:#efeae0; font-weight:700; border-top:2px solid #d9d3c7; }
  .rpt-empty { padding:26px; text-align:center; color:#8a94a3; }
  .rpt-count { font-size:12.5px; color:#6b7480; margin:2px 0 10px; }
  @media print { .rpt-cat, .rpt-pickbar, .rpt-filters, .rpt-presets, .rpt-actions { display:none !important; } .rpt-wrap { display:block !important; } .rpt-tbl-wrap { max-height:none; border:none; overflow:visible; } }
  /* ---- fetch-100: pipeline compaction ---- */
  .pipe-grid.pipe-fit { align-items: start; }
  .pipe-grid .pipe-scroll { max-height: 54vh; overflow-y: auto; overscroll-behavior: contain; margin: 0 -4px; padding: 0 4px; }
  .pipe-grid .pipe-scroll::-webkit-scrollbar { width: 7px; }
  .pipe-grid .pipe-scroll::-webkit-scrollbar-thumb { background: #ddd6c9; border-radius: 4px; }
  .pipe-grid .pipe-col.pipe-slim { padding: 9px 13px; opacity: .62; }
  .pipe-grid .pipe-col.pipe-slim .pipe-hint { margin-bottom: 0; }
  /* fetch-192: while a card is being dragged, every column (even empty/slim ones like Lead) lights up as an obvious drop target */
  .pipe-grid.pipe-dragmode .pipe-col { outline: 2px dashed var(--pipe-accent); outline-offset: 3px; }
  .pipe-grid.pipe-dragmode .pipe-col.pipe-slim { opacity: 1; min-height: 120px; }
  .pipe-grid.pipe-dragmode .pipe-col.pipe-slim::after { content: "⬇ drop here to move"; display: block; margin-top: 14px; font-size: 11.5px; color: #707373; text-align: center; }
  .pipe-grid .pipe-col.drop-hot { outline: 3px solid var(--pipe-accent); outline-offset: 3px; background: #fbfaf6; }
  /* ---- fetch-100: sales action strip ---- */
  .sas-wrap { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 12px; padding: 10px 13px; margin-bottom: 12px; }
  /* fetch-125: GM venue dot-switcher */
  .gmv-switch { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
  .gmv-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: #707373; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 5px 12px; cursor: pointer; transition: all .12s; }
  .gmv-dot:hover { border-color: var(--navy); color: var(--navy); }
  .gmv-dot.on { background: var(--navy); color: #fff; border-color: var(--navy); }
  .gmv-swatch { width: 11px; height: 11px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1.5px rgba(255,255,255,.6) inset; }
  .sas-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
  .sas-lbl { font-size: 11px; letter-spacing: .6px; text-transform: uppercase; color: #8a94a3; font-weight: 700; margin-right: 2px; }
  .sas-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; background: #faf8f4; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--navy); transition: .12s; }
  .sas-chip:hover { border-color: var(--gold); background: #fffdf8; }
  .sas-chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
  .sas-chip .n { background: #b3261e; color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; }
  .sas-chip.ok-zero { opacity: .55; cursor: default; }
  .sas-chip.ok-zero .n { background: #16a34a; }
  .sas-list { margin-top: 9px; border-top: 1px solid #f1ede4; padding-top: 4px; }
  .sas-item { display: flex; gap: 10px; align-items: center; padding: 6px 2px; border-bottom: 1px solid #f6f3ec; cursor: pointer; }
  .sas-item:hover { background: #fffdf8; }
  .sas-item .t { font-weight: 600; font-size: 13px; }
  .sas-item .s { font-size: 11.5px; color: #8a94a3; }
  /* ---- fetch-101: design-review P0 pass ---- */
  /* P0-3 — buttons never wrap; rows wrap instead */
  .btn { white-space: nowrap; }
  .row, .toolbar { min-width: 0; }
  table.rpt-tbl td:first-child { white-space: nowrap; }
  /* P0-5 — AA-passing gold CTAs (white on #8c6145 ≈ 4.8:1); light gold becomes the hover */
  .btn.btn-gold { background: var(--gold-dark); border-color: var(--gold-dark); }
  .btn.btn-gold:hover { background: var(--gold); border-color: var(--gold); }
  /* P0-2 — event detail sticky anchor bar */
  .evt-anchors { position: sticky; top: 0; z-index: 30; display: flex; gap: 4px; align-items: center; overflow-x: auto; scrollbar-width: none; background: rgba(240,232,224,.92); padding: 8px 4px; margin: 0 -4px 10px; border-bottom: 1px solid #e7dfcf; backdrop-filter: blur(6px); }
  .evt-anchors::-webkit-scrollbar { display: none; }
  .evt-anchors a { white-space: nowrap; font-size: 12.5px; font-weight: 600; color: var(--navy); text-decoration: none; padding: 7px 13px; border-radius: 20px; }
  .evt-anchors a:hover { background: #fff; box-shadow: 0 1px 4px rgba(56,74,97,.14); }
  .evt-anchors .bal { margin-left: auto; font-weight: 700; color: var(--gold-dark); padding: 7px 4px; white-space: nowrap; font-size: 12.5px; }
  .evt-mark { scroll-margin-top: 54px; }
  /* fetch-702: Event Notes is record memory, not another workspace or nested scrolling area. */
  @media (max-width: 640px) {
  }
  /* fetch-891: the docked one-line composer at the top of a record's Communication log. Tokens only. */
  .cl-dock { background: var(--wash); border: 1px solid var(--line); border-radius: var(--r-s); padding: var(--s-2); margin-bottom: var(--s-3); }
  .cl-dock .cl-dock-in { width: 100%; min-height: var(--control-height-touch); font-size: var(--t-body); } /* two classes: outranks input.sel's 36px; the fetch-614 phone rule at (0,3,1) still wins its 16px, so no iOS zoom regression */
  .cl-dock-row { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; margin-top: var(--s-2); }
  .btn.cl-dock-send { margin-left: auto; min-height: var(--control-height-touch); } /* two-class selector on purpose: portal.css sets .btn min-height (36px, and 42px under 720px) later in the file at equal specificity, which would win over a bare .cl-dock-send; the .tc-chip rows inherit that 720px lift, and that is fine */
  .btn.cl-dock-send:disabled { opacity: .45; cursor: default; } /* .btn-primary's explicit background beats the UA's disabled greying, so an empty dock showed a full-navy button that ignored taps — the #content .skl-btn:disabled shape, scoped to the dock */
  .cl-dock-row .btn.tc-chip { border-radius: 999px; font-size: var(--t-sub); padding: var(--s-1) var(--s-3); } /* (0,3,0): .tc-chip's pill shape, type and padding all lose to the later .btn rule at equal specificity (the fetch-846 order bug, which rescued only --on's background) — without this the selectors were the same shape and weight as Save touch. min-height is left to .btn so the 720px 42px tap height holds */
  .cl-dock .cl-dock-date { min-height: var(--control-height-touch); } /* the same two-class lift .cl-dock-in gets — on a phone input.sel's 36px would win over a bare class */
  .cl-sum { flex: 1 1 14rem; min-width: 0; } /* a Communication-log row's summary: a real flex-basis, so the phone's .row { flex-wrap: wrap } drops "Mark follow-up done" beneath the text instead of crushing it into a 90px column; on desktop grow:1 fills exactly as the old inline flex:1 did. Replaces that inline style (one fewer style=) */
  .cl-row { align-items: flex-start; padding: var(--s-2) 0; border-bottom: 1px solid var(--hair); }
  .cl-row-meta { font-size: var(--t-sub); }
  .cl-row-detail { margin-top: var(--s-1); white-space: pre-wrap; }
  .cl-row-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: var(--s-1); }
  .btn.cl-row-act { display: inline-flex; align-items: center; justify-content: center; width: var(--control-height-sm); min-width: var(--control-height-sm); height: var(--control-height-sm); min-height: var(--control-height-sm); padding: 0; border-radius: var(--r-s); }
  .cl-row-act .ci { display: block; }
  /* fetch-1289 (Six-Control pass 5a): THE icon button, grown from .evt-task-action / .cl-row-act above.
     36px on a desktop, 44px on a phone (the phone rule sits beside theirs in the 640px block). Its
     aria-label is the tooltip's words (index.html iconBtnHTML + the one .ci-tip). --quiet drops the
     frame until hover, for rows where a line of bordered squares would shout. */
  .btn.icon-btn { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: var(--control-height-icon); min-width: var(--control-height-icon); height: var(--control-height-icon); min-height: var(--control-height-icon); padding: 0; border-radius: var(--r-s); }
  .icon-btn .ci { display: block; }
  .btn.icon-btn--quiet { background: transparent; border-color: transparent; }
  .btn.icon-btn--quiet:hover { background: var(--wash); border-color: var(--line); }
  .btn.icon-btn[aria-expanded="true"] { background: var(--wash); border-color: var(--navy); }
  /* the one real tooltip (fetch-1289). position:fixed, so no row's overflow can clip it; z 680 sits above
     every overlay a control can live in (500 modals, 600-650 sheets) and below the 700 full-screen
     blockers. No fade: it appears after its delay, so there is no motion to reduce. */
  .ci-tip { position: fixed; left: 0; top: 0; z-index: 680; max-width: min(260px, calc(100vw - 16px)); padding: var(--s-1) var(--s-2); border-radius: var(--r-s); background: var(--brand-blue-deep); color: var(--brand-pink); font-size: var(--t-sub); font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; box-shadow: 0 4px 14px rgba(20, 33, 61, .22); }
  .ci-tip[hidden] { display: none; }
  .ci-tip--lines { white-space: pre-line; max-width: min(300px, calc(100vw - 16px)); } /* fetch-1502: a tip with line breaks (a time-off name's details) keeps them */
  /* fetch-1291 (Six-Control pass 3a): THE menu (index.html cmenuHTML). The menus tier (300-320) of the fetch-431
     scale; a card holding an open list lifts above its neighbours the way details.hdd's card does. A phone pins
     the list across the screen just under (or over) its trigger - placed by cmenuSet, since a list inside a flex
     wrapper has no useful static position. */
  .cmenu { position: relative; display: inline-flex; }
  .cmenu-list { position: absolute; top: calc(100% + var(--s-1)); right: 0; z-index: 310; min-width: 236px; max-width: min(320px, calc(100vw - 16px)); padding: var(--s-1); background: var(--surface-card); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: 0 12px 30px rgba(20, 33, 61, .18); text-align: left; }
  .cmenu-list[hidden] { display: none; }
  .cmenu-list--left, .cmenu-list.cmenu-list--flip { left: 0; right: auto; }
  .cmenu-list--left.cmenu-list--flip { left: auto; right: 0; }
  .cmenu-list.cmenu-list--up { top: auto; bottom: calc(100% + var(--s-1)); }
  .cmenu-i { display: flex; align-items: center; gap: var(--s-2); width: 100%; min-height: var(--control-height-md); padding: var(--s-1) var(--s-2); border: 0; border-radius: var(--r-s); background: none; color: var(--ink); font: inherit; font-size: var(--t-body); line-height: 1.3; text-align: left; text-decoration: none; cursor: pointer; }
  .cmenu-i:hover, .cmenu-i:focus-visible { background: var(--wash); }
  .cmenu-i .ci { flex: 0 0 auto; color: var(--navy); }
  .cmenu-i span { min-width: 0; }
  .cmenu-i small { display: block; margin-top: 1px; font-size: var(--t-sub); color: var(--muted); }
  .cmenu-i--danger, .cmenu-i--danger .ci { color: var(--bad-fg); }
  .cmenu-sep { height: 1px; margin: var(--s-1) 2px; background: var(--hair); }
  .cmenu-head { padding: var(--s-1) var(--s-2) 2px; font-size: var(--t-label); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .card:has(.cmenu-list:not([hidden])) { position: relative; z-index: 300; }
  .cl-row-empty { padding: var(--s-2) 0; }
  .cl-dock-hint { font-size: var(--t-sub); color: var(--muted); margin-top: var(--s-1); }
  .cl-dock-row--line { flex-wrap: nowrap; } /* fetch-908: r2's dock - the line and Save on one row */
  .cl-dock-row--line .cl-dock-in { flex: 1 1 auto; width: auto; min-width: 0; }
  .cl-dock-row--touch, .cl-dock-hint { display: none; } /* fetch-908: the next-touch chips and the hint wait until the composer has focus or a line */
  .cl-dock--on .cl-dock-row--touch { display: flex; } /* fetch-910: the class is state (opened on focus, closed after a pause) - never :focus-within, which shifted the layout under a click */
  .cl-dock--on .cl-dock-hint { display: block; }
  /* /fetch-891 */
  /* P0-1 — Home: everything beyond the main queue folds into one "All signals" section */
  details.home-more { margin-bottom: 18px; }
  details.home-more > summary { list-style: none; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--navy); padding: 13px 16px; background: #fff; border: 1px solid #e7dfcf; border-radius: 12px; }
  details.home-more > summary::-webkit-details-marker { display: none; }
  details.home-more > summary .sig-hint { color: #8a94a3; font-weight: 500; font-size: 12px; }
  details.home-more[open] > summary { border-radius: 12px 12px 0 0; margin-bottom: 12px; }
  .rd-list { padding: var(--s-3) 0; border-bottom: 1px solid var(--hair); }
  .rd-list:last-child { border-bottom: 0; }
  .rd-list-head { display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; }
  .rd-list-name { flex: 1; min-width: 12rem; }
  .rd-items { margin-top: var(--s-2); padding-left: var(--s-3); }
  .rd-item { display: flex; gap: var(--s-2); align-items: center; padding: var(--s-2) 0; border-top: 1px solid var(--hair); }
  .rd-item-copy { flex: 1; min-width: 0; }
  .rd-manager-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(12rem,1fr)); gap: var(--s-3); margin-top: var(--s-3); }
  .rd-manager-grid .rd-wide { grid-column: 1 / -1; }
  .rd-manager-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: end; }
  .rd-subtitle { margin-top: var(--s-4); }
  .rd-coverage { display: flex; gap: var(--s-2); align-items: baseline; flex-wrap: wrap; margin-top: var(--s-3); padding: var(--s-3); background: var(--wash); border: 1px solid var(--hair); border-radius: var(--r-m); }
  .rd-master-menu { max-height: 32rem; overflow: auto; margin-top: var(--s-3); border: 1px solid var(--hair); border-radius: var(--r-m); }
  .rd-master-section { padding: var(--s-3); border-bottom: 1px solid var(--hair); }
  .rd-master-section:last-child { border-bottom: 0; }
  .rd-master-section-title { display: block; margin-bottom: var(--s-2); }
  /* fetch-664: ONE rule. A second .rd-master-row block below re-declared align-items and won
     the cascade, so the checkbox nudge below was aiming at an alignment that no longer applied. */
  .rd-master-row { display: flex; gap: var(--s-2); align-items: center; min-height: var(--control-height-touch); padding: var(--s-2) 0; border-top: 1px solid var(--hair); }
  .rd-master-row:first-of-type { border-top: 0; }
  .rd-master-row input { flex: 0 0 auto; }
  .rd-master-copy { flex: 1; min-width: 0; }
  .rd-master-cadence { display: block; color: var(--muted); font-size: var(--t-sub); }
  .rd-person { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:var(--s-3); }
  .rd-person-lbl { font-size:var(--t-label); font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--muted); }
  .rd-person-in { min-width:240px; }
  .rd-person-hint { font-size:var(--t-sub); } /* --t-label is chips and badges; this is a sentence */
  .rd-head { display:flex; align-items:baseline; gap:var(--s-2); flex-wrap:wrap; margin-bottom:var(--s-3); }
  .rd-h { font-size:var(--t-section); margin:0; }
  .rd-count { font-size:var(--t-sub); font-weight:700; color:var(--muted); }
  .rd-headnote { font-size:var(--t-sub); }
  .rd-empty { margin:var(--s-3) 0; }
  .rd-grp { display:flex; align-items:baseline; gap:var(--s-2); margin:var(--s-3) 0 var(--s-1); padding-top:var(--s-2); border-top:2px solid var(--line); }
  .rd-grp:first-child { border-top:0; padding-top:0; margin-top:0; }
  .rd-grp-lbl { font-size:var(--t-label); font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--text-heading); }
  .rd-grp-n { font-size:var(--t-label); color:var(--muted); margin-left:auto; }
  .rd-master-who { margin-left:auto; flex:none; align-self:center; }
  .rd-off-note { font-size:var(--t-sub); margin-top:var(--s-1); }
  /* fetch-855 — the routines/checklists styles, HOISTED from actionTableHTML's per-screen
     <style> block: since fetch-852 the fold renders on the Checklists tab, which that block
     never reaches (the fold arrived unstyled — caught by probe855's 44px measurement). Global
     now, serving both the Checklists tab and the pointer card on Action Items. Tokens only. */
  .rt-line{display:flex;gap:var(--s-3);align-items:center;flex-wrap:wrap;padding:var(--s-2) 0;border-bottom:1px solid var(--line)}
  .rt-line:last-child{border-bottom:none}
  .rt-copy{flex:1;min-width:200px}
  .rt-sub{font-size:var(--t-sub);color:var(--muted)}
  .rt-mini{margin:var(--s-2) 0 var(--s-3);padding:var(--s-3);border:1px solid var(--line);border-radius:var(--r-s);background:var(--wash);display:flex;gap:var(--s-3);flex-wrap:wrap;align-items:flex-end}
  .rt-mini .field{min-width:150px;flex:0 1 auto}
  .rt-step{font-size:var(--t-sub);color:var(--muted);margin:var(--s-3) 0 var(--s-2);font-weight:600}
  .rt-paused{opacity:.55}
  .rt-paused .rt-copy strong{text-decoration:line-through}
  .rt-fold{margin-top:10px}
  .rt-sum{cursor:pointer;font-size:var(--t-sub)}
  .rt-card{margin-top:6px;padding:var(--s-3) var(--s-4)}
  .rt-intro{margin-bottom:4px}
  .rt-none{padding:var(--s-3) 0}
  .ck-pointer-btn{min-height:var(--control-height-touch)}
  /* fetch-917.1 — one calm hierarchy for three intentionally separate checklist systems.
     State keys and binders remain unchanged; these wrappers only explain what each system does. */
  .ck-page-body{display:grid;gap:var(--s-4);max-width:var(--w-narrow);min-width:0}
  .ck-page-section{min-width:0}
  .ck-page-body>.ck-run-overview{margin-bottom:0}
  .ck-page-section+.ck-page-section{padding-top:var(--s-5);border-top:1px solid var(--line)}
  .ck-eyebrow{display:block;margin-bottom:var(--s-1);color:var(--brand-gold-dark);font-size:var(--t-label);font-weight:700;letter-spacing:.08em;text-transform:uppercase}
  .ck-section-intro{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:var(--s-4);align-items:center;padding:var(--s-4);border:1px solid var(--line);border-radius:var(--r-l);background:var(--wash)}
  .ck-section-intro h2{margin:0;color:var(--text-heading);font-size:var(--t-title);line-height:1.15}
  .ck-section-intro p{max-width:50rem;margin:var(--s-2) 0 0;color:var(--muted);font-size:var(--t-body);line-height:1.5}
  .ck-intro-facts{display:flex;gap:var(--s-2);flex-wrap:wrap;justify-content:flex-end;font-size:var(--t-sub);font-variant-numeric:tabular-nums}
  .ck-intro-facts span{display:grid;gap:var(--s-1);min-width:6rem;padding:var(--s-2) var(--s-3);border:1px solid var(--line);border-radius:var(--r-m);background:var(--paper);color:var(--muted);text-align:center}
  .ck-intro-facts strong{color:var(--text-heading);font-size:var(--t-section)}
  .ck-recurring-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(18rem,100%),1fr));gap:var(--s-3);margin-top:var(--s-3)}
  .ck-v3-routine-history>.ck-card{margin-top:var(--s-3)}
  .ck-legacy-rules{padding-bottom:var(--s-4)}
  .ck917-uncertain-refresh{align-items:center;justify-content:space-between;gap:var(--s-3);margin-top:var(--s-3)}
  .ck917-uncertain-refresh .btn{flex:none}
  /* the Library (Checklists v1 T2): cards now share the Playbook reading measure */
  .ck-cov{display:flex;gap:var(--s-3);align-items:center;flex-wrap:wrap;padding:var(--s-3) var(--s-4);margin:var(--s-3) 0;background:var(--surface-card);border:1px solid var(--line);border-radius:var(--r-m);font-size:var(--t-sub);font-variant-numeric:tabular-nums}
  .ck-gap{color:var(--bad-fg);font-weight:600}
  .ck-cover-btn{min-height:var(--control-height-touch);margin-left:auto}
  .ck-card{min-width:0;margin:0;padding:var(--s-3) var(--s-4)}
  .ck-head{display:flex;gap:var(--s-2);align-items:center;flex-wrap:wrap}
  .ck-list-heading{margin:0;color:var(--text-heading);font-size:var(--t-body);font-weight:700;overflow-wrap:anywhere}
  .ck-chips{display:flex;gap:var(--s-2);flex-wrap:wrap;margin-top:var(--s-1)}
  .ck-chip{font-size:var(--t-label);color:var(--muted);border:1px solid var(--line);border-radius:999px;padding:1px var(--s-2);white-space:nowrap}
  .ck-aud{display:flex;gap:var(--s-2);align-items:center;margin-top:var(--s-2);font-size:var(--t-sub)}
  .ck-init{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:var(--wash);border:1px solid var(--line);font-size:var(--t-label);font-weight:600;color:var(--muted)}
  .ck-items{margin-top:var(--s-2)}
  .ck-list-footer{display:flex;justify-content:flex-end;margin-top:var(--s-3);padding-top:var(--s-3);border-top:1px solid var(--hair)}
  .btn.ck-list-delete-trigger,.ck-list-delete-actions .btn{min-height:var(--control-height-touch)}
  .ck-list-delete-panel h4{margin:0 0 var(--s-2);color:var(--bad-fg);font-size:var(--t-body);overflow-wrap:anywhere}
  .ck-list-delete-panel,.ck-list-delete-panel .notice{min-width:0;overflow-wrap:anywhere}
  .ck-list-delete-panel .notice{margin-top:var(--s-3)}
  .ck-items > summary{cursor:pointer;font-size:var(--t-sub);color:var(--muted);min-height:var(--control-height-touch);display:flex;align-items:center}
  .ck-item{align-items:flex-start}
  .ck-more{position:relative}
  .ck-more > summary{min-height:var(--control-height-touch);min-width:var(--control-height-touch);display:inline-flex;align-items:center;justify-content:center}
  .ck-more .hddm .btn{justify-content:flex-start;text-align:left;border:none;width:100%}
  .ck-grow{flex:1;min-width:220px} /* fetch-858: compose wide fields */
  .ck-init--team{border-style:dashed} /* fetch-860: a team audience wears a dashed ring */
  /* fetch-863 — Checklists' own copies of the action form's af-* helpers. Compose and the Teams
     editor had borrowed af-wide/af-chips/af-fhint/af-blk/af-echo, which live in the ACTION
     screen's per-screen style block and resolve to NOTHING on the Checklists tab (the T1
     styles-don't-follow-markup trap, second occurrence — that emptiness was Jack's screenshot).
     ck-wide is a FLEX filler, not a grid span: these fields live inside flex .rt-mini rows. */
  .ck-wide{flex:1 1 100%;min-width:0}
  .ck-chips{display:flex;gap:var(--s-1) var(--s-2);flex-wrap:wrap;align-items:center}
  .ck-fhint{font-size:var(--t-sub);margin-top:2px}
  .ck-blk{display:block;margin-top:4px}
  .ck-echo{flex:1 1 100%;margin-top:var(--s-2);padding:var(--s-2) var(--s-3);border:1px solid var(--line);border-radius:var(--r-s);background:var(--wash);font-size:var(--t-body);color:var(--ink)}
  .ck-pickbar{margin-bottom:var(--s-1)} /* fetch-864: the quick-sort row hugs the menu it filters */
  .ck-pickbar .ck-pickcount{flex:1 1 auto;text-align:right;align-self:center;min-width:160px}
  .ckc-fam{font-size:var(--t-label);letter-spacing:.08em;text-transform:uppercase;color:var(--gold-dark)} /* fetch-861: family shelf headers — gold as jewelry, one accent */
  /* fetch-857 — History (the completion ledger's first reader) */
  .ck-pulse{margin-top:var(--s-1);font-size:var(--t-sub);color:var(--muted);font-variant-numeric:tabular-nums}
  .ckh-chips{display:flex;gap:var(--s-2);flex-wrap:wrap;margin-bottom:var(--s-2)}
  .ckh-step{display:flex;gap:var(--s-2);align-items:center;margin-bottom:var(--s-2)}
  .ckh-range{font-size:var(--t-sub);color:var(--muted);font-variant-numeric:tabular-nums}
  .ckh-day{margin-top:var(--s-3)}
  .ckh-dh{font-size:var(--t-label);font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--muted);padding-bottom:var(--s-1);border-bottom:1px solid var(--line)}
  .ckh-row{display:flex;gap:var(--s-2);align-items:flex-start;padding:var(--s-2) 0;border-bottom:1px solid var(--hair);font-size:var(--t-body)}
  .ckh-row:last-child{border-bottom:none}
  .ckh-mark{flex:0 0 auto;width:18px;text-align:center;font-weight:700}
  .ckh-copy{flex:1;min-width:0}
  .ckh-t{font-variant-numeric:tabular-nums}
  .ckh-note{display:block;font-size:var(--t-sub);color:var(--muted);white-space:pre-wrap}
  .ckh-done .ckh-mark{color:var(--ok-fg)}
  .ckh-late .ckh-mark{color:var(--warn-fg)}
  .ckh-late .ckh-copy{color:var(--ink)}
  .ckh-skip .ckh-mark,.ckh-skip .ckh-copy strong{color:var(--warn-fg)}
  .ckh-miss .ckh-mark,.ckh-miss .ckh-copy strong{color:var(--bad-fg)}
  .ckh-foot{margin-top:var(--s-3);padding-top:var(--s-2);border-top:1px solid var(--hair)}
  /* fetch-902 — V3 Playbook Library + contextual Import Review. The review intentionally
     exceeds .ck-card's reading measure; source and normalized proposal need equal room. */
  .ck-v3-shell{max-width:var(--w-narrow)}
  .ck-v3-template-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(16rem,1fr));gap:var(--s-3);margin-top:var(--s-3)}
  /* fetch-1132: Library and Today as rows - one list, one row per checklist, the venue as the portal chip */
  .ck-group-head{display:flex;align-items:baseline;justify-content:space-between;gap:var(--s-3);flex-wrap:wrap;padding-bottom:var(--s-2);border-bottom:1px solid var(--line)}
  .ck-group-head h2{margin:0;color:var(--text-heading);font-size:var(--t-section)}
  .ck-group-count{font-size:var(--t-sub);color:var(--muted);font-variant-numeric:tabular-nums}
  .ck-group-count strong{color:var(--text-heading)}
  .ck-cov.ck-group-count{display:inline-flex;gap:var(--s-2);align-items:center;flex-wrap:wrap;padding:0;margin:0;background:none;border:0;border-radius:0}
  .ck1036-links{margin-left:auto;display:flex;gap:var(--s-2);align-items:center;flex-wrap:wrap}
  .ck-v3-template-grid{grid-template-columns:1fr;gap:0;margin-top:var(--s-2);border:1px solid var(--line);border-radius:var(--r-m);background:var(--surface-card);overflow:hidden}
  .ck-v3-template-card--row{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(0,1fr) auto auto;gap:var(--s-3);align-items:center;padding:var(--s-2) var(--s-3);border:0;border-top:1px solid var(--hair);border-radius:0;box-shadow:none;min-height:var(--control-height-touch)}
  .ck-v3-template-grid .ck-v3-template-card--row:first-child{border-top:0}
  .ck-v3-template-card--row .ck-v3-title{font-size:var(--t-body)}
  .ck-v3-template-card--row .ck-v3-copy{margin:var(--s-1) 0 0;font-size:var(--t-sub);color:var(--muted)}
  .ck-row-main{min-width:0}
  .ck-row-venue{min-width:0}
  .ck-row-actions{display:flex;gap:var(--s-1);justify-content:flex-end;align-items:center;flex-wrap:wrap}
  .ck-row-dialog{grid-column:1/-1}
  /* fetch-1133: the one-form New checklist */
  .cse-modal.cku{max-width:40rem}
  .cku .field{margin-top:var(--s-3)}
  .cku-label{display:block;font-size:var(--t-sub);margin-bottom:var(--s-1)}
  .cku-venues{display:flex;gap:var(--s-2);flex-wrap:wrap}
  .cku-venue{cursor:pointer;min-height:var(--control-height-touch);padding:0 var(--s-3);font-family:inherit}
  .cku-venue.is-on{background:var(--vc);color:var(--surface-card);border-color:var(--vc)}
  .cku-venue.is-on .vdot{background:var(--surface-card)}
  .cku #ckuTasks{width:100%;min-height:8rem;font:inherit}
  .ck-run-list{grid-template-columns:1fr;gap:0;border:1px solid var(--line);border-radius:var(--r-m);overflow:hidden;background:var(--surface-card)}
  .ck-run-list .ck-run-card{border:0;border-top:1px solid var(--hair);border-radius:0;padding:var(--s-2) var(--s-3)}
  .ck-run-list .ck-run-card:first-child{border-top:0}
  .ck-run-list .ck-run-card[aria-current="true"]{box-shadow:inset 3px 0 0 var(--brand-gold-dark)}
  @media (max-width:640px){.ck-v3-template-card--row{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"main state" "venue venue" "actions actions"}.ck-v3-template-card--row .ck-row-main{grid-area:main}.ck-row-venue{grid-area:venue}.ck-row-state{grid-area:state}.ck-row-actions{grid-area:actions;justify-content:flex-start}.ck-row-actions .btn{min-height:var(--control-height-touch)}.ck1036-links{margin-left:0}}
  .ck-v3-template-card{min-width:0;margin:0;padding:var(--s-3) var(--s-4)}
  .ck-v3-head,.ck-v3-review-head,.ck-v3-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--s-2);flex-wrap:wrap}
  .ck-v3-title,.ck-v3-review-head h2,.ck-v3-section-head h2,.ck-v3-section-head h3{margin:0;color:var(--text-heading);font-size:var(--t-section);overflow-wrap:anywhere}
  .ck-v3-meta,.ck-v3-live{color:var(--muted);font-size:var(--t-sub);line-height:1.45;overflow-wrap:anywhere}
  .ck-v3-copy{font-size:var(--t-body);line-height:1.5;margin:var(--s-2) 0 0;white-space:pre-wrap;overflow-wrap:anywhere}
  .ck-v3-facts{display:flex;gap:var(--s-2);flex-wrap:wrap;margin-top:var(--s-2)}
  .ck-v3-section,.ck-v3-routine-history{margin-top:var(--s-5)}
  .ck-v3-stage,.ck-v3-review{max-width:var(--w-narrow);padding:var(--s-4)}
  .ck-v3-file{margin-top:var(--s-3)}
  .ck-v3-package{margin-top:var(--s-3);padding:var(--s-3);border:1px solid var(--line);border-radius:var(--r-m);background:var(--wash)}
  .ck-v3-package strong,.ck-v3-batch strong{overflow-wrap:anywhere}
  .ck-v3-batches{margin-top:var(--s-2);border:1px solid var(--line);border-radius:var(--r-m);overflow:hidden;background:var(--paper)}
  .ck-v3-batch{display:flex;align-items:center;justify-content:space-between;gap:var(--s-3);width:100%;min-height:var(--control-height-touch);padding:var(--s-2) var(--s-3);border:0;border-bottom:1px solid var(--hair);background:var(--paper);color:var(--ink);font:inherit;text-align:left;cursor:pointer}
  .ck-v3-batch:last-child{border-bottom:0}
  .ck-v3-batch:hover{background:var(--wash)}
  .ck-v3-batch:focus-visible,.ck-v3-candidate:focus-visible{outline-offset:-2px}
  .ck-v3-batch span:first-child{min-width:0}
  .ck-v3-batch small,.ck-v3-candidate small{display:block;color:var(--muted);font-size:var(--t-sub);font-weight:400;overflow-wrap:anywhere}
  .ck-v3-receipt{margin-top:var(--s-3)}
  .ck-v3-review-head{padding-bottom:var(--s-3);border-bottom:1px solid var(--hair)}
  .ck-v3-progress{display:flex;justify-content:space-between;gap:var(--s-2);flex-wrap:wrap;margin:var(--s-3) 0;font-size:var(--t-sub);font-variant-numeric:tabular-nums}
  .ck-v3-workbench{display:grid;grid-template-columns:minmax(0,.72fr) minmax(0,1.75fr);gap:var(--s-4);align-items:start;margin-top:var(--s-3)}
  .ck-v3-queue,.ck-v3-detail{min-width:0}
  .ck-v3-queue{position:sticky;top:var(--s-3);max-height:70vh;overflow:auto;border:1px solid var(--line);border-radius:var(--r-m);background:var(--paper)}
  .ck-v3-candidate{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:var(--s-2);align-items:center;width:100%;min-height:var(--control-height-touch);padding:var(--s-2) var(--s-3);border:0;border-bottom:1px solid var(--hair);background:var(--paper);color:var(--ink);font:inherit;text-align:left;cursor:pointer}
  .ck-v3-candidate:last-child{border-bottom:0}
  .ck-v3-candidate[aria-current="true"]{background:var(--wash);box-shadow:inset var(--s-1) 0 0 var(--brand-gold-mid);font-weight:600}
  .ck-v3-candidate-copy{min-width:0;overflow-wrap:anywhere}
  .ck-v3-row-badges{display:flex;justify-content:flex-end;gap:var(--s-1);flex-wrap:wrap;min-width:0}
  .ck-v3-back{display:none;margin-bottom:var(--s-2)}
  .ck-v3-detail-nav{display:none}
  .ck-v3-compare{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:var(--s-3);margin-top:var(--s-3)}
  .ck-v3-panel{min-width:0;padding:var(--s-3);border:1px solid var(--line);border-radius:var(--r-m);background:var(--paper)}
  .ck-v3-panel--source{background:var(--wash)}
  .ck-v3-panel-title,.ck-v3-decision h4{margin:0 0 var(--s-2);color:var(--text-heading);font-size:var(--t-body)}
  .ck-v3-source{white-space:pre-wrap;overflow-wrap:anywhere;font-size:var(--t-body);line-height:1.5}
  .ck-v3-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s-3)}
  .ck-v3-wide{grid-column:1/-1}
  .ck-v3-fieldset{min-inline-size:0;margin:0;border:0;padding:0}
  .ck-v3-fieldset legend{font-size:var(--t-sub);font-weight:600;color:var(--ink);padding:0}
  .ck-v3-checks{display:flex;gap:var(--s-3);flex-wrap:wrap;min-height:var(--control-height-md);align-items:center}
  .ck-v3-attest{display:block;margin-top:var(--s-2);font-weight:600}
  .ck-v3-live{min-height:1.45em;margin-top:var(--s-2)}
  .ck-v3-live--ok{color:var(--ok-fg)}
  .ck-v3-live--warn{color:var(--warn-fg);font-weight:600}
  .ck-v3-live--bad{color:var(--bad-fg);font-weight:600}
  .ck-v3-decision{margin-top:var(--s-3);padding:var(--s-3);border:1px solid var(--line);border-radius:var(--r-m);background:var(--wash)}
  .ck-v3-decisions,.ck-v3-footer{display:flex;gap:var(--s-2);align-items:center;flex-wrap:wrap;margin-top:var(--s-3)}
  .ck-v3-footer{padding-top:var(--s-3);border-top:1px solid var(--hair)}
  .ck-v3-blockers{flex:1;min-width:14rem;font-size:var(--t-sub)}
  .ck-v3-blockers ul{margin:var(--s-1) 0 0;padding-left:var(--s-4)}
  .ck-v3-commit{align-items:flex-end}
  .ck-v3-empty{padding:var(--s-3);color:var(--muted);font-size:var(--t-sub)}
  /* fetch-906 — activation is a contextual workbench, then Today/History become the calm
     oversight surfaces. Every layout is one column at phone width; no execution controls live
     here because staff completion belongs to the shared task surface in the next slice. */
  .ck-run-shell,.ck-run-overview{max-width:var(--w-narrow);min-width:0}
  .ck-run-overview{margin-bottom:var(--s-5)}
  .ck-run-step{margin-top:var(--s-4);padding:var(--s-4);border:1px solid var(--line);border-radius:var(--r-l);background:var(--paper)}
  .ck-run-step-head{display:flex;align-items:flex-start;gap:var(--s-3);margin-bottom:var(--s-3)}
  .ck-run-step-head h3,.ck-run-submit h3,.ck-run-receipt h3,.ck-run-detail h3{margin:0;color:var(--text-heading);font-size:var(--t-section)}
  .ck-run-step-head p,.ck-run-submit p,.ck-run-receipt p{margin:var(--s-1) 0 0;color:var(--muted);font-size:var(--t-sub);line-height:1.45}
  .ck-run-step-no{display:flex;align-items:center;justify-content:center;flex:0 0 var(--control-height-sm);height:var(--control-height-sm);border-radius:50%;background:var(--surface-nav);color:var(--paper);font-size:var(--t-sub);font-weight:700;font-variant-numeric:tabular-nums}
  .ck-run-mode-grid,.ck-run-scenarios{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--s-2)}
  .ck-run-scenarios{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:var(--s-2)}
  .ck-run-mode,.ck-run-scenario{display:flex;align-items:flex-start;gap:var(--s-2);min-width:0;min-height:var(--control-height-touch);padding:var(--s-3);border:1px solid var(--line);border-radius:var(--r-m);background:var(--paper);cursor:pointer}
  .ck-run-mode.is-on,.ck-run-scenario.is-on{border-color:var(--brand-gold-dark);background:var(--wash);box-shadow:inset 0 0 0 1px var(--brand-gold-light)}
  .ck-run-mode.is-disabled{cursor:not-allowed;opacity:.62}
  .ck-run-mode input,.ck-run-scenario input{margin-top:var(--s-1);flex:none}
  .ck-run-mode span,.ck-run-scenario span{min-width:0;overflow-wrap:anywhere}
  .ck-run-mode strong,.ck-run-scenario strong{display:block;color:var(--text-heading);font-size:var(--t-body)}
  .ck-run-mode small,.ck-run-scenario small{display:block;margin-top:var(--s-1);color:var(--muted);font-size:var(--t-sub);line-height:1.4}
  .ck-run-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s-3);margin-top:var(--s-3)}
  .ck-run-wide{grid-column:1/-1}
  .ck-run-fact{align-self:end;padding:var(--s-3);border:1px solid var(--hair);border-radius:var(--r-m);background:var(--wash)}
  .ck-run-fact span{display:block;color:var(--muted);font-size:var(--t-label);text-transform:uppercase;letter-spacing:.04em}
  .ck-run-confirm{display:flex;align-items:flex-start;gap:var(--s-2);margin-top:var(--s-3);padding:var(--s-3);border-radius:var(--r-m);background:var(--info-bg);color:var(--info-fg);font-size:var(--t-body);line-height:1.45}
  .ck-run-confirm input{margin-top:var(--s-1);flex:none}
  .ck-run-confirm>span{flex:1;min-width:0}
  .ck-run-subhead{margin:var(--s-4) 0 var(--s-2);color:var(--text-heading);font-size:var(--t-body)}
  .ck-run-anchor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s-3)}
  .ck-run-anchor{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:var(--s-2);padding:var(--s-3);border:1px solid var(--hair);border-radius:var(--r-m);background:var(--wash)}
  .ck-run-freeze{display:grid;gap:var(--s-1);margin-top:var(--s-3);padding:var(--s-3);border-left:3px solid var(--brand-gold-mid);border-radius:var(--r-m);background:var(--wash);overflow-wrap:anywhere}
  .ck-run-freeze strong{color:var(--text-heading);font-size:var(--t-body)}
  .ck-run-freeze span{font-size:var(--t-body);line-height:1.45}
  .ck-run-freeze small{color:var(--muted);font-size:var(--t-sub);line-height:1.45}
  .ck-run-preview{display:grid;gap:var(--s-3)}
  .ck-run-preview-section{min-width:0}
  .ck-run-preview-section h4{margin:0;padding-bottom:var(--s-2);border-bottom:1px solid var(--line);color:var(--text-heading);font-size:var(--t-body)}
  .ck-run-preview-section ol,.ck-run-detail-group ol{margin:0;padding:0;list-style:none}
  .ck-run-preview-section li,.ck-run-detail-group li{padding:var(--s-3) 0;border-bottom:1px solid var(--hair)}
  .ck-run-preview-section li:last-child,.ck-run-detail-group li:last-child{border-bottom:0}
  .ck-run-item-head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--s-2)}
  .ck-run-preview-section p,.ck-run-detail-group p{margin:var(--s-1) 0;color:var(--ink);font-size:var(--t-body);line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}
  .ck-run-response{display:grid;gap:var(--s-1);margin-top:var(--s-2);padding:var(--s-2);border-radius:var(--r-m);background:var(--wash);color:var(--ink);font-size:var(--t-sub);line-height:1.45;overflow-wrap:anywhere}
  .ck-run-response-exception{color:var(--bad-fg);font-weight:600}
  .ck-run-item-meta,.ck-run-detail-facts,.ck-run-receipt-facts{display:flex;gap:var(--s-2);flex-wrap:wrap;margin-top:var(--s-2);color:var(--muted);font-size:var(--t-sub)}
  .ck-run-item-meta span,.ck-run-detail-facts>span,.ck-run-receipt-facts span{padding:var(--s-1) var(--s-2);border-radius:var(--r-s);background:var(--wash)}
  .ck-run-submit,.ck-run-receipt,.ck-run-detail{max-width:var(--w-narrow);margin-top:var(--s-4);padding:var(--s-4)}
  .ck-run-filters{display:flex;gap:var(--s-2);flex-wrap:wrap;margin-top:var(--s-3)}
  .ck-run-filters .is-on{border-color:var(--brand-gold-dark);background:var(--wash);color:var(--text-heading);font-weight:700}
  .ck-run-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s-2);margin-top:var(--s-3)}
  .ck-run-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:var(--s-2);width:100%;min-width:0;padding:var(--s-3);border:1px solid var(--line);border-radius:var(--r-m);background:var(--paper);color:var(--ink);font:inherit;text-align:left;cursor:pointer}
  .ck-run-card:hover,.ck-run-card[aria-current="true"]{border-color:var(--brand-gold-dark);background:var(--wash)}
  .ck-run-card-main,.ck-run-card-side{display:flex;flex-direction:column;gap:var(--s-1);min-width:0}
  .ck-run-card-side{align-items:flex-end}
  .ck-run-card-title{color:var(--text-heading);font-weight:700;overflow-wrap:anywhere}
  .ck-run-card-meta{color:var(--muted);font-size:var(--t-sub);line-height:1.4;overflow-wrap:anywhere}
  /* fetch-1311 (Six-Control 4b.2): the card's progress is progressHTML across both columns (the card's gap spaces it) */
  .ck-run-card > .pg{grid-column:1/-1;margin-top:0}
  .ck-run-detail-section{margin-top:var(--s-4);padding-top:var(--s-3);border-top:1px solid var(--hair)}
  .ck-run-detail-section h4,.ck-run-detail-group h5{margin:0 0 var(--s-2);color:var(--text-heading);font-size:var(--t-body)}
  /* fetch-1131: the housekeeping evaluation strip on Checklists > Today - one row per venue, venue chips, one verb */
  .hki-strip{margin-bottom:var(--s-4)}
  .hki-strip .ck-v3-section-head{margin-bottom:var(--s-2)}
  .hki-actions{display:flex;gap:var(--s-2);align-items:center;flex-wrap:wrap}
  .hki-rows{display:flex;flex-direction:column}
  .hki-row{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1.6fr) auto auto;gap:var(--s-3);align-items:center;min-height:var(--control-height-touch);padding:var(--s-2) 0;border-top:1px solid var(--hair)}
  .hki-row:first-child{border-top:0}
  .hki-venue{min-width:0}
  .hki-meta{color:var(--muted);font-size:var(--t-sub);overflow-wrap:anywhere}
  .hki-notice{margin:0 0 var(--s-2);color:var(--muted);font-size:var(--t-sub)}
  @media (max-width:640px){.hki-row{grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"venue badge btn" "meta meta btn";row-gap:var(--s-1)}.hki-row .hki-venue{grid-area:venue}.hki-row .badge{grid-area:badge;justify-self:start}.hki-row .hki-meta{grid-area:meta}.hki-row .btn{grid-area:btn}}
  .ck-run-detail-group{margin-top:var(--s-3)}
  .ck-run-assignment-list,.ck-run-activity{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s-2)}
  .ck-run-assignment-list>span,.ck-run-activity>span{display:grid;gap:var(--s-1);padding:var(--s-2);border:1px solid var(--hair);border-radius:var(--r-m);background:var(--wash);font-size:var(--t-sub);overflow-wrap:anywhere}
  .ck-run-assignment-list small,.ck-run-activity small,.ck-run-detail-group small{color:var(--muted);font-size:var(--t-sub);line-height:1.4}
  .ck-run-schedules{margin-top:var(--s-5);padding-top:var(--s-4);border-top:1px solid var(--line)}
  .ck-run-schedule-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s-3);margin-top:var(--s-3)}
  .ck-run-schedule-card{min-width:0;margin:0;padding:var(--s-3)}
  .ck-run-schedule-card h4{margin:0;color:var(--text-heading);font-size:var(--t-body);overflow-wrap:anywhere}
  .ck-run-schedule-facts{display:flex;gap:var(--s-2);flex-wrap:wrap;margin-top:var(--s-2);color:var(--muted);font-size:var(--t-sub);font-variant-numeric:tabular-nums}
  .ck-run-schedule-facts span{padding:var(--s-1) var(--s-2);border-radius:var(--r-s);background:var(--wash);overflow-wrap:anywhere}
  .ck-run-schedule-confirm{margin-top:var(--s-3);padding:var(--s-3);border:1px solid var(--bad-fg);border-radius:var(--r-m);background:var(--bad-bg)}
  .ck-run-schedule-confirm p{margin:0;color:var(--bad-fg);font-size:var(--t-sub);line-height:1.45}
  @media (max-width: 640px) {
    .ck-list-delete-actions{align-items:stretch}
    .ck-list-delete-actions .btn,.ck-list-delete-actions .ck-v3-live{width:100%}
  }
  @media (max-width: 900px) {
    .ck-v3-compare,.ck-v3-fields,.ck-run-mode-grid,.ck-run-list,.ck-run-schedule-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  }
  /* fetch-184: phone tap-target + control hygiene (390px audit of all 37 views: 42 tiny ×
     on Pickups, 46 on Schedule, 148 small controls in Admin, linen control sprawl). */
  .rowdel { border: 1px solid var(--line); background: #fff; color: #9a3d3d; border-radius: 8px; min-width: 26px; cursor: pointer; font-size: 14px; line-height: 1.4; }
  .rowdel:hover { border-color: #c66; background: #fff5f5; }
  @media (max-width: 640px) {
    .ck-page .pgh-seg{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));overflow:visible;mask-image:none;-webkit-mask-image:none}
    .ck-page .pgh-seg button{min-height:var(--control-height-touch);padding:var(--s-2);white-space:normal}
    .ck-section-intro{grid-template-columns:1fr;padding:var(--s-3)}
    .ck-intro-facts{justify-content:flex-start}
    .ck-intro-facts span{flex:1 1 40%}
    .ck917-uncertain-refresh{align-items:stretch}
    .ck917-uncertain-refresh .btn{width:100%}
    .ck-v3-template-grid,.ck-v3-workbench,.ck-v3-compare,.ck-v3-fields,.ck-run-mode-grid,.ck-run-scenarios,.ck-run-fields,.ck-run-anchor-grid,.ck-run-anchor,.ck-run-list,.ck-run-assignment-list,.ck-run-activity,.ck-run-schedule-list{grid-template-columns:1fr}
    .ck-v3-queue{position:static;max-height:none;overflow:visible}
    .ck-v3-workbench--detail .ck-v3-queue{display:none}
    .ck-v3-workbench--detail .ck-v3-back{display:inline-flex}
    .ck-v3-detail-nav{display:flex;gap:var(--s-2);align-items:center;justify-content:space-between;flex-wrap:wrap;margin-top:var(--s-3);padding-top:var(--s-3);border-top:1px solid var(--hair)}
    .ck-v3-detail-nav .btn{flex:1 1 40%}
    .ck-v3-candidate,.ck-v3-back,.ck-v3-detail-nav .btn,.ck-v3-decisions .btn,.ck-v3-footer .btn,.ck-v3-stage .btn,.ck-v3-stage input,.ck-v3-detail input,.ck-v3-detail select,.ck-v3-detail textarea,.ck-run-shell .btn,.ck-run-shell input,.ck-run-shell select,.ck-run-overview .btn,.ck-run-schedules .btn,.ck-run-card{min-height:var(--control-height-touch)}
    .ck-v3-decisions .btn{flex:1 1 40%}
    .ck-v3-footer .btn{flex:1 1 auto}
    .ck-v3-stage,.ck-v3-review{padding:var(--s-3)}
    .ck-run-step,.ck-run-submit,.ck-run-receipt,.ck-run-detail{padding:var(--s-3)}
    .ck-run-item-head{align-items:flex-start;flex-direction:column}
    .rowdel { min-width: 34px; min-height: 32px; font-size: 16px; }
    .btn { min-height: 36px; }
    .sel, select.sel, input.sel { max-width: 100%; min-height: 36px; }
    .cappill { padding: 7px 13px; }
  }
  /* ---- fetch-110: server assignment cards ---- */
  .svc-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
  .svc-card { border: 2px dashed #b8b0a2; border-radius: 12px; padding: 12px 14px; background: #fff; break-inside: avoid; }
  .svc-top { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--muted); border-bottom: 2px solid var(--gold); padding-bottom: 5px; margin-bottom: 7px; }
  .svc-name { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 26px; font-weight: 700; color: var(--navy); line-height: 1.1; }
  .svc-grid { display: flex; gap: 22px; margin-top: 6px; }
  .svc-l { font-size: 9.5px; letter-spacing: 1.2px; color: #8a94a3; font-weight: 700; }
  .svc-v { font-size: 15px; font-weight: 700; }
  .svc-big { font-size: 21px; letter-spacing: 1px; }
  .svc-diet { margin-top: 7px; background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; border-radius: 8px; padding: 5px 8px; font-size: 11.5px; font-weight: 600; }
  .svc-foot { margin-top: 8px; font-size: 9px; color: #b8b0a2; text-align: right; }
  /* fetch-630 — courses, timeline and role on the printable card */
  .svc-mt { margin-top: 6px; }
  .svc-role { font-size: var(--t-sub); color: var(--muted); }
  .svc-course { font-size: var(--t-label); line-height: 1.35; }
  .svc-ck { font-weight: 700; }
  /* fetch-636 — Amanda's survey type spec (2026-08-20) and the spacing she asked for */
  .svy-full { grid-column: 1 / -1; }
  /* fetch-704 (Amanda #3): "make the title font larger than the subheader font". Nominally
     22px > 17px already — but Cormorant's small x-height renders 22px visually SMALLER than
     Inter bold at 17px, so on the live form the subheader out-shouted the heading. Display
     size (27px) wins by eye, not just by number. Verified against svy-h2 in the browser. */
  /* fetch-826 (Jack, from a phone screenshot): ONE field on the client survey rendered as a
     grey filled capsule while every other field was a white bordered box. It is not a text box
     and it is not leaking — it is a <select>.

     portal.css:2261 styles .field input/select/textarea together and chromium honours it on all
     three: rendered at 390px, all thirteen SVY_TYPES come back white, bordered, zero overflow
     (box-sizing is border-box globally, so width:100% + padding cannot overrun). What that
     render DOES report is `appearance: auto` on the select-backed types. On iOS Safari that
     means the control keeps the NATIVE rendering — a grey capsule with its own metrics — and the
     author's background and border are not honoured the way chromium honours them. Every other
     field is an input or textarea, whose native appearance is already flat. That is why exactly
     one box on the page looks unlike all the others.

     SCOPED TO THE NO-LOGIN FORM. `select` appears across 163 surfaces; restyling every dropdown
     in the portal to fix one client-facing form is the blast radius fetch-819 refused. This also
     picks up the Venue select on the same screen, which has the identical defect.

     CANNOT BE PROVEN ON THIS MACHINE: chromium does not reproduce iOS Safari's native select at
     any viewport or device emulation. The probe asserts the MECHANISM — computed appearance is
     none, the chevron exists, and the control still measures identically to the inputs beside
     it. The visual confirmation is a real phone. */
  .af-form .field select { appearance: none; -webkit-appearance: none; -moz-appearance: none;
    background-image: none; padding-right: var(--s-6); }
  /* fetch-826, CORRECTED after Jack tested the live form: the field he reported is an
     input[type=date], not a select. His laptop shows it as mm/dd/yyyy with a calendar
     indicator, and an EMPTY date input is precisely what iOS draws as a grey box with no text.
     date / time / number are the other controls iOS dresses in its own chrome. text and
     textarea are LEFT ALONE ON PURPOSE — their native appearance is already flat, which is
     exactly why every other box on that form looked correct. */
  .af-form .field input[type="date"], .af-form .field input[type="time"],
  .af-form .field input[type="number"] { appearance: none; -webkit-appearance: none; }
  /* Safari hides the picker indicator with the native appearance; put it back so a date field
     still announces itself as one. */
  .af-form .field input[type="date"]::-webkit-calendar-picker-indicator { opacity: 1; }
  .af-form .field input[type="number"]::-webkit-inner-spin-button,
  .af-form .field input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
  /* Removing the native appearance also removes the native arrow, and a dropdown that looks
     exactly like a text box is a worse bug than the one being fixed. The chevron is a ::after on
     the field — no markup change, and :has() is already load-bearing in this stylesheet
     (.card:has(details.hdd[open])), so it is not a new dependency. A character, NOT an inline
     SVG: an SVG data URI needs a literal colour and the UI-debt ratchet counts hex. */
  /* fetch-826 (Jack): "these boxes / text are also off center". In a two-column row where one
     question wraps to two lines and its neighbour does not, the two controls sat 19px apart —
     measured identically at 640, 760, 900, 1100 and 1280px, so it is the label height and not a
     breakpoint. The control is pushed to the BOTTOM of its cell, so every control in a row
     shares a baseline however long its question is. Scoped to the survey question grid, which
     is the only place a wrapping question sits beside a short one. */
  .svy-qs .field { display: flex; flex-direction: column; }
  .svy-qs .field > label { flex: 0 0 auto; }
  .svy-qs .field > input, .svy-qs .field > select, .svy-qs .field > textarea,
  .svy-qs .field > .svy-dollar { margin-top: auto; }
  .af-form .field:has(select) { position: relative; }
  .af-form .field:has(select)::after { content: "\25BE"; position: absolute; right: var(--s-3);
    bottom: 10px; pointer-events: none; color: var(--muted); font-size: var(--t-body); line-height: 1; }
  .svy-h1 { font-family: 'Cormorant Garamond', serif; font-size: var(--t-display); line-height: 1.2; margin: 14px 0 2px; }
  /* fetch-637 — Sales: "a bold sub header that allows us to create sections of things to be
     able to separate the surveys out a little bit more". Bold alone was not doing that: it
     read as a slightly louder question. A rule above it and real space around it is what
     makes it a SECTION BREAK rather than emphasis. */
  /* fetch-826 (Jack): "make the gold lines that divide the sections a little thicker to
     differentiate the sections of questions further". It was 1px var(--line) — #e7dfcf, the warm
     cream hairline, which is why it reads as gold. Merely doubling that was rejected: 2px of
     #e7dfcf on white is still almost invisible and would not differentiate anything, which is the
     thing actually asked for. 2px var(--gold) is literally the gold line, thicker — and a section
     divider is the ONE use of gold the brand rule names outright: "focus rings, a selected metric,
     FINE DIVIDERS". */
  /* fetch-873 (Amanda #9): the gold section rule moves UNDER the header it belongs to —
     "put the horizontal line that comes with adding a header underneath the header instead
     of above it." Same 2px var(--gold) divider fetch-826 chose; only its side changes, so
     a header now reads as titling the section below its line rather than closing the one
     above. The fetch-793-era first-child exception dies with the top rule — a line under
     the very first header is exactly what's wanted. */
  .svy-h2 { font-family: Inter, system-ui, sans-serif; font-weight: 700; font-size: var(--t-section);
            margin: 22px 0 10px; padding-bottom: 8px; border-bottom: 2px solid var(--gold); }
  .svy-full:first-child .svy-h2 { margin-top: 4px; }
  .svy-body { font-family: Inter, system-ui, sans-serif; font-weight: 400; font-size: var(--t-body); line-height: 1.5; margin: 4px 0; }
  /* fetch-873 (Amanda #6): the five named text styles a builder can pick for any text block.
     Sizes are Amanda's spec in points (26/16/14/11pt — client-facing editorial, matching the
     Word-export sizes); colors ride the tokens. "All Caps" styles transform; "lowercase" in
     her spec reads as as-typed (the contrast is with All Caps), so no transform there.
     Title/HEADER carry the gold section rule BELOW them (per #9); SUB HEADER a hairline. */
  .svy-t-title { font-family: 'Cormorant Garamond', serif; font-weight: 700; font-size: 26pt; line-height: 1.15; color: var(--navy); margin: 14px 0 6px; }
  .svy-t-header { font-family: Inter, system-ui, sans-serif; font-weight: 700; font-size: 16pt; line-height: 1.25; color: var(--navy); text-transform: uppercase; letter-spacing: .04em; margin: 22px 0 10px; padding-bottom: 8px; border-bottom: 2px solid var(--gold); }
  .svy-t-subheader { font-family: Inter, system-ui, sans-serif; font-weight: 700; font-size: 14pt; line-height: 1.3; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 16px 0 6px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
  .svy-t-bodybold { font-family: Inter, system-ui, sans-serif; font-weight: 700; font-size: 11pt; line-height: 1.5; color: var(--ink); margin: 4px 0; }
  .svy-t-body { font-family: Inter, system-ui, sans-serif; font-weight: 400; font-size: 11pt; line-height: 1.5; color: var(--ink); margin: 4px 0; }
  .svy-full:first-child .svy-t-header, .svy-full:first-child .svy-t-title { margin-top: 4px; }
  /* fetch-887 — FONT FREEDOM. Four axes that compose on top of the five presets above, each
     optional, each declared AFTER the presets so equal specificity resolves to the override.
     Jack ruled the boundary: our two brand faces, not a font library. Colours are brand tokens
     only, so no combination can leave the palette.
     SIZES ARE pt, deliberately: they extend the preset ladder above (26/16/14/11pt), which was
     matched to the Word-export sizes. The UI-debt ratchet counts px font-sizes only and will
     not see these — the same gap fetch-883's census flagged. Named here rather than widened
     quietly; converting the whole family to tokens is its own ticket and would move what
     already ships. */
  .svy-f-cormorant { font-family: 'Cormorant Garamond', Georgia, serif; }
  .svy-f-inter { font-family: Inter, system-ui, sans-serif; }
  .svy-s-xs { font-size: 9pt; } .svy-s-sm { font-size: 11pt; } .svy-s-md { font-size: 14pt; }
  .svy-s-lg { font-size: 18pt; } .svy-s-xl { font-size: 22pt; } .svy-s-xxl { font-size: 30pt; }
  .svy-c-navy { color: var(--brand-blue-deep); } .svy-c-blue { color: var(--brand-blue-traditional); }
  .svy-c-gold { color: var(--brand-gold-dark); } .svy-c-stone { color: var(--brand-stone); }
  .svy-c-ink { color: var(--ink); }
  .svy-a-left { text-align: left; } .svy-a-center { text-align: center; display: block; }
  .svy-w-bold { font-weight: 700; }
  .svy-u-caps { text-transform: uppercase; letter-spacing: .04em; }
  /* fetch-873 (Amanda #1): the attachment answer — file input + the picked-files list */
  .svy-filewrap { display: flex; flex-direction: column; gap: 6px; }
  .svy-fileinp { font: inherit; }
  .svy-filenote { color: var(--muted); font-size: var(--t-sub); }
  /* the response browser's attachment buttons */
  .svy-filebtn { display: inline-flex; align-items: center; gap: 6px; margin: 2px 6px 2px 0; }
  /* ── fetch-874: the closing polish pass — hoisted + new classes ─────────────────────────
     Everything here replaces inline styles deleted from index.html (counted debt DOWN) or
     dresses the two header-⋯ modals and the new affordances. Tokens only. */
  /* the auto-survey log modal */
  .svy-snd-intro { font-size: var(--t-sub); margin-bottom: var(--s-2); }
  .svy-snd-note { font-size: var(--t-sub); margin-top: var(--s-2); }
  .svy-sndrow { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; align-items: center; gap: 8px; flex-wrap: wrap; }
  .svy-snd-ev { font-size: var(--t-mid); min-width: 140px; }
  .svy-snd-meta { font-size: var(--t-sub); }
  .svy-snd-sp { flex: 1; }
  /* the recipient-groups modal */
  .svy-grp-intro { align-items: center; margin-bottom: var(--s-2); }
  .svy-grp-introtext { flex: 1; min-width: 220px; font-size: var(--t-sub); }
  .svy-grprow { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; align-items: center; gap: 6px; flex-wrap: wrap; }
  .svy-grp-id { flex: 1; min-width: 180px; }
  .svy-grp-name { font-size: var(--t-mid); }
  .svy-grp-rule { font-size: var(--t-label); }
  .svy-grp-hdd { position: relative; }
  /* the QR takeaway (download + caption) */
  .svy-qrwrap { margin-top: var(--s-3); display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
  .svy-qrcap { font-size: var(--t-sub); font-weight: 600; }
  .svy-qracts { align-items: center; gap: var(--s-2); flex-wrap: wrap; }
  .svy-qrurl { font-size: var(--t-sub); word-break: break-all; }
  /* the client form's expectation line */
  .svy-expect { font-size: var(--t-sub); margin: -8px 0 12px; }
  /* the items table, un-inlined (renders in the live form, the preview, and the gallery) */
  .svy-items { border-collapse: collapse; width: 100%; }
  .svy-items th { text-align: left; padding: 4px 6px 4px 0; font-size: var(--t-label); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
  .svy-items td { padding: 2px 4px; }
  .svy-items td:first-child { padding-left: 0; }
  /* the base rule `.field input:not(...):not(...)` is (0,3,1) — these tie it and win by
     order, so the numeric cells keep the old inline widths (the hoist's parity promise) */
  .field .svy-items input.svy-it-item { width: 100%; min-width: 120px; }
  .field .svy-items input.svy-it-num { width: 74px; }
  .field .svy-items input.svy-it-cons { width: 84px; }
  .svy-it-del { padding: 2px 8px; }
  .svy-it-add { margin-top: 6px; padding: 3px 10px; font-size: var(--t-sub); }
  .svy-it-note { font-size: var(--t-label); margin-top: 3px; }
  /* the editor's question rows, un-inlined */
  .svy-qrow { padding: 6px 0; border-top: 1px solid var(--line); align-items: center; gap: 6px; }
  .svy-qrow-label { flex: 1; font-size: var(--t-mid); min-width: 160px; }
  .svy-qrow-meta { font-size: var(--t-label); }
  /* the survey list rows, un-inlined */
  .svy-lrow { padding: 10px 0; border-top: 1px solid var(--line); }
  .svy-lrow .btn.cmenu-trigger { min-width: var(--control-height-touch); min-height: var(--control-height-touch); } /* fetch-1291: the row's 44px action target at every width (fetch-1171) moves from the old summary.btn to the menu's trigger */
  /* fetch-950 - DIRECTION A. The class names .svy-lrow and .svy-row are KEPT, not replaced:
     .svy-row .hddm carries the fetch-509 phone pin that keeps the row menu inside the viewport,
     and renaming the row would have opened that menu off the left edge at 390px again. Every
     value below is a token, so the UI-debt ratchet stays flat. */
  .svy-lrow2 { align-items: center; gap: var(--s-3); flex-wrap: nowrap; }
  /* fetch-1308 (the map's 1c.1): an Off row is muted by COLOUR, the grid card's rule - opacity .62 took the name to 4.2:1
     and the meta line to 2.4:1, and an opacity layer can paint over a click target (the fetch-1300 card lesson). --muted
     holds AA on --paper (4.78:1). The meta line is already --muted; the name and the count join it. */
  .svy-lrow--off .svy-lname, .svy-lrow--off .svy-lcount-n, .svy-lrow--off .svy-lavg { color: var(--muted); }
  .svy-lmain { flex: 1; min-width: 0; }
  .svy-lname strong { font-weight: 600; }
  .svy-lmeta { color: var(--muted); font-size: var(--t-sub); margin-top: 2px; font-variant-numeric: tabular-nums; }
  .svy-mark { margin-left: var(--s-1); vertical-align: 1px; }
  /* the count IS the door to responses - the number was previously printed twice per row, once
     in the sub-line and once on a button beside it. 44px tall, so it holds the touch floor. */
  .svy-lcount { display: flex; flex-direction: column; align-items: flex-end; justify-content: center;
    min-width: 62px; min-height: var(--control-height-touch); padding: 0 var(--s-1);
    border-radius: 8px; text-decoration: none; color: var(--text-heading); }
  .svy-lcount:hover { background: var(--wash); }
  .svy-lcount-n { font-size: var(--t-section); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
  .svy-lcount-u { font-size: var(--t-label); color: var(--muted); }
  .svy-lcount--zero { pointer-events: none; }
  .svy-lcount--zero .svy-lcount-n { font-weight: 500; color: var(--muted); }
  /* fetch-1174: restore the previous family definition while the band-removal design is paused. */
  .svy-band { display: flex; justify-content: space-between; align-items: baseline;
    font-size: var(--t-label); text-transform: uppercase; letter-spacing: .09em; font-weight: 700;
    color: var(--text-heading); background: var(--wash); padding: var(--s-2) var(--s-3);
    margin: 0 calc(-1 * var(--s-4)); border-top: 1px solid var(--line); }
  .svy-lrow + .svy-band { margin-top: var(--s-2); }
  .svy-band-n { font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
  /* fetch-1300 (Six-Control pass 1c) - THE SURVEYS GRID. One card per survey inside the same bands: the venue and Live/Off
     up top, the name, the count in tabular figures, the last-filed line; the fetch-1291 menu in the corner. The whole card
     opens the responses (the fetch-659 lesson): .svy-gopen is one real button whose ::after covers the card, and the corner
     sits above it. The order is stated, not left to the markup: the card isolates, the target is z 1, the corner z 2 - so
     nothing that makes its own layer (an opacity, a transform) can paint over the target and swallow a click. An Off card
     is muted by colour, never opacity, for the same reason and for contrast (--muted holds AA on --paper).
     The ⋯ keeps the row's 44px target at every width (fetch-1171). Two-up on a phone. Tokens only. */
  .svy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: var(--s-3); padding: var(--s-3) 0 var(--s-2); }
  .svy-gcard { position: relative; isolation: isolate; display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; min-height: 8.5rem; box-sizing: border-box;
    padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--paper); }
  .svy-gcard--open:hover { border-color: var(--navy); box-shadow: 0 2px 10px rgba(56,74,97,.10); }
  .svy-gcard:has(.svy-gopen:focus-visible) { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
  .svy-gcard:has(.cmenu-list:not([hidden])) { z-index: 2; }
  .svy-gtop { display: flex; flex-wrap: wrap; align-content: flex-start; align-items: center; gap: var(--s-1) var(--s-2); padding-right: calc(var(--control-height-touch) - var(--s-2));
    min-height: calc(var(--control-height-touch) - var(--s-2)); font-size: var(--t-sub); color: var(--muted); } /* tall enough that the name always starts below the corner menu */
  .svy-gtop .svy-mark { margin-left: 0; }
  .svy-glive { color: var(--text-heading); font-weight: 600; }
  .svy-gopen { appearance: none; background: none; border: 0; padding: 0; margin: 0; text-align: left; font: inherit; color: var(--text-heading); cursor: pointer; }
  .svy-gopen::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--r-m); }
  .svy-gopen:focus-visible { outline: none; }
  .svy-gopen strong, .svy-gname { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    font-size: var(--t-body); font-weight: 600; line-height: 1.3; color: var(--text-heading); overflow-wrap: anywhere; }
  .svy-gcount { margin-top: auto; padding-top: var(--s-1); color: var(--text-heading); }
  .svy-gcount-n { font-size: var(--t-title); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
  .svy-gcount-u { font-size: var(--t-sub); color: var(--muted); }
  .svy-gmeta { font-size: var(--t-sub); color: var(--muted); font-variant-numeric: tabular-nums; }
  .svy-gcorner { position: absolute; top: var(--s-1); right: var(--s-1); z-index: 2; } /* above the card's target */
  .svy-gcorner .btn.cmenu-trigger { min-width: var(--control-height-touch); min-height: var(--control-height-touch); }
  .svy-gcard--off .svy-gname, .svy-gcard--off .svy-gopen strong, .svy-gcard--off .svy-gcount, .svy-gcard--off .svy-gavg { color: var(--muted); }
  /* fetch-1308 (Six-Control pass 2c, Jack's D1): the first Rating question's average, named, on the row and on the card.
     Two lines on both, so a phone - which can never open a title tooltip - still reads which question the number
     averages (the review: one line cut it to two words at 390px). Tabular figures. */
  .svy-lavg, .svy-gavg { font-size: var(--t-sub); color: var(--text-heading); font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .svy-lavg { margin-top: 2px; }
  .svy-lavg strong, .svy-gavg strong { font-weight: 700; }
  .svy-gwide { grid-column: 1 / -1; min-width: 0; }
  @media (max-width: 640px) {
    .svy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
    .svy-gcard { min-height: 8rem; padding: var(--s-2); }
  }
  /* fetch-874.1: the recap-history notice on a recap template's responses page */
  .svy-recnote { margin-bottom: var(--s-3); }
  .svy-recnote .btn { vertical-align: baseline; }
  /* fetch-1175: the RSVP totals above a survey's responses. Three or four figures in one row
     that wraps on a phone; tabular numerals so a total does not jitter as replies land. The gold
     rule sits under the HERO figure only (guests coming) — a selected metric, the one number the
     page exists for — and nowhere else (gold is jewelry). Every figure carries its label as
     text, so nothing here is read by colour. */
  .svy-rsvp { margin-bottom: var(--s-3); }
  .svy-rsvp-figs { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); align-items: flex-end; }
  .svy-rsvp-fig { display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; }
  .svy-rsvp-n { font-size: var(--t-title); font-weight: 600; line-height: 1.1; color: var(--text-heading); font-variant-numeric: tabular-nums; }
  .svy-rsvp-l { font-size: var(--t-sub); color: var(--muted); }
  .svy-rsvp-fig.is-hero .svy-rsvp-n { font-size: var(--t-display); padding-bottom: var(--s-1); border-bottom: 2px solid var(--gold); }
  .svy-rsvp-meta { margin-top: var(--s-3); padding-top: var(--s-2); border-top: 1px solid var(--line); font-size: var(--t-sub); color: var(--muted); }
  .svy-rsvp-note { margin: var(--s-3) 0 0; }
  .svy-rr-guests { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text-heading); }
  /* the builder's RSVP settings block: the three fields indent under their checkbox */
  .svy-rsvpset > .f-help { display: block; }
  .svy-rsvpgrid { margin-top: var(--s-3); padding-left: var(--s-4); border-left: 2px solid var(--line); }
  /* fetch-1176: the invite list on an RSVP's Responses page. One row per person: who, state
     (a WORD in a badge), a quiet trail of dates, and a 44px ⋯ menu. The row is a four-column
     grid that folds to two lines on a phone rather than scrolling sideways. */
  .svy-inv { margin-bottom: var(--s-3); }
  .svy-inv-head { align-items: flex-start; justify-content: space-between; gap: var(--s-2) var(--s-4); flex-wrap: wrap; }
  .svy-inv-sum { font-size: var(--t-body); color: var(--muted); }
  .svy-inv-sum strong { color: var(--text-heading); font-variant-numeric: tabular-nums; }
  /* fetch-1313: the replies meter leads the invite card; the chaser's number is its own line under it */
  .svy-inv-sum > .pg { margin-top: 0; }
  .svy-inv-title { flex: 1 1 16rem; min-width: 0; } /* the review: sized to its words, the replies bar was 114px on any card */
  .svy-inv-wait { display: block; margin-top: var(--s-1); font-size: var(--t-sub); }
  .svy-inv-tools { display: flex; flex-wrap: wrap; gap: var(--s-2); }
  .svy-inv-add { margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--line); }
  .svy-inv-chips { gap: var(--s-2); flex-wrap: wrap; justify-content: flex-start; margin: var(--s-3) 0 var(--s-1); }
  .svy-inv-n { font-variant-numeric: tabular-nums; opacity: .75; }
  .svy-inv-list { border-top: 1px solid var(--line); }
  .svy-inv-row { display: grid; grid-template-columns: minmax(0, 1.6fr) auto minmax(0, 1.4fr) auto; align-items: center; gap: var(--s-2) var(--s-3); padding: var(--s-2) 0; border-bottom: 1px solid var(--line); }
  .svy-inv-row:last-child { border-bottom: 0; }
  .svy-inv-who { display: flex; flex-direction: column; min-width: 0; font-size: var(--t-body); color: var(--text-heading); }
  .svy-inv-who strong, .svy-inv-mail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .svy-inv-mail, .svy-inv-trail { font-size: var(--t-sub); }
  .svy-inv-trail { font-variant-numeric: tabular-nums; }
  .svy-inv-acts { display: inline-flex; justify-content: flex-end; }
  .svy-inv .svy-rmenu-btn { width: var(--control-height-touch); height: var(--control-height-touch); } /* a 44px target: this list is worked from a phone at an event */
  .svy-inv-none { padding: var(--s-3) 0 var(--s-1); font-size: var(--t-sub); }
  @media (max-width: 640px) {
    .svy-inv-row { grid-template-columns: minmax(0, 1fr) auto auto; }
    .svy-inv-trail { grid-column: 1 / -1; grid-row: 2; }
  }
  /* the public form greets an invitee by the name they were invited under */
  .svy-inv-hello { font-size: var(--t-body); color: var(--text-heading); margin: calc(-1 * var(--s-2)) 0 var(--s-3); }
  .svy-inv-hello + .svy-rsvp-by { margin-top: calc(-1 * var(--s-2)); }
  /* the public form: the reply-by line, and the card an RSVP shows once that date has passed */
  .svy-rsvp-by { font-size: var(--t-body); color: var(--text-heading); margin: calc(-1 * var(--s-2)) 0 var(--s-3); }
  .af-closedcard { max-width: 560px; margin: 44px auto; text-align: center; }
  .af-closed-mark { font-size: var(--t-display); line-height: 1; color: var(--gold-dark); }
  .af-closed-title { display: block; margin-top: var(--s-2); font-size: var(--t-section); color: var(--text-heading); }
  .af-closed-body { margin-top: var(--s-2); font-size: var(--t-body); }
  /* the public form's sent card — the raw #16a34a border went with the hoist; --ok-fg is the status green */
  .af-sentcard { max-width: 560px; margin: 24px auto; text-align: center; border-left: 4px solid var(--ok-fg); }
  /* fetch-1177: under the Crystal banner the card drops its green side rule - a full-bleed navy
     image beside a 4px status stripe reads as a rendering fault. "It went through" is still said
     twice without colour: the check mark and the heading. overflow clips the banner to the card's
     own rounded corners on all three non-form cards. */
  .af-sentcard[data-brand] { border-left-width: 1px; border-left-color: var(--line); }
  .af-sentcard[data-brand], .af-closedcard { overflow: hidden; }
  /* fetch-873 (Amanda #11): a page-header title that is also the way home. Opt-in via
     pageHeaderHTML's titleId — renders as a button that inherits the .pgh-h look. */
  .pgh-h--link { background: none; border: 0; padding: 0; margin: 0; text-align: left;
    font: inherit; color: inherit; cursor: pointer; }
  .pgh-h--link:hover { color: var(--gold-dark); }
  /* fetch-873 (Amanda #2): the summary rides below the rows in an open fold */
  .svy-sumfold { margin-top: var(--s-3); }
  .svy-sumfold > summary { cursor: pointer; font-weight: 600; font-size: var(--t-mid); color: var(--muted); padding: 6px 0; }
  /* fetch-637: Amanda's banners are 1584x396 (4:1). Height-capping them left white space
     either side of a full-bleed graphic, so they span the card edge to edge instead —
     the negative inline margin cancels the card's 16px horizontal padding, and the
     rounded corners are inherited so the banner does not overhang the card. */
  /* fetch-822: max-width is NOT decoration here. The global `img, canvas, svg { max-width: 100% }`
     at the top of this file outranks the width below and pins the banner to the card's CONTENT
     width, so the +32px is discarded while the -16px margin still shifts it left — flush on the
     left, 33px short on the right at 390px. Measured, not reasoned about: the fetch-637 comment
     above has claimed edge-to-edge since the day it was written. */
  .svy-logo, .svy-footimg { display: block; width: calc(100% + 32px); max-width: none; margin-left: -16px; margin-right: -16px; height: auto; }
  .svy-logo { margin-top: -14px; margin-bottom: 14px; border-radius: 12px 12px 0 0; }
  .svy-footimg { margin-top: 18px; margin-bottom: -14px; border-radius: 0 0 12px 12px; }
  /* fetch-638 (Amanda #7, second attempt) — THE FIRST FIX NEVER APPLIED.
     `.field label { display: block; font-size: 12px }` has specificity 0-1-1 and beats a
     bare `.svy-mulbl` at 0-1-0. So these labels were display:BLOCK the whole time — which
     means `gap` and `align-items` did nothing at all, because they only affect a flex
     container. That is why the box and its text sat jammed together with the text riding
     low, and why a wrapped option tucked itself under the checkbox instead of lining up.
     It has been that way since the multi type was built; Amanda is the first to say so.
     `.field label.svy-mulbl` is 0-2-1 and wins outright. Measured in the browser after,
     not assumed — the assumption is what produced the first attempt. */
  /* fetch-704 (Amanda #2): the question label above a checkbox list was 12px and the option
     text next to the boxes was 14px — "two different sizes … a size that's in between".
     Both meet at 13px: the question label steps up, the option labels step down. Scoped to
     the survey checkbox question (.svy-wide) so the portal-wide 12px field label is untouched. */
  .field.svy-wide > label { font-size: var(--t-mid); }
  .field label.svy-mulbl {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 7px 0; margin-bottom: 0;
    font-size: var(--t-mid); line-height: 1.45; color: inherit; cursor: pointer;
  }
  .field label.svy-mulbl input[type="checkbox"] {
    flex: 0 0 auto; width: 17px; height: 17px; margin: 0; accent-color: var(--gold);
    /* nudge the box onto the optical centre of the FIRST line of text, so a two-line
       option still lines up with its own first line rather than drifting up */
    margin-top: calc((1.45em - 17px) / 2);
  }
  /* #8: the question box was a one-line input — you could not see what you had typed */
  .svy-qbox { width: 100%; min-height: 72px; resize: vertical; font: inherit; }
  /* fetch-704 (Amanda #1): the CHOICES box had the same disease — a one-line input that cut
     off long text while she typed it. Same cure as the question box, slightly shorter. */
  /* fetch-873 (Amanda #8): "make the choices box able to be expanded to the right as well
     as down." resize:both — max-width keeps a dragged-wide box inside its card. */
  /* fetch-883 (Amanda, still asking after 873): resize:both DID ship — and did nothing, because
     width:100% already fills the cell and max-width:100% forbade growing past it, so the drag
     had nowhere to go. Two changes make the ask real: the field now spans the whole builder
     grid (.svy-full on its wrapper, so it starts ~3x wider), and max-width is released so a
     drag right actually widens it. The wrapper scrolls instead of the card breaking. */
  .svy-optbox { width: 100%; min-height: 54px; resize: both; max-width: none; font: inherit; }
  #svyQOptsWrap { overflow-x: auto; }
  /* fetch-883 (Jack + Miranda): the confirmation screen's icon links. Navy discs with the
     glyph reversed out, matching the row on the CSE sites. 44px targets — this is the last
     thing a client touches, usually on a phone. */
  .svy-linkrow { margin-bottom: var(--s-1); }
  .svy-linkadd { margin-top: var(--s-1); }
  .svy-linkhelp { margin: 0; }
  /* fetch-892: the confirmation links are WORDS now, not icon discs  three website links
     rendered as three identical globes said nothing about where each one went (Jack's
     screenshot). Read as links: gold, underlined, 44px tall so a thumb still lands cleanly. */
  .svy-links { display: flex; justify-content: center; flex-wrap: wrap; gap: var(--s-2) var(--s-4); margin-top: var(--s-4); }
  .svy-link { display: inline-flex; align-items: center; min-height: var(--control-height-touch);
    color: var(--brand-gold-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
  .svy-link:hover { color: var(--brand-blue-deep); }
  .svy-link:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
  /* fetch-704 (Amanda #5): dollar questions — the $ lives in the field, the person types
     only the number. inputmode=decimal brings up the number pad on phones. */
  /* fetch-819 (Amanda #6: "make the questions in the survey the same size fonts and the answers").
     .field label is var(--t-sub) 12px and .field input/select/textarea are 14px, so on the form a
     CLIENT fills in, the question read as subordinate to the box asking it. Backwards: the
     question is the content, the input is the container.
     SCOPED, NOT GLOBAL. .field appears 331 times across the portal — roster, events, settings,
     timesheets — and none of those were asked about. .svy-qs .field label is 0-2-1 against the
     base rule's 0-1-1, so it wins here and changes nothing anywhere else.
     var(--t-body) IS 14px: the label lands exactly on the answer size, and using the token
     instead of the literal keeps the UI-debt ratchet flat.
     Colour is deliberately unchanged — she asked about size, and recolouring the label is her
     call to make, not one to slip in alongside. */
  .svy-qs .field label { font-size: var(--t-body); }
  /* fetch-1308 (Six-Control pass 2b): a question that is a GROUP - pick many, the item table, the rating, the praise rows,
     the builder's Look and links - is a fieldset whose legend is the question, so a screen reader names the group. It
     must look exactly like the label it replaced: the reset takes away the fieldset's own border, padding, margin and
     min-content width, and the legend copies .field label (and .svy-qs .field label) in tokens. A divided field keeps
     its divider on a wrapper, because a legend straddles its own fieldset's top border. The legend is full width, because
     a rendered legend shrink-wraps its text and an author's "Centred" look then had nothing to centre in (the review's
     F1). The checklist import's Importance fieldset (.ck-v3-fieldset) already styles its own legend and is left to it. */
  fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; min-inline-size: 0; }
  .field:not(.ck-v3-fieldset) > legend { display: block; width: 100%; padding: 0; margin: 0 0 3px; font-size: var(--t-sub); color: var(--muted); }
  .field.svy-wide > legend { font-size: var(--t-mid); }
  .svy-qs .field > legend { font-size: var(--t-body); }
  /* fetch-1308 (2a + 2b): THE RATING. A native radio group, five 3rem (48px) targets. Each radio is invisible (opacity 0 -
     never display:none, so it keeps focus and the arrow keys) and LAID OVER its whole option, so a tap lands on the radio
     itself and so does a screen reader's explore-by-touch, which hit-tests the same way - a 1px radio under a
     pointer-events:none rule left a finger on a nameless label (the review's a11y-3). Hover therefore reads off the
     option, not the label. Stars are outlined in gold-dark and fill gold up to the choice (a restrained active indicator -
     jewelry); Numbers fill navy. The choice is said back under the scale in words (.svy-rate-say), so colour never carries
     it alone. Specificity is deliberate: .field input[type="radio"] and .field label are portal-wide, so every rule here
     is scoped to .field.svy-rate. Tokens only. */
  .svy-rate-scale { display: flex; flex-wrap: wrap; gap: var(--s-1); }
  /* Stars are five columns that may narrow, never wrap: at 320px (an iPhone on Zoomed display) a wrapping row put star 5
     alone under star 1, and "Excellent" nowhere near it (the review's N2) */
  .svy-rate--stars .svy-rate-scale { display: grid; grid-template-columns: repeat(5, minmax(0, 3rem)); }
  .field.svy-rate .svy-rate-opt { position: relative; display: inline-flex; }
  .field.svy-rate.svy-rate--stars .svy-rate-opt { display: flex; }
  .field.svy-rate.svy-rate--stars .svy-rate-opt label { width: 100%; }
  .field.svy-rate .svy-rate-opt input.svy-rate-in { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
  .field.svy-rate .svy-rate-opt label { display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem;
    margin: 0; border-radius: var(--r-m); color: var(--text-heading); cursor: pointer; user-select: none; -webkit-user-select: none; }
  .field.svy-rate .svy-rate-opt input.svy-rate-in:focus-visible + label { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
  .svy-rate-star { width: 2.125rem; height: 2.125rem; fill: transparent; stroke: var(--gold-dark); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; transition: fill .12s ease; }
  .svy-rate--stars .svy-rate-scale:has(.svy-rate-opt:nth-child(1) .svy-rate-in:checked) .svy-rate-opt:nth-child(-n+1) .svy-rate-star,
  .svy-rate--stars .svy-rate-scale:has(.svy-rate-opt:nth-child(2) .svy-rate-in:checked) .svy-rate-opt:nth-child(-n+2) .svy-rate-star,
  .svy-rate--stars .svy-rate-scale:has(.svy-rate-opt:nth-child(3) .svy-rate-in:checked) .svy-rate-opt:nth-child(-n+3) .svy-rate-star,
  .svy-rate--stars .svy-rate-scale:has(.svy-rate-opt:nth-child(4) .svy-rate-in:checked) .svy-rate-opt:nth-child(-n+4) .svy-rate-star,
  .svy-rate--stars .svy-rate-scale:has(.svy-rate-opt:nth-child(5) .svy-rate-in:checked) .svy-rate-opt:nth-child(-n+5) .svy-rate-star { fill: var(--svy-rate-on, var(--gold)); }
  .field.svy-rate.svy-rate--stars .svy-rate-opt:hover label { background: var(--wash); }
  .svy-rate--numbers .svy-rate-scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-2); max-width: 20rem; }
  .field.svy-rate.svy-rate--numbers .svy-rate-opt { display: flex; }
  .field.svy-rate.svy-rate--numbers .svy-rate-opt label { width: 100%; border: 1px solid var(--line); background: var(--paper);
    font-size: var(--t-section); font-weight: 600; font-variant-numeric: tabular-nums; }
  .field.svy-rate.svy-rate--numbers .svy-rate-opt:hover label { border-color: var(--navy); }
  .field.svy-rate.svy-rate--numbers .svy-rate-opt input.svy-rate-in:checked + label { background: var(--navy); border-color: var(--navy); color: var(--paper); }
  .svy-rate-ends { display: flex; justify-content: space-between; gap: var(--s-2); max-width: calc(15rem + 4 * var(--s-1)); margin-top: var(--s-1); font-size: var(--t-sub); color: var(--muted); }
  .svy-rate--numbers .svy-rate-ends { max-width: 20rem; }
  /* the said-back words, and an optional rating's Clear beside them. Clear shows only once something is chosen (:has, the
     way the stars fill) and is never drawn for a required question. Its 44px target reaches DOWN only - the words sit on
     the line, the rest of the box hangs 24px below it (a negative bottom margin, so picking a star never shifts the page)
     - and when no end labels sit between, the line starts 24px under the options: a finger landing a little low on a star
     must pick the star, not erase the answer (the review's N1, measured on both doors). The focus ring draws round the
     word, not the hanging box. */
  .svy-rate-foot { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 var(--s-3); min-height: 1.45em; margin-top: var(--s-1); }
  .svy-rate-scale + .svy-rate-foot { margin-top: var(--s-5); }
  .svy-rate-say { min-height: 1.45em; font-size: var(--t-mid); font-weight: 600; color: var(--text-heading); }
  .field.svy-rate .svy-rate-clr { display: none; align-items: flex-start; min-height: var(--control-height-touch); margin: 0 0 calc(var(--s-5) * -1);
    padding: 0 var(--s-2); border: 0; border-radius: var(--r-s); background: none; color: var(--navy); font-size: var(--t-sub); font-weight: 600;
    text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
  .field.svy-rate:has(.svy-rate-in:checked) .svy-rate-clr { display: inline-flex; }
  .field.svy-rate .svy-rate-clr:hover { color: var(--navy-dark); }
  .field.svy-rate .svy-rate-clr:focus-visible { outline: none; }
  .field.svy-rate .svy-rate-clr:focus-visible .svy-rate-clr-t { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: var(--r-s); }
  /* a refused Send marks the rating where it sits (afRefuse adds .is-missing and aria-invalid; a pick takes both away):
     focus on an invisible radio after a tap draws no ring, so without this nothing on the scale said which was missing */
  .field.svy-rate.is-missing { outline: 2px solid var(--bad-fg); outline-offset: var(--s-1); border-radius: var(--r-s); }
  /* forced colours (Windows High Contrast) repaint the chosen number's navy as Canvas like the rest, so the choice would
     vanish; it takes the system's Highlight pair, the way the view toggle's pressed half does (.pgh-view). Chrome leaves
     SVG fill and stroke alone there, so the stars keep brand gold on a black or white Canvas unless told: the outline
     takes CanvasText and the filled ones Highlight. */
  @media (forced-colors: active) {
    .field.svy-rate.svy-rate--numbers .svy-rate-opt input.svy-rate-in:checked + label { forced-color-adjust: none; background: Highlight; color: HighlightText; border-color: Highlight; }
    .field.svy-rate.svy-rate--numbers .svy-rate-opt input.svy-rate-in:checked:focus-visible + label { outline-color: CanvasText; } /* not the brand ring - that label opted out of forced colours (N7) */
    .field.svy-rate { --svy-rate-on: Highlight; }
    .field.svy-rate .svy-rate-star { stroke: CanvasText; }
  }
  /* the builder's Rating settings: the two end labels side by side */
  .svy-rategrid { margin-top: var(--s-2); }

  /* fetch-820 (Amanda #2): a response opens on its own and exports on its own.
     Everything here is classed rather than inline-styled on purpose — the UI-debt ratchet fails
     the build when inline styles RISE, and the surrounding survey code is dense with them.
     No focus outline declared: portal.css:57-58 already gives every [tabindex]:focus-visible the
     brand focus ring, and the card carries tabindex="0". */
  .svy-rcard { cursor: pointer; transition: border-color .12s ease; }
  .svy-rcard:hover, .svy-rcard:focus-visible { border-color: var(--muted); }

  .svy-r1-bar { margin-bottom: var(--s-3); align-items: center; gap: var(--s-2); flex-wrap: wrap; }
  .svy-r1-spacer { flex: 1; }
  .svy-r1-del { padding: var(--s-1) var(--s-2); }
  /* fetch-823: the responses list — one line per response instead of one screen per response. */
  .svy-rlist { padding: 0; }
  .svy-rrow { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) auto auto auto;
    align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4);
    border-bottom: 1px solid var(--line); cursor: pointer; }
  /* The header row is not a row of data: it names the columns so each cell is readable on its
     own rather than being guessed at from its neighbours. */
  .svy-rhead { cursor: default; font-size: var(--t-label); color: var(--muted);
    text-transform: uppercase; letter-spacing: .04em; padding-top: var(--s-2); padding-bottom: var(--s-2); }
  .svy-rhead:hover { background: none; }
  .svy-rrow:last-child { border-bottom: 0; }
  .svy-rrow:hover, .svy-rrow:focus-visible { background: var(--wash); }
  .svy-rr-who { font-size: var(--t-body); font-weight: 600; color: var(--text-heading);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .svy-rr-ev, .svy-rr-venue { font-size: var(--t-sub); color: var(--muted);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .svy-rr-when { font-size: var(--t-sub); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
  /* Completeness is the one fact the old card could not show: it drew only ANSWERED questions,
     so a half-finished response looked exactly like a complete one until you opened it. */
  .svy-rr-done { font-size: var(--t-label); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
  .svy-rr-done.is-partial { font-weight: 600; }
  .svy-rr-acts { display: inline-flex; justify-content: flex-end; }
  /* fetch-823 (Jack): one control, not two loose buttons per row. Same shape as the header's
     ⋯ overflow, so the two menus in this screen behave identically. */
  .svy-rmenu { position: relative; }
  .svy-rmenu-btn { list-style: none; cursor: pointer; width: 28px; height: 28px; border-radius: var(--r-s);
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--muted); border: 1px solid transparent; }
  .svy-rmenu-btn::-webkit-details-marker { display: none; }
  .svy-rmenu-btn:hover { color: var(--ink); border-color: var(--line); background: var(--paper); }
  .svy-rmenu[open] .svy-rmenu-list { display: flex; }
  .svy-rmenu-list { display: none; position: absolute; right: 0; top: calc(100% + var(--s-1)); z-index: 40;
    flex-direction: column; gap: var(--s-1); padding: var(--s-2); min-width: 168px;
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m);
    box-shadow: 0 6px 20px rgba(20, 33, 61, .12); }
  .svy-rmenu-list .btn { justify-content: flex-start; text-align: left; }
  @media (max-width: 640px) {
    /* A five-column grid at 390px is five unreadable slivers. The row becomes two lines: who and
       when on top, context and the actions under it. */
    .svy-rrow { grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--s-1) var(--s-2); }
    /* Column HEADINGS need columns to head. At 390px there are none, so the header row is
       hidden rather than shown lying about a layout that is not there. */
    .svy-rhead { display: none; }
    .svy-rr-who { grid-column: 1; grid-row: 1; }
    .svy-rr-ev { grid-column: 1; grid-row: 2; }
    .svy-rr-venue { grid-column: 2; grid-row: 2; text-align: right; }
    .svy-rr-when { grid-column: 2; grid-row: 1; text-align: right; }
    .svy-rr-done { grid-column: 3; grid-row: 1; text-align: right; }
    .svy-rr-acts { grid-column: 3; grid-row: 2; justify-content: flex-end; }
  }
  /* fetch-823: the header primitive's own bits that the inert fetch-801 block did not carry. */
  .pgh-back { margin-bottom: var(--s-2); }
  .pgh-moremenu { position: relative; }
  .pgh-moremenu[open] .pgh-morelist { display: flex; }
  .pgh-morelist { display: none; position: absolute; right: 0; top: calc(100% + var(--s-1)); z-index: 40;
    flex-direction: column; gap: var(--s-1); padding: var(--s-2);
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m);
    box-shadow: 0 6px 20px rgba(20, 33, 61, .12); }
  .svy-r1-meta { font-size: var(--t-sub); color: var(--muted); }
  .svy-r1-q { margin-top: var(--s-2); }
  /* fetch-822 (Jack): on a desktop this reader was ~90% empty — every question/answer pair took
     a full row, so "Buffet" occupied one line of a 1900px screen and a 25-question questionnaire
     was 25 near-empty rows to scroll. */
  .svy-r1-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s-3) var(--s-4); margin-top: var(--s-3); }
  .svy-r1-grid .svy-r1-q { margin-top: 0; }
  /* A paragraph answer squeezed into a 260px track is worse than the empty space this fixes,
     so anything long takes the full width and only the short answers pack. */
  .svy-r1-grid .svy-r1-q.is-long { grid-column: 1 / -1; }
  .svy-r1-lbl { display: block; font-size: var(--t-label); color: var(--muted); }
  /* pre-wrap: a long answer was typed with its own line breaks and they are part of the answer */
  .svy-r1-a { font-size: var(--t-body); white-space: pre-wrap; }
  .svy-r1-a.is-blank { color: var(--muted); }
  .svy-r1-blanks { font-size: var(--t-label); color: var(--muted); margin-top: var(--s-4); }

  .svy-dollar { position: relative; }
  .svy-dollar .svy-dpfx { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; font-size: var(--t-body); }
  /* fetch-892 (Jack, 09-01, with the screenshot: the $ sitting on top of the first digit —
     "$0,000" where the 5 of 50,000 was hidden underneath it). The rule below WAS
     `.svy-dollar input`, specificity (0,1,1) — and it lost to the base field rule at
     portal.css:2331, `.field input:not([type="checkbox"]):not([type="radio"])`, which is
     (0,3,1) because :not() takes its argument's specificity, and which sets the padding
     SHORTHAND. So padding-left never applied and the input kept its 8px.
     The fix is to match that (0,3,1) exactly — the same lesson fetch-874 recorded for the
     items table. Reaching for !important here would have hidden the cause. */
  .svy-dollar input:not([type="checkbox"]):not([type="radio"]) { padding-left: 24px; width: 100%; }
  /* fetch-704 (Amanda #8): the survey's name opens its editor in a new tab — the list stays put. */
  .svy-title-a { color: inherit; text-decoration: none; }
  .svy-title-a:hover strong { text-decoration: underline; text-underline-offset: 2px; }
  .svy-addrow { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
  /* fetch-644 — WHY THE BOXES DID NOT LINE UP.
     `.fs-hint` is an inline span INSIDE the label, and `.field label` is display:block.
     A hint long enough to wrap (Venue's ran to three lines) therefore grows the LABEL,
     and every control in that grid row starts at a different y. Nothing is misaligned in
     the CSS — the label is just taller than its neighbours. Hints move BELOW the control
     instead: labels stay one line, so the controls of a row all start together.
     `.fs-hint` itself is untouched — 10 other screens use it. */
  .f-help { display: block; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted); font-size: var(--t-sub); line-height: 1.4; margin-top: var(--s-1); }
  /* fetch-644 — ONE checkbox style for the whole survey card. Active and Counts-as-recap
     carried a hand-written inline flex; Standalone carried .svy-mulbl, which fetch-638 had
     just moved to --t-body/17px. Same row, two type sizes, two box sizes, two baselines.
     .svy-chk is the single answer; the inline copies are deleted. */
  .field label.svy-chk {
    display: flex; align-items: flex-start; gap: var(--s-2);
    font-size: var(--t-sub); line-height: 1.45; font-weight: 400; text-transform: none; letter-spacing: 0;
    color: var(--muted); cursor: pointer; margin-bottom: 0; padding: var(--s-1) 0;
  }
  .field label.svy-chk input[type="checkbox"], .field label.svy-chk input[type="radio"] { flex: 0 0 auto; margin: 0; accent-color: var(--gold); margin-top: calc((1.45em - 13px) / 2); } /* fetch-863: radios too — the Teams/compose audience radios wear .svy-chk */
  /* the three switches share one full-width row instead of each taking a grid cell beside a
     labelled control — a checkbox has no label above it, so it never lined up with one */
  .svy-chkrow { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-5); }
  /* fetch-644 — the answer-type preview. Sales asked for Tave's hover thumbnail; this
     renders the REAL control instead, from the choices they have actually typed, and it
     is always visible rather than hover-only (hover does not exist on their phones).
     pointer-events:none makes the whole panel a picture — nothing here is submittable. */
  .svy-prev { border: 1px solid var(--line); border-radius: var(--r-s); background: var(--paper); padding: var(--s-2) var(--s-3) var(--s-3); }
  .svy-qform { background: var(--wash); border-radius: var(--r-s); padding: var(--s-3); margin-top: var(--s-1); }
  .svy-prev-h { font-size: var(--t-label); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s-1); }
  .svy-prev-body { pointer-events: none; user-select: none; }
  .svy-prev-body .field { margin: 0; }
  .svy-prev-note { font-size: var(--t-sub); color: var(--muted); margin-top: var(--s-2); line-height: 1.4; }
  .svy-gal { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--s-3); margin-top: var(--s-2); }
  .svy-gal .svy-prev { padding: var(--s-2); display: flex; flex-direction: column; }
  .svy-gal-pick { margin-top: auto; padding-top: var(--s-2); } /* tiles are unequal heights; the button still lands on one line */
  /* fetch-862 (Mobbin audit) — the row menu's item style, hoisted from six inline copies */
  .hddm .hddm-i { justify-content: flex-start; text-align: left; border: none; width: 100%; }
  /* U2 — the editor's settings fold: questions are the work, settings are the fold */
  .svy-setfold { border: 1px solid var(--line); border-radius: var(--r-s); padding: var(--s-2) var(--s-3); margin-top: var(--s-3); background: var(--paper); }
  .svy-setfold > summary { cursor: pointer; font-weight: 600; font-size: var(--t-body); color: var(--navy); }
  .svy-setfold > summary .muted { font-weight: 400; font-size: var(--t-sub); }
  .svy-setfold .svy-setgrid { margin-top: var(--s-2); }
  .svy-qsec { margin-top: var(--s-3); border-top: 1px solid var(--line); padding-top: var(--s-2); }
  .svy-qsec-head strong { font-size: var(--t-body); }
  .svy-qsec-empty { font-size: var(--t-sub); margin-top: var(--s-1); }
  /* U1 — the results summary: bars carry their counts in TEXT; the fill is emphasis, never
     the message (color-alone rule). Track is a quiet wash; gold stays jewelry. */
  .svy-sum-strip { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); font-size: var(--t-sub); color: var(--muted); padding-bottom: var(--s-2); border-bottom: 1px solid var(--line); }
  .svy-sum-strip strong { color: var(--ink); font-variant-numeric: tabular-nums; }
  .svy-sum-card { padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
  .svy-sum-card .pg-label { overflow-wrap: anywhere; } /* fetch-1313: a choice label may be a pasted link - the old .svy-sum-lbl broke it too */
  .svy-sum-card:last-child { border-bottom: none; padding-bottom: var(--s-1); }
  .svy-sum-q { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-1) var(--s-3); margin-bottom: var(--s-2); }
  .svy-sum-q strong { font-size: var(--t-body); }
  .svy-sum-base { font-size: var(--t-label); color: var(--muted); font-variant-numeric: tabular-nums; }
  .svy-sum-stat { font-size: var(--t-sub); }
  /* fetch-1308 (2c): a rating's average leads its card, then the five bars 5 -> 1 */
  .svy-sum-avg { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--s-1) var(--s-2); margin: 0 0 var(--s-2); }
  .svy-sum-avg-n { font-size: var(--t-title); font-weight: 700; line-height: 1; color: var(--text-heading); font-variant-numeric: tabular-nums; }
  .svy-sum-avg span { font-size: var(--t-sub); color: var(--muted); }
  .svy-sum-stat strong { font-variant-numeric: tabular-nums; }
  .svy-sum-quote { font-size: var(--t-sub); border-left: 2px solid var(--line); padding: 2px 0 2px var(--s-2); margin: var(--s-1) 0; white-space: pre-wrap; }
  .svy-sum-none { font-size: var(--t-sub); }
  .svc-duty { font-size: var(--t-sub); }
  /* fetch-1179: the Passing block on an event's Server assignments. Tokens only. */
  /* The event page strips a nested card's chrome and hides its first .row > strong (one heading owner per section),
     so this block is a SUB-section: its own h3 and one restrained rule above it. */
  .pass-card, .evt-section-body > .card.pass-card { margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--line); }
  .pass-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-2); margin-bottom: var(--s-1); }
  .pass-title { margin: 0; font-size: var(--t-body); font-weight: 700; color: var(--text-heading); }
  .pass-item { padding: var(--s-2) 0; border-top: 1px solid var(--hair); }
  .pass-name { font-size: var(--t-body); font-weight: 600; color: var(--text-heading); }
  .pass-chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1); margin-top: var(--s-1); }
  .pass-chip { display: inline-flex; align-items: center; gap: var(--s-1); min-height: var(--control-height-sm); padding: 0 var(--s-2); border: 1px solid var(--line); border-radius: var(--r-l); background: var(--wash); font-size: var(--t-sub); }
  .pass-chip--none { border-color: var(--warn-fg); background: var(--warn-bg); color: var(--warn-fg); font-weight: 600; }
  .pass-x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: var(--t-body); line-height: 1; min-width: var(--control-height-sm); min-height: var(--control-height-sm); margin-right: calc(var(--s-2) * -1); }
  .pass-x:hover, .pass-x:focus-visible { color: var(--bad-fg); }
  .pass-pick { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-2); }
  .pass-pick .sel, .pass-more .sel { min-height: var(--control-height-touch); max-width: 100%; }
  .svc-tl { display: flex; flex-direction: column; gap: 1px; font-size: var(--t-label); line-height: 1.3; }
  @media print { .svc-sheet { grid-template-columns: 1fr 1fr; gap: 10px; } .svc-card { border-color: #999; } }
  /* Menu Catalog still uses the shared prep-line item anatomy. */
  .prep-line { display: flex; gap: 9px; padding: 4px 8px; border-bottom: 1px solid #f6f3ec; align-items: baseline; }
  .prep-qty { min-width: 42px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
  .prep-item { flex: 1; min-width: 0; font-size: 13px; }
  .prep-roll { margin-top: 8px; padding: 8px 10px; background: #fffdf6; border: 1px dashed var(--gold); border-radius: 8px; font-size: 12.5px; }
  .prep-unit { font-weight: 400; font-size: var(--t-label); color: var(--muted); }
  .prep-vessel { display: inline-block; font-size: 10.5px; border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; margin-left: 6px; color: var(--muted); background: #fff; }
  .mi-spec-yes { color: var(--ok-fg); font-size: var(--t-sub); white-space: nowrap; }
  .mi-spec-no { color: var(--muted); font-size: var(--t-sub); white-space: nowrap; }
  tr[data-miopen] { cursor: pointer; }
  tr[data-miopen]:hover td { background: var(--wash); }
  /* fetch-134: planning packet */
  .pk-sec { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; background: #fff; }
  .pk-sec summary { cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--navy); }
  .pk-chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 20px; padding: 4px 10px; font-size: 12.5px; cursor: pointer; background: #fff; }
  .pk-chip:has(input:checked) { background: #f3efe2; border-color: var(--gold); }
  .pk-chip input { accent-color: var(--gold-dark, #a8853a); margin: 0; }
  .pk-upg { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 2px 0; }
  .pk-upg input { width: 60px; padding: 4px 6px; }
  /* fetch-136: long titles wrap instead of blowing out tiles (events page + calendar quick-view) */
  /* fetch-138.1: 'anywhere' shrank flex min-content to ONE CHARACTER, so greedy siblings
     (event header button row) crushed titles into a 4-char column. break-word wraps the
     same overflow cases WITHOUT changing intrinsic width. */
  .qv-title { overflow-wrap: anywhere; }
  .qv-row .v { overflow-wrap: anywhere; min-width: 0; flex: 1; }
  .card .row strong { overflow-wrap: break-word; }
  .card .row > div[style*="flex:1"] { min-width: 0; }
  .card .muted { overflow-wrap: break-word; }
  .evt-anchors a { overflow-wrap: anywhere; }
  /* ---- fetch-104: linen order print ---- */
  @media print { .linen-doc { border: none; box-shadow: none; } .linen-doc input.linen-qty { border: none; font-size: 15px; } }
  /* fetch-476: venue asset QR sheet (labels = Avery 5163-class 4in x 2in, cards = cut-apart) */
  .aqr-head { display: flex; gap: 8px; margin-bottom: 12px; align-items: center; flex-wrap: wrap; }
  .aqr-hint { font-size: 12px; }
  .aqr-sheet { background: #fff; }
  .aqr-sheet.aqr-labels { display: grid; grid-template-columns: 4in 4in; grid-auto-rows: 2in; column-gap: 0.16in; justify-content: center; }
  .aqr-label { width: 4in; height: 2in; padding: 0.14in; box-sizing: border-box; display: flex; gap: 0.14in; align-items: center; overflow: hidden; break-inside: avoid; border: 1px dashed var(--line); }
  .aqr-label .aqr-qr { flex: 0 0 auto; }
  .aqr-nm { font-weight: 700; font-size: 13px; }
  .aqr-nm--lg { font-size: 15px; }
  .aqr-sub { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
  .aqr-scan { font-size: 8.5px; letter-spacing: .08em; color: var(--muted); margin-top: 5px; }
  .aqr-sheet.aqr-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 10px; }
  .aqr-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px; text-align: center; break-inside: avoid; }
  .aqr-qr--center { display: flex; justify-content: center; margin: 8px 0; }
  @media print { .aqr-label { border: none; } .aqr-sheet.aqr-labels { column-gap: 0.16in; } .aqr-card { border-color: #999; } }
  /* fetch-477: action-item paste box */
  .stf-kw-ta { width: 100%; box-sizing: border-box; font-family: inherit; }
  /* ---- fetch-103: notification bell + panel ---- */
  /* fetch-283: .eq-seg base styles hoisted out of the phone media block (they were phone-only,
     leaving the Assets segmented control unstyled on desktop; the nested desktop rule was dead) */
  .eq-seg { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
  .rcp-ib { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-card, White); color: var(--navy); text-decoration: none; transition: .12s; } /* fetch-445: recap dept icon buttons */
  .rcp-ib:hover, .rcp-ib:focus-visible { border-color: var(--brand-blue-traditional); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
  .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } /* fetch-444: screen-reader-only page titles */
  .page-header--actions { justify-content: flex-end; margin: 0 0 8px; } /* fetch-444: actions slot without the strip */
  .ci-sprite { display: none; } /* fetch-443: the inlined symbol sprite */
  .ci { display: inline-block; vertical-align: -2px; flex: none; } /* fetch-443: Crystal icon glyphs (sprite <use>) */
  .eq-segbtn { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; padding: 9px 15px; border: 1px solid #e7dfcf; background: #fff; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--navy); cursor: pointer; white-space: nowrap; }
  .eq-segbtn.on { background: var(--navy); color: #fff; border-color: var(--navy); }
  .bellwrap { position: relative; display: inline-block; }
  .brandbar .shell-bell { display: inline-flex; align-items: center; justify-content: center; position: relative;
    width: var(--control-height-touch); min-height: var(--control-height-touch); padding: var(--s-2);
    background: transparent; color: var(--brand-pink); border-color: var(--brand-gold-mid); }
  .brandbar .shell-bell:hover { color: var(--brand-gold-light); }
  .brandbar .shell-bell .ci { width: 22px; height: 22px; }
  .bell-n { position: absolute; top: -6px; right: -7px; background: #b3261e; color: #fff; border-radius: 999px; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border: 2px solid var(--navy-dark); }
  .bell-panel { position: absolute; right: 0; top: 46px; width: min(370px, 92vw); max-height: 66vh; overflow-y: auto; background: #fff; border: 1px solid #e7dfcf; border-radius: 13px; box-shadow: 0 14px 40px rgba(36,43,66,.24); z-index: 90; text-align: left; }
  .bell-head { display: flex; justify-content: space-between; align-items: center; padding: 11px 14px; border-bottom: 1px solid #f1ede4; color: var(--navy); }
  .bell-item { padding: 10px 14px; border-bottom: 1px solid #f6f3ec; cursor: pointer; }
  .bell-item:hover { background: #fffdf8; }
  .bell-item .bi-t { font-size: 13px; color: var(--ink); }
  .bell-item.un .bi-t { font-weight: 700; }
  .bell-item.un { border-left: 3px solid var(--gold); }
  .bell-item .bi-s { font-size: 11px; color: #8a94a3; margin-top: 2px; }
  /* fetch-936: the same panel hosted in the phone's Notifications sheet - the anchored geometry comes off, the
     sheet's head carries the title, the panel's own head keeps Mark all read */
  .cse-modal .bell-panel { position: static; top: auto; right: auto; width: auto; max-height: none; border: 0; box-shadow: none; border-radius: 0; }
  .cse-modal .bell-head > strong { display: none; }
  .cse-modal .bell-head { justify-content: flex-end; } /* the title is gone from this head, so Mark all read keeps the right edge instead of drifting left */
  .cse-modal .bell-head:not(:has(#bellReadAll)) { display: none; } /* with nothing unread the head would be an empty band under the sheet's own title */
  /* fetch-102 — phone quick actions (Home) + phone declutter */
  .pq-grid { display: none; }
  @media (max-width: 640px) {
    .pq-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
    /* fetch-213 (Jack): Assets segmented control — one tidy scrollable row on phone (base styles
       moved global in fetch-283; the old nested min-width rule could never fire inside this block) */
    .eq-seg { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 3px; scrollbar-width: none; }
    .eq-seg::-webkit-scrollbar { display: none; }
    /* fetch-522 (Jack): "have a little translucence ... i dont love the stark white chips".
       They were PURE WHITE on the --bg Neutral Pink page — not merely bright, but COLD against
       warm, and the only pure-white surface on the whole screen. A 55% white now resolves to a
       warm off-white over the page: still clearly a raised surface, but in the same family as
       everything around it, and it FOLLOWS the page if --bg ever changes instead of stranding.
       NO backdrop-filter: what sits behind these is a flat colour, so a blur would cost GPU on
       every phone and change nothing visible. Translucence without the theatre.
       Shadow matches .card so the tiles read as part of the card family rather than their own.
       Three raw colour literals removed here — and note the ratchet counts literals in COMMENTS
       too, which is why this one names tokens in prose (the fetch-517 lesson, relearned). */
    .pq-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; background: rgba(255, 255, 255, .55); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 5px rgba(56, 74, 97, .06); font-size: 12.5px; font-weight: 700; color: var(--navy); cursor: pointer; }
    .pq-tile:active { background: rgba(255, 255, 255, .92); border-color: var(--brand-gold-mid); } /* presses toward solid — glass firming under the thumb */
    .pq-tile .pq-ic { font-size: 20px; }
  }
  @media (max-width: 640px) { .be-launch { display: none; } } /* fetch-105.1: booking starts from the Home tile on phones */
  @media (max-width: 560px) {
    #importBtn, #exportBtn { display: none; }   /* desktop jobs — off the phone */
    .cal-legend { display: none; }              /* reference, not reading */
    .build-evt .be-sub { display: none; }
  }
  /* ---- fetch-111: branded letterhead print (Crystal Wiki) + new sections ---- */
  .lhdoc { display: none; }
  .lh-head { background: #242b42; color: #fff; padding: 26px 34px 20px; text-align: center; }
  .lh-word { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 40px; letter-spacing: 11px; font-weight: 600; color: #c09267; }
  .lh-word span { background: linear-gradient(115deg, #8c6145, #c09267 42%, #ecd0af 58%, #c09267 74%, #8c6145); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
  .lh-sub { font-size: 10.5px; letter-spacing: 6.5px; color: #e9e2d4; margin-top: 5px; }
  .lh-rule { height: 4px; background: linear-gradient(90deg, #8c6145, #c09267, #8c6145); }
  .lh-titlebar { padding: 26px 44px 4px; }
  .lh-doc-title { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 27px; color: #242b42; font-weight: 700; line-height: 1.15; }
  .lh-doc-meta { font-size: 10.5px; letter-spacing: 1.8px; text-transform: uppercase; color: #8c6145; margin-top: 4px; }
  .lh-body { padding: 14px 44px 74px; font-size: 12.5px; line-height: 1.55; color: #1a1a1a; }
  .lh-foot { position: fixed; bottom: 0; left: 0; right: 0; text-align: center; font-size: 9.5px; letter-spacing: 2.6px; color: #8c6145; border-top: 1px solid #d8cebc; padding: 7px 0 3px; background: #fff; }
  @media print {
    body.lh-print > :not(.lhdoc) { display: none !important; }
    body.lh-print .lhdoc { display: block !important; }
    .lhdoc, .lhdoc * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  }
  .wiki-card[data-wikisec="emergency"] { border-left: 3px solid #b3423a; }
  /* P1-4 seeds — phone ergonomics that ride along free */
  @media (max-width: 720px) { .btn { min-height: 42px; } }
  /* ── fetch-501: SUMMIT PHONE BATCH — five shared primitives (Jack's screenshot batch 2026-08-15).
     Desktop is untouched; every rule below lives behind the phone breakpoint except the two
     display defaults. ── */
  .pipe-venue { max-width: 260px; margin: 0; } /* fetch-900: the Pipeline's page-level venue select; fetch-908: a cell of the filter row */
  /* ── fetch-903: DISPATCH — scope cards, the two-pane list + record, search (docs/sales-v2 r2); fetch-908: one filter row, Recent gone. ── */
  .pdx-filters { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; margin-bottom: var(--s-2); } /* the venue chips (a desktop) or the venue select (a phone), and the salesperson select */
  .pdx-venues { display: flex; gap: var(--s-1); flex-wrap: wrap; align-items: center; }
  /* fetch-914: the venue pills wear the calendar's venue color (--vc set by bindPipeline from venueColor): tinted at rest, filled when selected; All venues keeps the navy */
  .btn.pdx-vchip--venue { color: var(--vc); border-color: color-mix(in srgb, var(--vc) 45%, var(--surface-card)); background: color-mix(in srgb, var(--vc) 11%, var(--surface-card)); }
  .btn.pdx-vchip--venue.btn-primary { background: var(--vc); border-color: var(--vc); color: var(--surface-card); }
  .pdx-filters .pipe-owner-sel { display: block; margin: 0 0 0 auto; max-width: 15rem; }
  .pdx-scopes { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: var(--s-2); margin-bottom: var(--s-3); }
  .pdx-assign-bg { z-index: 620; align-items: center; padding: var(--s-4); }
  .pdx-assign-modal { max-width: 600px; max-height: 84vh; border-top: 3px solid var(--gold); }
  .pdx-assign-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-3); }
  .pdx-assign-head h2 { margin: 0; font-size: var(--t-title); line-height: 1.2; }
  .pdx-assign-close { flex: 0 0 auto; min-width: var(--control-height-touch); min-height: var(--control-height-touch); font-size: var(--t-title); line-height: 1; }
  .pdx-assign-record { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2); margin: 0; }
  .pdx-assign-modal .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
  .pdx-assign-modal .sel { width: 100%; }
  .pdx-assign-help { margin: var(--s-2) 0 0; }
  .pdx-assign-actions { margin-top: var(--s-4); }
  @media (max-width: 640px) {
    .pdx-assign-bg { align-items: flex-end; padding: 0; }
    .pdx-assign-modal { width: 100%; max-width: none; max-height: 92dvh; border-radius: var(--r-l) var(--r-l) 0 0; padding: var(--s-3); }
    .pdx-assign-modal .grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-2); }
  }
  .pdx-scope { --pipe-accent: var(--brand-stone); display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 84px; padding: var(--s-2) var(--s-3); background: var(--surface-card); border: 1px solid var(--hair); border-top: 3px solid var(--pipe-accent); border-radius: var(--r-m); text-align: left; cursor: pointer; font: inherit; color: var(--ink); }
  .pdx-scope.on { box-shadow: 0 0 0 2px var(--gold); border-color: var(--gold); }
  .pdx-scope.drop-hot { box-shadow: 0 0 0 2px var(--pipe-accent); }
  .pdx-scope-name { font-weight: 700; }
  .pdx-scope-n { font-size: 1.4em; font-weight: 800; line-height: 1.1; }
  .pdx-scope-sub { font-size: var(--t-sub); color: var(--muted); }
  .pdx-scope-def { font-size: var(--t-label); color: var(--muted); }
  .pdx-scope[data-pipescope="queue"] { --pipe-accent: var(--gold-dark); } /* fetch-1425: the "attn" scope (Needs a touch) retired */
  .pdx-scope[data-pipescope="Pending"] { --pipe-accent: var(--navy); }
  .pdx-scope[data-pipescope="Lead"] { --pipe-accent: var(--ok-fg); }
  .pdx-scope[data-pipescope="Hold"] { --pipe-accent: var(--pipe-orange); }
  .pdx-scope[data-pipescope="Tentative"] { --pipe-accent: var(--pipe-blue); }
  .pdx-scope[data-pipescope="Definite"] { --pipe-accent: var(--pipe-purple); }
  .pdx-scope--lost { --pipe-accent: var(--bad-fg); border-style: dashed; cursor: default; display: none; } /* fetch-908: Lost is a drop target, drawn only while a row is in the air */
  .pdx-scopes.is-dragging .pdx-scope--lost { display: flex; }
  .pdx-grid { display: grid; grid-template-columns: minmax(17rem, 31%) minmax(0, 1fr); gap: var(--s-3); align-items: start; } /* fetch-1023: the list is a compact index; the opened record owns the working width */
  .pdx-list, .pdx-record { min-width: 0; }
  /* fetch-1456: THE VIEW MENU (Board / Table) - one cmenu, first in the venue row; its trigger names the view it shows.
     The words ride CSS so cmenuHTML's icon trigger stays the shared primitive; the accessible name is the trigger's aria-label. */
  .pdx-view > .btn.cmenu-trigger { width: auto; gap: var(--s-1); padding: 0 var(--s-2); font-weight: 600; white-space: nowrap; }
  .pdx-view > .cmenu-trigger::after { content: "Board \25BE"; }
  .pdx-view--table > .cmenu-trigger::after { content: "Table \25BE"; }
  .pdx-view .cmenu-i[aria-current="true"] { font-weight: 700; }
  .pdx-view .cmenu-i[aria-current="true"]::after { content: "\2713"; margin-left: auto; color: var(--gold-dark); }
  /* the Table view (open or declined records): one full-width table; an opened record takes its place and keeps a Back on every width */
  .pdx-grid--solo { display: block; }
  .pdx-grid--solo .pdx-sheet-bar { display: flex; }
  .pdx-tableview .pdx-list-x { font-weight: 400; white-space: normal; }
  /* fetch-1464 (Jack 10-05, ruling 43): the box takes the height left under it in the window (--pvt-top is measured by pipeTblFit)
     and scrolls inside, both ways, so the sideways scrollbar is always on screen and the headings stay pinned while the rows
     scroll; the first useful row does not move (the box starts where it always did). A phone lifts the cap below. */
  .pvt-wrap { overflow: auto; max-height: calc(100vh - var(--pvt-top, 215px) - var(--s-4)); max-height: calc(100dvh - var(--pvt-top, 215px) - var(--s-4)); min-height: 14rem; background: var(--surface-card); border: 1px solid var(--line); border-radius: var(--r-m); } /* dvh where it exists: a tablet's browser bar then never covers the scrollbar; the vh line is the fallback */
  .pvt { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--t-sub); }
  .pvt th, .pvt td { padding: var(--s-1) var(--s-2); border-bottom: 1px solid var(--hair); text-align: left; white-space: nowrap; vertical-align: middle; }
  .pvt th { position: sticky; top: 0; z-index: 2; background: var(--wash); color: var(--navy); font-weight: 600; }
  .pvt th.num, .pvt td.num { text-align: right; font-variant-numeric: tabular-nums; }
  .pvt th:first-child, .pvt td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface-card); border-right: 1px solid var(--hair); }
  .pvt th:first-child { z-index: 3; background: var(--wash); }
  /* the Columns menu and the Excel export beside the Open / Declined pair; the export's answer sits right after the button */
  .pdx-tbl-tools { display: inline-flex; align-items: center; gap: var(--s-1); flex: 0 0 auto; }
  .pdx-search .pdx-tbl-tools .btn.icon-btn { width: auto; min-width: var(--control-height-sm); height: var(--control-height-sm); min-height: var(--control-height-sm); } /* as tall as the compact search bar, so the first row keeps its place */
  .pdx-cols > .btn.cmenu-trigger { width: auto; gap: var(--s-1); padding: 0 var(--s-2); font-weight: 600; white-space: nowrap; }
  .pdx-cols > .cmenu-trigger::after { content: "Columns \25BE"; font-size: var(--t-sub); font-weight: 600; }
  .pdx-cols--some > .cmenu-trigger::after { color: var(--gold-dark); }
  .pdx-cols .cmenu-list { max-height: min(70vh, 34rem); overflow-y: auto; } /* nineteen columns: the list scrolls inside a window-sized box rather than running off the screen */
  .pdx-cols .cmenu-i[aria-current="false"] { padding-left: calc(var(--s-2) + 18px + var(--s-2)); color: var(--muted); }
  .pdx-tbl-msg { font-size: var(--t-sub); }
  .pdx-tbl-msg--ok { color: var(--ok-fg); }
  .pdx-tbl-msg--err { color: var(--bad-fg); }
  .pdx-tbl-msg--busy { color: var(--muted); }
  .pvt tbody tr:last-child td { border-bottom: 0; }
  .pvt-row { cursor: pointer; }
  .pvt-row:hover td { background: var(--wash); }
  .pvt-open { display: block; max-width: 18rem; min-height: var(--control-height-sm); padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--navy); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
  .pvt .vchip { flex-wrap: nowrap; white-space: nowrap; }
  .pvt-c--clip { max-width: 16rem; overflow: hidden; text-overflow: ellipsis; }
  /* the shared sortable header (colSortThHTML) and the phone's Sort select (colSortPickHTML) */
  .col-sort { display: inline-flex; align-items: center; gap: var(--s-1); min-height: var(--control-height-sm); margin: 0; padding: 0; border: 0; background: transparent; font: inherit; font-weight: 600; color: inherit; text-align: left; white-space: nowrap; cursor: pointer; }
  .col-sort-mark { color: var(--muted); }
  .col-sort-mark::after { content: "\2195"; }
  [aria-sort="ascending"] .col-sort-mark::after { content: "\2191"; }
  [aria-sort="descending"] .col-sort-mark::after { content: "\2193"; }
  [aria-sort="ascending"] .col-sort-mark, [aria-sort="descending"] .col-sort-mark { color: var(--gold-dark); }
  .col-sortpick { display: none; }
  @media (max-width: 640px) {
    .col-sortpick { display: grid; gap: var(--s-1); flex: 1 0 100%; font-size: var(--t-sub); font-weight: 600; color: var(--muted); }
    .col-sortpick .sel { width: 100%; min-height: var(--control-height-touch); }
    .pvt-wrap { overflow: visible; max-height: none; min-height: 0; background: none; border: 0; }
    .pvt, .pvt tbody { display: block; }
    .pdx-tbl-tools { flex: 1 0 100%; }
    .pdx-search .pdx-tbl-tools .btn.icon-btn { height: var(--control-height-touch); min-height: var(--control-height-touch); min-width: var(--control-height-touch); } /* 44px targets on a phone */
    .pdx-tbl-msg { flex: 1 0 100%; }
    .pvt thead { display: none; }
    .pvt-row { display: flex; flex-wrap: wrap; gap: 2px var(--s-3); margin-bottom: var(--s-2); padding: var(--s-1) var(--s-3) var(--s-2); background: var(--surface-card); border: 1px solid var(--line); border-radius: var(--r-m); }
    .pvt th, .pvt td { display: none; padding: 0; border: 0; white-space: normal; }
    .pvt td.pvt-c--ph { display: block; position: static; border: 0; max-width: 100%; }
    .pvt td.pvt-c--ph:empty { display: none; }
    .pvt td.pvt-c--ph:first-child { flex: 1 0 100%; }
    .pvt td.pvt-c--ph:not(:first-child)::before { content: attr(data-l) ": "; color: var(--muted); }
    .pvt-row:hover td { background: none; }
    .pvt-open { max-width: 100%; min-height: var(--control-height-touch); font-size: var(--t-body); }
  }
  @media print {
    .pvt-wrap { max-height: none; overflow: visible; } /* fetch-1464: paper gets every row, as it did before the cap */
    .pvt th, .pvt td, .pvt th:first-child, .pvt td:first-child { position: static; }
    .pdx-tbl-tools, .col-sortpick { display: none; }
  }
  /* ── fetch-904: THE RECORD PAGE — r2's three columns (rail · log · rail) inside the Pipeline's pane; below 1480px the page takes the width. ── */
  .pdx-rec-head { display: flex; gap: var(--s-3); align-items: flex-start; margin-bottom: var(--s-3); }
  .pdx-rec-back { flex: 0 0 auto; }
  .pdx-rec-title { flex: 1; min-width: 0; }
  .pdx-rec-badges { display: flex; gap: var(--s-1); flex-wrap: wrap; align-items: center; }
  .pdx-rec-h { margin: 2px 0; font-size: var(--t-title); line-height: 1.2; }
  .pdx-rec-sub { font-size: var(--t-sub); }
  .pdx-rec-acts { flex: 0 0 auto; justify-content: flex-end; }
  /* ── fetch-916: THE RECORD CARD — the tabs, the head and the level's body in one card (r2's record-head); the head's hair line only when something follows it. ── */
  .pdx-rec-card { padding: var(--s-3) var(--s-4) var(--s-4); } /* fetch-1009: no level tabs - the head is the card's first row on every width */
  .pdx-rec-card > .pdx-rec-head { margin: 0 0 var(--s-3); padding-bottom: var(--s-3); border-bottom: 1px solid var(--hair); }
  .pdx-rec-card > .pdx-rec-head:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
  .pdx-rec-card .pdx-details { margin: 0; }
  .pdx-rec-card .pdx-move, .pdx-rec-card .inq-decline, .pdx-rec-card .pdx-stage { margin: 0 0 var(--s-3); } /* fetch-1420: the stage-move confirm opens on the record, under its menu */
  /* fetch-1453: Copy to venue - the venue is a pressed chip in the calendar's colour; Also at is a row of doors; the booked prompt lists the other copies */
  .pdx-copy-venues { display: flex; flex-wrap: wrap; gap: var(--s-2); }
  .pdx-copy-v, .pdx-copy .actions .btn { min-height: var(--control-height-touch); }
  .pdx-copy-v[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--navy); background: var(--wash); } /* pressed is a ring, not a fill: the venue keeps its own colour on a light ground */
  .pdx-copy-link { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2); width: 100%; min-height: var(--control-height-touch); padding: 0; border: 0; background: transparent; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
  .pdx-copyb-row { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2) var(--s-3); padding: var(--s-3) 0; border-top: 1px solid var(--hair); }
  .pdx-copyb-what { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2); flex: 1 1 12rem; min-width: 0; }
  .pdx-copyb-row .btn { min-height: var(--control-height-touch); }
  .pdx-copyb-row .pdx-field-err { flex-basis: 100%; }
  .pdx-copyb-row .pdx-field-err:empty, .pdx-copy .pdx-field-err:empty { display: none; }
  /* fetch-1458: THE EMAIL-SCRIPT EDITOR (Amanda round F) - a body-level dialog: the ten scripts as a list beside one editor
     (a select on a phone), the venue chips in the calendar's colours, the fill-in chips, a live preview, and the answer
     beside Save. The door is one small button in the Next steps head. Tokens only. */
  .esx-door { display: inline-flex; align-items: center; gap: var(--s-1); flex: 0 0 auto; }
  .esx.cse-modal { max-width: 1000px; }
  .esx.cse-modal:focus { outline: none; } /* the dialog takes focus when it opens so its name is announced; it is not itself a control */
  .esx-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: var(--s-5); }
  .esx-list { display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line); padding-right: var(--s-3); }
  .esx-group { font-size: var(--t-label); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: var(--s-3) 0 var(--s-1); }
  .esx-group:first-child { margin-top: 0; }
  .esx-item { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-height: 36px; padding: var(--s-2) var(--s-3); border: 0; border-radius: var(--r-s); background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
  .esx-item:hover { background: var(--wash); }
  .esx-item.on { background: var(--wash); box-shadow: inset 2px 0 0 var(--gold); } /* the selected script: a fine gold rule, not a fill */
  .esx-item-name { font-size: var(--t-body); font-weight: 600; }
  .esx-item-meta { font-size: var(--t-sub); color: var(--muted); }
  .esx-pick { display: none; width: 100%; }
  .esx-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--s-2); }
  .esx-h strong { font-size: var(--t-section); }
  .esx-venues { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-1) var(--s-2); margin: var(--s-3) 0 var(--s-1); }
  .esx-lab { margin-right: var(--s-1); font-size: var(--t-sub); color: var(--muted); }
  .esx-v { display: inline-flex; align-items: center; gap: var(--s-2); padding: 4px 12px; border-radius: 999px; }
  .esx-v[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--navy); background: var(--wash); } /* pressed is a ring, not a fill: the venue keeps its own colour */
  .esx-v .vchip { color: var(--ink); } /* on a control the name is ink and the dot carries the venue's colour: Crane Bay's yellow is not a reading colour on white */
  .esx-own { font-size: var(--t-label); color: var(--muted); }
  .esx-state { margin: 0; font-size: var(--t-sub); color: var(--muted); }
  .esx .field { margin-top: var(--s-3); }
  .esx-input, .esx-body { box-sizing: border-box; width: 100%; padding: var(--s-2) var(--s-3); border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface-card); font: inherit; font-size: var(--t-body); color: var(--ink); }
  .esx-body { min-height: 190px; line-height: 1.5; resize: vertical; }
  .esx-fill { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-1) var(--s-2); margin-top: var(--s-2); }
  .esx-chip { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--wash); font: inherit; font-size: var(--t-sub); color: var(--ink); cursor: pointer; }
  .esx-prev { margin-top: var(--s-4); padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--wash); }
  .esx-prev-h { font-size: var(--t-label); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); overflow-wrap: anywhere; }
  .esx-prev-s { margin-top: var(--s-2); font-size: var(--t-body); font-weight: 700; overflow-wrap: anywhere; }
  .esx-prev-b { margin-top: var(--s-2); font-size: var(--t-body); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
  .esx-long { margin-top: var(--s-2); font-size: var(--t-sub); color: var(--warn-fg); }
  .esx-long:empty { display: none; }
  .esx-foot { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }
  .esx-msg { flex: 1 1 100%; min-width: 0; font-size: var(--t-sub); color: var(--ok-fg); text-align: right; } /* the answer: its own line, right above the buttons */
  .esx-msg:empty { display: none; }
  .esx-msg.err { color: var(--bad-fg); }
  .esx-ask { flex: 1 1 100%; margin: 0; font-size: var(--t-body); }
  .esx-end { margin-left: auto; } /* Close / Cancel and Save sit at the right; Reset, when there is one, at the left */
  @media (max-width: 720px) {
    .esx-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
    .esx-list { display: none; }
    .esx select.esx-pick { display: block; min-height: var(--control-height-touch); } /* select.sel's own 36px floor is the stronger selector */
    .esx-h strong { display: none; } /* the select above already names the script */
    .esx-door, .esx-v, .esx-chip, .esx-foot .btn { min-height: var(--control-height-touch); }
    .esx-chip { padding-inline: var(--s-3); }
    .esx-input, .esx-body { font-size: 1rem; } /* a phone never zooms into a field that holds 1rem */
  }
  /* fetch-1153: the Customer portal panel on the Pipeline record. It borrows the Clients page's portal rows and invite form (the same
     class names, the same doors behind them); the field and action-row rules there are scoped to .cl-record, so they are restated
     here for this one panel - tokens only. Inputs hold 1rem so a phone never zooms into them; every press is a touch target. */
  .pdx-rec-card .pdx-portal { margin: 0 0 var(--s-3); }
  .pdx-portal p { margin: var(--s-2) 0 0; line-height: 1.5; }
  .pdx-portal .cl-portal-row:first-of-type { margin-top: var(--s-2); }
  .pdx-portal .cl-filter-field { display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; color: var(--text-heading); font-size: var(--t-sub); font-weight: 600; line-height: 1.5; }
  .pdx-portal .cl-filter-field input { width: 100%; min-width: 0; min-height: var(--control-height-touch); padding: var(--s-2); border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface-card); color: var(--ink); font: inherit; font-size: max(var(--t-body), 1rem); font-weight: 400; }
  .pdx-portal .cl-outreach-actions, .pdx-portal .actions { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; } /* .actions does not wrap by default: on a phone "Open <client> on Clients" pushed Close off the card's edge (seen in the first phone shot) */
  .pdx-portal .btn { min-height: var(--control-height-touch); }
  .pdx-rec-grid { display: grid; grid-template-columns: minmax(15rem, 18rem) minmax(0, 1fr) minmax(15rem, 18rem); gap: var(--s-3); align-items: start; }
  .pdx-rec-grid--log { grid-template-columns: minmax(0, 1fr) minmax(15rem, 18rem); } /* fetch-910: the left rail retired - the timeline and the right rail */
  /* fetch-1023: Inquiry/Lead records are one card. Their task/log/related regions are flat sections, not nested cards or a second rail. */
  .pdx-rec-card > .pdx-rec-grid--integrated { display: block; margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--hair); }
  .pdx-rec-grid--integrated .pdx-rec-main, .pdx-rec-grid--integrated .pdx-rail--right { display: block; }
  .pdx-section { min-width: 0; margin: 0; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
  .pdx-section + .pdx-section, .pdx-rec-grid--integrated .pdx-rail--right > .pdx-section { margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--hair); }
  .pdx-section-head { align-items: flex-start; margin-bottom: var(--s-2); }
  .pdx-related-empty { display: none; }
  .pdx-rail .pln-grid { grid-template-columns: minmax(0, 1fr); } /* fetch-1009: a booked record's Planning checklist stacks in the rail */
  @media (max-width: 1199px) { .pdx-record .pdx-rec-grid--log { grid-template-columns: minmax(0, 1fr); } .pdx-record .pdx-rail--right { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); align-items: start; } .pdx-record .pdx-rail--right .card { margin-bottom: 0; } } /* fetch-1009: beside the list the pane is narrow below 1200 - the rail drops under the log as two columns of cards */
  .evt-tabs { margin-bottom: var(--s-3); }
  .pdx-rail, .pdx-rec-main { min-width: 0; }
  .pdx-prop { padding: var(--s-1) 0; border-top: 1px solid var(--hair); }
  .card-kicker + .pdx-prop { border-top: 0; }
  .pdx-prop-l { display: block; font-size: var(--t-label); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
  .pdx-prop-v { display: block; margin-top: 2px; font-weight: 600; overflow-wrap: anywhere; }
  .pdx-log-tools { display: flex; gap: var(--s-1); flex-wrap: wrap; align-items: center; margin-bottom: var(--s-2); }
  .pdx-log-q { flex: 1 1 160px; min-width: 0; min-height: 36px; padding: 0 var(--s-2); border: 1px solid var(--hair); border-radius: var(--r-s); font: inherit; background: var(--surface-card); color: var(--ink); }
  .pdx-rel { display: block; width: 100%; padding: var(--s-1) 0; border: 0; border-top: 1px solid var(--hair); background: transparent; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
  .card-kicker + .pdx-rel { border-top: 0; }
  .pdx-rel-sub { display: block; }
  /* ── fetch-905: THE PHONE SHEET + THE QUICK-ACTION RAIL — a sticky bar and three segments on a phone; the rail above Sales status on a desktop. ── */
  .pdx-sheet-bar { display: none; align-items: center; gap: var(--s-2); min-height: 44px; margin-bottom: var(--s-2); } /* fetch-908: the phone's; a desktop has no back button. fetch-1009: the two level tabs are gone too - the record is one page */
  .pdx-sheet-title { display: none; }
  .pdx-segs { display: none; }
  /* ── fetch-908: r2's facts grid and the More fold; fetch-1009: the pane keeps its place beside the list and the log sits under the head, beside the rail. ── */
  .pdx-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3) var(--s-4); }
  .pdx-fact { min-width: 0; }
  .pdx-fact-l { font-size: var(--t-label); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
  .pdx-fact-v { font-weight: 600; overflow-wrap: anywhere; }
  .pdx-fact-v.is-empty { color: var(--muted); font-weight: 500; }
  .pdx-more { margin-top: var(--s-3); border-top: 1px solid var(--hair); padding-top: var(--s-2); }
  .pdx-more summary { cursor: pointer; color: var(--navy); font-weight: 600; }
  .pdx-facts--more { margin-top: var(--s-2); }
  .pdx-facts-h { margin-bottom: var(--s-2); }
  .pdx-edit .pdx-fact-v input:not([type="checkbox"]), .pdx-edit .pdx-fact-v select { width: 100%; box-sizing: border-box; min-height: 36px; font: inherit; }
  .pdx-edit .inq-check { display: block; margin-top: var(--s-1); font-weight: 500; }
  /* fetch-1420 (Amanda's 10-01 note): Notes and the Decline box span the grid; an inquiry's notes sit open under the facts */
  .pdx-fact--wide { grid-column: 1 / -1; }
  label.pdx-fact-l { display: block; }
  .pdx-edit .pdx-fact-v textarea { width: 100%; box-sizing: border-box; min-height: 6rem; font: inherit; resize: vertical; }
  .pdx-decline { border-top: 1px solid var(--hair); padding-top: var(--s-2); }
  .pdx-notes { margin-top: var(--s-3); }
  /* fetch-1451 (Amanda's row 11): the alternate dates editor - the dates as chips with their own remove, then the Add box on
     the same line (it wraps under them when there is no room). Global: the inquiry page's form draws it outside .pdx-edit. */
  .inq-alt-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
  .inq-alt-list { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); }
  .inq-alt-chip { display: inline-flex; align-items: center; gap: var(--s-1); min-height: var(--control-height-icon); padding-left: var(--s-3); border: 1px solid var(--line); border-radius: 999px; background: var(--wash); color: var(--ink); font-size: var(--t-body); font-weight: 600; box-sizing: border-box; }
  .inq-alt-chip .btn.icon-btn { border-radius: 999px; }
  .inq-alt-add { display: flex; align-items: center; gap: var(--s-2); }
  .inq-alt .inq-alt-add input[type="date"] { flex: 0 1 11rem; width: 11rem; min-width: 0; max-width: 100%; }
  .inq-alt-hint { margin-top: var(--s-1); }
  .inq-alt-hint:empty { display: none; }
  /* fetch-1466 (Amanda's 10-02 row 23, Jack's ruling 47): the inquiry record's details are always fields. The Save bar sits at the foot of
     the grid and stays at the window's bottom edge while the grid is taller than the window (sticky; a phone's rail is cleared); it is
     empty - and gone - while the fields match the record. Alternate dates sit beside Event date and Proposal on three columns and take
     the line on two (fetch-1451's evdate rule, moved onto the alternates cell). */
  @media (max-width: 1099px) { .pdx-edit .pdx-fact--alt { grid-column: 1 / -1; } }
  .pdx-savebar { position: sticky; bottom: 0; z-index: 2; margin-top: var(--s-2); padding: var(--s-2) 0; background: var(--surface-card); border-top: 1px solid var(--hair); }
  .pdx-savebar:empty { display: none; }
  .pdx-savebar-row, .pdx-savebar-ask { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
  .pdx-savebar-ask > div:first-child { flex-basis: 100%; }
  .pdx-savebar-ok { font-weight: 600; color: var(--ok-fg); }
  .pdx-savebar-err { font-weight: 600; color: var(--bad-fg); }
  .pdx-facts-ro { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--s-2) var(--s-4); margin-left: auto; } /* the read-only facts beside the kicker: Originally requested, Also at, Quoted value, Contact */
  .pdx-facts-ro .pdx-fact { min-width: 0; }
  @media (max-width: 640px) { body:has(.pdx-savebar:not(:empty)) .crystal-page-guide__dock { display: none; } } /* while something is unsaved the Save bar owns the phone's bottom edge; Crystal's suggestion pill steps aside and returns when the fields are clean */
  @media (max-width: 900px) { body.has-rail .pdx-savebar { bottom: calc(var(--control-height-touch) + var(--s-3) + var(--s-3) + env(safe-area-inset-bottom, 0px)); } } /* above the phone's bottom rail - the .ver-pill formula */
  @media (max-width: 640px) { .pdx-edit .pdx-fact-v input:not([type="checkbox"]), .pdx-edit .pdx-fact-v select, .pdx-savebar .btn { min-height: var(--control-height-touch); } } /* design rule 16: a phone's fields and the bar's buttons are 44px targets */
  .pdx-field-err { margin-top: var(--s-1); font-size: var(--t-sub); color: var(--bad-fg); }
  .pdx-field-err:empty { display: none; }
  .pdx-lost { margin: 0 0 var(--s-3); }
  .cl-dock { display: flex; flex-direction: column; } /* fetch-910: ONE line until focus, everywhere - the kinds, the next-touch chips and the More fold follow the line */
  .cl-dock > .cl-dock-row:first-child { display: none; order: 2; }
  .cl-dock--on > .cl-dock-row:first-child { display: flex; }
  .cl-dock-row--line { margin-top: 0; order: 1; }
  .cl-dock-row--touch { order: 3; }
  .cl-dock-row--more { order: 4; display: none; }
  .cl-dock--on .cl-dock-row--more { display: flex; }
  .cl-dock-more { order: 5; display: grid; gap: var(--s-2); margin-top: var(--s-2); }
  .cl-dock .cl-dock-details { width: 100%; box-sizing: border-box; min-height: 4.5rem; padding: var(--s-2); font: inherit; resize: vertical; }
  .cl-dock-row--meta { margin-top: 0; }
  .cl-dock-meta { display: grid; gap: 2px; }
  .cl-dock-meta--by { flex: 1 1 12rem; }
  .cl-dock-hint { order: 6; }
  .cl-dock-offer { order: 1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-top: var(--s-2); padding: var(--s-2); border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface-card); } /* fetch-1425: Move to Pending, under the line that was just logged */
  .cl-dock-offer-t { flex: 1 1 14rem; min-width: 0; font-size: var(--t-sub); color: var(--ink); }
  @media (max-width: 720px) { .cl-dock-offer .btn { min-height: var(--control-height-touch); } } /* fetch-1425: 44px on a phone */
  .pdx-search { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; margin-bottom: var(--s-2); } /* fetch-921 (Jack: "can the oldest/hottest move to beside the queue search bar"): the search and the Queue's sort share one bar; a narrow phone wraps the pair under the input */
  .pdx-search-in { flex: 1 1 9rem; min-width: 0; box-sizing: border-box; min-height: var(--control-height-sm); padding: 0 var(--s-2); border: 1px solid var(--hair); border-radius: var(--r-m); font: inherit; background: var(--surface-card); color: var(--ink); }
  .pdx-search .pdx-list-tools .btn { min-height: var(--control-height-sm); padding-top: 0; padding-bottom: 0; } /* fetch-1023: the pair stands as tall as the compact input, so the bar reads as one control */
  .pdx-list-h { display: flex; align-items: center; gap: var(--s-2); flex-wrap: nowrap; min-height: 32px; margin: var(--s-2) 0 var(--s-1); color: var(--ink); font-size: var(--t-body); } /* fetch-919: the scope, its count and the sort on ONE line; fetch-921: the sort moved into the search bar - the header is the title and its count */
  .pdx-list-t { white-space: nowrap; }
  .pdx-list-n, .pdx-list-x { color: var(--muted); font-weight: 600; white-space: nowrap; }
  .pdx-list-tools { margin-left: auto; display: inline-flex; gap: 0; flex: 0 0 auto; } /* fetch-914: the Queue's sort - Oldest first / Hottest first; fetch-919: a segmented pair; fetch-921: at the right end of the search bar */
  .pdx-list-tools .btn { border-radius: 0; white-space: nowrap; }
  .pdx-list-tools .btn:first-child { border-radius: var(--r-s) 0 0 var(--r-s); }
  .pdx-list-tools .btn + .btn { margin-left: -1px; border-radius: 0 var(--r-s) var(--r-s) 0; } /* fetch-914: the Queue's sort - Oldest first / Hottest first */
  @media (min-width: 641px) { .pdx-list { position: sticky; top: var(--s-3); } .pdx-list-body { max-height: min(calc(var(--pdx-list-rows, 10) * var(--pdx-row-h, 4.2rem)), calc(100vh - 12rem)); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; } } /* fetch-913 (Jack: "a box of 10 or so inquiries in view and you can scroll within the box"): the list is a box of about ten rows that scrolls inside itself and stays in view beside the record - the page no longer grows with the list. Below 641px the list is the page (the record replaces it). */
  .pdx-row { position: relative; display: flex; align-items: center; gap: var(--s-2); padding: var(--s-1) var(--s-2); border: 1px solid var(--hair); border-radius: var(--r-m); background: var(--surface-card); margin-bottom: var(--s-1); cursor: pointer; }
  .pdx-row.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
  .pdx-row--draft { border-left: 3px solid var(--info-fg); } /* fetch-1252: an emailed inquiry waiting for a decision, marked on the row's edge and in its badge */
  .pdx-draft .pdx-draft-quote span { font-style: normal; }
  .pdx-draft .pdx-draft-quote { font-style: italic; }
  .pdx-draft .pdx-draft-raw { white-space: pre-wrap; overflow: auto; max-height: 16rem; margin-top: var(--s-1); padding: var(--s-2); background: var(--wash); border-radius: var(--r-s); font-size: var(--t-sub); }
  .pdx-row:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
  .pdx-row-main { flex: 1; min-width: 0; }
  .pdx-row-title { font-weight: 700; }
  .pdx-list-body .pdx-row-title { font-size: var(--t-body); } /* fetch-919 took the title a step up; fetch-921 (Jack: "the Queue tiles got a little bit too large") brings it back to body size - the sub line keeps 919's --t-mid, so the row lands a half step between 5.498 and 5.499 */
  @media (min-width: 641px) {.pdx-list-body .pdx-row-title, .pdx-list-body .pq-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } } /* fetch-1023: the narrower desktop navigation tile stays one title + one sub-line; phones keep wrapping requested venues, the open record carries the full facts, and aria-describedby keeps the complete line for assistive tech */
  .pdx-list-body .pq-sub { font-size: var(--t-mid); }
  /* fetch-913: the strength as a flame in the row's corner (leadFlame); cold = Unqualified: no flame. The label rides the title and a screen-reader span.
     fetch-1011 (Jack, 09-09: "Color coded for each venue (Red/yellow/blue/green) - Flames: 3 fills (Full/shaded/no fill) - each venue has its own color flame filled in according to the strength"):
     the COLOUR is the venue's - leadFlame sets the svg's color attribute from VENUE_COLORS, the calendar's (Roof red, Crane Bay yellow, Heirloom green, Off Premise blue; stone for no venue) -
     and the FILL is the strength: Strong full (with the glow and the slow flicker), Medium a lighter tint of the venue colour (Jack: "lighter tint"), Weak the outline only. Every rule reads
     currentColor, so no hex lives here. fetch-921's three-golds heat rail on the row's edge and the lit core are retired: the flame carries both facts, the venue chip beside the date names
     the venue in words, and the title, the sr-only text and the record head's badge keep the score - colour never carries the meaning alone. data-heat stays on the row as the hook. */
  .pdx-flame { position: absolute; top: var(--s-2); right: var(--s-2); line-height: 0; }
  .pdx-row--acts .pdx-flame { top: calc(var(--s-2) + 3px); } /* fetch-921: centred on the rail's line (24px) rather than hung from the row's top */
  .pdx-flame svg { display: block; width: 18px; height: 18px; overflow: visible; transform-origin: 50% 100%; }
  .pdx-flame-body { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; } /* warm (Weak): the outline in the venue's colour */
  .pdx-flame-multi-body { stroke-width: 1.6; stroke-linejoin: round; }
  .pdx-row[data-heat="hot"] .pdx-flame-body { fill: color-mix(in srgb, currentColor 42%, white); } /* hot (Medium): a lighter tint of the venue's colour */
  .pdx-row[data-heat="blazing"] .pdx-flame-body { fill: currentColor; } /* blazing (Strong): the full venue colour, a soft glow and a slow flicker */
  .pdx-row[data-heat="blazing"] .pdx-flame svg { filter: drop-shadow(0 0 3px color-mix(in srgb, currentColor 55%, transparent)); animation: pdxBlaze 1.9s ease-in-out infinite alternate; }
  .pdx-row[data-heat="blazing"] .pdx-flame--multi svg { filter: drop-shadow(0 0 3px color-mix(in srgb, var(--muted) 30%, transparent)); }
  @keyframes pdxBlaze { from { transform: scale(1); opacity: .86; } to { transform: scale(1.07); opacity: 1; } }
  @media (prefers-reduced-motion: reduce) { .pdx-row[data-heat="blazing"] .pdx-flame svg { animation: none; } }
  .pdx-row[data-heat] .pdx-row-title { padding-right: 28px; } /* the 18px flame and its 8px inset */
  /* fetch-916 pass two: the Queue row's quick actions — three icon doorways at the row's right; the flame keeps its corner (the rail leaves it a column). */
  .pdx-row-acts { display: flex; align-self: center; justify-content: center; flex: 0 0 auto; gap: var(--s-1); margin: 0 var(--s-6) 0 var(--s-1); } /* fetch-1023: a dedicated rail centers the quick actions vertically on the tile; the trailing space belongs to the flame */
  .pdx-qa { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; min-height: 1.5rem; padding: 0; color: var(--navy); } /* fetch-921 (Jack: "the quick action icons in the queue are not centered within their boxes"): the buttons no longer wear .btn--xs, whose 4px 10px padding out-ranked this padding: 0 and pushed every icon 10px to the right; a half step smaller too */
  .pdx-row--acts .pdx-row-title { line-height: 1.5rem; } /* the title line is as tall as the rail beside it, so the sub line runs the full width beneath and the row stays one title + one line; fetch-921: the Queue row fits the box's 4.2rem default again, so the :has() override of fetch-918 is gone */
  .pdx-qa .ci { display: block; }
  .pdx-rec-acts .btn { min-height: var(--control-height-sm); } /* fetch-916 pass two: the head's toolbar is compact — the Queue rows carry the verbs */
  .pdx-menu { position: relative; } /* fetch-919: the head's Actions menu - .hddm anchors to it */
  .pdx-menu-trigger { display: inline-flex; align-items: center; justify-content: center; width: var(--control-height-sm); min-width: var(--control-height-sm); height: var(--control-height-sm); padding: 0; list-style: none; }
  .pdx-menu-trigger::-webkit-details-marker { display: none; }
  @media (min-width: 641px) { .pdx-rec-acts .pdx-menu > .btn.cmenu-trigger { width: var(--control-height-sm); min-width: var(--control-height-sm); height: var(--control-height-sm); min-height: var(--control-height-sm); } } /* fetch-1457: the head's menu is cmenuHTML now; its trigger keeps the head's compact size on a desktop (fetch-918), 44px on a phone */
  .pdx-action-sheet { margin: 0 0 var(--s-3); } .pdx-action-sheet > .card { margin-bottom: 0; } /* fetch-919: the Action Items composer in place under the head */
  .vchip--plain { background: transparent; border-color: transparent; padding: 0; } /* fetch-913: the venue as a dot and a name inside a row - the pill was one of four */
  /* fetch-1016, Jack's review: each requested venue uses the familiar colored dot and name. */
  .pdx-requested-venues { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-3); max-width: 100%; vertical-align: middle; }
  .pdx-requested-venues > [data-requested-venue] { min-width: 0; }
  .pdx-requested-venues .vchip { flex-wrap: nowrap; }
  .pdx-requested-unknown { min-width: 0; overflow-wrap: anywhere; color: var(--muted); font-size: var(--t-sub); }
  .pdx-group-h { display: flex; align-items: center; gap: var(--s-1); margin: var(--s-2) 0 var(--s-1); font-weight: 700; }
  .pdx-group-h .cal-dot { background: var(--brand-stone); }
  .pdx-group-h .cal-dot[data-stage="Pending"] { background: var(--navy); }
  .pdx-group-h .cal-dot[data-stage="Lead"] { background: var(--ok-fg); }
  .pdx-group-h .cal-dot[data-stage="Hold"] { background: var(--pipe-orange); }
  .pdx-group-h .cal-dot[data-stage="Tentative"] { background: var(--pipe-blue); }
  .pdx-group-h .cal-dot[data-stage="Definite"] { background: var(--pipe-purple); }
  .pdx-group-h .cal-dot[data-stage="queue"] { background: var(--gold-dark); } /* fetch-1037: The Queue's search group */
  @media (min-width: 641px) { .pipe-venue { display: none; } }
  @media (max-width: 640px) {
    .pdx-venues { display: none; }
    .pdx-scopes { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: var(--s-1); }
    .pdx-scope { flex: 0 0 136px; }
    .pdx-grid { display: block; }
    .pdx-grid.pdx-open .pdx-list { display: none; }
    .pdx-grid:not(.pdx-open) .pdx-record { display: none; }
  }
  @media (max-width: 1099px) { .pdx-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pdx-rec-grid { grid-template-columns: minmax(14rem, 16rem) minmax(0, 1fr); } .pdx-rail--right { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); align-items: start; } .pdx-rail--right .card { margin-bottom: 0; } } /* fetch-904: r2's mid width - two columns, the right rail below as three cards */
  @media (max-width: 1099px) { .pdx-rec-grid--log { grid-template-columns: minmax(0, 1fr); } }
  @media (max-width: 1199px) { .pdx-record .pdx-rec-grid--integrated .pdx-rail--right { display: block; } } /* fetch-1023: the inquiry's final Related section stays full-width; only booked/event rails become card grids */
  @media (max-width: 640px) { .pdx-rec-head { flex-direction: column; align-items: stretch; } .pdx-rec-acts { justify-content: flex-start; } .pdx-rec-grid { display: block; } .pdx-rail--right, .pdx-record .pdx-rail--right { display: block; } .pdx-rail--right .card, .pdx-record .pdx-rail--right .card { margin-bottom: 10px; } } /* fetch-904: a phone stacks the columns; ticket 3 makes the sheet */
  @media (max-width: 640px) {
    .pdx-sheet-bar { position: sticky; top: 0; z-index: 6; display: flex; background: var(--bg); border-bottom: 1px solid var(--hair); margin-bottom: 0; }
    .pdx-sheet-title { display: block; flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .pdx-segs { display: flex; position: sticky; top: 44px; z-index: 6; gap: var(--s-1); padding: var(--s-1) 0 var(--s-2); margin-bottom: var(--s-3); background: var(--bg); }
    .pdx-seg { flex: 1; min-height: 40px; border: 1px solid var(--hair); border-radius: var(--r-m); background: var(--surface-card); font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; }
    .pdx-seg.on { background: var(--navy); color: var(--surface-card); border-color: var(--navy); }
    .pdx-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pdx-menu .hddm { left: 0; right: auto; } /* fetch-919: the head menu opens under its left-aligned summary on a phone */
    .pdx-row--acts { flex-wrap: wrap; } .pdx-row-main { display: flex; flex-direction: column; flex-basis: 100%; } .pdx-row-acts { order: 9; justify-content: center; width: 100%; margin: var(--s-1) 0 0; } .pdx-qa { width: var(--control-height-touch); min-height: var(--control-height-touch); } .pdx-rec-acts .btn { min-height: var(--control-height-touch); } .pdx-menu-trigger { width: var(--control-height-touch); min-width: var(--control-height-touch); height: var(--control-height-touch); } /* fetch-1023: phone actions center beneath the tile copy and every target stays 44px */
    .pdx-record[data-seg="activity"] .pdx-rec-card > .pdx-rec-head, .pdx-record[data-seg="related"] .pdx-rec-card > .pdx-rec-head { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; } /* fetch-916: the summary body under the head is hidden on these segments */
    .pdx-record .pdx-rail--left { display: none; }
    .pdx-record[data-seg="summary"] .pdx-summary { display: block; }
    .pdx-record[data-seg="summary"] .pdx-rec-grid { display: none; }
    .pdx-record[data-seg="activity"] .pdx-summary, .pdx-record[data-seg="activity"] .pdx-rail--right { display: none; }
    .pdx-record[data-seg="activity"] .pdx-rec-grid { display: block; }
    .pdx-record[data-seg="related"] .pdx-summary, .pdx-record[data-seg="related"] .pdx-rec-main { display: none; }
    .pdx-record[data-seg="related"] .pdx-rec-grid { display: block; }
    .pdx-record[data-seg="related"] .pdx-rec-grid--integrated .pdx-rail--right > .pdx-section { margin-top: 0; padding-top: 0; border-top: 0; }
    .pdx-record[data-seg="related"] .pdx-related-empty { display: block; }
    .btn.evt-task-action, .btn.cl-row-act { width: var(--control-height-touch); min-width: var(--control-height-touch); height: var(--control-height-touch); min-height: var(--control-height-touch); }
    .btn.icon-btn { width: var(--control-height-touch); min-width: var(--control-height-touch); height: var(--control-height-touch); min-height: var(--control-height-touch); } /* fetch-1289: a phone's icon button is a full 44px target */
    .cmenu > .cmenu-list { position: fixed; left: var(--s-3); right: var(--s-3); bottom: auto; max-width: none; } /* fetch-1291: pinned across the screen; cmenuSet sets its top */
    .cmenu-i { min-height: var(--control-height-touch); } /* fetch-1291: 44px rows on a phone */
    .evt-task-row { flex-direction: column; }
    .evt-task-actions { width: 100%; }
  } /* fetch-905: r2's sheet - the bar and the segments stick, one region shows at a time, Back returns the list where it was */
  .cal-agday { margin-bottom: var(--s-2); }
  .cal-agday .cal-chip { display: block; margin: var(--s-1) 0; }
  .cal-agday-h { align-items: baseline; margin-bottom: var(--s-1); }
  .svy-offrow { justify-content: center; margin-top: 8px; }
  @media (max-width: 640px) {
    /* 1 · card headers: the title takes its own line, controls wrap below. Fixes the
       one-character-per-line crush (Labor actuals): .row > div { min-width:0 } out-specifies
       .stf-grow's min-width, so the title column collapsed instead of wrapping. */
    .stf-head > :first-child { flex-basis: 100%; min-width: 0; }
    /* 2 · wide tables: one-line rows, names truncate instead of colliding with the next
       column, sideways scroll keeps the numbers reachable. */
    .x-scroll .fin-table td, .x-scroll .fin-table th { white-space: nowrap; }
    .x-scroll .fin-table td strong { display: inline-block; max-width: 44vw; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
    /* 3 · chip rows: one scrolling line instead of a three-row stack. fetch-939 moved this pair
       into the page-header's own phone block below — the base .pgh-chips rule is declared AFTER
       this media query, so an override here loses the cascade and the chips wrapped to 104px. */
    /* 4 · calendar controls: the standalone Today button and the Day/Week/Month selector hide
       (phone is Week, always); the rest of the period bar is styled with the header, below. */
    .cal-todaybtn, #calModeSel { display: none; }
    /* fetch-1046 (Jack): dates are context, event names are the work. The old 16px date over a
       9.5px event inverted that hierarchy on both Sales and Ops; event rows also missed the
       portal's phone touch-target floor. This shared agenda rule fixes both routes. */
    .cal-agday { padding: var(--s-3); }
    .cal-agday-h { margin-bottom: var(--s-2); }
    .cal-agday-h strong { color: var(--muted); font-size: var(--t-sub); font-weight: 600; line-height: 1.35; }
    .cal-agday .cal-chip { box-sizing: border-box; font-size: var(--t-body); line-height: 1.35;
      min-height: var(--control-height-touch); padding: var(--s-2) var(--s-3); overflow-wrap: anywhere; }
    .cal-agday .cal-chip-venue { display: block; margin-top: var(--s-1); font-size: var(--t-sub); }
    /* fetch-510 (Jack: "Multi bubble problem can be solved on this page + the wrapping
       issues") · Reports: the 13-report chip stack becomes the #3 primitive — each pickbar
       row is ONE scrolling line — the presets row too, and the actions row (Pace/CSV/Print)
       drops below the title and WRAPS instead of clipping Print off the right edge. */
    .rpt-pickbar { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: var(--s-1); }
    .rpt-pickbar .rpt-rchip { flex: 0 0 auto; white-space: nowrap; }
    .rpt-presets { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: var(--s-1); }
    .rpt-presets .rpt-chip { flex: 0 0 auto; white-space: nowrap; }
    .row:has(> .rpt-actions) { flex-wrap: wrap; } /* .row is no-wrap by default; :has is already load-bearing elsewhere (fetch-357) */
    .rpt-actions { margin-left: 0; flex-basis: 100%; flex-wrap: wrap; margin-top: var(--s-2); }
    /* 5 · summary tiles slim down; salesperson chips give way to a select. */
    .brief-hero { padding: var(--s-3) var(--s-4); border-radius: var(--r-m); }
    .brief-headline { font-size: var(--t-body); margin-top: var(--s-2); }
    .svy-row .btn-lbl { display: none; }
  }
  @media (max-width: 560px) {
    .dash-stats { grid-template-columns: repeat(2, 1fr); }
    .wsbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .wsbar::-webkit-scrollbar { display: none; }
  }

/* fetch-1310 (the map's 4b.9): fetch-150's boot splash (#bootSplash, .bs-load and its bsSweep) left the markup long ago -
   nothing drew it - and its CSS (raw hex, px type, an unguarded animation) left with this ticket. */

/* fetch-224 (+225 fix): header dropdown menus (Documents / ⋯). The event sub-tab
   strip (.evt-anchors) is position:sticky with z-index:30 and was painting OVER the
   open menu — the panel's z-index was trapped inside the header card's stacking
   context. Elevating the whole card while a menu is open puts the panel on top. */
details.hdd>summary{list-style:none;cursor:pointer}
details.hdd>summary::-webkit-details-marker{display:none}
details.hdd[open]>summary{box-shadow:0 0 0 2px var(--gold,#c09267) inset}
details.hdd[open]{z-index:300}
.card:has(details.hdd[open]){position:relative;z-index:300}
/* fetch-226: stage-aware suggested section chip in the event anchors bar */
.evt-anchors a.sugg{background:var(--gold,#c09267);color:#fff;box-shadow:0 1px 4px rgba(56,74,97,.22)}
.evt-anchors a.sugg:hover{background:var(--gold-dark,#a87b52);color:#fff}
  /* ===== fetch-405: One Portal Wave 1 skeleton primitives (pilot: Roster). Shared — every screen adopts as touched. ===== */
  .hero-facts { display: flex; gap: 26px; flex-wrap: wrap; align-items: baseline; margin: 2px 0 14px; padding: var(--s-3) var(--s-4); background: var(--wash); border: 1px solid var(--hair); border-radius: var(--r-m); }
  .hf { text-align: center; } /* numbers center over their labels (Jack, 2026-08-05) */
  .hf-val { font-size: 21px; font-weight: 700; color: var(--text-heading); font-variant-numeric: tabular-nums; line-height: 1.1; }
  .hf-val .hf-of { font-size: 13px; font-weight: 600; color: var(--muted); }
  .hf-gold .hf-val { color: var(--brand-gold-dark); } /* gold like jewelry: max ONE per band */
  .hf-label { font-size: var(--t-sub); color: var(--muted); font-weight: 600; margin-top: 1px; }
  .ctx-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 0 0 var(--s-3); }
  .ctx-lead { font-size: var(--t-sub); font-weight: 600; color: var(--muted); }
  .ctx-chip { display: inline-flex; align-items: center; gap: 7px; font-size: var(--t-sub); font-weight: 600; color: var(--navy); background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 4px 6px 4px 11px; }
  .ctx-chip--scope { background: var(--wash); border-style: dashed; padding-right: 11px; }
  .ctx-x { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: var(--hair); color: var(--muted); font-size: 11px; line-height: 1; cursor: pointer; border: none; padding: 0; }
  .ctx-x:hover { background: var(--bad-bg); color: var(--bad-fg); }
  /* fetch-1480: the roster's Sort select - the shared sortable table's one Sort control (colSortPickHTML), shown at EVERY width here
     because the roster's rows are cards with no headings to press - and the download's result line under the header. */
  .ros-sortpick { margin-left: auto; }
  .ros-sortpick .col-sortpick { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--t-sub); font-weight: 600; color: var(--muted); }
  .ros-sortpick .col-sortpick .sel { width: auto; min-height: var(--control-height-sm); }
  .ros-export-note { font-size: var(--t-sub); font-weight: 600; color: var(--muted); margin: 0 0 var(--s-3); }
  .ros-export-note--ok { color: var(--ok-fg); }
  .ros-export-note--err { color: var(--bad-fg); }
  @media (max-width: 640px) {
    .ros-sortpick { flex: 1 0 100%; margin-left: 0; }
    .ros-sortpick .col-sortpick { display: grid; }
    .ros-sortpick .col-sortpick .sel { width: 100%; min-height: var(--control-height-touch); }
  }
  .card.card--action { border-left: 3px solid var(--gold); }      /* asks for work */
  .card.card--status { border-left: 3px solid var(--card-accent, var(--navy)); } /* being monitored */
  .card.card--flush { padding: 0; }
  .card-kicker { font-size: var(--t-label); font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
  .card.card--action .card-kicker { color: var(--brand-gold-dark); }
  .empty-state .es-body { color: var(--muted); line-height: 1.5; margin-bottom: 14px; }
  .empty-state--inline { margin: var(--s-3) auto; padding: 18px 12px; }
  .empty-state--inline .es-emoji { font-size: 24px; margin-bottom: 4px; }
  .empty-state--inline .es-title { font-size: var(--t-body); }
  .badge.badge--trainer { background: #fbf3e2; color: var(--brand-gold-dark); border: 1px solid var(--brand-gold-mid); font-size: 10.5px; margin-left: 6px; vertical-align: 1px; }
  .badge.badge--training { background: var(--warn-bg); color: var(--warn-fg); border: 1px solid var(--warn-fg); font-size: 10.5px; margin-left: 6px; vertical-align: 1px; }
  /* fetch-1347b: a Crystal level on the roster (Jack 09-27) - navy words, a gold hairline: jewelry, not paint */
  .badge.badge--level { background: var(--surface-card); color: var(--navy); border: 1px solid var(--gold); font-size: var(--t-label); margin-left: 6px; vertical-align: 1px; }
  .btn.btn--xs { padding: 4px 10px; font-size: var(--t-sub); }
  .bday-shout { margin-left: auto; align-self: center; flex-shrink: 0; } /* fetch-435/436: birthday shout-out button OR "shouted out" badge sits at the row's end */
  .form-sec { margin-bottom: var(--s-4); padding-bottom: var(--s-4); border-bottom: 1px solid var(--hair); }
  .form-sec:last-of-type { border-bottom: none; margin-bottom: 0; }
  .fs-title { font-size: var(--t-label); font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--brand-gold-dark); margin-bottom: 10px; }
  .fs-hint { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted); font-size: var(--t-sub); margin-left: 8px; }
  .chip-ck { position: relative; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; background: #fff; user-select: none; }
  .chip-ck input { position: absolute; opacity: 0; pointer-events: none; }
  .chip-ck.on { border-color: var(--navy); color: var(--navy); background: var(--wash); }
  .chip-ck.on::before { content: "\2713"; font-weight: 700; font-size: 11px; }
  .chip-ck:focus-within { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
  .chip-wrap { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
  .pos-panel { border: 1px solid var(--hair); border-radius: var(--r-m); background: var(--wash); padding: 10px; max-height: 132px; overflow: auto; display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
  .form-actions { display: flex; gap: 8px; align-items: center; margin-top: var(--s-4); padding-top: 14px; border-top: 1px solid var(--hair); flex-wrap: wrap; }
  .form-danger { margin-left: auto; display: flex; align-items: center; gap: 10px; }
  .form-danger .fd-note { font-size: var(--t-sub); color: var(--muted); }
  /* fetch-1483: THE ARCHIVE PICKER (Jacki's reasons; design rules 9 and 16). A dialog over the person record: one radio list, every
     row a 44px target, two columns where they fit and one on a phone (the 640px block above makes the dialog a full-screen sheet),
     the housekeeping reason set apart under a hairline. The result reads beside Restore to roster in ink, not muted. */
  @media (min-width: 641px) { .cse-modal.ros-arch { max-width: 560px; } }
  .ros-arch-what { margin: 0 0 var(--s-3); color: var(--muted); font-size: var(--t-sub); }
  .ros-arch-draft { margin: 0 0 var(--s-3); }
  .ros-arch-list { border: 0; margin: 0; padding: 0; min-width: 0; }
  .ros-arch-list legend { padding: 0; margin: 0 0 var(--s-2); font-weight: 600; font-size: var(--t-body); }
  .ros-arch-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-3); }
  .ros-arch-opt { display: flex; align-items: center; gap: var(--s-2); min-height: var(--control-height-touch); padding: 0 var(--s-2); border-radius: var(--r-m); cursor: pointer; font-size: var(--t-body); }
  .ros-arch-opt:hover, .ros-arch-opt:has(input:checked) { background: var(--wash); }
  .ros-arch-opt:has(input:checked) { font-weight: 600; }
  .ros-arch-opt:has(input:disabled) { cursor: default; opacity: .6; }
  .ros-arch-opt input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--brand-blue-deep); }
  .ros-arch-house { margin-top: var(--s-2); padding-top: var(--s-2); border-top: 1px solid var(--rule-soft); }
  .ros-arch-hint { display: block; font-weight: 400; color: var(--muted); font-size: var(--t-sub); }
  .ros-arch-err { margin-top: var(--s-2); color: var(--bad-fg); font-size: var(--t-sub); }
  .ros-arch-err:empty { display: none; }
  .ros-arch .actions { margin-top: var(--s-4); }
  .form-danger .ros-arch-done { color: var(--ink); }
  @media (max-width: 640px) { .ros-arch-opts { grid-template-columns: 1fr; } .ros-arch .actions .btn { min-height: var(--control-height-touch); } }
  .fm-title { font-size: var(--t-section); font-weight: 700; }
  .fm-first { margin-top: var(--s-3); }
  .fm-bday { display: flex; gap: 6px; }
  .fm-addpos { margin-top: 6px; }
  .fm-w280 { max-width: 280px; }
  .qrow-tools { display: flex; gap: 6px; opacity: .4; transition: opacity .12s ease; } /* fetch-419: attention budget — row tools whisper until you're on the row (still tappable on touch) */
  .row:hover .qrow-tools, .qrow-tools:focus-within { opacity: 1; }
  .qdrag { cursor: grab; color: var(--muted); padding: 2px 6px; border-radius: 6px; user-select: none; flex-shrink: 0; } /* fetch-420 (Jack): drag handle replaces the arrows */
  .qdrag:hover, .qdrag:focus-visible { background: var(--hair); color: var(--navy); }
  .qrow-over { background: var(--wash); box-shadow: inset 0 2px 0 var(--gold); }
  .rd-today { background: #fffaf3; box-shadow: inset 3px 0 0 var(--gold); } /* fetch-413: day-of event row (div rows) */
  tr.rd-today { background: none; box-shadow: none; } /* fetch-416 (Jack: highlight "didn't turn out right") — tables paint per-cell */
  tr.rd-today > td { background: #fffaf3; }
  tr.rd-today > td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
  .rd-today--tint { background: #fffaf3; } /* day-of tint for elements carrying their own left accent (bar cards) */
  .tl-row { border-radius: 6px; }
  .tl-row:hover { background: var(--wash); } /* fetch-416 (Jack: "save that UX") — list rows hover like the Readiness table */
  .tl-row.rd-today:hover { background: #fdf3e3; }
  .rd-detail { display: block; font-size: var(--t-label); color: var(--bad-fg); opacity: .85; margin-top: 1px; white-space: nowrap; }
  .rd-detail--warn { color: var(--warn-fg); }

  /* fetch-517 — THE PHONE ZOOM. Jack: "we have zoom issue when i click the notifications button
     in phone view."
     It is not the bell. iOS Safari zooms the whole page whenever you focus a form control whose
     computed font-size is under 16px — that is the zoom. Swept every workspace and tab at 390px:
     48 controls were under 16px (homeRole 12.5, dashRange/dashTrade 13, the admin filters 13,
     and ~40 more at 14 across My Work, staffing, linen, recaps, menu, invoices, scheduling).
     One media query beats 48 edits. The `body` prefix is deliberate: .acted input (12.5px) is
     declared in a per-render <style> INSIDE the Action Items table, which lands after this
     block in document order, so equal specificity would lose. Desktop is untouched.
     RATCHET: this raises px-font by design — a deliberate adjust, noted in ui-debt.json. */
  @media (max-width: 640px) {
    body input:not([type="checkbox"]):not([type="radio"]),
    body select,
    body textarea,
    body .sel,
    /* fetch-1038: this arm carried ONE :not() and was (0,2,2). The base form primitive,
       `.field input:not([type="checkbox"]):not([type="radio"])`, is (0,3,1) and sets 14px
       with no media query — three classes beat two, so the 16px above lost on every .field
       control in the portal, which is nearly every form. Adding the second :not() makes this
       (0,3,2) and it wins. Same (0,3,1) trap fetch-874 and fetch-892 recorded for padding;
       this is the font-size instance of it. Selector-only edit: no new px declaration, so the
       UI-debt ratchet is unmoved. */
    body .field input:not([type="checkbox"]):not([type="radio"]),
    body .field select,
    body .field textarea,
    body .brief-role select,
    body .user-filterbar input,
    body .user-filterbar select,
    body .build-evt input,
    body .build-evt select,
    body .pbox-top input#pSearch,
    /* fetch-1038: `#rptCustom select, #rptCustom input` is (1,0,1) and sets --t-body (14px)
       with no media query — an id outranks every class-level rule here, the same reason
       #pSearch above is named explicitly. Found by the gate once it was taught to read
       portal.css; the custom report builder zoomed on focus like everything else. */
    body #rptCustom input,
    body #rptCustom select,
    body .inv-cnt-input,
    body .linen-doc input.linen-qty,
    body .acted input,
    body .cmd-input,
    body .tcm-in { font-size: 16px; }
  }
  /* fetch-604: Notes rebuild. Classes rather than inline styles so the UI-debt
     ratchet falls instead of rising; every value is a token. */
  .note-segs { display: flex; gap: var(--s-1); margin-top: var(--s-2); flex-wrap: wrap; }
  .note-head { display: flex; align-items: flex-start; gap: var(--s-2); }
  .note-head-main { flex: 1; min-width: 0; }
  .note-acts { display: flex; gap: var(--s-1); flex-shrink: 0; }
  .note-acts .btn { padding: var(--s-1) var(--s-2); }
  .note-meta { color: var(--muted); font-size: var(--t-sub); }
  .note-sub { color: var(--muted); font-size: var(--t-sub); }
  .note-body { margin-top: var(--s-1); font-size: var(--t-body); white-space: pre-wrap; }
  .note-shots { margin-top: var(--s-2); display: flex; gap: var(--s-1); flex-wrap: wrap; }
  .note-shots img { max-height: 88px; border-radius: var(--r-s); }
  .note-attr { color: var(--muted); font-size: var(--t-sub); margin-top: var(--s-2); }
  .note-field { margin-top: var(--s-2); }
  .note-actions { margin-top: var(--s-3); }
  .note-pinned { border-left: 3px solid var(--gold); }
  /* The icon names the object; colour names the state. */
  .note-st-request     { color: var(--info-fg); }
  .note-st-in_progress { color: var(--warn-fg); }
  .note-st-completed   { color: var(--ok-fg); }
  .note-st-declined    { color: var(--bad-fg); }
  /* fetch-869: the .wk-* island (fetch-695..701 Work workspace) deleted with its page - Phase 6 one-surface; nothing outside the Work renderers ever emitted a wk- class */


  /* ==========================================================================================
     fetch-801 — THE PAGE-HEADER PATTERN. Extracted from Codex’s Action Items reshape.
     Spec + the seven rules + migration order: docs/page-header-pattern.md
     INERT ON ARRIVAL: no surface calls these classes yet, so this changes nothing on screen.
     ========================================================================================== */
/* ==========================================================================================
   THE PAGE-HEADER PATTERN — extracted from Codex's Action Items reshape so it stops being a
   one-off and becomes the house rule.

   The rules it encodes, which are the actual answer to "we have no set way of doing buttons
   and dropdown filters":
     1. ONE card holds the header. Not three floating ones with gaps between them.
     2. A real title + ONE line of context. No instructional prose in a header.
     3. ONE solid primary action, right-aligned. Everything else goes behind an overflow.
     4. Scope = tabs with counts. Active gets a GOLD underline — gold is jewelry, and a
        selected scope is exactly the "restrained active indicator" the brand rule names.
     5. Quick filters = ONE connected segmented control with counts inline. Not five loose
        pills that read as five unrelated buttons.
     6. Everything else lives behind a single "Filters" button. Native selects leave the
        header — that is what made the old strip look like a form.
     7. A muted meta line states what is currently shown.

   Built from existing tokens only. .btn / .btn-primary keep their current look so this sits
   beside unmigrated screens without a seam.
   ========================================================================================== */


.pgh { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-l);
      padding: var(--s-5); margin-bottom: var(--s-4); }

.pgh-top { display: flex; align-items: flex-start; gap: var(--s-4); flex-wrap: wrap; }
.pgh-titles { flex: 1 1 260px; min-width: 0; }
.pgh-h { font-size: var(--t-title); font-weight: 700; color: var(--text-heading); margin: 0; }
.pgh-sub { font-size: var(--t-sub); color: var(--muted); margin-top: var(--s-1); }
.pgh-acts { display: flex; align-items: center; gap: var(--s-2); flex-shrink: 0; }

/* the overflow control — square, quiet, never competes with the primary */
.pgh-more { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
           background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-s);
           color: var(--muted); cursor: pointer; font-size: var(--t-title); line-height: 1;
           padding: 0 0 var(--s-1); }
.pgh-more:hover { border-color: var(--muted); color: var(--ink); }

/* SCOPE TABS — count sits beside the label, muted, so the label stays the thing you read */
/* fetch-1389: the grey rule is an inset shadow INSIDE the row, not a border under it, so the selected tab's gold bar lies on it
   without the old -1px margin. That margin made the tab overhang the row's padding box by 1px, and because overflow-x:auto turns
   overflow-y auto too, Windows drew a miniature up/down scrollbar at the end of every tab row (Jack, Feedback 09-30). overflow-y is
   hidden as the belt: a long row still scrolls sideways, and nothing can ever scroll it vertically. */
.pgh-tabs { display: flex; gap: var(--s-5); margin-top: var(--s-4);
           box-shadow: inset 0 -1px 0 var(--line); overflow-x: auto; overflow-y: hidden; }
.pgh-tab { appearance: none; background: none; border: 0; cursor: pointer; white-space: nowrap;
          padding: var(--s-2) 0 var(--s-3); font-size: var(--t-body); color: var(--muted);
          border-bottom: 2px solid transparent; }
.pgh-tab:hover { color: var(--ink); }
.pgh-tab[aria-selected="true"] { color: var(--text-heading); font-weight: 600;
                                border-bottom-color: var(--brand-gold-mid); }
.pgh-tab .n { color: var(--muted); font-weight: 400; margin-left: var(--s-1); }

/* SUBJECT TILES (fetch-1250) - a page's sections as tiles: a Crystal icon, the name, one quiet line under it. The selected
   tile carries the gold bar (jewelry: the one restrained active indicator). fetch-1235's Readiness header keeps its own scoped
   rules at the top of this file; these are the shared defaults every other caller gets (CRM first). */
.pgh-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: var(--s-2); margin-top: var(--s-4); }
.pgh-tile { position: relative; display: flex; align-items: center; gap: var(--s-3); min-height: var(--control-height-touch); padding: var(--s-2) var(--s-3);
            border: 1px solid var(--line); border-radius: var(--r-m); background: var(--paper); color: var(--navy-dark); text-align: left; font: inherit; cursor: pointer;
            transition: background .12s, border-color .12s; }
.pgh-tile > .ci { flex: 0 0 auto; color: var(--navy); }
.pgh-tile > span { min-width: 0; }
.pgh-tile strong { display: block; font-size: var(--t-body); font-weight: 600; line-height: 1.25; }
.pgh-tile small { display: block; font-size: var(--t-sub); color: var(--muted); margin-top: 2px; }
.pgh-tile:hover { background: var(--wash); border-color: var(--muted); }
.pgh-tile[aria-pressed="true"] { border-color: var(--navy); background: var(--wash); }
.pgh-tile[aria-pressed="true"]::after { content: ''; position: absolute; bottom: 0; left: var(--s-3); right: var(--s-3); height: 3px; background: var(--gold); border-radius: var(--r-s) var(--r-s) 0 0; }
.pgh-tiles + .pgh-row { margin-top: var(--s-3); }
.pgh-titles > .pgh-tiles { margin-top: 0; } /* fetch-1250.1: tiles that LEAD the header sit in the title's place, beside the primary action */
.pgh-tiles--square { grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); } /* fetch-1250.1 (Jack: "a bit more Square", then "shouldnt the tiles be spread evenly across the header?"): the icon over the name, and the tiles share the row in equal columns */
.pgh-tiles--square .pgh-tile { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: var(--s-2); min-height: 6rem; padding: var(--s-3); }
.pgh-tiles--square .pgh-tile > .ci { width: 28px; height: 28px; }

/* CONTROL ROW — search grows, the rest keep their size */
.pgh-row { display: flex; align-items: center; gap: var(--s-2); margin-top: var(--s-4); flex-wrap: wrap; }
.pgh-search { flex: 1 1 260px; display: flex; align-items: center; gap: var(--s-2);
             background: var(--wash); border: 1px solid var(--line); border-radius: var(--r-m);
             padding: var(--s-2) var(--s-3); min-width: 0; }
.pgh-search input { flex: 1; border: 0; background: none; outline: none; min-width: 0;
                   font-size: var(--t-body); color: var(--ink); }
.pgh-search svg { flex-shrink: 0; color: var(--muted); }

/* SEGMENTED — one container, so five filters read as one control */
.pgh-seg { display: inline-flex; background: var(--wash); border: 1px solid var(--line);
          border-radius: var(--r-m); padding: 3px; gap: 2px; }
.pgh-seg button { appearance: none; border: 0; background: none; cursor: pointer; white-space: nowrap;
                 padding: var(--s-1) var(--s-3); border-radius: var(--r-s);
                 font-size: var(--t-sub); color: var(--muted); }
.pgh-seg button .n { margin-left: var(--s-1); }
.pgh-seg button[aria-pressed="true"] { background: var(--paper); color: var(--text-heading);
                                      font-weight: 600; box-shadow: 0 1px 2px rgba(36,43,66,.10); }
.pgh-seg button.bad[aria-pressed="true"] { color: var(--bad-fg); }

.pgh-filters { display: inline-flex; align-items: center; gap: var(--s-2); white-space: nowrap; }
/* fetch-829: the door shows when something non-default is applied behind it (rule 6 + rule 7) */
/* fetch-939 · ONE HEADER PER PAGE (Jack): the period bar and the filter chips are ROWS OF THIS CARD
   now, not loose rows under it. On a 390px phone those two rows cost 110px before the content began.
   .pgh-chip is the calendar's filter chip promoted to the primitive (fetch-129's look, on tokens): the
   dot is the portal's .vdot and its colour is whatever --vc the caller set - venueColor(), always. */
.pgh-nav { display: flex; align-items: center; gap: var(--s-2); margin-top: var(--s-4); flex-wrap: wrap; }
.pgh-navlabel { font-family: 'Cormorant Garamond', Georgia, serif; font-size: var(--t-section); font-weight: 700;
                color: var(--navy); background: none; border: 0; margin: 0; padding: 0 var(--s-1); cursor: pointer; }
.pgh-navlabel:hover { color: var(--gold-dark); }
.pgh-chips { display: flex; gap: var(--s-2); margin-top: var(--s-2); flex-wrap: wrap; }
.pgh-chip { display: inline-flex; align-items: center; gap: var(--s-1); padding: 5px 12px; border: 1.5px solid var(--line);
            border-radius: 999px; background: var(--paper); font-family: inherit; font-size: var(--t-sub); font-weight: 600;
            color: var(--ink); cursor: pointer; transition: border-color .12s, transform .12s; }
/* fetch-942: --vc is OPTIONAL. A chip with no venue dot - the Managers view Request-offs
   toggle - still needs hover and selected states, so both fall back to the action colour. */
.pgh-chip:hover { border-color: var(--vc, var(--action-primary)); transform: translateY(-1px); }
/* fetch-939 (review): the SELECTED chip's text is --vc-ink, which the builder sets per chip from the
   fill's own luminance - white where white clears 4.5:1, --ink where it does not. Crane Bay's
   #d9a800 carried white at 2.20:1 on origin/main's .cal-vchip and this ticket was about to make
   that the portal's ONE chip. The venue colours themselves do not move (Jack: "the same colors as
   whats on the calendar"); only the text on top of them does. --paper stays the default so a
   caller that sets no ink behaves exactly as before. */
.pgh-chip.on { background: var(--vc, var(--action-primary)); border-color: var(--vc, var(--action-primary)); color: var(--vc-ink, var(--paper)); }
.pgh-chip .vdot { width: 7px; height: 7px; border-radius: 50%; background: var(--vc); flex: 0 0 auto; display: inline-block; }
.pgh-chip.on .vdot { background: var(--vc-ink, var(--paper)); }
/* fetch-939 (review): the pipeline switch is not a filter, and it used to say so with 6px of air
   (an inline margin the declarative chips slot had nowhere to put). The gap is a token now. */
.pgh-chip--sep { margin-left: var(--s-2); }
.pgh-filters--on { border-color: var(--brand-gold-mid); color: var(--text-heading); font-weight: 600; }
.pgh-search-x { border: 0; background: none; cursor: pointer; color: var(--muted);
               font-size: var(--t-section); line-height: 1; padding: 0 var(--s-1); flex-shrink: 0; }
.pgh-meta { margin-top: var(--s-3); font-size: var(--t-sub); color: var(--muted); }
.pgh-meta strong { color: var(--ink); font-weight: 600; }
/* fetch-1298 (Six-Control pass 1a) · THE VIEW TOGGLE. "List | Grid" at the right end of the meta line (rule 7): the line
   that says what is shown also says how. A two-button variant of .pgh-seg in its own class, so the phone .pgh-seg rule
   (full width, a fading scroller) can never clip the Grid half. 36px halves on a desktop, like the icon button
   (fetch-1289); on a phone, the glyph alone in a 44px square with the word kept for screen readers (the block after the
   base phone rules below). */
.pgh-metarow { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2) var(--s-3); margin-top: var(--s-3); }
.pgh-metarow .pgh-meta { margin-top: 0; flex: 1 1 12rem; min-width: 0; }
.pgh-view { display: inline-flex; flex: 0 0 auto; margin-left: auto; background: var(--wash); border: 1px solid var(--line);
            border-radius: var(--r-m); padding: 3px; gap: 2px; }
.pgh-view button { appearance: none; border: 0; background: none; cursor: pointer; white-space: nowrap; box-sizing: border-box;
                   display: inline-flex; align-items: center; justify-content: center; gap: var(--s-1);
                   min-height: var(--control-height-icon); padding: 0 var(--s-3); border-radius: var(--r-s);
                   font-size: var(--t-sub); color: var(--muted); }
.pgh-view button:hover { color: var(--text-heading); }
/* the pressed half says so without colour (header rule 12): a gold bar under it - the restrained active indicator
   .pgh-scope-choice already wears - because on a phone the word, and its weight, are hidden. */
.pgh-view button[aria-pressed="true"] { background: var(--paper); color: var(--text-heading); font-weight: 600;
                                        box-shadow: inset 0 -2px var(--brand-gold-mid), 0 1px 2px rgba(36,43,66,.10); }
.pgh-view button .ci { flex: 0 0 auto; }
@media (forced-colors: active) { .pgh-view button[aria-pressed="true"] { forced-color-adjust: none; background: Highlight; color: HighlightText; } }

@media (max-width: 640px) {
  .pgh { padding: var(--s-4); }
  .pgh-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } /* fetch-1250: four tiles read as two rows of two on a phone */
  .pgh-tile { gap: var(--s-2); padding: var(--s-2); }
  .pgh-tile small { display: none; } /* fetch-1250: on a phone a tile is its icon and its name - the line under it wrapped three deep in a 160px tile; the Readiness header keeps its own scoped rule */
  .pgh-tiles--square { grid-template-columns: repeat(2, minmax(0, 1fr)); } /* fetch-1250.1: two by two on a phone, the icon over the name */
  .pgh-tiles--square .pgh-tile { min-height: 4.75rem; }
  .pgh-acts { width: 100%; }
  .pgh-acts .btn-primary { flex: 1; min-height: var(--control-height-touch); } /* the one action is thumb-width on a phone */
  .pgh-more { width: var(--control-height-touch); height: var(--control-height-touch); }
  .pgh-search { min-height: var(--control-height-touch); box-sizing: border-box; }
  .pgh-search-x { width: var(--control-height-touch); min-height: var(--control-height-touch); }
  /* Tabs WRAP on a phone rather than scroll: four scope tabs cut mid-word ("St…") read as
     broken, and two horizontally-scrolling rows stacked is one too many. Wrapping hides nothing. */
  /* fetch-939 · the period bar and the chip row on a phone. These MUST live here, after the base
     .pgh-nav / .pgh-chips rules — the calendar's old overrides sat in an earlier media block and
     lost the cascade, which wrapped the chips onto three rows and made the card TALLER than the
     loose rows it replaced. The chips scroll as one line; the period label takes the middle and
     the arrows pin to the edges (fetch-501: the date itself is the Today button on a phone). */
  /* fetch-939 (review): the chip row scrolls, so it earns the SAME fade edge .pgh-seg gets below -
     at 390px the fifth venue is clipped mid-word and read as "chopped off", not "there is more".
     Same mask, same 24px, and the scrollbar hides the way every other phone scroller in this file
     hides it (.tabslot .tabbar, .tc-chips, .wsbar, .evt-anchors). black = fully opaque to a mask,
     not a design colour. */
  .pgh-chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: var(--s-1);
              scrollbar-width: none;
              mask-image: linear-gradient(to right, black calc(100% - 24px), transparent);
              -webkit-mask-image: linear-gradient(to right, black calc(100% - 24px), transparent); }
  .pgh-chips::-webkit-scrollbar { display: none; }
  .pgh-chips .pgh-chip { flex: 0 0 auto; white-space: nowrap; }
  .pgh-nav { flex-wrap: nowrap; margin-top: var(--s-3); }
  /* fetch-942: the period arrows are a THUMB TARGET. .schd-controls .btn guaranteed 44px on a phone
     (fetch-697) and moving the Manager week controls into this slot silently dropped them to 42 —
     probe697 caught it. The floor belongs on the slot, not on one screen's old class. */
  .pgh-nav .btn { min-height: var(--control-height-touch); min-width: var(--control-height-touch); }
  .pgh-nav .pgh-navlabel { order: 0; flex: 1; text-align: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pgh-nav [data-calnav="-1"] { order: -1; }
  .pgh-nav [data-calnav="1"] { order: 1; }
  .pgh-tabs { flex-wrap: wrap; gap: var(--s-2) var(--s-4); } /* fetch-938: row-gap tightened - with three tabs the wrapped row sat 16px under the selected tab's gold bar */
  /* black here is not a design colour: a mask only reads ALPHA, and black means "fully opaque".
     Using the keyword rather than a hex keeps the ratchet flat without gaming it.
     The segmented control keeps its single scroller, but earns a fade edge so a clipped item
     reads as "there is more" instead of "this is chopped off". */
  .pgh-seg { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
            mask-image: linear-gradient(to right, black calc(100% - 24px), transparent);
            -webkit-mask-image: linear-gradient(to right, black calc(100% - 24px), transparent); }
  .pgh-filters { flex: 1 1 auto; justify-content: center; min-height: var(--control-height-touch); }
}
/* fetch-1298 · the view toggle on a phone: the glyph alone in a 44px square, the word kept for screen readers. It sits
   AFTER the base phone block so nothing earlier in the cascade wins (the fetch-939 trap). A compact header's two-column
   grid gives the meta row the full width; print drops the toggle. */
@media (max-width: 640px) {
  .pgh-view button { min-width: var(--control-height-touch); min-height: var(--control-height-touch); padding: 0; }
  .pgh-view-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
}
@media (min-width: 641px) { .pgh--compact .pgh-metarow { grid-column: 1 / -1; } }
@media print { .pgh-view { display: none; } }


/* fetch-943 · A+ Calendar. Opt-in compact layout; existing consumers keep their geometry. */
.pgh--compact { padding: var(--s-3); }
.pgh--compact .pgh-top { align-items: center; gap: var(--s-2); }
.pgh--compact .pgh-titles { flex: 1 1 100px; min-width: 0; }
.pgh--compact .pgh-h { font-family: Inter, sans-serif; font-size: var(--t-title); line-height: 1.2; }
.pgh--compact .pgh-meta { margin-top: var(--s-1); line-height: 1.35; }
.pgh--compact .pgh-acts { width: auto; flex: 0 1 auto; }
.pgh--compact .pgh-acts:empty { display: none; }
.pgh--compact .pgh-acts .btn-primary { flex: 0 1 auto; padding-inline: var(--s-3); }
.pgh--compact button, .pgh--compact select, .pgh--compact summary {
  min-height: var(--control-height-touch); min-width: var(--control-height-touch); box-sizing: border-box; }
.pgh--compact .pgh-nav { display: grid; grid-template-columns: var(--control-height-touch) minmax(0, 1fr) var(--control-height-touch) auto auto;
  gap: var(--s-1); margin-top: var(--s-2); }
.pgh--compact .pgh-nav > * { order: 0; min-width: 0; }
.pgh--compact .pgh-nav .btn { padding-inline: var(--s-2); }
.pgh--compact .pgh-nav .cal-todaybtn, .pgh--compact #calModeSel { display: block; }
.pgh--compact #calModeSel { width: auto; padding-inline: var(--s-2); font-size: var(--t-body); }
.pgh--compact .pgh-navlabel { font-family: Inter, sans-serif; font-size: var(--t-sub); line-height: 1.35;
  color: var(--text-heading); cursor: default; text-align: center; white-space: normal;
  overflow: visible; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.pgh-scope { display: flex; align-items: stretch; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-2); }
.pgh-picker { position: relative; flex: 1 1 100px; min-width: 0; }
.pgh-picker-trigger { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-3);
  border: 1px solid var(--line); border-radius: var(--r-s); background: var(--paper); color: var(--navy-dark);
  font-size: var(--t-sub); font-weight: 600; line-height: 1.35; cursor: pointer; list-style: none; }
.pgh-picker-trigger::-webkit-details-marker { display: none; }
.pgh-picker-trigger .vdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--vc); flex: 0 0 auto; }
.pgh-picker-value { min-width: 0; overflow-wrap: anywhere; }
.pgh-picker-arrow { margin-left: auto; flex: 0 0 auto; }
.pgh-picker[open] .pgh-picker-trigger { border-color: var(--navy); }
.pgh-picker-list { position: absolute; top: calc(100% + var(--s-1)); left: 0; z-index: 20;
  width: max-content; min-width: 100%; max-width: min(260px, calc(100vw - var(--s-6) * 2));
  display: grid; gap: var(--s-1); padding: var(--s-2); background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-m); box-shadow: 0 6px 20px rgba(36,43,66,.16); box-sizing: border-box; }
.pgh-picker-list .pgh-chip { width: 100%; justify-content: flex-start; border-radius: var(--r-s); white-space: normal;
  text-align: left; overflow-wrap: anywhere; }
.pgh-picker-list .pgh-chip:hover { transform: none; }
.pgh-picker-list .pgh-chip.on { background: var(--wash); color: var(--navy-dark); border-color: var(--vc); }
.pgh-picker-list .pgh-chip.on .vdot { background: var(--vc); }
.pgh-picker-list .pgh-chip.on::after { content: '✓'; margin-left: auto; }
.pgh-scope-choices { display: flex; flex: 1 1 136px; border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; }
.pgh-scope-choice { flex: 1 1 0; background: var(--paper); color: var(--muted); border: 0; border-radius: 0;
  padding: var(--s-2); font: inherit; font-size: var(--t-sub); line-height: 1.35; cursor: pointer; }
.pgh-scope-choice + .pgh-scope-choice { border-left: 1px solid var(--line); }
.pgh-scope-choice[aria-pressed="true"] { background: var(--wash); color: var(--navy-dark); font-weight: 700;
  box-shadow: inset 0 -2px var(--brand-gold-mid); }
.pgh--compact .pgh-chips { flex-wrap: wrap; overflow: visible; mask-image: none; -webkit-mask-image: none; }
.pgh--compact .pgh-chip { white-space: normal; }
.pgh--compact :is(button, select, summary):focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
@media (min-width: 641px) {
  .pgh--compact { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(260px, 1fr); gap: 0 var(--s-4); }
  .pgh--compact .pgh-top { grid-column: 1 / -1; }
  .pgh--compact .pgh-chips { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .pgh--compact #calModeSel { font-size: max(var(--t-body), 1rem); }
}
@media (max-width: 359px) {
  .pgh--compact .pgh-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pgh--compact .pgh-navlabel { grid-column: 2 / 4; }
  .pgh--compact .pgh-nav .cal-todaybtn { grid-column: 1 / 3; }
  .pgh--compact #calModeSel { grid-column: 3 / -1; }
}

/* fetch-944: an opt-in SINGLE control strip. Only the outer card scrolls on narrow screens. */
.pgh--strip { display: flex; align-items: center; flex-wrap: nowrap; gap: var(--s-2);
  min-width: 0; max-width: 100%; box-sizing: border-box; padding: var(--s-2);
  overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--muted) var(--wash);
  --pgh-left-shadow: transparent; --pgh-right-shadow: transparent;
  box-shadow: inset 12px 0 12px -10px var(--pgh-left-shadow), inset -12px 0 12px -10px var(--pgh-right-shadow); }
.pgh--strip.pgh--scroll-left { --pgh-left-shadow: var(--muted); }
.pgh--strip.pgh--scroll-right { --pgh-right-shadow: var(--muted); }
.pgh--strip::-webkit-scrollbar { height: var(--s-2); }
.pgh--strip::-webkit-scrollbar-thumb { background: var(--muted); border-radius: var(--r-s); }
.pgh--strip > .pgh-row, .pgh--strip > .pgh-nav, .pgh--strip > .pgh-chips {
  flex: 0 0 auto; flex-wrap: nowrap; width: auto; margin: 0; padding: 0;
  overflow: visible; mask-image: none; -webkit-mask-image: none; }
.pgh--strip .pgh-chips { gap: var(--s-1); }
.pgh--strip .pgh-seg button, .pgh--strip .pgh-chip { padding-inline: var(--s-2); }
.pgh--strip .pgh-seg { width: auto; overflow: visible; mask-image: none; -webkit-mask-image: none; }
.pgh--strip :is(button, select, summary) { flex: 0 0 auto; box-sizing: border-box;
  min-height: var(--control-height-touch); min-width: var(--control-height-touch); white-space: nowrap; }
.pgh--strip .pgh-nav .pgh-navlabel { flex: 0 0 auto; min-width: var(--control-height-touch);
  font-family: inherit; font-size: var(--t-sub); line-height: 1.4; font-variant-numeric: tabular-nums;
  overflow: visible; white-space: nowrap; padding-inline: var(--s-1); }
.pgh--strip :is(button, select, summary):focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* fetch-944: phones compare the complete manager week. Desktop keeps its existing grid.
   With no column gaps, a 320px viewport leaves seven 44px targets inside the border. */
.schd-phone-events, .schd-phone-only, .schd-phone-editing-day,
.schd-phone-form-title, .schd-phone-label { display: none; }
@media (max-width: 640px) {
  /* hidden would create a non-scrolling body scrollport and strand the sticky weekday row. */
  body:has(#managerScheduleStrip) { overflow-x: clip; }
  .schd-wrap { width: calc(100vw - var(--s-2)); max-width: none;
    margin-inline: calc((100% - (100vw - var(--s-2))) / 2); }
  .schd-wrap::after { display: none; }
  .schd { width: 100%; max-height: none; overflow: visible; }
  .schd .schd-row { min-width: 0; grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .schd .schd-head { position: sticky; top: 0; z-index: 4; border-radius: var(--r-s) var(--r-s) 0 0; }
  .schd .schd-head > .schd-name, .schd .schd-band { display: none; }
  .schd .schd-cell { min-width: 0; text-align: center; white-space: normal; overflow-wrap: anywhere;
    font-size: var(--t-sub); line-height: 1.35; font-variant-numeric: tabular-nums; }
  .schd .schd-head > .schd-cell { padding: var(--s-2) 2px; font-size: var(--t-sub) !important; }
  .schd .schd-cell .muted { font-size: var(--t-sub) !important; }
  .schd .schd-personrow > .schd-name { grid-column: 1 / -1; grid-row: 1; position: static;
    border-right: 0; border-bottom: 1px solid var(--hair); padding: 0 var(--s-2);
    font-size: var(--t-sub); overflow-wrap: anywhere; }
  .schd .schd-personrow > .schd-cell:not(.schd-editing) { grid-row: 2; }
  .schd .schd-row:not(.schd-crewhead):not(.schd-head) .schd-cell {
    min-height: var(--control-height-touch); padding: var(--s-1) 2px; }
  .schd .schd-personrow > .schd-name .schd-pedit { flex: 0 0 var(--control-height-touch);
    min-width: var(--control-height-touch); min-height: var(--control-height-touch); margin-left: auto;
    padding: var(--s-2); color: var(--muted); }
  .schd .schd-crewhead > .schd-name, .schd .schd-addrow > .schd-name {
    grid-column: 1 / -1; position: static; min-width: 0; border-right: 0; font-size: var(--t-sub); }
  .schd .schd-crewhead > .schd-name { padding: var(--s-2); }
  .schd .schd-crewhead > .schd-cell, .schd .schd-addrow > .schd-cell { display: none; }
  .schd :is(.schd-time, .schd-code, .schd-state, .schd-ro, .schd-blank) {
    font-size: var(--t-sub); white-space: normal; overflow-wrap: anywhere; }
  .schd .schd-blank { color: var(--muted); }
  .schd .schd-phone-editing-day { display: flex; align-items: center; justify-content: center;
    background: var(--wash); color: var(--text-heading); box-shadow: inset 0 -2px var(--brand-gold-mid); }
  .schd .schd-row.schd-personrow > .schd-cell.schd-editing { grid-column: 1 / -1; grid-row: 3;
    width: 100%; min-width: 0; padding: var(--s-3); text-align: left; border-right: 0; }
  .schd .schd-phone-form-title { display: block; margin-bottom: var(--s-2);
    font-size: var(--t-body); font-weight: 700; color: var(--text-heading); }
  :is(.schd, .sched-agenda-editor) .schd-phone-label { display: block; margin: var(--s-2) 0 var(--s-1);
    font-size: var(--t-sub); font-weight: 600; }
  :is(.schd, .sched-agenda-editor) .schd-form { padding: 0; }
  :is(.schd, .sched-agenda-editor) .schd-form input { width: 100%; min-width: 0; min-height: var(--control-height-touch);
    font-size: max(var(--t-body), 1rem) !important; padding: var(--s-2) !important; }
  :is(.schd, .sched-agenda-editor) .schd-form .combo-in { margin-top: 0 !important;
    padding-right: calc(var(--control-height-touch) + var(--s-2)) !important; }
  :is(.schd, .sched-agenda-editor) .schd-form .combo-caret { width: var(--control-height-touch);
    margin-left: calc(var(--control-height-touch) * -1); }
  :is(.schd, .sched-agenda-editor) .schd-form > div { gap: var(--s-1) !important; margin-top: var(--s-2) !important; flex-wrap: wrap; }
  :is(.schd, .sched-agenda-editor) .schd-form button { min-width: var(--control-height-touch); min-height: var(--control-height-touch);
    font-size: var(--t-sub) !important; padding: var(--s-2) !important; white-space: normal; }
  .schd-phone-only { display: block; }
  .schd .schd-phone-events { display: block; border-bottom: 1px solid var(--line); background: var(--paper); }
  .schd-phone-events-title { display: flex; align-items: baseline; justify-content: space-between;
    flex-wrap: wrap; gap: var(--s-1) var(--s-2); padding: var(--s-2);
    font-size: var(--t-sub); font-weight: 700; color: var(--text-heading); }
  .schd-phone-events-title > span { font-weight: 400; color: var(--warn-fg); }
  .schd-phone-event-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .schd-phone-event-day { min-width: 0; min-height: var(--control-height-touch); padding: var(--s-1) 2px;
    border: 0; border-top: 1px solid var(--hair); border-right: 1px solid var(--hair); border-radius: 0;
    background: transparent; color: var(--ink); font: inherit; font-size: var(--t-sub); line-height: 1.35;
    font-variant-numeric: tabular-nums; white-space: normal; overflow-wrap: anywhere; cursor: pointer; }
  .schd-phone-event-day:last-child { border-right: 0; }
  .schd-phone-event-day > span { display: block; }
  .schd-phone-event-day > span:first-child { font-weight: 700; }
  .schd-phone-event-day[aria-expanded="true"] { background: var(--wash); box-shadow: inset 0 -2px var(--brand-gold-mid); }
  .schd-phone-gap { color: var(--warn-fg); font-size: var(--t-sub); font-weight: 600;
    white-space: normal; overflow-wrap: anywhere; }
  .schd-phone-event-details { min-width: 0; padding: var(--s-3); border-top: 1px solid var(--line);
    font-size: var(--t-sub); overflow-wrap: anywhere; }
  .schd-phone-event-group { margin-top: var(--s-3); }
  .schd-phone-event-group h4 { margin: 0 0 var(--s-1); font-size: var(--t-sub); color: var(--text-heading); }
  .schd-phone-event-link { display: block; width: 100%; min-width: 0; min-height: var(--control-height-touch);
    margin-top: var(--s-1); padding: var(--s-2); border: 1px solid var(--line); border-radius: var(--r-s);
    background: var(--surface-card); color: var(--ink); font: inherit; font-size: var(--t-sub); line-height: 1.45;
    text-align: left; white-space: normal; overflow-wrap: anywhere; cursor: pointer; }
  .schd-phone-event-link > span { display: block; }
  .schd-phone-event-link > span:first-child { font-weight: 600; }
  .schd-phone-event-link > span + span { color: var(--muted); font-variant-numeric: tabular-nums; }
  .schd :is([data-schedcell], button):focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
}

/* ── fetch-922 · NATIVE CULINARY SCHEDULER (culinary-schedule.js) ─────────────
   The scan rule is borrowed deliberately from Matt's app, where it is already
   load-bearing: WORKING shifts are SATURATED with white text, ABSENCES are
   LIGHT with dark text. A reader tells the two apart by weight before they read
   a single word. Do not break that to make something shout. */
  .culsch-bar { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap;
    margin-bottom: var(--s-3); padding: var(--s-2) var(--s-3);
    border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface-card, White); }
  .culsch-nav { display: flex; gap: var(--s-1); }
  .culsch-weeklabel { font-weight: 700; color: var(--text-heading); }
  .culsch-bar__right { margin-left: auto; }
  .culsch-note { margin: 0 0 var(--s-3); color: var(--muted); font-size: var(--t-sub); }
  .culsch-error__detail { margin: var(--s-2) 0; color: var(--muted); font-size: var(--t-sub);
    word-break: break-word; }

  .culsch-venue { margin-bottom: var(--s-4); }
  .culsch-venue__head { display: flex; align-items: center; gap: var(--s-2);
    margin: 0 0 var(--s-2); padding-left: var(--s-2); border-left: 3px solid var(--vc, var(--line));
    font-size: var(--t-mid); color: var(--text-heading); }
  .culsch-venue__code { color: var(--muted); font-size: var(--t-sub); font-weight: 400; }
  /* The venues with no home in staff_shifts (issue #83). Stated on the block, not
     buried in a tooltip, because it changes what publishing will be able to do. */
  .culsch-venue__warn { margin-left: auto; padding: 2px var(--s-2); border-radius: var(--r-s);
    background: var(--warn-bg); color: var(--warn-fg); font-size: var(--t-label); font-weight: 700; }

  /* The grid scrolls INSIDE its own box. A week is seven columns plus a name and
     will not fit a phone; the page itself must never scroll sideways. */
  .culsch-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface-card, White); }
  /* FIXED LAYOUT, AND IT IS NOT COSMETIC. Each venue is its own <table>, so with auto
     layout every block sized its columns to its own content and Monday landed at a
     different x in each one — the first screenshot had The Roof's Monday three times the
     width of Crane Bay's. A week grid whose days do not line up between blocks cannot be
     read across, which is the only reason to draw it as a grid. */
  .culsch-grid { border-collapse: collapse; width: 100%; min-width: 760px; table-layout: fixed; }
  .culsch-corner, .culsch-person { width: 150px; }
  .culsch-dayhead, .culsch-td { width: calc((100% - 150px) / 7); }
  .culsch-dayhead { padding: var(--s-1) var(--s-2); border-bottom: 1px solid var(--line);
    font-size: var(--t-label); color: var(--muted); text-align: center; font-weight: 700; }
  .culsch-dayhead__n { display: block; color: var(--text-heading); font-size: var(--t-sub); }
  .culsch-person { width: 150px; padding: var(--s-1) var(--s-2); border-bottom: 1px solid var(--hair);
    text-align: left; vertical-align: middle; }
  .culsch-person__name { display: block; font-size: var(--t-sub); font-weight: 700; color: var(--text-heading); }
  .culsch-person__role { display: block; font-size: var(--t-label); color: var(--muted); }
  .culsch-person--open { color: var(--muted); font-style: italic; }
  .culsch-td { padding: 2px; border-bottom: 1px solid var(--hair); vertical-align: top; }

  .culsch-cell { display: block; width: 100%; min-height: 34px; padding: var(--s-1);
    border: 1px solid transparent; border-radius: var(--r-s); background: transparent;
    font: inherit; font-size: var(--t-label); text-align: center; cursor: pointer; }
  /* An empty day is quiet until you go looking for it: the + only appears on
     hover or focus, so an unscheduled week is not seven columns of plus signs. */
  .culsch-cell--empty { color: transparent; border-style: dashed; border-color: var(--hair); }
  .culsch-cell--empty:hover, .culsch-cell--empty:focus-visible { color: var(--muted); border-color: var(--line); }
  .culsch-tile { color: White; font-weight: 700; background: var(--vc, var(--navy)); }
  .culsch-tile--off { background: var(--hair); color: var(--ink); font-weight: 400; }
  .culsch-tile--open { background: var(--bad-bg); color: var(--bad-fg); font-weight: 700; }
  .culsch-tile__tag { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .culsch-tile__time { display: block; font-size: var(--t-label); font-weight: 400; opacity: .9; }
  .culsch-tile__note { display: inline-block; margin-left: 3px; font-size: .65em; vertical-align: super; opacity: .85; }
  /* Darkening by a quarter rather than a ring: an inset shadow paints over the
     background and UNDER the text, so a white label stays white and the hue is
     unchanged -- a Roof cell cannot start reading as another kitchen. */
  @media (hover: hover) and (pointer: fine) {
    .culsch-tile:hover { box-shadow: inset 0 0 0 100px rgba(0, 0, 0, .25); }
  }

  .culsch-sheet-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 60; }
  .culsch-sheet { position: fixed; z-index: 61; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto;
    border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface-card, White);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .25); }
  .culsch-sheet__head { display: flex; align-items: center; gap: var(--s-2);
    padding: var(--s-3); border-bottom: 1px solid var(--hair); }
  .culsch-sheet__date { color: var(--muted); font-size: var(--t-sub); }
  .culsch-sheet__head .btn { margin-left: auto; }
  .culsch-sheet__body { padding: var(--s-3); display: grid; gap: var(--s-2); }
  .culsch-sheet__foot { display: flex; align-items: center; gap: var(--s-2);
    padding: var(--s-3); border-top: 1px solid var(--hair); }
  .culsch-spacer { flex: 1 1 auto; }
  .culsch-field { display: grid; gap: 4px; }
  .culsch-field > span { font-size: var(--t-label); font-weight: 700; color: var(--muted); }
  .culsch-times { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
  .culsch-hint { margin: 0; color: var(--muted); font-size: var(--t-label); }
  /* fetch-983: the Check-sync plan. Same hairline rows as .culsch-money; the number
     column is right-aligned and tabular so nine counts read as a column, not a paragraph. */
  .culsch-syncprobe__table { border-collapse: collapse; margin: var(--s-2) 0; }
  .culsch-syncprobe__table th, .culsch-syncprobe__table td {
    padding: var(--s-1) var(--s-2); border-bottom: 1px solid var(--hair); text-align: left; font-size: var(--t-sub); }
  .culsch-syncprobe__table td:nth-child(2) { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* ── fetch-928 · DAY VIEW + PRINTED WEEK ──────────────────────────
   The day card keeps the week grid's scan rule: a WORKING chip is saturated with
   white text, an ABSENCE is light with dark text, so the two are told apart by
   weight before a word is read. */
  .culsch-daycard { margin-bottom: var(--s-4); }
  .culsch-daycard__tally { margin-left: auto; color: var(--muted); font-size: var(--t-sub); font-weight: 400; }
  .culsch-daycard__tally strong { color: var(--bad-fg); }
  .culsch-daybody { border: 1px solid var(--line); border-radius: var(--r-m);
    background: var(--surface-card, White); overflow: hidden; }
  /* A row is a button when you may edit and a div when you may not — same box
     either way, so read-only does not read as a broken layout. */
  /* FLEX-WRAP IS LOAD-BEARING, and a screenshot is the only thing that found that out.
     The note below is flex: 0 0 100% so it takes its own line. Without wrap it cannot
     GET its own line, so it stays on the first one, refuses to shrink (flex-shrink 0)
     and squeezes .culsch-dayrow__name — which is flex: 1 1 auto — down to zero width.
     Every shift carrying a note rendered with NO PERSON'S NAME. The text was still in
     the DOM the whole time, so no textContent assertion could ever have seen it; the
     probe now measures the rendered width instead. */
  .culsch-dayrow { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2);
    width: 100%; padding: var(--s-2) var(--s-3); border: 0; border-top: 1px solid var(--hair);
    background: none; font: inherit; color: var(--ink); text-align: left; }
  .culsch-daybody > .culsch-dayrow:first-child { border-top: 0; }
  button.culsch-dayrow { cursor: pointer; }
  button.culsch-dayrow:hover, button.culsch-dayrow:focus-visible { background: var(--wash); }
  .culsch-dayrow__name { flex: 1 1 auto; font-weight: 700; color: var(--text-heading);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .culsch-dayrow--off .culsch-dayrow__name { font-weight: 400; color: var(--muted); }
  .culsch-dayrow__warn { padding: 1px var(--s-1); border-radius: var(--r-s);
    background: var(--warn-bg); color: var(--warn-fg); font-size: var(--t-label); font-weight: 700; }
  .culsch-dayrow__tag { flex: 0 0 auto; padding: 2px var(--s-2); border-radius: var(--r-s);
    background: var(--vc, var(--navy)); color: White; font-size: var(--t-label); font-weight: 700; }
  .culsch-dayrow__tag--off { background: var(--hair); color: var(--ink); font-weight: 400; }
  .culsch-dayrow__time { flex: 0 0 auto; color: var(--muted); font-size: var(--t-sub);
    font-variant-numeric: tabular-nums; }
  .culsch-dayrow__note { flex: 0 0 100%; color: var(--muted); font-size: var(--t-label); font-style: italic; }
  .culsch-dayempty { padding: var(--s-3); color: var(--muted); font-style: italic; font-size: var(--t-sub); }
  .culsch-dayadd { display: block; width: 100%; padding: var(--s-2) var(--s-3);
    border: 0; border-top: 1px dashed var(--line); background: none; font: inherit;
    color: var(--muted); text-align: left; cursor: pointer; font-size: var(--t-sub); }
  .culsch-dayadd:hover, .culsch-dayadd:focus-visible { color: var(--ink); }
  .culsch-printscope { display: inline-block; }
  .culsch-printscope .sel { min-width: 9.5rem; }

  /* fetch-935 . ONE KITCHEN SCHEDULE TAB, TWO VIEWS
     The chooser sits ABOVE both views and is drawn only for somebody who may see
     the portal build. "in progress" rides on the segment itself rather than in a
     note underneath, because the label is what somebody reads before clicking --
     a caveat below the fold is a caveat nobody sees in time. */
  .ksched-seg { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap;
    margin-bottom: var(--s-3); }
  .ksched-seg__sub { font-weight: 400; font-size: var(--t-label); opacity: .75; }

  /* ── fetch-931 · THE BENCH ─────────────────────────────────
     A phone list, not a second roster. It sits BELOW the grid and folded shut,
     because the whole point is that these people are not part of the week until
     somebody rings them. Tokens only. */
  .culsch-bench { margin-top: var(--s-4); }
  .culsch-bench > summary { cursor: pointer; font-weight: 700; color: var(--text-heading);
    padding: var(--s-2) 0; }
  .culsch-benchlist { list-style: none; margin: var(--s-2) 0 0; padding: 0;
    border: 1px solid var(--line); border-radius: var(--r-m);
    background: var(--surface-card, White); overflow: hidden; }
  .culsch-benchrow { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2);
    padding: var(--s-2) var(--s-3); border-top: 1px solid var(--hair); }
  .culsch-benchlist > .culsch-benchrow:first-child { border-top: 0; }
  .culsch-benchrow__name { flex: 1 1 12rem; font-weight: 700; color: var(--text-heading); }
  .culsch-benchrow__role { font-weight: 400; color: var(--muted); font-size: var(--t-label); }
  /* The one thing that would otherwise confuse: a name here AND in the grid. */
  .culsch-benchrow__on { padding: 1px var(--s-1); border-radius: var(--r-s);
    background: var(--ok-bg, var(--hair)); color: var(--ok-fg, var(--ink));
    font-size: var(--t-label); font-weight: 700; }
  /* fetch-934: the two states a bench row can be in besides "on the grid".
     NOT ON THE ROSTER IS THE ORDINARY CASE — most of the bench gets a check
     rather than payroll — so it is stated quietly, in muted text, and does NOT
     take the warning colour. OFF ROSTER is different: it means the row points at
     an employee who is no longer there, which is a thing to fix. */
  .culsch-benchrow__off { color: var(--muted); font-size: var(--t-label); font-weight: 400; }
  .culsch-benchrow__warn { padding: 1px var(--s-1); border-radius: var(--r-s);
    background: var(--warn-bg); color: var(--warn-fg); font-size: var(--t-label); font-weight: 700; }
  .culsch-benchadd .culsch-field { flex: 1 1 9rem; }
  .culsch-benchrow__note { flex: 1 1 100%; color: var(--muted); font-size: var(--t-sub);
    font-style: italic; }
  .culsch-benchrow__actions { display: flex; align-items: center; gap: var(--s-1);
    margin-left: auto; flex-wrap: wrap; }
  .culsch-benchadd { display: flex; align-items: flex-end; gap: var(--s-2); flex-wrap: wrap;
    margin-top: var(--s-3); }
  .culsch-benchadd .culsch-field { flex: 1 1 12rem; }

  /* ── fetch-929 · BUDGET + THE HOLIDAY BANK ───────────────────────
     Tokens only. The one colour decision here is that OVER BUDGET uses --bad-fg and
     is also written in the word "over" beside the number — a colour on its own is not
     a signal everybody can read, which is the rule the app's own bar follows. */
  .culsch-money__grain { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-3); }
  .culsch-money__span { color: var(--muted); font-size: var(--t-sub); }
  .culsch-money { border-collapse: collapse; width: 100%; min-width: 720px; }
  .culsch-money th, .culsch-money td { padding: var(--s-2); border-bottom: 1px solid var(--hair);
    text-align: left; font-size: var(--t-sub); vertical-align: middle; }
  .culsch-money thead th { border-bottom: 1px solid var(--line); color: var(--muted);
    font-size: var(--t-label); text-transform: uppercase; letter-spacing: .04em; }
  .culsch-money tbody th { font-weight: 700; color: var(--text-heading); }
  /* Tabular numerals so a column of money lines up on its digits and can be scanned
     down rather than read row by row. */
  .culsch-money .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .culsch-money__var--over { color: var(--bad-fg); font-weight: 700; }
  .culsch-money__warn { border-left: 3px solid var(--warn-fg); margin-bottom: var(--s-3); }
  .culsch-money__warn p { margin: var(--s-2) 0 0; color: var(--muted); font-size: var(--t-sub); }

  /* A BULLET, NOT A PAIR OF BARS. The mark is what the period cost; the notch behind it
     is what its bookings allowed. One measure, one axis — they are the same unit, so
     they belong on the same scale, and the scale is shared by every row so the rows
     compare. Widths come from a generated stylesheet keyed on data-w (see
     bulletPaletteHTML): a bar's length is DATA and cannot be a literal in this file,
     and writing it inline is the debt fetch-928 cleared out of this feature. */
  .culsch-bullet { width: 30%; min-width: 120px; }
  .culsch-bullet__track { position: relative; display: block; height: 14px;
    background: var(--hair); border-radius: var(--r-s); overflow: hidden; }
  .culsch-bullet__notch { position: absolute; left: 0; top: 0; height: 100%;
    background: var(--line); }
  .culsch-bullet__mark { position: absolute; left: 0; top: 3px; height: 8px;
    background: var(--navy); border-radius: var(--r-s); }
  .culsch-bullet__mark--over { background: var(--bad-fg); }
  .culsch-bullet__none { color: var(--muted); font-size: var(--t-label); font-style: italic; }

  .culsch-wages { margin-top: var(--s-4); }
  .culsch-wages > summary { cursor: pointer; font-weight: 700; color: var(--text-heading);
    padding: var(--s-2) 0; }
  .culsch-wageinp { width: 6.5rem; text-align: right; font-variant-numeric: tabular-nums; }
  .culsch-holcal { margin-bottom: var(--s-3); }
  .culsch-holcal ul { margin: var(--s-2) 0 0; padding-left: var(--s-4); }
  .culsch-holcal li { font-size: var(--t-sub); }
  .culsch-holcal p { margin: var(--s-2) 0 0; color: var(--muted); font-size: var(--t-sub); }

  /* THE PAPER HALF. Always in the DOM and hidden on screen, so Print is the
     browser's own Print — no popup to be blocked, and no second render path that
     can drift from the one on screen. Same shape the rest of the portal uses. */
  .culsch-doc { display: none; }
  @media print {
    .culsch-live { display: none !important; }
    .culsch-doc { display: block !important; }
    .culsch-doc__head { margin: 0 0 2pt; font-size: 14pt; }
    .culsch-doc__sub { margin: 0 0 10pt; font-size: 9.5pt; color: var(--muted); }
    .culsch-doc__foot { margin-top: 8pt; font-size: 8.5pt; color: var(--muted); }
    .culsch-docsec { margin-bottom: 12pt; break-inside: avoid; page-break-inside: avoid; }
    .culsch-docsec h3 { margin: 0 0 3pt; font-size: 11pt; }
    .culsch-docempty { margin: 0; font-size: 9pt; color: var(--muted); font-style: italic; }
    .culsch-doctbl { width: 100%; border-collapse: collapse; table-layout: fixed; }
    .culsch-doctbl thead { display: table-header-group; }
    .culsch-doctbl th, .culsch-doctbl td { border: 0.75pt solid var(--ink); padding: 2pt 4pt;
      font-size: 8.5pt; vertical-align: top; text-align: left; word-break: break-word; }
    .culsch-doctbl thead th { background: Gainsboro; text-align: center; }
    .culsch-doctbl tbody th { width: 15%; }
    .culsch-doctbl tr { break-inside: avoid; page-break-inside: avoid; }
    /* An OPEN row is the one thing on the sheet that means "this is not covered", so it
       is the only row that looks different — a hole must not read as a status somebody
       is in, the same reason the app draws it dashed.

       A HEAVIER BORDER ALONE WAS NOT ENOUGH, and the first printed proof is what said
       so: every name cell is already bold, so at 0.75pt against 1.25pt the open rows
       were indistinguishable from the crew at arm's length — which is the distance a
       sheet on a wall is read from. It takes a fill and the caps as well.
       print-color-adjust because a background a printer drops is not a signal. */
    .culsch-docopen th, .culsch-docopen td { border-width: 1.25pt; font-weight: 700;
      background: var(--hair); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .culsch-docopen th { text-transform: uppercase; letter-spacing: .5pt; }
    .culsch-doccell__head { display: block; font-weight: 700; }
    .culsch-doccell__t { display: block; font-size: 7.5pt; color: var(--muted); }
  }

/* fetch-949 · Open Shifts: fit the phone, retain readable people and explicit actions. */
.os-header { padding: var(--s-3); }
#openShiftsHeader .pgh { margin: 0; padding: 0; border: 0; box-shadow: none; background: none; display: block; }
#openShiftsHeader .pgh-nav { display: flex; flex-wrap: wrap; }
#openShiftsHeader #schedVenue { flex: 1 1 8em; width: auto; }
#openShiftsHeader .pgh-top { flex-wrap: wrap; }
#openShiftsHeader .pgh-h { font-size: var(--t-section); }
#openShiftsHeader .pgh-titles { flex: 1 0 auto; max-width: 100%; overflow-wrap: anywhere; }
#openShiftsHeader .pgh-acts { flex: 0 0 auto; }
#openShiftsHeader #schedPast { min-width: var(--control-height-touch); }
#openShiftsHeader #schedPast[aria-pressed="true"] { background: var(--navy); color: var(--paper); border-color: var(--navy); }
#osNotifications { margin-top: var(--s-2); border-top: 1px solid var(--line); font-size: var(--t-sub); }
#osNotifications > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); min-height: var(--control-height-touch); cursor: pointer; }
#osNotifications > summary::after { content: "⌄"; }
#osNotifications[open] > summary::after { content: "⌃"; }
#osNotifications > summary > .muted { margin-left: auto; }
.os-notify-state { font-weight: 600; }
.os-notify-on { color: var(--ok-fg); }
.os-notify-off { color: var(--warn-fg); }
.os-notify-body { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; padding: 0 0 var(--s-2); }
.os-notify-body > span { flex: 1 1 16rem; }
.os-date { font: inherit; font-size: var(--t-sub); font-weight: 700; color: var(--navy); margin: var(--s-4) var(--s-1) var(--s-2); }
.os-card { min-width: 0; padding: var(--s-4); overflow-wrap: anywhere; }
.os-card--cancelled { opacity: .65; }
.os-cancelled-label { text-decoration: line-through; }
.os-card-head { display: flex; gap: var(--s-3); align-items: flex-start; justify-content: space-between; }
.os-card-head > :first-child { flex: 1; min-width: 0; }
.os-position { font-size: var(--t-body); color: var(--text-heading); }
.os-venue, .os-person-status { display: block; font-size: var(--t-sub); color: var(--muted); margin-top: var(--s-1); }
.os-fill { display: flex; align-items: flex-end; flex-direction: column; flex: 0 1 auto; gap: var(--s-1); font-variant-numeric: tabular-nums; }
.os-fill .badge { white-space: normal; text-align: right; }
.os-staffed { margin-top: var(--s-2); font-variant-numeric: tabular-nums; } /* fetch-1315: "3 of 5 staffed" over the one meter, across the card */
.os-staffed > .pg { margin-top: 0; }
.os-time { margin-top: var(--s-2); font-size: var(--t-body); font-variant-numeric: tabular-nums; }
.os-notes { margin-top: var(--s-1); font-size: var(--t-sub); }
.os-people { margin-top: var(--s-3); }
.os-person { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2); border-top: 1px solid var(--line); padding: var(--s-2) 0; }
.os-person > div:first-child { flex: 1 1 9rem; min-width: 0; font-size: var(--t-body); }
.os-person--drop .os-person-status { color: var(--warn-fg); font-weight: 600; }
.os-person-actions, .os-card-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.os-card-actions { margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--line); }
.os-card-actions .btn { flex: 0 1 auto; }
.os-card :is(button, select), #osFormCard :is(button, select), #osNotifications button { min-height: var(--control-height-touch); min-width: var(--control-height-touch); max-width: 100%; box-sizing: border-box; }
.os-card button, #osFormCard button { font-size: var(--t-sub); white-space: normal; }
.os-assign { display: grid; min-width: 0; gap: var(--s-2); padding: var(--s-3); margin-top: var(--s-2); background: var(--wash); border: 1px solid var(--line); border-radius: var(--r-m); }
.os-assign > label { font-weight: 600; font-size: var(--t-sub); }
#osAssignSel { width: 100%; min-width: 0; }
#osFormCard { min-width: 0; }
.os-form-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.os-form-head strong { font-size: var(--t-section); }
#osFormError { margin-top: var(--s-2); font-size: var(--t-body); color: var(--bad-fg); background: var(--bad-bg); overflow-wrap: anywhere; }
.os-form-grid { margin-top: var(--s-3); }
#osFormCard .field { min-width: 0; }
#osFormCard .field input:not([type="checkbox"]):not([type="radio"]), #osFormCard .field select, #osAssignSel, #openShiftsHeader #schedVenue {
  font-family: Inter, sans-serif; font-size: max(1rem, var(--t-body)); min-width: 0; max-width: 100%; min-height: var(--control-height-touch); box-sizing: border-box; }
#osFormCard .combo-in { padding-right: calc(var(--control-height-touch) + var(--s-2)); }
#osFormCard .combo-caret { width: var(--control-height-touch); margin-left: calc(var(--control-height-touch) * -1); }
.os-publish, #osFormCard .sg-trlab { display: flex; align-items: center; gap: var(--s-2); min-height: var(--control-height-touch); font-size: var(--t-sub); line-height: 1.5; }
.os-publish { margin-top: var(--s-2); }
.os-form-actions { margin-top: var(--s-3); }
.os-override-note { font-size: var(--t-sub); margin-top: var(--s-2); }
#osPhoneDialog { box-sizing: border-box; width: calc(100% - var(--s-4)); max-width: 38rem; max-height: calc(100dvh - var(--s-4)); padding: 0; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--paper); color: var(--ink); overflow: auto; overscroll-behavior: contain; }
#osPhoneDialog::backdrop { background: var(--modal-backdrop, rgba(0,0,0,.5)); }
#osPhoneDialog #osFormCard { margin: 0; padding: var(--s-3); border: 0; box-shadow: none; }
#osPhoneDialog .os-form-head { position: sticky; top: calc(-1 * var(--s-3)); z-index: 1; background: var(--paper); padding-block: var(--s-2); }
#openShiftsHeader :is(button,select,summary):focus-visible, #openShiftsBoard :is(button,select):focus-visible, #osFormCard :is(button,input,select):focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
@media (max-width: 640px) {
  .os-card { padding: var(--s-3); }
  #osFormCard .os-form-grid { grid-template-columns: minmax(0, 1fr); }
  .os-card-actions .btn { flex: 1 1 5rem; }
  #openShiftsHeader .pgh-morelist { right: 0; max-width: calc(100vw - var(--s-6)); }
}
@media (min-width: 900px) {
  #openShiftsHeader .pgh { display: flex; align-items: center; gap: var(--s-5); }
  #openShiftsHeader .pgh-top { flex: 1; }
  #openShiftsHeader .pgh-nav { flex: 0 1 30rem; margin-top: 0; }
}

/* fetch-957: phone-first manual Playbook draft editor */
.ck957-editor{display:grid;gap:var(--s-3)}
.ck957-editor h2,.ck957-editor h3{margin:0;color:var(--text-heading);font-size:var(--t-section)}
.ck957-editor .form-group{min-width:0;margin:0}
.ck957-editor input:not([type="checkbox"]),.ck957-editor select,.ck957-editor textarea{box-sizing:border-box;width:100%;min-width:0;min-height:var(--control-height-touch);font-size:var(--t-body)}
.ck957-editor textarea{resize:vertical}
.ck957-editor label{display:block;font-size:var(--t-sub);font-weight:600}
.ck957-editor .btn,.ck957-import .btn{min-height:var(--control-height-touch)}
.ck957-panel,.ck957-job-editor{padding:var(--s-4);margin:0 0 var(--s-3)}
.ck957-panel>.ck-v3-fields,.ck957-job-editor>.ck-v3-fields{margin-top:var(--s-3)}
.ck957-actions,.ck957-scenarios{display:flex;align-items:center;flex-wrap:wrap;gap:var(--s-2)}
.ck957-scenarios{margin:var(--s-3) 0}
.ck957-import{margin-bottom:var(--s-3)}
.ck957-section{border-top:1px solid var(--line);padding-top:var(--s-3);margin-top:var(--s-3)}
.ck957-section-name{flex:1;min-width:0}
.ck957-jobs{list-style:none;margin:var(--s-2) 0;padding:0;display:grid;gap:var(--s-2)}
.ck957-jobs li{display:flex;align-items:stretch;gap:var(--s-2);min-width:0}
.ck957-job{display:flex;gap:var(--s-2);align-items:center;flex:1;min-width:0;min-height:var(--control-height-touch);text-align:left;padding:var(--s-2);border:1px solid var(--line);border-radius:var(--r-s);background:var(--surface-card);color:var(--ink);font:inherit;font-size:var(--t-body);overflow-wrap:anywhere;cursor:pointer}
.ck957-job.is-selected{border-color:var(--focus-ring);box-shadow:inset 3px 0 0 var(--focus-ring)}
.ck957-order{display:flex;align-items:center;gap:var(--s-1)}
.ck957-picker,.ck957-move{display:grid;gap:var(--s-2);margin-top:var(--s-3);padding-top:var(--s-3);border-top:1px solid var(--line)}
.ck957-details{margin-top:var(--s-3);border-top:1px solid var(--line)}
.ck957-details summary{min-height:var(--control-height-touch);padding:var(--s-3) 0;cursor:pointer;font-size:var(--t-body);font-weight:600}
.ck957-details>.ck-v3-fields{padding-bottom:var(--s-3)}
.ck957-instructions{white-space:pre-wrap;overflow-wrap:anywhere;font-size:var(--t-body)}
.ck957-check{display:flex;align-items:center;justify-content:space-between;min-height:var(--control-height-touch);gap:var(--s-2)}
.ck957-check label{display:flex;align-items:center;flex:1;min-height:var(--control-height-touch)}
.ck957-check input{width:1.25rem;height:1.25rem}
@media(max-width:600px){.ck957-editor .ck-v3-fields{grid-template-columns:minmax(0,1fr)}.ck957-panel,.ck957-job-editor{padding:var(--s-3)}.ck957-jobs li{flex-wrap:wrap}.ck957-job{flex-basis:100%}.ck957-order{justify-content:flex-end;width:100%}.ck957-editor>.ck-v3-head>.ck957-actions{width:100%}.ck957-editor>.ck-v3-head>.ck957-actions .btn{flex:1}}

.ck-page #ckNewPlaybookBtn,.ck-page [data-ck957edit],.ck-page [data-ck957revision]{min-height:var(--control-height-touch)}

.ck957-editor input:not([type="checkbox"]),.ck957-editor select,.ck957-editor textarea{padding:var(--s-2) var(--s-3);border:1px solid var(--line);border-radius:var(--r-s);background:var(--surface-card);color:var(--ink)}
.ck957-editor input:disabled,.ck957-editor select:disabled,.ck957-editor textarea:disabled{background:var(--wash);color:var(--muted)}
.ck957-footer{padding:var(--s-3) 0;border-top:1px solid var(--line)}
.ck957-footer .ck957-actions{justify-content:flex-end}
@media(max-width:600px){.ck957-footer .ck957-actions .btn{flex:1}}

/* fetch-958: Training owns its page controls; desktop and phone share the same task order. */
.training-page .pgh { display: grid; grid-template-columns: minmax(8rem, 1fr) minmax(18rem, 2fr) auto; align-items: center; gap: var(--s-2) var(--s-4); padding: var(--s-2) var(--s-3); }
.training-page .pgh-top { display: contents; }
.training-page .pgh-titles { grid-column: 1; grid-row: 1; }
.training-page .pgh-acts { grid-column: 3; grid-row: 1; justify-self: end; }
.training-page .pgh-tabs { grid-column: 2; grid-row: 1; display: grid; grid-template-columns: 1fr 1.6fr; gap: var(--s-2); margin: 0; width: 100%; overflow: visible; } /* fetch-1194: two tabs, not three */
.training-page .pgh-tab { min-width: var(--control-height-touch); min-height: var(--control-height-touch); padding: var(--s-2) var(--s-1); white-space: normal; font-size: var(--t-body); line-height: 1.4; }
.training-page .pgh-nav, .training-page .pgh-row { grid-column: 1 / -1; display: flex; margin: 0; }
.training-page .pgh-nav .sel { width: auto; min-width: 10rem; max-width: 100%; }
.training-page .pgh-search { min-height: var(--control-height-touch); box-sizing: border-box; padding-block: 0; }
.training-page .pgh-search input { min-height: var(--control-height-touch); }
.training-page .pgh-search-x { flex: 0 0 var(--control-height-touch); }
.training-page .pgh-morelist .btn { white-space: normal; min-height: var(--control-height-touch); }
.training-library-files { list-style: none; margin: 0; padding: 0; }
.training-library-file { display: flex; align-items: center; gap: var(--s-3); padding-block: var(--s-3); }
.training-library-file + .training-library-file { border-top: 1px solid var(--line); }
.training-library-file a { flex: 1; min-width: 0; color: var(--navy); font-size: var(--t-body); font-weight: 600; overflow-wrap: anywhere; }
.training-library-file .btn { min-width: var(--control-height-touch); min-height: var(--control-height-touch); }
.training-library-intro { margin: 0 0 var(--s-3); color: var(--muted); font-size: var(--t-sub); line-height: 1.5; }
@media (max-width: 800px) {
  .training-page .pgh { grid-template-columns: minmax(0, 1fr); gap: var(--s-2); }
  .training-page .pgh-top { display: flex; grid-column: 1; gap: var(--s-2); }
  .training-page .pgh-titles { flex: 1 1 4rem; }
  .training-page .pgh-h { font-size: var(--t-section); }
  .training-page .pgh-acts { flex: 0 1 auto; }
  .training-page .pgh-tabs { grid-column: 1; grid-row: auto; }
  .training-page .pgh-tab { font-size: var(--t-sub); }
  .training-page .pgh-nav, .training-page .pgh-row { grid-column: 1; }
}

/* fetch-1194: ONE TRAINING LIST (docs/trainee-redesign/mockups/training-list.html). Three groups a manager
   reads top to bottom — Needs attention, In progress, Complete — each row a name, the four-day spine, and the
   one line that says why it is there. The fetch-958 stage board left with its tab; its read receipts did not:
   the skeleton, the failed notice and the retry below are what a list owes a reader when it does not know. */
.trl-sec { display: flex; align-items: baseline; gap: var(--s-2); margin: var(--s-4) 0 var(--s-2); color: var(--muted); font-size: var(--t-sub); font-weight: 650; letter-spacing: .05em; text-transform: uppercase; }
.trl-sec:first-child { margin-top: var(--s-2); }
.trl-sec .trl-n { font-variant-numeric: tabular-nums; font-weight: 700; }
.trl-list { list-style: none; margin: 0; padding: 0; background: var(--surface-card); border: 1px solid var(--line); border-radius: var(--r-m); }
.trl-list > li + li { border-top: 1px solid var(--line); }
.trl-row { display: grid; gap: var(--s-1); width: 100%; box-sizing: border-box; padding: var(--s-3); border: 0; border-radius: var(--r-m); background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.trl-row:hover { background: var(--wash); }
.trl-row:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.trl-top { display: flex; align-items: center; gap: var(--s-3); }
.trl-name { font-size: var(--t-body); font-weight: 700; color: var(--navy-dark); overflow-wrap: anywhere; }
.trl-dots { display: inline-flex; gap: var(--s-1); margin-left: auto; flex: none; }
.trl-meta { color: var(--muted); font-size: var(--t-sub); line-height: 1.5; overflow-wrap: anywhere; }
.trl-meta b { color: var(--ink); font-weight: 600; }
.trl-meta .vchip { vertical-align: -1px; }
.trl-why { display: flex; align-items: flex-start; gap: var(--s-2); color: var(--muted); font-size: var(--t-sub); line-height: 1.5; overflow-wrap: anywhere; }
.trl-why .ci { flex: none; margin-top: .2em; }
.trl-why--bad { color: var(--bad-fg); font-weight: 600; }
.trl-why--warn { color: var(--warn-fg); font-weight: 600; }
.trl-why--ok { color: var(--ok-fg); font-weight: 600; }
/* fetch-1415: the schedule line - when this trainee next works a training shift, or that nobody has booked one */
.trl-next { display: flex; align-items: flex-start; gap: var(--s-2); color: var(--ink); font-size: var(--t-sub); line-height: 1.5; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.trl-next .ci { flex: none; margin-top: .2em; color: var(--muted); }
.trl-next--none { color: var(--warn-fg); font-weight: 600; }
.trl-next--none .ci { color: inherit; }
.trl-next--quiet { color: var(--muted); }
.trl-row--done .trl-name { color: var(--muted); }
.trl-quiet { margin: var(--s-3) 0 0; color: var(--muted); font-size: var(--t-sub); line-height: 1.5; }
/* Loading: no count, no group heading, no green — the shape of an answer, not an answer. */
.trl-skels { display: grid; gap: var(--s-3); padding: var(--s-4); background: var(--surface-card); border: 1px solid var(--line); border-radius: var(--r-m); }
.trl-skel { display: block; height: .7rem; border-radius: var(--r-s); background: var(--wash); }
.trl-skel--l { width: 70%; }
.trl-skel--m { width: 45%; }
.trl-skel--s { width: 30%; }
.trl-row--quiet .trl-name { font-weight: 600; }
.train-dot-gap { width: 12px; height: 12px; border-radius: 50%; display: inline-block; background: var(--warn-bg); border: 2px solid var(--warn-fg); box-sizing: border-box; }
@media (min-width: 900px) {
  /* a search box the width of the page reads as the page's subject; it is a filter, so it takes a filter's room */
  .training-page .pgh-search { max-width: 24rem; }
  .trl-row { grid-template-columns: minmax(12rem, 1.1fr) minmax(0, 1.4fr); align-items: start; column-gap: var(--s-4); }
  .trl-top { grid-column: 1; }
  .trl-meta { grid-column: 1; }
  .trl-next { grid-column: 1; }
  .trl-why { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
}
/* fetch-969: Reports owns its category, catalog and refinements in one compact card. */
#reportsHeader .pgh { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-2); font-size: var(--t-sub); }
#reportsHeader .pgh-top { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: var(--s-1) var(--s-2); }
#reportsHeader .pgh-titles { display: contents; }
#reportsHeader .pgh-acts { grid-column: 2; grid-row: 1; }
#reportsHeader .pgh-h { overflow-wrap: anywhere; }
#reportsHeader .pgh-sub, #reportsHeader .pgh-meta { grid-column: 1 / -1; margin: 0; line-height: 1.35; }
#reportsHeader .pgh-meta { color: var(--muted); font-size: var(--t-sub); }
#reportsHeader .pgh-tabs { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 6em), 1fr)); margin: 0; gap: var(--s-1); overflow: visible; }
#reportsHeader .pgh-tab { white-space: normal; font-size: var(--t-sub); line-height: 1.3; padding: var(--s-1); }
#reportsHeader .pgh-nav { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10em), 1fr)); align-items: end; gap: var(--s-2); margin: 0; }
#reportsHeader .pgh-navfield { position: relative; display: block; min-width: 0; }
#reportsHeader .pgh-navfield > span { position: absolute; top: var(--s-1); left: var(--s-2); font-size: var(--t-sub); line-height: 1; pointer-events: none; }
#reportsHeader .pgh-navfield :is(select, input) { min-height: var(--control-height-touch); height: auto; padding: calc(1em + var(--s-2)) var(--s-5) var(--s-1) var(--s-2); font-size: var(--t-sub); line-height: 1.3; }
#reportsHeader .pgh-navfield:has(#rptReport) { grid-column: 1 / -1; }
#reportsHeader .pgh-navfield:has(#rptPreset) { order: 1; }
#reportsHeader #rptClearDates { order: 2; }
#reportsHeader .pgh-navfield:has(#rptFrom) { order: 3; }
#reportsHeader .pgh-navfield:has(#rptTo) { order: 4; }
#reportsHeader .pgh-navfield:has(#rptStatus) { order: 5; }
#reportsHeader .pgh-scope { margin: 0; }
#reportsHeader .pgh-scope-choices:empty { display: none; }
#reportsHeader .pgh-morelist { min-width: 12rem; width: min(19rem, calc(100vw - var(--s-6) * 2)); }
#reportsHeader .pgh-morelist .btn { white-space: normal; text-align: left; justify-content: flex-start; }
#reportsHeader :is(button, select, input, summary) { min-height: var(--control-height-touch); min-width: var(--control-height-touch); box-sizing: border-box; }
#reportsHeader .pgh-more { width: var(--control-height-touch); }
#reportsHeader .pgh-nav > button { white-space: normal; font-size: var(--t-sub); }
#reportsHeader.rpt-header-insights .pgh-nav { grid-template-columns: repeat(auto-fit, minmax(min(100%, 10em), 1fr)); }
#reportsHeader.rpt-header-insights .pgh-h { font-size: var(--t-section); }
#reportsHeader.rpt-header-insights .pgh { padding-block: var(--s-2); gap: var(--s-1); margin-bottom: var(--s-2); }
.reports-page #rptPanel:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
/* fetch-1299 (Six-Control pass 1b) - THE "ALL REPORTS" CATALOG. Reports opens on it; a report opens from its tile or row.
   The header keeps #reportsHeader's grid, so its search row, the fetch-1298 meta row (the toggle at its end) and a report's
   "All reports" back button each take the full width. Grid (the default): a tile per report, its Crystal glyph, name and
   one-line description, the whole tile the target (the fetch-659 lesson); two-up on a phone, which drops the description.
   List: name, description, category, one row each; a phone stacks them and keeps the description. */
#reportsHeader .pgh-row, #reportsHeader .pgh-metarow { grid-column: 1 / -1; margin: 0; }
#reportsHeader .pgh-search { padding-block: 0; } /* the header's 44px input floor is the box; its padding stacked a 60px field */
#reportsHeader .pgh-search:focus-within { outline: 2px solid var(--focus-ring); outline-offset: 2px; } /* its input draws no ring of its own (outline: none) */
#reportsHeader.rpt-header-catalog .pgh-nav { display: flex; justify-content: flex-end; }
#reportsHeader.rpt-header-catalog .pgh-nav > .btn { flex: 0 0 auto; }
@media (min-width: 800px) { #reportsHeader.rpt-header-catalog .pgh-nav { grid-column: 2; grid-row: 2; align-self: end; } } /* Build a report beside the category tabs */
#reportsHeader .pgh-back { grid-column: 1; grid-row: 1; justify-self: start; align-self: center; } /* the top row, beside Print and More; the title sits under it */
@media print { #reportsHeader .pgh-back, #reportsHeader .pgh-row { display: none !important; } } /* the printed report is the report, not its way back; a printed catalog drops its search */
.rpt-cat-h { margin: var(--s-5) 0 var(--s-2); font-size: var(--t-label); font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--text-heading); }
.rpt-cat-h:first-child { margin-top: 0; }
.rpt-cat-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: var(--s-3); }
.rpt-tile { display: flex; align-items: flex-start; gap: var(--s-3); width: 100%; height: 100%; min-height: 5.5rem; box-sizing: border-box;
  padding: var(--s-3) var(--s-4); text-align: left; font: inherit; color: var(--text-heading); background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r-m); cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.rpt-tile:hover { border-color: var(--navy); box-shadow: 0 2px 10px rgba(56,74,97,.10); }
.rpt-tile > .ci { flex: 0 0 auto; color: var(--navy); margin-top: 1px; }
.rpt-tile > span { min-width: 0; }
.rpt-tile strong { display: block; font-size: var(--t-body); font-weight: 600; line-height: 1.3; }
.rpt-tile small { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: var(--s-1);
  font-size: var(--t-sub); line-height: 1.4; color: var(--muted); }
.rpt-cat-list { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.rpt-cat-list li + li { border-top: 1px solid var(--hair); }
.rpt-lrow { display: grid; grid-template-columns: minmax(12rem, 1.1fr) minmax(0, 2fr) 8rem; gap: var(--s-1) var(--s-4); align-items: baseline;
  width: 100%; min-height: var(--control-height-touch); box-sizing: border-box; padding: var(--s-3) var(--s-4); text-align: left; font: inherit;
  color: var(--text-heading); background: none; border: 0; cursor: pointer; }
.rpt-lrow:hover { background: var(--wash); }
.rpt-lrow:focus-visible { outline-offset: -3px; } /* inside the row: the list's rounded clip would cut an outside ring */
.rpt-lrow strong { font-size: var(--t-body); font-weight: 600; }
.rpt-lrow-d { font-size: var(--t-sub); line-height: 1.4; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rpt-lrow-g { font-size: var(--t-sub); color: var(--muted); text-align: right; }
@media (max-width: 640px) {
  .rpt-cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
  .rpt-tile { flex-direction: column; gap: var(--s-2); min-height: 6rem; padding: var(--s-3); }
  .rpt-tile small { display: none; }
  .rpt-lrow { grid-template-columns: minmax(0, 1fr); }
  .rpt-lrow-g { text-align: left; }
}
@media (min-width: 800px) {
  #reportsHeader .pgh { grid-template-columns: minmax(0, 1fr) minmax(14rem, 1fr); }
  #reportsHeader .pgh-tabs { grid-column: 1; max-width: 30rem; }
  #reportsHeader .pgh-nav { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10em), 1fr)); }
  #reportsHeader .pgh-scope { grid-column: 2; grid-row: 2; justify-self: end; min-width: 12rem; }
  #reportsHeader.rpt-header-insights .pgh-nav { grid-template-columns: repeat(auto-fit, minmax(min(100%, 10em), 1fr)); }
  #reportsHeader.rpt-header-insights .pgh-navfield:has(#rptReport) { grid-column: auto; }
}
@media print {
  #reportsHeader .pgh { display: block; padding: 0; border: 0; box-shadow: none; }
  #reportsHeader :is(.pgh-tabs, .pgh-nav, .pgh-scope, .pgh-acts) { display: none !important; }
  #reportsHeader .pgh-h, #reportsHeader .pgh-sub, #reportsHeader .pgh-meta { display: block; }
  .reports-page .rpt-tbl-wrap { max-height: none; overflow: visible; }
}
/* fetch-960: labeled native period controls opt in; existing nav callers keep their markup. */
.pgh-navfield { display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; font-size: var(--t-sub); font-weight: 600; color: var(--text-heading); }
.pgh-navfield :is(input, select) { width: 100%; min-width: 0; min-height: var(--control-height-touch); box-sizing: border-box; font-weight: 400; }

/* Linen workbench: quantities first, event evidence beside them, one shared page header. */
.linen-page { max-width: var(--w-mid); margin-inline: auto; }
.linen-page .notice { flex-wrap: wrap; gap: var(--s-3); }
.linen-page .notice > div { flex: 1 1 16rem; min-width: 0; }
.linen-page .notice > button { flex: 0 0 auto; max-width: 100%; white-space: normal; }
#linenHeader .pgh:not(.readiness-header) { display: block; }
#linenHeader .pgh:not(.readiness-header) .pgh-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9em), 1fr)); align-items: end; }
#linenHeader .pgh-morelist { width: min(19rem, calc(100vw - var(--s-6))); }
#linenHeader .pgh-morelist .btn { white-space: normal; text-align: left; justify-content: flex-start; }
.linen-page :is(button, summary, input, select) { min-height: var(--control-height-touch); }
.linen-page :is(button, summary) { min-width: var(--control-height-touch); }
.linen-doc { padding: var(--s-5); }
.linen-doc-head { display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; border-bottom: 1px solid var(--brand-gold-mid); padding-bottom: var(--s-4); margin-bottom: var(--s-5); }
.linen-doc-head h2 { font-family: Inter, sans-serif; font-size: var(--t-section); line-height: 1.35; margin: 0 0 var(--s-2); color: var(--text-heading); }
.linen-print-context { display: none; }
.linen-supplier, .linen-deadline, .linen-delivery { font-size: var(--t-sub); line-height: 1.65; }
.linen-supplier { color: var(--muted); overflow-wrap: anywhere; }
.linen-deadline { margin-top: var(--s-1); font-weight: 600; }
.linen-delivery { text-align: right; font-variant-numeric: tabular-nums; }
.linen-order-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-6); align-items: start; }
.linen-section-head { margin-bottom: var(--s-3); }
.linen-section-head h3, .linen-events-print h3 { font-family: Inter, sans-serif; font-size: var(--t-body); color: var(--text-heading); margin: 0; }
.linen-section-head p, .linen-catalog-help { font-size: var(--t-sub); color: var(--muted); line-height: 1.5; margin: var(--s-1) 0 0; }
.linen-item-row { display: grid; grid-template-columns: minmax(0, 1fr) 6rem; align-items: center; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--hair); }
.linen-item-label { display: block; font-size: var(--t-body); font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.linen-item-note, .linen-item-edited { font-size: var(--t-sub); line-height: 1.4; color: var(--muted); margin-top: var(--s-1); }
.linen-item-edited { color: var(--info-fg); }
.linen-page input { border: 1px solid var(--line); border-radius: var(--r-s); background: var(--paper); color: var(--ink); padding: var(--s-2); box-sizing: border-box; min-width: 0; width: 100%; font-size: var(--t-body); }
.linen-page .linen-qty, .linen-extra-qty input { text-align: right; font-weight: 700; }
.linen-extra-row { display: grid; grid-template-columns: minmax(0, 1fr) 6rem var(--control-height-touch); align-items: end; gap: var(--s-2); padding: var(--s-3) 0; border-bottom: 1px solid var(--hair); }
.linen-extra-row label { display: block; font-size: var(--t-sub); margin-bottom: var(--s-1); }
.linen-remove { padding: 0; font-size: var(--t-section); }
#linExtraAdd { margin-top: var(--s-3); }
.linen-event { border: 1px solid var(--line); border-radius: var(--r-m); margin-top: var(--s-2); background: var(--paper); }
.linen-event summary { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-3); cursor: pointer; list-style: none; }
.linen-event summary::-webkit-details-marker, .linen-catalog summary::-webkit-details-marker { display: none; }
.linen-event-heading { flex: 1; min-width: 0; }
.linen-event-heading strong { display: block; font-size: var(--t-body); line-height: 1.4; overflow-wrap: anywhere; }
.linen-event-meta { display: block; margin-top: var(--s-1); font-size: var(--t-sub); color: var(--muted); line-height: 1.4; }
.linen-event-guests { display: flex; flex-direction: column; align-items: flex-end; gap: var(--s-1); font-size: var(--t-sub); white-space: nowrap; }
.linen-event-chevron { flex-shrink: 0; color: var(--muted); }
.linen-event[open] > summary .linen-event-chevron, .linen-catalog[open] > summary .linen-event-chevron { transform: rotate(180deg); }
.linen-event-quantities { margin: 0; padding: 0 var(--s-3) var(--s-3); }
.linen-event-quantities > div { display: flex; justify-content: space-between; gap: var(--s-3); padding-block: var(--s-2); border-top: 1px solid var(--hair); font-size: var(--t-sub); line-height: 1.4; }
.linen-event-quantities dt { overflow-wrap: anywhere; }
.linen-event-quantities dd { margin: 0; font-weight: 600; }
.linen-events-print { display: none; }
.linen-catalog { margin-top: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-l); background: var(--paper); }
.linen-catalog > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-4); cursor: pointer; list-style: none; font-size: var(--t-body); }
.linen-catalog-summary { display: block; color: var(--muted); font-size: var(--t-sub); margin-top: var(--s-1); line-height: 1.4; }
.linen-catalog-body { padding: 0 var(--s-4) var(--s-4); }
.linen-catalog-row { display: grid; grid-template-columns: minmax(10rem, 2fr) minmax(8rem, 1.4fr) repeat(3, minmax(5rem, .7fr)) var(--control-height-touch); gap: var(--s-3); align-items: end; padding-block: var(--s-4); border-bottom: 1px solid var(--hair); }
.linen-catalog-row .field { margin: 0; min-width: 0; }
.linen-catalog-row label { font-size: var(--t-sub); }
.linen-catalog-actions { margin-top: var(--s-4); }
@media (min-width: 1025px) {
  #linenHeader .pgh:not(.readiness-header) { display: grid; grid-template-columns: minmax(10rem, 1fr) minmax(18rem, 1.4fr) auto; gap: var(--s-4); align-items: center; }
  #linenHeader .pgh:not(.readiness-header) .pgh-top { display: contents; }
  #linenHeader .pgh:not(.readiness-header) .pgh-titles { grid-column: 1; grid-row: 1; }
  #linenHeader .pgh:not(.readiness-header) .pgh-acts { grid-column: 3; grid-row: 1; }
  #linenHeader .pgh:not(.readiness-header) .pgh-nav { grid-column: 2; grid-row: 1; margin-top: 0; }
}
@media (max-width: 1024px) {
  .linen-catalog-row { grid-template-columns: repeat(3, minmax(0, 1fr)) var(--control-height-touch); }
  .linen-catalog-name, .linen-catalog-unit { grid-column: span 2; }
}
@media (max-width: 760px) {
  .linen-order-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
}
@media (max-width: 640px) {
  .linen-doc { padding: var(--s-4); }
  .linen-doc-head { gap: var(--s-3); margin-bottom: var(--s-4); }
  .linen-delivery { text-align: left; width: 100%; }
  .linen-page :is(input, select) { font-size: max(var(--t-body), 1rem); }
  .linen-catalog-row { grid-template-columns: repeat(auto-fit, minmax(min(100%, 6em), 1fr)); }
  .linen-catalog-name, .linen-catalog-unit { grid-column: 1 / -1; }
  .linen-catalog-row .linen-remove { grid-column: -2 / -1; justify-self: end; width: var(--control-height-touch); }
  .linen-extra-row { grid-template-columns: minmax(0, 1fr) 5rem var(--control-height-touch); }
  .linen-event summary { flex-wrap: wrap; }
  .linen-event-heading { flex-basis: 60%; }
}
@media print {
  .linen-page .no-print, .linen-page #linenHeader { display: none !important; }
  .linen-print-context { display: block; }
  .linen-order-grid { display: block; }
  .linen-events-print { display: block; margin-top: var(--s-5); }
  .linen-events-print table { width: 100%; table-layout: fixed; }
  .linen-events-print table.rpt-tbl th, .linen-events-print table.rpt-tbl td { overflow-wrap: anywhere; white-space: normal; }
  .linen-item-row { grid-template-columns: minmax(0, 1fr) 6rem; padding-block: var(--s-1); break-inside: avoid; }
  .linen-page input { border: 0; min-height: 0; padding: 0; }
  .linen-page .linen-doc input.linen-qty { font-size: var(--t-body); }
  .linen-extra-row { grid-template-columns: minmax(0, 1fr) 6rem; break-inside: avoid; }
  .linen-doc-head { flex-wrap: nowrap; }
  .linen-delivery { width: auto; text-align: right; }
}

/* fetch-962: an event is a working document with a persistent index. */
.evt-record-head { padding: 0; }
.evt-record-main { display: flex; align-items: flex-start; gap: var(--s-4); padding: var(--s-4); }
.evt-record-identity { flex: 1 1 28rem; min-width: 0; }
.evt-record-kicker { display: none; }
/* fetch-1110: a quiet label and first-function guidance for the Sales planning workspace. */
.evt-record-kicker--planning { display: block; margin-bottom: var(--s-1); color: var(--muted); font-size: var(--t-sub); font-weight: 600; }
.evt-planning-start { max-width: 42rem; padding-block: var(--s-2); }
.evt-planning-start h4 { margin: 0 0 var(--s-2); font-family: inherit; font-size: var(--t-body); color: var(--ink); }
.evt-planning-start p { margin: 0; color: var(--muted); font-size: var(--t-mid); line-height: 1.6; }
.evt-record-identity h2 { margin: 0; font: 700 var(--t-section)/1.3 Inter, sans-serif; color: var(--text-heading); overflow-wrap: anywhere; }
.evt-record-context { font-size: var(--t-sub); line-height: 1.5; margin-top: var(--s-1); }
.evt-record-actions { display: flex; flex: 0 1 33rem; gap: var(--s-1); align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.evt-record-actions .btn { min-height: var(--control-height-sm); font-size: var(--t-sub); }
/* fetch-1500: the Operations view's Staffing header as one band (evtHeaderCompact). Nothing is removed from the DOM: the kicker,
   the readiness strip and the tile captions are hidden until "Event details"; the areas become 44px chips (the phone's
   fetch-1332 shape) on every width; the Event view select keeps its accessible name and loses its visible label. */
#evtHeader.evt-record-head--compact .evt-record-main { align-items: center; gap: var(--s-3); padding: var(--s-2) var(--s-4); }
#evtHeader.evt-record-head--compact .evt-record-identity { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-1) var(--s-3); }
#evtHeader.evt-record-head--compact .evt-record-kicker { display: none; } /* fetch-1500 R2: the readiness detail draws in the band's right-hand slot, uncompacted */
#evtHeader.evt-record-head--compact .evt-record-identity h2 { font-size: var(--t-body); }
#evtHeader.evt-record-head--compact .evt-record-context { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-3); margin-top: 0; color: var(--muted); }
#evtHeader.evt-record-head--compact .evt-record-context > span { display: inline-flex; align-items: center; gap: var(--s-1); }
#evtHeader.evt-record-head--compact .evt-view-switch { margin-bottom: 0; }
#evtHeader.evt-record-head--compact .evt-view-switch > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
/* fetch-1500 R2 (Jack 10-08: "every button in the top right of the header could be removed - and the readiness details could be
   uncompacted in its place"): the band is two rows - the title row, then the area chips with the readiness detail (meter, count,
   what is missing) at the row's right end, where the empty space is; no hairline, no button (beo-editor.css draws the hairline
   for the full header). The open checklist takes the whole row. */
#evtHeader.evt-record-head--compact { display: flex; flex-wrap: wrap; align-items: center; }
#evtHeader.evt-record-head--compact > .evt-record-main { flex: 1 1 100%; }
#evtHeader.evt-record-head--compact > .evt-workspace-tiles { flex: 0 0 auto; min-width: 0; container-type: normal; } /* fetch-1332's 641-1099px container (inline-size) would give the chips no width in this flex row; the compact chips are drawn by the rules above */
#evtHeader.evt-record-head--compact > .evt-record-readiness { flex: 1 1 14rem; min-width: 0; margin-left: auto; padding: 0 var(--s-4) var(--s-2); } /* beside the chips, its sentence wrapping into the room that is left */
#evtHeader.evt-record-head--compact > .evt-record-readiness:has(.evt-readiness-list) { flex: 1 1 100%; margin-left: 0; }
#evtHeader.evt-record-head--document.evt-record-head--compact .evt-readiness { justify-content: flex-end; margin: 0; padding-top: 0; border-top: 0; }
#evtHeader.evt-record-head--document.evt-record-head--compact .evt-readiness:has(.evt-readiness-list) { justify-content: flex-start; }
/* fetch-1500 R2: the title is the Event details toggle - its words and a chevron, one control; there is no Event details / Compact header button */
#evtHeader .evt-record-title-toggle { display: inline-flex; align-items: center; gap: var(--s-1); max-width: 100%; min-height: var(--control-height-sm); margin: 0 calc(-1 * var(--s-1)); padding: 0 var(--s-1); border: 0; border-radius: var(--r-s); background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
#evtHeader .evt-record-title-toggle > span:first-child { flex: 0 0 auto; overflow-wrap: normal; } /* flex: none - a sub-pixel shrink broke the title onto two lines; a wide title is clipped by the button, the full header shows it whole */
#evtHeader.evt-record-head--compact .evt-record-identity h2 { min-width: 0; max-width: 100%; }
#evtHeader.evt-record-head--compact .evt-record-title-toggle { overflow: hidden; white-space: nowrap; }
#evtHeader .evt-record-title-toggle:hover { background: var(--wash); }
#evtHeader .evt-record-title-toggle > .ci { flex: 0 0 auto; color: var(--muted); transition: transform .15s; }
#evtHeader .evt-record-title-toggle[aria-expanded="true"] > .ci { transform: rotate(180deg); }
#evtHeader.evt-record-head--compact .evt-record-back { flex: none; min-height: var(--control-height-sm); } /* the Back door, in the row (data-backevent, as before) */
#evtHeader.evt-record-head--compact .evt-record-identity > :not(h2):not(.evt-view-switch):not(.evt-view-label):not(.evt-record-context):not(.evt-record-back) { display: none; } /* anything else that is detail */
#evtHeader.evt-record-head--compact .evt-workspace-tiles .pgh-tile small { display: none; }
#evtHeader.evt-record-head--compact .evt-workspace-tiles .pgh-tile[aria-pressed="true"]::after { display: none; }
@media (min-width: 641px) { /* the phone keeps its fetch-1332 one-row scroller; wider, the chips wrap in the card's gutter */
  #evtHeader.evt-record-head--compact .evt-workspace-tiles { padding: 0 var(--s-4) var(--s-2); }
  #evtHeader.evt-record-head--compact .evt-workspace-tiles .pgh-tiles { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0; }
  #evtHeader.evt-record-head--compact .evt-workspace-tiles .pgh-tile { flex: 0 0 auto; height: var(--control-height-touch); min-height: 0; padding: 0 var(--s-3); gap: var(--s-2); white-space: nowrap; }
  #evtHeader.evt-record-head--compact .evt-workspace-tiles .pgh-tile > .ci { width: 18px; height: 18px; }
  #evtHeader.evt-record-head--compact .evt-workspace-tiles .pgh-tile strong { font-size: var(--t-sub); }
  #evtHeader.evt-record-head--compact .evt-workspace-tiles .pgh-tile[aria-pressed="true"] { border-color: var(--navy); background: var(--navy); color: var(--paper); }
  #evtHeader.evt-record-head--compact .evt-workspace-tiles .pgh-tile[aria-pressed="true"] > .ci { color: var(--paper); }
}
@media (max-width: 640px) {
  #evtHeader.evt-record-head--compact .evt-record-main { padding: var(--s-2) var(--s-3); }
  #evtHeader.evt-record-head--compact .evt-record-identity h2 { flex: 1 1 10rem; min-width: 0; } /* the view and the title share the first row */
  #evtHeader.evt-record-head--compact .evt-record-title-toggle { white-space: normal; } /* fetch-1500 R2: a phone wraps the title */
  #evtHeader.evt-record-head--compact .evt-record-title-toggle > span:first-child { flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere; }
  #evtHeader.evt-record-head--compact .evt-record-back { display: none; } /* the phone's top bar already carries Back */
  #evtHeader.evt-record-head--compact .evt-view-switch { display: inline-flex; width: auto; flex: 0 0 auto; }
  #evtHeader.evt-record-head--compact .evt-view-switch .sel { flex: none; font-size: var(--t-sub); }
  #evtHeader.evt-record-head--compact .evt-view-label { margin: 0; }
  #evtHeader.evt-record-head--compact .evt-record-context { flex: 1 1 100%; }
  #evtHeader.evt-record-head--compact > .evt-workspace-tiles { flex: 1 1 100%; } /* fetch-1500 R2: the chip row keeps its sideways scroll; the readiness line is the band's last line */
  #evtHeader.evt-record-head--compact > .evt-record-readiness { flex: 1 1 100%; margin-left: 0; padding: 0 var(--s-3) var(--s-2); }
  #evtHeader.evt-record-head--document.evt-record-head--compact .evt-readiness { justify-content: flex-start; }
}
/* fetch-1014 (Jack, 09-09): the readiness line in the header - label, segment meter, count, then the failing checks as a sentence;
   the button opens the full checklist under the line. Tone rides data-tone from the strip's own grammar; the words carry the meaning. */
.evt-readiness { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s-2); margin-top: var(--s-1); font-size: var(--t-sub); line-height: 1.5; color: var(--navy); }
.evt-readiness-summary { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--control-height-sm); margin-left: calc(-1 * var(--s-2)); padding: 0 var(--s-2); border: 0; border-radius: var(--r-s); background: transparent; color: var(--text-heading); font: 600 var(--t-sub)/1.5 Inter, sans-serif; cursor: pointer; }
.evt-readiness-summary:hover { background: var(--wash); }
.evt-readiness-line { display: inline-block; white-space: nowrap; } /* one inline run inside the flex button, so the words read "Readiness n/m" as text (the flex items would read as lines) */
.evt-readiness-meter { display: inline-block; vertical-align: middle; line-height: 0; margin: 0 var(--s-2) 2px 1px; } /* inline-block, not inline-flex: Chrome breaks innerText around a flex box, and the words must read "Readiness n/m" */
.evt-readiness-meter i { display: inline-block; width: 14px; height: 7px; border-radius: 2px; background: var(--line); }
.evt-readiness-meter i + i { margin-left: 3px; }
.evt-readiness-meter i.on { background: var(--vc, var(--muted)); } /* fetch-1017 (Jack): the fill is the venue's colour (--vc from the binder, the calendar's token), not the tone - the tone stays on data-tone for the checklist's marks and the words carry the state */
.evt-readiness-chev { display: inline-block; margin-left: var(--s-1); vertical-align: middle; font-size: var(--t-body); line-height: 1; color: var(--muted); transform: rotate(0); transition: transform .15s; }
.evt-readiness-summary[aria-expanded="true"] .evt-readiness-chev { transform: rotate(90deg); }
.evt-readiness-needs { min-width: 0; overflow-wrap: anywhere; }
.evt-readiness-detail { color: var(--muted); font-weight: 400; }
.evt-readiness-list { flex-basis: 100%; list-style: none; margin: var(--s-1) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: var(--s-1) var(--s-3); }
.evt-readiness-list li { display: flex; gap: var(--s-2); align-items: baseline; min-width: 0; overflow-wrap: anywhere; }
.evt-readiness-list li[data-state="na"] { color: var(--muted); }
.evt-readiness-mark { flex: 0 0 auto; font-weight: 700; }
.evt-readiness-list li[data-state="ready"] .evt-readiness-mark { color: var(--ok-fg); }
.evt-readiness-list li[data-state="missing"] .evt-readiness-mark { color: var(--warn-fg); }
.evt-readiness[data-tone="bad"] .evt-readiness-list li[data-state="missing"] .evt-readiness-mark { color: var(--bad-fg); }
.evt-action-menu { position: relative; }
.evt-action-menu-list { position: absolute; right: 0; top: calc(100% + var(--s-1)); min-width: 15rem; max-width: calc(100vw - var(--s-6)); padding: var(--s-2); z-index: 300; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: 0 var(--s-2) var(--s-5) color-mix(in srgb, var(--navy-dark) 18%, transparent); display: flex; flex-direction: column; gap: var(--s-1); }
.evt-action-menu-list .btn { width: 100%; justify-content: flex-start; text-align: left; border: 0; white-space: normal; }
.evt-workspace { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: var(--s-4); margin-top: var(--s-4); } /* fetch-1256: one column - the index column went with the rail */
.evt-document { min-width: 0; font-family: Inter, sans-serif; }
.evt-log-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; margin-bottom: var(--s-3); }
.evt-log-heading h2 { margin: 0; font: 650 var(--t-section)/1.4 Inter, sans-serif; color: var(--text-heading); }
.evt-section { min-width: 0; margin-bottom: var(--s-4); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-l); scroll-margin-top: var(--s-4); }
.evt-section-heading { margin: 0; font-family: Inter, sans-serif; }
.evt-section-toggle { display: flex; align-items: center; gap: var(--s-2); width: 100%; min-height: 3.25rem; padding: var(--s-3) var(--s-4); background: transparent; border: 0; border-radius: var(--r-l); color: var(--text-heading); font: 650 var(--t-section)/1.4 Inter, sans-serif; text-align: left; cursor: pointer; }
.evt-section-toggle:hover { background: var(--wash); }
.evt-section-chevron { display: inline-block; font-size: var(--t-title); line-height: 1; transform: rotate(90deg); }
.evt-section-toggle[aria-expanded="false"] .evt-section-chevron { transform: rotate(0); }
.evt-section-body { min-width: 0; padding: 0 var(--s-4) var(--s-4); }
.evt-section-body[hidden] { display: none; }
.evt-section-body > .card { padding: 0; margin: 0; border: 0; box-shadow: none; border-radius: 0; }
.evt-section-body > .card > .row:first-child { flex-wrap: wrap; }
.evt-section[data-evt-section="evt-functions"] .evt-section-body > .card > .row:first-child > strong,
.evt-section[data-evt-section="evt-staffing"] .evt-section-body > .card > .row:first-child > strong,
.evt-section[data-evt-section="evt-servers"] .evt-section-body > .card > .row:first-child > strong,
.evt-section[data-evt-section="evt-beo"] .evt-section-body > .card > .row:first-child > strong,
.evt-section[data-evt-section="evt-pull"] .evt-section-body > .card > .row:first-child > strong,
.evt-section[data-evt-section="evt-payments"] .evt-section-body > .card > .row:first-child > strong,
.evt-section[data-evt-section="evt-deposits"] .evt-section-body > .card > .row:first-child > strong,
.evt-section[data-evt-section="evt-recaps"] .evt-section-body > .card > .row:first-child > strong,
.evt-section[data-evt-section="evt-tasks"] #evtTasksTitle { display: none; }
.evt-section[data-evt-section="evt-beo"] .evt-section-body > .card { border-top: 0 !important; }
.evt-section[data-evt-section="evt-beo"] #beoOpenBtn { background: var(--navy); color: var(--paper); }
.evt-section-body > .evt-mark { scroll-margin-top: var(--s-4); }
.evt-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4) var(--s-6); margin: 0; }
.evt-fact-group { min-width: 0; margin: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.evt-detail-fact { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: var(--s-2); align-items: baseline; }
.evt-facts dt { font-size: var(--t-sub); color: var(--muted); line-height: 1.5; margin: 0; }
.evt-facts dd { font-size: var(--t-body); font-weight: 600; line-height: 1.5; margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.evt-fact-unset { color: var(--muted); font-weight: 400; }
.evt-section[data-evt-section="evt-info"] > .evt-section-heading { display: flex; align-items: center; gap: var(--s-2); padding-right: var(--s-4); }
.evt-section[data-evt-section="evt-info"] > .evt-section-heading .evt-section-toggle { flex: 1; min-width: 0; width: auto; }
.evt-details-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: var(--s-2); }
[data-event-name-editor] .btn { min-height: var(--control-height-touch); }
.evt-details-actions .btn { white-space: nowrap; font-size: var(--t-sub); min-height: var(--control-height-sm); }
.evt-detail-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); }
.evt-detail-field { min-width: 0; margin: 0; }
.evt-detail-field-wide { grid-column: span 2; }
.evt-detail-field-full { grid-column: 1 / -1; }
.evt-detail-field label { display: block; font-size: var(--t-sub); margin-bottom: var(--s-1); }
.evt-detail-field input, .evt-detail-field select, .evt-detail-field textarea { width: 100%; min-width: 0; min-height: var(--control-height-touch); font: inherit; font-size: var(--t-body); }
.evt-detail-field input[type="number"] { font-variant-numeric: tabular-nums; }
.evt-detail-field [aria-invalid="true"] { border-color: var(--bad-fg); }
.evt-detail-field-error { display: block; margin-top: var(--s-1); font-size: var(--t-sub); color: var(--bad-fg); }
.evt-details-error { margin-top: var(--s-3); }
.evt-special-requests { margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--hair); font-size: var(--t-body); line-height: 1.6; overflow-wrap: anywhere; }
.evt-special-requests h3 { margin: 0 0 var(--s-2); color: var(--muted); font: 600 var(--t-sub)/1.5 Inter, sans-serif; }
.evt-functions-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
.evt-functions-table { margin-top: var(--s-1); }
.evt-functions-table th, .evt-functions-table td { vertical-align: top; }
.evt-functions-table th { white-space: nowrap; }
.evt-functions-table td:nth-child(3) { white-space: nowrap; }
.evt-functions-table td:nth-child(2) { min-width: 12rem; }
.evt-functions-table td:last-child { min-width: 10rem; }
.evt-functions-table .muted { font-size: var(--t-sub) !important; line-height: 1.5; }
.evt-document .beo-line:focus-within .acts { visibility: visible; }
.evt-document .beo-sec-nm { font-family: Inter, sans-serif; }
body.has-navback #beoDocBack.evt-quick-beo-back { display: inline-flex; }
.qv-foot:has(#qvBeo) { flex-wrap: wrap; }
.qv-open-event { flex: 1; }
.qv-foot:has(#qvBeo) #qvOpen { flex: 1 0 100%; }
.qv-foot:has(#qvBeo) .btn { min-height: var(--control-height-touch); }
.qv-foot #qvBeo { flex: 1; }
.qv-foot .qv-beo-note { flex: 1 0 100%; margin: 0; font-size: var(--t-sub); color: var(--bad-fg); } /* fetch-1509: the PDF's error, a full-width row of the footer under its button */
.evt-document .beo-line > div { min-width: 0; }
.evt-document .beo-line > div:first-child { overflow-wrap: anywhere; }
.evt-document .beo-line .qty, .evt-document .beo-line .price, .evt-document .beo-line .amt { white-space: nowrap; overflow-wrap: normal; }
.evt-document .beo-line .acts { display: flex; justify-content: flex-end; gap: var(--s-1); }
.evt-document .pln-item { min-height: var(--control-height-touch); }
@media (max-width: 1280px) { .evt-detail-fact { grid-template-columns: 5.5rem minmax(0, 1fr); } }
@media (max-width: 1100px) {
  .evt-record-main { flex-wrap: wrap; }
  .evt-record-actions { flex-basis: 100%; justify-content: flex-start; }
  .evt-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .evt-detail-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .evt-workspace { display: block; margin-top: var(--s-3); }
  .evt-section { scroll-margin-top: 7rem; }
  .evt-record-main { padding: var(--s-4); gap: var(--s-3); }
  .evt-record-actions .btn { min-height: var(--control-height-touch); }
  .evt-readiness-summary { min-height: var(--control-height-touch); } /* fetch-1014: a thumb target; on a phone the sentence is hidden and this tap opens the checklist */
  .evt-readiness-needs { display: none; }
  .evt-details-actions .btn { min-height: var(--control-height-touch); }
}
@media (max-width: 480px) {
  .evt-facts { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
  .evt-detail-fact { grid-template-columns: 7rem minmax(0, 1fr); }
  .evt-fact-group + .evt-fact-group { padding-top: var(--s-3); border-top: 1px solid var(--hair); }
  .evt-detail-fields { grid-template-columns: minmax(0, 1fr); }
  .evt-detail-field-wide { grid-column: auto; }
  .evt-section[data-evt-section="evt-info"] > .evt-section-heading { flex-wrap: wrap; padding-right: var(--s-3); }
  .evt-details-actions { margin-left: auto; padding-block: var(--s-1); }
  .evt-record-actions { gap: var(--s-1); }
  .evt-record-actions > .btn-primary { flex-basis: 100%; }
  .evt-section-body { padding-inline: var(--s-3); }
  .evt-document .beo-line, .evt-document .beo-cols { column-gap: var(--s-1); }
  .evt-document .beo-line, .evt-document .beo-cols { grid-template-columns: minmax(0, 1fr) 2rem 3.75rem 5.5rem; }
}
@media print {
  .evt-workspace-tiles, .evt-workspace-pin, .evt-section-toggle .evt-section-chevron { display: none !important; }
  .evt-workspace { display: block; }
  .evt-section-body[hidden] { display: block; }
  .evt-section { break-inside: auto; }
}
/* fetch-1163: focused event workspaces; existing editors remain mounted. */
.evt-workspace--grouped { grid-template-columns: minmax(0, 1fr); gap: 0; } /* fetch-1256: the rail folded into the header's tiles; the document takes the whole width */
/* fetch-1256: the event's workspaces as tiles inside the record header (fetch-1250's .pgh-tile, spread evenly across the card),
   and the pinned bar that stands in for the header once it has scrolled off. The bar sits in flow under the header with a
   negative top margin equal to its own height, hidden until the binder's observer sees the header leave, so pinning moves nothing. */
.evt-workspace-tiles { margin: 0; padding: 0 var(--s-5) var(--s-4); }
.evt-workspace-tiles .pgh-tiles { margin-top: 0; }
.evt-workspace-pin { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: var(--s-1); box-sizing: border-box; height: var(--control-height-touch); margin: calc(-1 * var(--control-height-touch)) calc(-1 * var(--s-4)) 0; padding: 0 var(--s-4); visibility: hidden; background: var(--paper); border-bottom: 1px solid var(--line); border-radius: 0 0 var(--r-m) var(--r-m); box-shadow: 0 2px 10px color-mix(in srgb, var(--navy-dark) 14%, transparent); }
.evt-workspace-pin.is-pinned { visibility: visible; }
.evt-workspace-pin-title { display: flex; align-items: baseline; gap: var(--s-2); min-width: 0; max-width: 22rem; margin-right: var(--s-2); padding-right: var(--s-3); border-right: 1px solid var(--line); color: var(--text-heading); font: 700 var(--t-sub)/1.3 Inter, sans-serif; }
.evt-workspace-pin-title > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evt-workspace-pin-title > small { flex: 0 0 auto; color: var(--muted); font-size: var(--t-sub); font-weight: 500; }
.evt-workspace-pin-tabs { display: flex; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.evt-workspace-pin-tabs::-webkit-scrollbar { display: none; }
.evt-workspace-pin-tabs button { min-height: var(--control-height-touch); padding: 0 var(--s-3); border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--navy); font: 600 var(--t-sub)/1.4 Inter, sans-serif; white-space: nowrap; cursor: pointer; }
.evt-workspace-pin-tabs button:hover { background: var(--wash); }
.evt-workspace-pin-tabs button[aria-current="page"] { border-bottom-color: var(--gold-dark); color: var(--navy-dark); }
.evt-workspace-pin-primary { margin-left: auto; min-height: var(--control-height-sm); font-size: var(--t-sub); white-space: nowrap; }
.evt-workspace-pin-primary[hidden] { display: none; }
@media (max-width: 800px) {
  .evt-workspace-pin { margin-left: calc(-1 * var(--s-3)); margin-right: calc(-1 * var(--s-3)); padding: 0 var(--s-3); }
  .evt-workspace-pin-title, .evt-workspace-pin-primary { display: none; }
}
@media (max-width: 640px) {
  body.has-rail .evt-workspace-pin { top: var(--phone-nav-height, 55px); }
  /* fetch-1332 (Jack's ruling 09-26): on a phone the areas are ONE row of 44px chips that scrolls sideways inside the card
     (the binder keeps the pressed one in view), instead of five tiles two across; the work below reaches the first screen. */
  .evt-workspace-tiles { padding: 0 0 var(--s-2); }
  .evt-workspace-tiles .pgh-tiles { display: flex; gap: var(--s-2); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: var(--s-4); padding: 0 var(--s-4); scrollbar-width: none; }
  .evt-workspace-tiles .pgh-tiles::-webkit-scrollbar { display: none; }
  .evt-workspace-tiles .pgh-tiles::after { content: ""; flex: 0 0 var(--s-2); } /* the row's end keeps the card's gutter when scrolled fully */
  .evt-workspace-tiles .pgh-tile { flex: 0 0 auto; height: var(--control-height-touch); padding: 0 var(--s-3); scroll-snap-align: start; white-space: nowrap; }
  .evt-workspace-tiles .pgh-tile > .ci { width: 20px; height: 20px; }
  .evt-workspace-tiles .pgh-tile strong { font-size: var(--t-sub); }
  .evt-workspace-tiles .pgh-tile[aria-pressed="true"] { border-color: var(--navy); background: var(--navy); color: var(--paper); }
  .evt-workspace-tiles .pgh-tile[aria-pressed="true"] > .ci { color: var(--paper); }
}
/* fetch-1332 (review): between a phone and a wide laptop the Operations view's five areas share ONE row of equal tiles instead
   of wrapping four and one (the second row put ~62px between the header and the Staff Plan). Each area's second line stays
   while it fits on one line and drops only once the row is too narrow for it (below ~1018px), as a phone does; narrower
   still, the icon sits over the name so every name fits. Final review: scoped to --ops (evtWorkspaceTilesHTML), so the Sales
   and Culinary views keep their tiles and their counts (unread, changes, checklist) as they were; wide screens are unchanged. */
@media (min-width: 641px) and (max-width: 1099px) {
  .evt-workspace-tiles--ops { container-type: inline-size; }
  .evt-workspace-tiles--ops .pgh-tiles { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  @container (max-width: 60rem) {
    .evt-workspace-tiles--ops .pgh-tile { gap: var(--s-2); padding-inline: var(--s-2); }
  }
  @container (max-width: 54rem) {
    .evt-workspace-tiles--ops .pgh-tile small { display: none; }
  }
  @container (max-width: 44rem) {
    .evt-workspace-tiles--ops .pgh-tile { flex-direction: column; justify-content: center; gap: var(--s-1); padding-block: var(--s-1); text-align: center; }
    .evt-workspace-tiles--ops .pgh-tile strong { font-size: var(--t-sub); }
  }
}
.evt-workspace-group { min-width: 0; scroll-margin-top: var(--s-4); }
.evt-workspace-group[hidden], .evt-workspace--grouped [hidden] { display: none !important; }
.evt-workspace-heading { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2) var(--s-3); margin-bottom: var(--s-3); }
.evt-workspace-heading h2 { margin: 0; color: var(--text-heading); font: 650 var(--t-title)/1.35 Inter, sans-serif; }
/* fetch-1164: one visible title per section; the optional index stays a navigation tool. */
.evt-workspace-jump { position: relative; margin-left: auto; max-width: 100%; }
.evt-workspace-jump > summary { min-height: var(--control-height-touch); padding: var(--s-2); align-content: center; color: var(--navy); font-size: var(--t-sub); cursor: pointer; }
.evt-workspace-jump > .evt-workspace-local { position: absolute; right: 0; top: 100%; z-index: 40; display: grid; width: max-content; max-width: min(22rem, calc(100vw - 2 * var(--s-4))); margin: 0; padding: var(--s-2); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--paper); }
.evt-workspace-jump .evt-workspace-local a { min-width: 0; }
.evt-section[data-evt-section="evt-staffing"] .evt-staffing-title,
.evt-section[data-evt-section="evt-contract"] .evt-section-body > .card > .row:first-child > div:first-child > strong,
.evt-section[data-evt-section="evt-changes"] .evt-section-body > .card > .row:first-child > strong { display: none; }
.evt-workspace-local { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-2); margin-bottom: var(--s-4); border-bottom: 1px solid var(--line); }
.evt-workspace-local a { display: inline-flex; align-items: center; min-height: var(--control-height-touch); padding: var(--s-2) var(--s-2); border-bottom: 2px solid transparent; color: var(--navy); font-size: var(--t-sub); font-weight: 600; line-height: 1.4; text-decoration: none; }
.evt-workspace-local a[aria-current="location"] { border-bottom-color: var(--gold-dark); color: var(--navy-dark); }
.evt-workspace-local a:hover { background: var(--wash); }
.evt-workspace--grouped .evt-section-heading { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2); padding-right: var(--s-3); }
.evt-workspace--grouped .evt-section-toggle { flex: 1; min-width: 0; width: auto; }
.evt-workspace--grouped .evt-section-heading > .btn { min-height: var(--control-height-touch); font-size: var(--t-sub); }
.evt-internal-audience { margin: var(--s-2) 0 var(--s-4); color: var(--muted); font-size: var(--t-sub); line-height: 1.6; }
.evt-section[data-evt-section="evt-log"] #commLogTitle { display: none; }
.evt-section[data-evt-section="evt-log"] .pdx-section-head { margin-bottom: var(--s-3); }
.evt-section[data-evt-section="evt-log"] .cl-dock { position: static; }
.cl-dock-error { margin-block: var(--s-3); font-size: var(--t-sub); line-height: 1.6; }
.evt-planning-context { margin-bottom: var(--s-4); color: var(--navy); }
.evt-planning-context > summary { min-height: var(--control-height-touch); padding: var(--s-2) 0; font-size: var(--t-sub); font-weight: 600; cursor: pointer; }
.evt-planning-context-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: var(--s-3); padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--paper); }
.evt-planning-context-body p { display: flex; flex-direction: column; gap: var(--s-1); margin: 0; min-width: 0; font-size: var(--t-sub); overflow-wrap: anywhere; }
.evt-planning-context-body p > span { color: var(--muted); }
.evt-planning-context-body a { display: flex; align-items: center; min-height: var(--control-height-touch); color: var(--navy); font-weight: 600; }
.evt-workspace--grouped .evt-document .beo-sec-title { font-family: Inter, sans-serif; }
.appointment-calendar-help { color: var(--muted); font-size: var(--t-sub); line-height: 1.6; }
.appointment-calendar-help > summary { display: list-item; min-height: var(--control-height-touch); padding-block: var(--s-2); cursor: pointer; }
.appointment-calendar-help > p { margin: 0 0 var(--s-3); }
.evt-workspace--grouped #evt-messages-body .conv-title { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 800px) {
  .evt-workspace--grouped { display: block; }
  .evt-workspace-heading h2 { font-size: var(--t-section); }
  .evt-workspace-local { gap: 0 var(--s-1); margin-bottom: var(--s-3); }
  .evt-workspace-local a { padding-inline: var(--s-2); }
  .evt-workspace--grouped .evt-section { scroll-margin-top: var(--s-4); }
  .evt-workspace--grouped .evt-section-heading > .btn { margin-left: auto; margin-bottom: var(--s-2); }
  .evt-record-actions > [data-evt-beo-author] { flex-basis: auto; }
}
@media print { .evt-workspace-group[hidden] { display: block !important; } .evt-workspace-jump, .evt-workspace-local, .evt-planning-context, .evt-internal-audience { display: none; } }
.evt-function-label { display: none; }
.evt-workspace--grouped .fnm-head h4 { scroll-margin-top: calc(var(--s-4) + var(--s-4)); }
@media (max-width: 640px) {
  .evt-workspace--grouped .fnm-head h4 { scroll-margin-top: calc(4 * var(--s-4)); }
  .evt-workspace--grouped .evt-functions-scroll { overflow: visible; }
  .evt-workspace--grouped .evt-functions-table { display: block; width: 100%; min-width: 0; overflow: visible; }
  .evt-workspace--grouped .evt-functions-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .evt-workspace--grouped .evt-functions-table tbody { display: grid; gap: var(--s-3); }
  .evt-workspace--grouped .evt-function-row, .evt-workspace--grouped .evt-function-totals { display: grid; min-width: 0; padding-block: var(--s-3); border-bottom: 1px solid var(--line); }
  .evt-workspace--grouped .evt-functions-table td { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: var(--s-2); min-width: 0; padding: var(--s-1) 0; border: 0; text-align: left; white-space: normal !important; overflow-wrap: anywhere; font-size: var(--t-body); }
  .evt-workspace--grouped .evt-function-label { display: block; color: var(--muted); font-size: var(--t-sub); font-weight: 500; }
  .evt-workspace--grouped .evt-functions-table .evt-function-name { display: block; color: var(--navy); margin-bottom: var(--s-2); }
  .evt-workspace--grouped .evt-function-name[data-function-order]:not([data-function-order=""])::before { content: attr(data-function-order) ". "; color: var(--muted); font-variant-numeric: tabular-nums; }
  .evt-workspace--grouped .evt-function-name .muted { margin-top: var(--s-1); font-size: var(--t-sub) !important; }
  .evt-workspace--grouped .evt-functions-table .evt-function-seq, .evt-workspace--grouped .evt-function-totals td:empty { display: none; }
  .evt-workspace--grouped .evt-functions-table .evt-function-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); padding-top: var(--s-3); }
  .evt-workspace--grouped .evt-function-actions .btn, .evt-workspace--grouped .evt-function-actions .rowdel { min-height: var(--control-height-touch); min-width: var(--control-height-touch); }
}
/* fetch-974: saved Reports analysis reads as a summary, priorities and supporting evidence. */
.rpt-reading { max-width: var(--w-narrow); margin-inline: auto; display: grid; gap: var(--s-3); overflow-wrap: anywhere; }
.rpt-reading .rpt-reading-section { margin: 0; min-width: 0; padding: var(--s-4); }
.rpt-reading .rpt-reading-heading { display: flex; align-items: baseline; gap: var(--s-2); margin-bottom: var(--s-2); }
.rpt-reading h2 { margin: 0; font-size: var(--t-section); line-height: 1.3; }
.rpt-reading h3 { margin: 0; font-size: var(--t-body); line-height: 1.45; font-weight: 600; }
.rpt-reading p { margin: var(--s-1) 0 0; font-size: var(--t-body); line-height: 1.55; white-space: pre-wrap; }
.rpt-reading .rpt-reading-count, .rpt-reading .rpt-reading-meta { color: var(--muted); font-size: var(--t-sub); line-height: 1.5; font-variant-numeric: tabular-nums; }
.rpt-reading .rpt-reading-list { list-style: none; margin: 0; padding: 0; }
.rpt-reading .rpt-reading-item { padding-block: var(--s-3); }
.rpt-reading .rpt-reading-item + .rpt-reading-item { border-top: 1px solid var(--line); }
.rpt-reading .rpt-reading-item:first-child { padding-top: var(--s-1); }
.rpt-reading .rpt-reading-item:last-child { padding-bottom: 0; }
.rpt-reading .rpt-reading-item > p { color: var(--muted); }
.rpt-reading .rpt-reading-support { display: grid; gap: var(--s-3); }
.rpt-reading .rpt-reading-severity { font-weight: 600; }
.rpt-reading .rpt-reading-severity--high { color: var(--bad-fg); }
.rpt-reading .rpt-reading-severity--medium { color: var(--warn-fg); }
.rpt-reading .rpt-reading-severity--low { color: var(--info-fg); }
.rpt-reading .rpt-reading-fold { margin-top: var(--s-2); }
.rpt-reading .rpt-reading-fold > summary { cursor: pointer; min-height: var(--control-height-touch); min-width: var(--control-height-touch); box-sizing: border-box; padding: var(--s-3) var(--s-2); font-size: var(--t-sub); line-height: 1.5; color: var(--text-heading); border-radius: var(--r-s); }
.rpt-reading .rpt-reading-fold > summary:hover { background: var(--wash); }
.rpt-reading .rpt-reading-fold-body { padding: var(--s-1) var(--s-2) var(--s-2); }
.rpt-reading .rpt-reading-fold-body blockquote { margin: var(--s-2) 0; padding-left: var(--s-3); border-left: 2px solid var(--line); font-size: var(--t-sub); line-height: 1.55; white-space: pre-wrap; color: var(--muted); }
.rpt-reading .rpt-reading-section:has(> .rpt-reading-full-summary[open]) > .rpt-reading-summary-preview { display: none; }
.rpt-reading .rpt-reading-sentiment { margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--line); }
.rpt-reading .rpt-reading-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: var(--s-4); margin: var(--s-3) 0 0; }
.rpt-reading .rpt-reading-metrics dt { color: var(--muted); font-size: var(--t-sub); }
.rpt-reading .rpt-reading-metrics dd { margin: var(--s-1) 0 0; font-size: var(--t-section); font-weight: 600; font-variant-numeric: tabular-nums; }
.rpt-reading .rpt-reading-metrics .rpt-reading-metric-note { font-size: var(--t-sub); line-height: 1.45; font-weight: 400; color: var(--muted); }
.rpt-reading .rpt-reading-signal { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--s-1) var(--s-3); }
@media (min-width: 900px) {
  .rpt-reading .rpt-reading-support { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .rpt-reading .rpt-reading-support > .rpt-reading-section:first-child:nth-last-child(3) { grid-row: span 2; }
}
@media print {
  .rpt-reading { display: block; max-width: none; }
  .rpt-reading .rpt-reading-section { border: 0; box-shadow: none; padding: var(--s-3) 0; break-inside: auto; }
  .rpt-reading .rpt-reading-support { display: block; }
  .rpt-reading .rpt-reading-item { break-inside: avoid; }
  .rpt-reading .rpt-reading-fold > summary { display: none; }
  .rpt-reading .rpt-reading-fold::details-content { display: block; content-visibility: visible; }
  .rpt-reading .rpt-reading-fold > .rpt-reading-fold-body { display: block !important; }
  .rpt-reading .rpt-reading-section:has(> .rpt-reading-full-summary) > .rpt-reading-summary-preview { display: none; }
}

/* fetch-974: questions, visible definitions and paged report results. */
.reports-page .rpt-question, .reports-page .rpt-report-definition { padding: var(--s-5); margin-block: var(--s-4); }
.rpt-question-heading { display: flex; align-items: start; justify-content: space-between; gap: var(--s-5); }
.rpt-question-heading h2 { font-size: var(--t-section); color: var(--navy-dark); margin: 0 0 var(--s-2); }
.rpt-question-heading p { margin: 0 0 var(--s-4); color: var(--muted); font-size: var(--t-body); line-height: 1.5; }
.rpt-question-heading > .field { min-width: 15rem; max-width: 24rem; }
.rpt-question textarea { width: 100%; box-sizing: border-box; padding: var(--s-3); font: inherit; font-size: var(--t-body); line-height: 1.5; border: 1px solid var(--line); border-radius: var(--r-s); resize: vertical; min-height: 5rem; }
.rpt-question-actions, .rpt-save-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.rpt-question-actions { margin-block: var(--s-3); }
#rptCustom .btn, #rptCustom select, #rptCustom input, .rpt-pagination .btn { min-height: var(--control-height-touch); font-size: var(--t-body); }
#rptCustom .field label { font-size: var(--t-sub); }
.rpt-question .rpt-load { margin-bottom: var(--s-3); }
.rpt-message { font-size: var(--t-body); line-height: 1.5; margin-block: var(--s-3); }
.rpt-message-error { color: var(--bad-fg); }
/* fetch-1039: the reader's question sits above the box it is answered in, with its choices as 44px buttons; Undo
   follows the status line; an empty result is a centred card, never a table of zeros. */
#rptCustom .rpt-pending { margin-bottom: var(--s-3); }
#rptCustom .rpt-pending p { margin: 0; font-size: var(--t-body); line-height: 1.5; }
#rptCustom .rpt-choices { margin: var(--s-2) 0 0; }
#rptCustom .rpt-question-ready > form > .rpt-pending { grid-column: 1 / -1; margin: 0; }
#rptCustom .rpt-undo { margin-left: var(--s-2); }
#rptCustom .rpt-empty-result .rpt-choices { justify-content: center; margin-bottom: var(--s-3); }
.rpt-definition { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); margin: var(--s-3) 0 var(--s-5); }
.rpt-definition dt, .rpt-totals dt { color: var(--muted); font-size: var(--t-sub); margin-bottom: var(--s-1); }
.rpt-definition dd { margin: 0; font-size: var(--t-body); line-height: 1.5; overflow-wrap: anywhere; }
.rpt-save-row { border-top: 1px solid var(--line); padding-top: var(--s-4); align-items: end; }
.rpt-save-row .field { flex: 1; min-width: 14rem; max-width: 30rem; }
.rpt-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); padding: var(--s-4) var(--s-5); margin: var(--s-4) 0; background: var(--surface-card); border: 1px solid var(--line); border-radius: var(--r-m); }
.rpt-totals dd { margin: 0; color: var(--navy-dark); font-size: var(--t-title); font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rpt-report-notes { color: var(--muted); font-size: var(--t-sub); line-height: 1.5; margin-block: var(--s-3); }
.rpt-report-notes p { margin: var(--s-1) 0; }
.rpt-table-report { min-width: 0; }
.rpt-table-report .rpt-tbl-wrap { max-height: 34rem; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface-card); }
.rpt-table-report .rpt-tbl { width: 100%; }
.rpt-table-report .rpt-tbl th { position: sticky; top: 0; background: var(--wash); z-index: 1; }
.rpt-table-report .rpt-tbl td, .rpt-table-report .rpt-tbl th { font-size: var(--t-sub); text-align: left; }
.rpt-phone-rows, .rpt-phone-foot, .rpt-phone-empty { display: none; }
.rpt-table-report .rpt-tbl .rpt-num { text-align: right; font-variant-numeric: tabular-nums; }
.rpt-tbl .col-sort { text-transform: inherit; letter-spacing: inherit; font-weight: inherit; min-height: 0; } /* fetch-1462: a sortable heading reads as the heading it replaced - a button resets the th's capitals, tracking and weight */
.rpt-pagination, .rpt-pagination > div { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--s-2); }
.rpt-pagination { padding-block: var(--s-3); font-size: var(--t-sub); color: var(--muted); }
@media (max-width: 700px) {
  .reports-page .rpt-question, .reports-page .rpt-report-definition { padding: var(--s-4); }
  .rpt-question-heading { flex-direction: column; gap: var(--s-2); }
  .rpt-question-heading > .field { min-width: 0; width: 100%; max-width: none; }
  .rpt-definition { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
  .rpt-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: var(--s-4); }
  .rpt-save-row .field { min-width: 0; flex-basis: 100%; }
  .rpt-pagination { align-items: start; }
  .rpt-pagination > div { width: 100%; }
  .rpt-table-report .rpt-tbl-wrap { display: none; }
  .rpt-table-report .col-sortpick { display: grid; gap: var(--s-1); margin-top: var(--s-3); font-size: var(--t-sub); font-weight: 600; color: var(--muted); } /* fetch-1462: the cards have no headings to press - one Sort select */
  .rpt-table-report .col-sortpick .sel { width: 100%; min-height: var(--control-height-touch); }
  .rpt-phone-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
  .rpt-phone-row, .rpt-phone-foot { min-width: 0; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface-card); padding: var(--s-3); }
  .rpt-phone-row-head { display: flex; justify-content: space-between; gap: var(--s-2); padding-bottom: var(--s-2); border-bottom: 1px solid var(--hair); }
  .rpt-phone-row-head span, .rpt-phone-row dt, .rpt-phone-foot dt { color: var(--muted); font-size: var(--t-sub); }
  .rpt-phone-row-head strong { color: var(--text-heading); font-size: var(--t-body); overflow-wrap: anywhere; text-align: right; }
  .rpt-phone-row dl, .rpt-phone-foot dl { margin: 0; }
  .rpt-phone-row dl > div, .rpt-phone-foot dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-2); padding-block: var(--s-1); }
  .rpt-phone-row dd, .rpt-phone-foot dd { margin: 0; font-size: var(--t-body); font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
  .rpt-phone-foot { display: block; margin-top: var(--s-2); background: var(--wash); }
  .rpt-phone-foot > strong { display: block; margin-bottom: var(--s-2); font-size: var(--t-body); }
  .rpt-phone-empty { display: block; }
  #rptCustom .btn { white-space: normal; }
}
@media print {
  .rpt-phone-rows, .rpt-phone-foot, .rpt-phone-empty { display: none !important; }
  .rpt-table-report .rpt-tbl-wrap { display: block !important; }
  #rptCustom button, #rptCustom .rpt-question, #rptCustom .rpt-save-row, #rptCustom .rpt-question-actions, .rpt-pagination { display: none !important; }
  .rpt-table-report .rpt-tbl-wrap { max-height: none; overflow: visible; border: 0; }
  .rpt-table-report .rpt-tbl th { position: static; }
  .rpt-table-report .rpt-tbl .col-sort, #rptCustom .rpt-tbl .col-sort { display: inline !important; } /* fetch-1462: a heading is a button now - paper keeps its words and drops the sort mark and the phone's select */
  .rpt-table-report .col-sort-mark, .rpt-table-report .col-sortpick { display: none !important; }
  .rpt-table-report .rpt-tbl { table-layout: auto; }
  .rpt-table-report .rpt-tbl td, .rpt-table-report .rpt-tbl th { white-space: normal; overflow-wrap: anywhere; }
  .rpt-totals { break-inside: avoid; }
}
/* fetch-974: ready reports keep the follow-up and current scope visible above the result. */
#rptCustom .rpt-question-ready { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: var(--s-2) var(--s-4); align-items: end; padding: var(--s-4); }
#rptCustom .rpt-question-ready > .rpt-question-heading { grid-column: 2; grid-row: 1; }
#rptCustom .rpt-question-ready .rpt-question-heading > .field { min-width: 0; width: 100%; margin: 0; }
#rptCustom .rpt-question-ready > form { grid-column: 1; grid-row: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--s-2); }
#rptCustom .rpt-question-ready textarea { min-height: var(--control-height-touch); height: var(--control-height-touch); }
#rptCustom .rpt-question-ready .rpt-question-actions { margin: 0; }
#rptCustom .rpt-question-ready > .rpt-message, #rptCustom .rpt-question-ready > .rpt-load { grid-column: 1 / -1; margin: 0; }
#rptCustom .rpt-report-ready { padding: var(--s-4); }
#rptCustom .rpt-report-ready > .rpt-question-heading { align-items: center; gap: var(--s-3); }
#rptCustom .rpt-report-ready .rpt-ready-scope { margin: 0; font-size: var(--t-sub); }
#rptCustom .rpt-report-ready .rpt-question-actions { margin: 0; flex: 0 0 auto; }
#rptCustom .rpt-ready-folds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); margin-top: var(--s-2); }
#rptCustom .rpt-custom-fold { min-width: 0; }
#rptCustom .rpt-ready-folds > .rpt-custom-fold[open] { grid-column: 1 / -1; }
#rptCustom .rpt-custom-fold > summary { box-sizing: border-box; min-height: var(--control-height-touch); min-width: var(--control-height-touch); padding: var(--s-3) var(--s-2); cursor: pointer; color: var(--text-heading); font-size: var(--t-sub); line-height: 1.5; border-radius: var(--r-s); }
#rptCustom .rpt-custom-fold > summary:hover { background: var(--wash); }
#rptCustom .rpt-custom-fold-body { padding: var(--s-2); }
#rptCustom .rpt-custom-fold .rpt-definition { margin: 0; }
/* fetch-1043: Report details is edited by tapping. Checkboxes, not chip buttons - the print rules hide
   #rptCustom button, so a chip would print blank while a checkbox prints with its state. */
#rptCustom .rpt-definition-edit { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); align-items: start; }
#rptCustom .rpt-edit-group { display: flex; flex-direction: column; gap: 0; }
#rptCustom .rpt-edit-group label {
  display: flex; align-items: center; gap: var(--s-2); min-height: var(--control-height-touch);
  font-size: var(--t-body); line-height: 1.4; color: var(--ink); cursor: pointer; overflow-wrap: anywhere;
}
#rptCustom .rpt-edit-group label:hover { background: var(--wash); border-radius: var(--r-s); }
#rptCustom .rpt-edit-group input[type="checkbox"] { flex: 0 0 auto; width: 1rem; height: 1rem; margin: 0; accent-color: var(--gold); }
#rptCustom .rpt-edit-group input:disabled + *, #rptCustom .rpt-edit-group input:disabled { cursor: not-allowed; }
#rptCustom .rpt-edit-group label:has(input:disabled) { color: var(--muted); cursor: not-allowed; }
#rptCustom .rpt-edit-hint { margin: var(--s-1) 0 0; font-size: var(--t-sub); color: var(--muted); line-height: 1.4; }
#rptCustom .rpt-edit-dates { display: flex; flex-wrap: wrap; gap: var(--s-2); }
#rptCustom .rpt-edit-dates input[type="date"] {
  flex: 1 1 9rem; min-width: 0; box-sizing: border-box; min-height: var(--control-height-touch);
  padding: var(--s-2); border: 1px solid var(--line); border-radius: var(--r-s);
  font-family: inherit; font-size: max(1rem, var(--t-body)); color: var(--ink); background: var(--surface-card);
}
#rptCustom .rpt-custom-fold .rpt-save-row { border: 0; padding: 0; }
@media (max-width: 1000px) {
  #rptCustom .rpt-question-ready > form { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  #rptCustom .rpt-question-ready { grid-template-columns: minmax(0, 1fr); }
  #rptCustom .rpt-question-ready > .rpt-question-heading { grid-column: 1; grid-row: 2; }
  #rptCustom .rpt-report-ready > .rpt-question-heading { align-items: start; }
}
@media print {
  #rptCustom .rpt-ready-folds { display: block; }
  #rptCustom .rpt-custom-save, #rptCustom .rpt-custom-fold > summary { display: none !important; }
  #rptCustom .rpt-custom-fold::details-content { display: block; content-visibility: visible; }
  #rptCustom .rpt-custom-fold-body { display: block !important; padding: 0; }
}

  /* fetch-985: Timesheets review controls; keep the portal and standalone shell aligned. */
  .tcw-item { min-height: var(--control-height-touch, 44px); }
  .tcm-hours { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; }
  .tcm-status { font-size: var(--t-sub); font-weight: 600; }
  .tc-status-live { color: var(--ok-fg); }
  .tcw-nrrow .stf-grow { min-width: 0; flex-basis: 180px; overflow-wrap: anywhere; }
  .tcw-nrrow .tcp-editbtn { min-height: var(--control-height-touch, 44px); }
  .tc-wksub { font-size: var(--t-sub); }
  @media (min-width: 641px) and (max-width: 900px) {
    .tcw-rail { max-height: 360px; }
    .tcw-lenses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 640px) {
    .tc-wkbar .tc-wkbtn, .tc-minihead .btn, .tc-chips .tc-chip { min-height: var(--control-height-touch, 44px); min-width: var(--control-height-touch, 44px); }
    .tc-wkbar { padding-inline: 0; }
    .tc-wkbar .tc-wkbtn { padding-inline: var(--s-2); flex-shrink: 0; }
    .tc-wkmain { padding-inline: 0; }
    .tc-minihead > .row { width: 100%; flex-wrap: wrap; }
  }

  .tc-export-dialog { border: 0; margin: 7vh auto auto; color: var(--ink); width: calc(100% - var(--s-5) * 2); }
  .tc-export-dialog::backdrop { background: color-mix(in srgb, var(--navy-dark) 45%, transparent); }
  .tc-export-dialog .stf-field, .tc-export-dialog .stf-field--w { min-width: 0; flex: 1 1 180px; }
  .tc-export-dialog input, .tc-export-dialog select, .tc-export-dialog .btn { min-height: var(--control-height-touch, 44px); }
  .tc-export-dialog input[type="checkbox"] { min-height: 0; }
  .tc-export-dialog label.stf-sub { display: flex; align-items: center; gap: var(--s-2); min-height: var(--control-height-touch, 44px); }
  @media (max-width: 640px) {
    .tc-export-dialog { margin: 0; width: 100%; max-width: 100%; height: 100%; max-height: 100dvh; border-radius: 0; padding: var(--s-4); }
    .tc-export-dialog .stf-field, .tc-export-dialog .stf-field--w { flex: 1 1 auto; }
  }

  /* fetch-986: one compact owner for the pay week, page actions and venue scope. */
  .tc-page-header { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s-3); padding: var(--s-1); margin-bottom: var(--s-2); }
  .tc-page-header .tc-sheethead { flex: 1 1 auto; min-width: 0; margin: 0; padding: 0; border: 0; }
  .tc-page-header .tc-wkbar { justify-content: center; gap: var(--s-1); }
  .tc-page-header .tc-wkmain { flex: 0 1 auto; min-width: 0; text-align: center; padding: 0; }
  .tc-page-header .tc-wkmain strong { display: block; font-size: var(--t-body); }
  .tc-page-header .tc-wksub { display: block; font-size: var(--t-sub); color: var(--muted); }
  .tc-page-header .tc-chips { display: flex; gap: var(--s-1); overflow-x: auto; scrollbar-width: none; flex: 1 1 420px; min-width: 0; margin: 0; padding: calc(var(--s-1) / 2) var(--s-1); border: 0; }
  .tc-page-header .tc-chip { flex: 0 0 auto; white-space: nowrap; }
  .tc-page-header .tc-wkbtn, .tc-page-header .tc-chip { min-height: var(--control-height-touch, 44px); min-width: var(--control-height-touch, 44px); }

  /* fetch-986: thin gold rules separate time entry, context and day totals. */
  .tcp-table, .tc-sheet { --tc-grid: color-mix(in srgb, var(--gold) 60%, var(--line)); border-collapse: collapse; }
  .tcp-table th, .tcp-table td, .tc-sheet th, .tc-sheet td { border-bottom: 1px solid var(--tc-grid); padding: var(--s-2); }
  .tcp-table :is(th, td):nth-child(1), .tcp-table :is(th, td):nth-child(5), .tcp-table :is(th, td):nth-child(6), .tcp-table :is(th, td):nth-child(9),
  .tc-sheet :is(th, td):nth-child(1), .tc-sheet :is(th, td):nth-child(4) { border-right: 1px solid var(--tc-grid); }
  .tcp-table .stf-total td, .tc-sheet .stf-total td { border-top: 1px solid var(--gold); }
  /* fetch-1191: reserve the same columns before, during and after a correction. */
  .tcp-table { table-layout: fixed; }
  .tcp-table thead th:nth-child(1) { width: 9%; }
  .tcp-table thead th:nth-child(2), .tcp-table thead th:nth-child(3), .tcp-table thead th:nth-child(4) { width: 10%; }
  .tcp-table thead th:nth-child(5), .tcp-table thead th:nth-child(7) { width: 8%; }
  .tcp-table thead th:nth-child(6) { width: 18%; }
  .tcp-table thead th:nth-child(8), .tcp-table thead th:nth-child(9) { width: 7%; }
  .tcp-table thead th:nth-child(10) { width: 13%; }
  .tcp-table td.tcp-editable { min-width: 0; padding: var(--s-1); vertical-align: top; }
  .tcp-cellbtn, .tcp-cellinput { box-sizing: border-box; display: block; width: 100%; min-width: 0; max-width: 100%; min-height: var(--control-height-touch, 44px); padding: var(--s-1) var(--s-2); border: 1px solid transparent; border-radius: var(--r-s); color: inherit; font: inherit; font-size: var(--t-body); font-variant-numeric: tabular-nums; text-align: inherit; line-height: 1.35; }
  .tcp-cellbtn { background: transparent; white-space: nowrap; cursor: pointer; }
  .tcp-cellbtn:hover { background: var(--wash); text-decoration: underline; text-decoration-color: var(--gold-dark); text-underline-offset: var(--s-1); }
  .tcp-cellinput { border-color: var(--gold); background: var(--surface-card, White); color: var(--ink); }
  .tcp-cellinput[type="number"] { text-align: right; }
  .tcp-cellfields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); flex: 1 0 100%; width: 100%; min-width: 0; }
  .tcp-cellfield, .tcp-celldate { display: grid; align-content: start; gap: var(--s-1); min-width: 0; }
  .tcp-cellfield, .tcp-celldate { color: var(--muted); font-size: var(--t-sub); }
  .tcp-celldate input { box-sizing: border-box; width: 100%; min-width: 0; min-height: var(--control-height-touch, 44px); padding: var(--s-1) var(--s-2); border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface-card, White); color: var(--ink); font: inherit; font-size: var(--t-body); }
  .tcw-nrrow[data-tc-entry] { flex-wrap: wrap; }
  .tcw-nrrow[data-tc-entry] > .tcp-cellactions, .tcw-nrrow[data-tc-entry] > .tcp-cellstatus { flex: 1 0 100%; }
  .tcp-cellactions { display: flex; flex-wrap: nowrap; align-items: center; gap: var(--s-1); margin-top: var(--s-1); }
  .tcp-cellactions .btn { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 var(--control-height-touch, 44px); width: var(--control-height-touch, 44px); height: var(--control-height-touch, 44px); min-width: var(--control-height-touch, 44px); min-height: var(--control-height-touch, 44px); padding: var(--s-1); font-size: var(--t-body); }
  #tcCellDiscard, #tcCellRetry { min-height: var(--control-height-touch, 44px); min-width: var(--control-height-touch, 44px); padding: var(--s-1) var(--s-2); font-size: var(--t-sub); }
  .tcp-cellstatus { max-width: 25em; margin-top: var(--s-1); font-size: var(--t-sub); line-height: 1.35; white-space: normal; overflow-wrap: anywhere; }
  .tcp-cellinput[aria-invalid="true"] { border-color: var(--bad-fg); }
  .tcp-cellediting td > .tcp-chip { padding: 0; border: 0; border-radius: 0; background: transparent; }
  .tcp-cellediting td > .tcp-chip:first-child::after { content: ' ·'; }
  @media (max-width: 640px) {
    .tcp-cellfields .tcp-cellinput, .tcp-celldate input { font-size: max(1rem, var(--t-body)); padding-inline: var(--s-1); }
  }
  .tcm-dayhead { border-bottom: 1px solid var(--gold); }
  .tcm-sum > span + span { border-left: 1px solid color-mix(in srgb, var(--gold) 60%, var(--line)); padding-left: var(--s-3); }

  /* fetch-986: selected-person actions, with a contact choice before native composing. */
  .tc-quick-actions { position: relative; display: flex; align-items: flex-start; gap: var(--s-2); flex-wrap: wrap; margin: var(--s-2) 0 var(--s-3); }
  .tc-quick-actions .btn { min-height: var(--control-height-touch, 44px); text-decoration: none; }
  .tc-task-sheet { margin: 0 0 var(--s-4); }
  .tc-task-sheet > .card { margin-top: var(--s-2); }
  .tc-task-sheet .btn { min-height: var(--control-height-touch, 44px); }
  .tc-message-menu { position: relative; }
  .tc-message-menu > summary { display: flex; align-items: center; cursor: pointer; list-style: none; }
  .tc-message-menu > summary::-webkit-details-marker { display: none; }
  .tc-message-choices { position: absolute; top: calc(100% + var(--s-1)); left: 0; z-index: 10; width: 260px; max-width: calc(100vw - var(--s-5) * 2); padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface-card); box-shadow: 0 6px 18px color-mix(in srgb, var(--navy-dark) 15%, transparent); }
  .tc-contact { display: flex; flex-direction: column; justify-content: center; min-height: var(--control-height-touch, 44px); padding: var(--s-2) 0; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--hair); overflow-wrap: anywhere; }
  .tc-contact small { font-size: var(--t-sub); color: var(--muted); }
  a.tc-contact:hover { background: var(--wash); }
  @media (max-width: 640px) { .tc-message-menu { position: static; } .tc-message-choices { left: 0; right: auto; max-width: 100%; } }

  /* fetch-986.1: reuse the shared chip emitter inside the Timesheets period card. */
  .tc-chips > .pgh { flex: 0 0 auto; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
  .tc-chips .pgh-chips { display: flex; flex-wrap: nowrap; gap: var(--s-1); margin: 0; padding: 0; border: 0; overflow: visible; mask-image: none; -webkit-mask-image: none; }
  @media (max-width: 640px) {
    .tc-page-header .tc-chip { position: relative; isolation: isolate; padding-inline: var(--s-2); font-size: var(--t-label); border-color: transparent; background: transparent; }
    .tc-page-header .tc-chip::before { content: ""; position: absolute; inset: 5px 0; z-index: -1; border: 1px solid var(--line); border-radius: inherit; background: var(--paper); }
    .tc-page-header .tc-chip.on::before { background: var(--vc, var(--action-primary)); border-color: var(--vc, var(--action-primary)); }
    .tc-page-header .tc-chip:hover::before { border-color: var(--vc, var(--action-primary)); }
  }

/* fetch-986.1: every schedule lens reserves the same period and family positions. */
.pgh--strip.pgh--schedule { --schedule-period-width: calc(var(--control-height-touch) * 2 + 13em); font-size: var(--t-body); justify-content: flex-start; flex-wrap: nowrap; gap: var(--s-1); margin: 0 0 var(--s-3); padding: var(--s-2); border: 1px solid var(--line); background: var(--paper); }
.pgh--strip.pgh--schedule > .pgh-nav:not(.pgh-nav--tail) { display: grid; grid-template-columns: var(--control-height-touch) minmax(0, 1fr) var(--control-height-touch); gap: var(--s-1); width: var(--schedule-period-width); flex: 0 0 var(--schedule-period-width); }
.pgh--strip.pgh--schedule > .pgh-nav:not(.pgh-nav--tail) > :only-child { grid-column: 1 / -1; }
.pgh--strip.pgh--schedule > .pgh-nav:not(.pgh-nav--tail) .pgh-navlabel { width: 100%; min-width: 0; text-align: center; white-space: normal; }
.pgh--strip.pgh--schedule .pgh-navfield { flex-direction: row; align-items: center; gap: var(--s-2); min-height: var(--control-height-touch); }
.pgh--strip.pgh--schedule .pgh-navfield > span { flex: 0 0 auto; }
.pgh--strip.pgh--schedule .pgh-navfield > .sel { flex: 1; width: auto; }
.pgh--strip.pgh--schedule .pgh-seg { flex-wrap: nowrap; }
.pgh--strip.pgh--schedule .pgh-seg button { padding-inline: var(--s-1); }
.pgh--strip.pgh--schedule .pgh-chip { padding-inline: var(--s-1); }
.pgh--strip.pgh--schedule > .pgh-nav--tail { gap: var(--s-1); }
.pgh--strip.pgh--schedule > .pgh-nav--tail .btn { padding-inline: var(--s-2); }
.sched-agenda-days { margin-block: var(--s-3); }
.sched-agenda h2 { font-size: var(--t-section); margin: 0 0 var(--s-2); }
.sched-agenda-crew h3 { font-size: var(--t-body); margin: var(--s-4) 0 var(--s-1); color: var(--muted); }
.sched-agenda-row { display: flex; align-items: center; border-bottom: 1px solid var(--hair); }
.sched-agenda-duty { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-2); align-items: center; min-height: var(--control-height-touch); padding: var(--s-2) 0; flex: 1; min-width: 0; background: none; border: 0; color: var(--ink); text-align: left; font: inherit; font-size: var(--t-body); }
.sched-agenda-duty span { text-align: right; color: var(--muted); font-size: var(--t-sub); font-variant-numeric: tabular-nums; }
.sched-agenda-duty > * { overflow-wrap: anywhere; }
.sched-agenda-note { display: block; font-size: var(--t-sub); margin-top: var(--s-1); }
.sched-agenda-row .schd-pedit { flex: 0 0 var(--control-height-touch); min-width: var(--control-height-touch); min-height: var(--control-height-touch); margin-left: var(--s-1); color: var(--muted); }
.sched-agenda-events { border-block: 1px solid var(--line); padding-block: var(--s-2); }
.sched-agenda-events summary { min-height: var(--control-height-touch); align-content: center; font-size: var(--t-sub); }
.sched-agenda-editor { padding: var(--s-3); background: var(--wash); }
.sched-agenda-editor .schd-form { min-width: 0; }
.sched-filters::backdrop { background: var(--surface-overlay, rgb(0 0 0 / 40%)); }
/* fetch-1050: phone schedule controls fit the viewport; venue scope lives in Filters. */
@media (max-width: 640px) {
  .pgh.pgh--schedule { flex-wrap: wrap; overflow: visible; box-shadow: none; gap: var(--s-2); }
  .pgh.pgh--schedule > .pgh-nav:not(.pgh-nav--tail) { flex: 1 0 100%; width: 100%; }
  .pgh.pgh--schedule > .pgh-row { flex: 1 0 100%; width: 100%; }
  .pgh.pgh--schedule .pgh-seg { display: flex; width: 100%; }
  .pgh--schedule .pgh-schedule-select { padding: 0; border: 0; background: none; }
  .pgh--schedule .pgh-schedule-select .sel { width: 100%; flex: 1; min-width: 0; min-height: var(--control-height-touch); }
  .pgh.pgh--schedule .pgh-seg button { white-space: normal; }
  .pgh.pgh--schedule > .pgh-nav--tail { flex: 1 0 100%; flex-wrap: wrap; width: 100%; }
  .pgh.pgh--schedule > .pgh-nav--tail > button { flex: 1 1 auto; white-space: normal; }
  #sgViewBg { padding: 0; align-items: stretch; }
  #sgViewDialog { width: 100%; max-width: none; height: 100dvh; max-height: 100dvh; border-radius: 0; box-sizing: border-box; overflow-y: auto; padding: var(--s-4); }
  #sgViewDialog .cse-modal-head { position: sticky; top: calc(-1 * var(--s-4)); background: var(--surface-card); z-index: 1; padding-block: var(--s-3); }
  #sgViewDialog .sg-view-dialog-actions { position: sticky; bottom: calc(-1 * var(--s-4)); background: var(--surface-card); padding-block: var(--s-3); border-top: 1px solid var(--line); }
  #sgViewDialog .sg-view-apply { flex: 1 0 100%; }
  .sched-filters { margin: 0; width: 100%; max-width: none; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; padding: var(--s-4); box-sizing: border-box; }
  .sched-filters .actions { margin-top: var(--s-5); }
  .sgp-group[data-sgvenue-group] > .sgp-gh { color: color-mix(in srgb, var(--vc) 62%, var(--ink)); font-size: var(--t-section); text-transform: none; letter-spacing: normal; border-bottom: 2px solid var(--vc); padding-block: var(--s-2); margin-block: var(--s-3) var(--s-2); }
}
/* fetch-1051: one compact picker/icon row; the date strip owns phone week gestures. */
.schedule-panel-section { margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--line); }
.schedule-panel-section h3 { font-size: var(--t-body); margin: 0 0 var(--s-2); }
/* fetch-1053: native touch/trackpad scrolling with one whole week per snap. */
.schedule-week-scroller { display: flex; position: relative; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; touch-action: pan-x pan-y pinch-zoom; -webkit-overflow-scrolling: touch; scrollbar-width: thin; direction: ltr; }
.schedule-week-page { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.schedule-week-page > .sgp-strip { height: 100%; }
@media (max-width: 640px) {
  :is(#eventStaffStrip, #managerScheduleStrip).pgh.pgh--schedule { display: grid; grid-template-columns: minmax(0, 1fr) var(--control-height-touch); align-items: center; padding: var(--s-2); }
  :is(#eventStaffStrip, #managerScheduleStrip).pgh.pgh--schedule > .pgh-row { grid-column: 1; grid-row: 1; min-width: 0; }
  :is(#eventStaffStrip, #managerScheduleStrip).pgh.pgh--schedule > .pgh-nav--tail { display: contents; }
  :is(#eventStaffStrip, #managerScheduleStrip) :is(#sgViewBtn, #schedFiltersBtn) { grid-column: 2; grid-row: 1; display: inline-flex; align-items: center; justify-content: center; position: relative; min-width: var(--control-height-touch); width: var(--control-height-touch); height: var(--control-height-touch); padding: 0; background: transparent; border-color: transparent; color: var(--text-heading); }
  :is(#eventStaffStrip, #managerScheduleStrip) :is(#sgViewBtn, #schedFiltersBtn):hover { background: var(--wash); }
  .schedule-filter-glyph { display: block; flex: 0 0 auto; }
  .pgh-icon-count { position: absolute; top: 0; right: 0; min-width: var(--s-3); border-radius: var(--r-m); padding: 0 var(--s-1); background: var(--ink); color: var(--paper); font-size: var(--t-label); line-height: 1.4; }
  #eventStaffStrip #sgPublish { grid-column: 1 / -1; min-height: var(--control-height-touch); }
  .sgp-context:has(.sg-live-state .b-green):not(:has(.sgp-draft-summary)) { margin: 0; min-height: 0; }
}
@media (max-width: 360px) { .pgh--strip.pgh--schedule { --schedule-period-width: calc(var(--control-height-touch) * 2 + 12em); } }
.sg-desktop-header { display: block; margin-bottom: var(--s-3); }
/* fetch-1229: the same controls and live recovery share one compact visual header. */
.sg-schedule-panel { padding: 0; overflow: hidden; border: 1px solid var(--line); border-top: 2px solid var(--brand-blue-deep); border-radius: var(--r-m); }
.sg-schedule-panel .sg-desktop-header { margin: 0; }
.sg-toolbar { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2); border-bottom: 1px solid var(--line); background: var(--surface-card); }
.sg-roster-count { display: inline-flex; align-items: center; gap: var(--s-1); flex: 0 0 auto; white-space: nowrap; color: var(--muted); font-size: var(--t-sub); font-variant-numeric: tabular-nums; }
.sg-schedule-panel .sg-scroll { border: 0; border-radius: 0; }
.sg-schedule-legend { padding: var(--s-2); margin: 0; }
.sg-toolbar > #eventStaffStrip.pgh.pgh--schedule { flex: 1 1 auto; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.sg-toolbar .pgh-nav:first-child { border-radius: var(--r-s); background: var(--wash); }
.sg-toolbar .pgh-navlabel { font-weight: 600; }
.sg-toolbar .pgh-seg button[aria-pressed="true"] { background: var(--brand-blue-deep); color: var(--paper); }
/* fetch-1528 (Jack 10-10: "use more of the blank space in the header to spread out the functions more evenly across"): on a desktop both
   schedule toolbars spread their groups - week, views, venue or crew chips, actions - across the row, and a narrow desktop wraps to a
   second row instead of scrolling. The phone (max-width 640px) keeps its grid above. Auto margins, not space-between: the week
   and the family switcher stay flush left, so the switcher sits at the same x on all three schedule views (fetch-986.1's rule);
   the chips take the middle and the actions the right, with equal gaps either side of the chips. */
@media (min-width: 641px) {
  .sg-toolbar > #eventStaffStrip.pgh.pgh--schedule, .schd-toolbar > #managerScheduleStrip.pgh.pgh--schedule { flex-wrap: wrap; row-gap: var(--s-1); overflow: visible; }
  :is(#eventStaffStrip, #managerScheduleStrip).pgh--schedule > :is(.pgh-chips, .pgh-nav--tail) { margin-inline-start: auto; }
}
.sg-header-state { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: var(--s-1); padding-inline-start: var(--s-3); border-inline-start: 1px solid var(--line); font-size: var(--t-sub); }
.sg-publication-state { color: var(--muted); white-space: nowrap; }
.sg-header-state .sg-live-state { margin: 0; }
.sg-schedule-card .sg-scroll { max-height: max(12rem, calc(100dvh - var(--sg-grid-top, 16rem) - var(--sg-grid-bottom, 0px) - var(--s-4))); }
.sg-head .sg-today .muted { color: var(--paper); }
.sg-cell.sg-today:not(:has(.sg-form)):hover, .sg-osrow .sg-cell:hover { background: var(--brand-blue-traditional); }
:is(.sg-today, .sg-osrow) .sg-chip { background: var(--brand-blue-traditional); color: var(--paper); border-color: color-mix(in srgb, var(--paper) 35%, var(--brand-blue-traditional)); border-left-color: var(--vc, var(--paper)); }
:is(.sg-today, .sg-osrow) :is(.sg-r, .sg-awayv) { color: var(--paper); }
:is(.sg-today, .sg-osrow) .sg-draft { background: repeating-linear-gradient(45deg, var(--brand-blue-traditional), var(--brand-blue-traditional) 5px, var(--brand-blue-deep) 5px, var(--brand-blue-deep) 10px); }
.sg-today .sg-chip--away { opacity: 1; }
.sg-today .sg-copybtn { background: var(--brand-blue-deep); color: var(--paper); }
.sg-today .sg-form { color: var(--ink); }

/* fetch-1227: one schedule control row; applied filters use the space vacated by venue choices. */
.sg-view-scope { margin: 0; padding: 0; border: 0; }
.sg-view-scope-checks { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-5); }
.sg-view-scope-checks .sg-view-check { min-height: var(--control-height-touch); }
#eventStaffStrip #sgViewBtn { display: inline-flex; align-items: center; justify-content: center; position: relative; min-width: calc(var(--control-height-touch) + var(--s-1)); width: calc(var(--control-height-touch) + var(--s-1)); height: calc(var(--control-height-touch) + var(--s-1)); padding: 0; background: transparent; border-color: transparent; color: var(--brand-gold-dark); }
#eventStaffStrip #sgViewBtn:hover { background: var(--wash); }
#eventStaffStrip .schedule-filter-glyph { display: block; flex: 0 0 auto; width: 28px; height: 28px; }
#eventStaffStrip #sgTplMgrBtn { display: inline-flex; align-items: center; justify-content: center; min-width: var(--control-height-touch); width: var(--control-height-touch); height: var(--control-height-touch); padding: 0; margin-inline-start: var(--s-3); background: transparent; border-color: transparent; color: var(--text-heading); }
#eventStaffStrip #sgTplMgrBtn:hover { background: var(--wash); }
#eventStaffStrip .pgh-icon-count { position: absolute; top: 0; right: 0; min-width: var(--s-3); border-radius: var(--r-m); padding: 0 var(--s-1); background: var(--ink); color: var(--paper); font-size: var(--t-label); line-height: 1.4; }
#eventStaffStrip .sg-view-chip { max-width: 24em; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) {
  #eventStaffStrip.pgh.pgh--schedule { display: flex; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; }
  #eventStaffStrip.pgh.pgh--schedule > .pgh-row { flex: 0 0 9rem; width: 9rem; }
  #eventStaffStrip.pgh.pgh--schedule > .pgh-nav--tail { display: flex; flex: 0 0 auto; flex-wrap: nowrap; width: auto; }
  #eventStaffStrip.pgh.pgh--schedule > .pgh-nav--tail > button { flex: 0 0 auto; white-space: nowrap; }
}

/* The embedded Culinary frame drops its old top gap; its family controls share the portal origin. */
.wrap.w-bleed:has(#culinaryScheduleStrip) .headwrap { padding-top: var(--s-6); }

/* fetch-1019: the manager asset record. Public QR records and shared issue markup stay intact. */
.asset-detail { min-width: 0; overflow-wrap: anywhere; }
.asset-detail .asset-detail-back { margin-bottom: var(--s-3); }
.asset-detail .asset-detail-overview { padding: var(--s-5); margin-bottom: var(--s-4); }
.asset-detail .asset-detail-heading { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--s-3); }
.asset-detail .asset-detail-heading > div { flex: 1 1 18rem; min-width: 0; }
.asset-detail h2 { margin: 0; font: 650 var(--t-title)/1.3 Inter, sans-serif; color: var(--text-heading); }
.asset-detail .asset-detail-context { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); align-items: center; margin-top: var(--s-2); font-size: var(--t-body); color: var(--muted); }
.asset-detail .asset-detail-location { margin: var(--s-1) 0 0; font-size: var(--t-sub); line-height: 1.5; }
.asset-detail .asset-detail-specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: var(--s-3) var(--s-5); margin: var(--s-4) 0 0; padding-top: var(--s-4); border-top: 1px solid var(--hair); }
.asset-detail .asset-detail-specs > div { min-width: 0; }
.asset-detail .asset-detail-specs dt { font-size: var(--t-sub); color: var(--muted); margin-bottom: var(--s-1); }
.asset-detail .asset-detail-specs dd { margin: 0; font-size: var(--t-body); font-variant-numeric: tabular-nums; }
.asset-detail .asset-detail-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }
.asset-detail .btn { min-height: var(--control-height-touch); max-width: 100%; white-space: normal; font-size: var(--t-sub); }
.asset-detail .asset-detail-action { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); padding: var(--s-2) var(--s-3); border-color: transparent; background: transparent; color: var(--action-primary); }
.asset-detail .asset-detail-action:hover { background: var(--wash); }
.asset-detail .asset-detail-action > span { display: inline-flex; flex: 0 0 auto; }
.asset-detail .asset-detail-qr { display: grid; justify-items: start; gap: var(--s-2); padding-top: var(--s-4); }
.asset-detail .asset-detail-qr p { margin: 0; font-size: var(--t-sub); line-height: 1.5; }
.asset-detail .asset-detail-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); align-items: start; margin-bottom: var(--s-4); }
.asset-detail .asset-detail-section { min-width: 0; margin: 0; padding: var(--s-4); }
.asset-detail .asset-detail-section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-3); margin-bottom: var(--s-3); scroll-margin-top: var(--s-5); }
.asset-detail h3 { margin: 0; font: 650 var(--t-section)/1.35 Inter, sans-serif; color: var(--text-heading); }
.asset-detail .asset-detail-empty { margin: 0; font-size: var(--t-sub); line-height: 1.5; }
.asset-detail .asset-detail-row { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-3); align-items: baseline; justify-content: space-between; padding: var(--s-3) 0; border-bottom: 1px solid var(--hair); font-size: var(--t-body); }
.asset-detail .asset-detail-row > :first-child { flex: 1 1 12rem; min-width: 0; }
.asset-detail .asset-detail-row:last-child { border-bottom: 0; }
.asset-detail .asset-detail-log { padding-bottom: var(--s-3); border-bottom: 1px solid var(--hair); }
.asset-detail .asset-detail-log:last-child { padding-bottom: 0; border-bottom: 0; }
.asset-detail .asset-detail-log .asset-detail-row { padding-bottom: var(--s-1); border-bottom: 0; }
.asset-detail .asset-detail-meta { margin-top: var(--s-1); font-size: var(--t-sub); line-height: 1.5; }
.asset-detail .asset-detail-amount { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--s-2); font-variant-numeric: tabular-nums; }
.asset-detail .asset-detail-total { font-size: var(--t-body); font-variant-numeric: tabular-nums; }
.asset-detail .asset-detail-work { display: flex; gap: var(--s-2); align-items: flex-start; font-size: var(--t-sub); line-height: 1.5; }
.asset-detail .asset-detail-work > :first-child { flex: 0 0 auto; }
.asset-detail .asset-detail-issues .row { flex-wrap: wrap; gap: var(--s-2) var(--s-3); }
.asset-detail .asset-detail-issues .row > div { min-width: 0; }
.asset-detail .asset-detail-issues .row > div:last-child { flex-wrap: wrap; }
.asset-detail .asset-detail-issues .field { min-width: 0; }
.asset-detail .asset-detail-issues input, .asset-detail .asset-detail-issues select { min-height: var(--control-height-touch); }
.asset-detail .asset-detail-maps { grid-column: 1/-1; }
.asset-detail .asset-detail-maps figure { margin: 0 0 var(--s-4); }
.asset-detail .asset-detail-maps figure:last-child { margin-bottom: 0; }
.asset-detail .asset-detail-maps figcaption { margin-bottom: var(--s-2); font-size: var(--t-sub); }
.asset-detail .asset-detail-map { max-width: 100%; height: auto; border-radius: var(--r-s); border: 1px solid var(--line); }
@media (max-width: 820px) {
  .asset-detail .asset-detail-sections { grid-template-columns: minmax(0, 1fr); }
  .asset-detail .asset-detail-overview { padding: var(--s-4); }
}

/* fetch-1019: Equipment identity leads; condition and actions have their own space. */
.toolbar:has(#assetQrSheetBtn) :is(.btn, .sel) { min-height: var(--control-height-touch); }
#content .asset-card { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--s-2) var(--s-4); align-items: start; padding: var(--s-4); cursor: pointer; }
.asset-card:hover { border-color: var(--muted); }
.asset-identity { min-width: 0; }
.asset-name { display: block; border: 0; background: none; color: var(--ink); font: inherit; font-size: var(--t-section); font-weight: 650; line-height: 1.4; text-align: left; padding: 0; min-height: var(--control-height-touch); cursor: pointer; overflow-wrap: anywhere; max-width: 100%; }
.asset-name:hover { color: var(--navy); text-decoration: underline; text-underline-offset: .2em; }
.asset-place { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-3); align-items: baseline; font-size: var(--t-body); line-height: 1.5; overflow-wrap: anywhere; }
.asset-place .vchip { white-space: normal; }
.asset-category { margin-top: var(--s-1); color: var(--muted); font-size: var(--t-sub); line-height: 1.5; overflow-wrap: anywhere; }
.asset-condition { display: flex; align-items: center; min-height: var(--control-height-touch); }
.asset-actions { display: flex; align-items: center; gap: var(--s-1); }
.asset-action { display: inline-flex; align-items: center; justify-content: center; width: var(--control-height-touch); height: var(--control-height-touch); flex: none; padding: 0; border: 0; border-radius: var(--r-s); background: none; color: var(--navy); font: inherit; font-size: var(--t-section); cursor: pointer; }
.asset-action:hover:not(:disabled) { background: var(--wash); }
.asset-action:disabled { opacity: .3; cursor: default; }
.asset-action .ci { display: block; }
.asset-signals { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-4); padding-top: var(--s-2); border-top: 1px solid var(--hair); }
.asset-signal { display: inline-flex; align-items: center; gap: var(--s-1); font: inherit; font-size: var(--t-sub); line-height: 1.5; text-align: left; overflow-wrap: anywhere; min-width: 0; }
button.asset-signal { background: none; border: 0; padding: 0; min-height: var(--control-height-touch); cursor: pointer; }
button.asset-signal:hover { text-decoration: underline; text-underline-offset: .2em; }
.asset-signal--urgent { color: var(--bad-fg); }
.asset-signal--warn { color: var(--warn-fg); }
.asset-signal--info { color: var(--navy); }
#content .asset-group { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s-2); width: 100%; min-height: var(--control-height-touch); text-align: left; font: inherit; }
.asset-group-name { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2); min-width: 0; overflow-wrap: anywhere; }
.asset-group-count { color: var(--muted); font-size: var(--t-sub); }
.asset-group[aria-expanded="true"] .grp-chev { transform: rotate(90deg); }
@media (max-width: 640px) {
  #content .asset-card { grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-2); }
  .asset-identity { grid-column: 1 / -1; }
  .asset-condition { grid-column: 1; }
  .asset-actions { grid-column: 2; justify-content: flex-end; }
  .asset-name { font-size: var(--t-body); }
  .asset-signals { gap: var(--s-2) var(--s-3); }
}
@media print {
  .asset-actions { display: none; }
  button.asset-signal { min-height: 0; }
  .asset-name { color: var(--ink); }
}

/* ---- fetch-1022: THE HOUSE RULES EDITOR for the three things a proposal prices from - the
   revenue-center matrix behind app_settings.pricing_rules (inside House rules), and the
   venue_rates sheet + the proposal_fees catalog (the Proposal rules section beneath it).
   Compact settings tables: every colour a token, every size a step on the type scale, no
   inline styles, so the debt ratchet stays flat. Phone: the tables scroll inside .pr-scroll. ---- */
.pr-bar { display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; margin: var(--s-3) 0 var(--s-2); }
.pr-bar select { max-width: 16rem; }
.pr-bar .pr-check { display: inline-flex; gap: var(--s-1); align-items: center; font-size: var(--t-sub); color: var(--muted); }
.pr-scroll { overflow-x: auto; }
.pr-tbl { width: 100%; min-width: 60rem; border-collapse: collapse; font-size: var(--t-mid); } /* the floor keeps eight to eleven columns legible: past it the table scrolls inside .pr-scroll instead of squeezing every input to nothing (probe1022 B10 caught the squeeze at 390px) */
.pr-tbl th { text-align: left; font-size: var(--t-label); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: var(--s-1) var(--s-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.pr-tbl td { padding: var(--s-1) var(--s-2); border-bottom: 1px solid var(--hair); vertical-align: middle; }
.pr-tbl tr:last-child td { border-bottom: none; }
.pr-tbl input, .pr-tbl select { width: 100%; min-width: 0; font-size: var(--t-sub); padding: var(--s-1) var(--s-2); }
.pr-tbl .pr-num, .pr-tbl .pr-num input { text-align: right; font-variant-numeric: tabular-nums; }
.pr-w-money input { max-width: 6.5rem; }
.pr-w-cap input { max-width: 4.5rem; }
.pr-w-price input { max-width: 5.5rem; }
.pr-w-name input { min-width: 11rem; }
.pr-sec td { background: var(--wash); font-size: var(--t-label); letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: var(--navy-dark); }
.pr-row--off td { opacity: .55; }
.pr-row--off .pr-w-name input { text-decoration: line-through; }
.pr-matrix { border-collapse: collapse; font-size: var(--t-sub); max-width: 36rem; }
.pr-matrix th { font-size: var(--t-label); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: var(--s-1) var(--s-2); border-bottom: 1px solid var(--line); text-align: center; }
.pr-matrix th:first-child { text-align: left; }
.pr-matrix td { padding: var(--s-1) var(--s-2); border-bottom: 1px solid var(--hair); text-align: center; }
.pr-matrix td:first-child { text-align: left; font-weight: 500; white-space: nowrap; }
.pr-matrix tr:last-child td { border-bottom: none; }
.pr-matrix input[type="checkbox"] { accent-color: var(--navy); cursor: pointer; }
.pr-hint { font-size: var(--t-sub); color: var(--muted); margin-top: var(--s-1); }
.pr-dirty { outline: 2px solid var(--gold); outline-offset: 1px; }

/* ---- fetch-1024: THE PROPOSAL BUILDER on the Pipeline record - one panel in the summary chain (beside Move venue and
   Decline), the rate strip, the fact grid, the line table and the totals. Every colour a token, every size a step on
   the type scale, no inline styles; phone: the line table scrolls inside .pp-scroll, the page never does. ---- */
.pdx-proposal { display: flex; flex-direction: column; gap: var(--s-3); }
.pp-strip { display: flex; flex-wrap: wrap; background: var(--wash); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.pp-cell { flex: 1 1 7.5rem; min-width: 0; padding: var(--s-2) var(--s-3); border-right: 1px solid var(--line); }
.pp-cell:last-child { border-right: none; }
.pp-l { font-size: var(--t-label); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.pp-v { font-size: var(--t-mid); font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 2px; }
.pp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--hair); }
.pp-fact .pp-v { font-weight: 500; }
.pp-inputs { align-items: end; }
.pp-scroll { overflow-x: auto; }
.pp-tbl { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: var(--t-mid); }
.pp-tbl th { text-align: left; font-size: var(--t-label); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: var(--s-1) var(--s-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.pp-tbl td { padding: var(--s-1) var(--s-2); border-bottom: 1px solid var(--hair); vertical-align: top; }
.pp-tbl tr:last-child td { border-bottom: none; }
.pp-tbl input { width: 100%; min-width: 0; font-size: var(--t-sub); padding: var(--s-1) var(--s-2); }
.pp-tbl .pp-num, .pp-tbl .pp-num input { text-align: right; font-variant-numeric: tabular-nums; }
.pp-w-name input { min-width: 13rem; }
.pp-w-price input { min-width: 5.5rem; max-width: 7rem; }
.pp-w-qty input { min-width: 4.75rem; max-width: 5.5rem; } /* room for three digits beside the spinner: "75" clipped to "7:" at 4.5rem (shot1024) */
.pp-w-total { white-space: nowrap; padding-top: calc(var(--s-1) + 6px); }
.pp-sec td { background: var(--navy); color: var(--paper); font-size: var(--t-label); letter-spacing: .08em; text-transform: uppercase; font-weight: 700; border-bottom: none; }
.pp-sec-note { font-weight: 400; letter-spacing: 0; text-transform: none; opacity: .85; }
.pp-section-add .btn { min-height: var(--control-height-touch); font-size: var(--t-sub); }
.pp-off td { opacity: .6; }
.pp-over .pp-w-name input, .pp-over .pp-w-price input { outline: 2px solid var(--gold); outline-offset: 1px; } /* an override on this proposal only - visible, as the design note asks */
.pp-totals { margin-left: auto; max-width: 28rem; border-top: 2px solid var(--navy); padding-top: var(--s-2); display: flex; flex-direction: column; gap: var(--s-1); }
.pp-trow { display: flex; justify-content: space-between; gap: var(--s-4); font-size: var(--t-mid); font-variant-numeric: tabular-nums; }
.pp-trow--sub { font-weight: 600; }
.pp-trow--grand { font-size: var(--t-section); font-weight: 700; color: var(--navy-dark); border-top: 1px solid var(--line); padding-top: var(--s-2); margin-top: var(--s-1); }
.pp-foot { margin-top: var(--s-2); }
@media (max-width: 640px) {
  .pp-totals { max-width: none; }
}

/* fetch-1097: one catalog browser keeps filters and batch actions visible while its results scroll. */
.pp-menu-entry { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s-3); padding: var(--s-3) 0; border-block: 1px solid var(--line); }
.pp-menu-entry strong { font-size: var(--t-body); color: var(--text-heading); }
.pp-menu-entry .btn { min-height: var(--control-height-touch); }
.pp-menu-dialog { width: min(64rem, calc(100vw - var(--s-6))); height: min(54rem, calc(100dvh - var(--s-6))); max-width: none; max-height: none; padding: 0; margin: auto; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface-card); color: var(--ink); overflow: hidden; box-sizing: border-box; }
.pp-menu-dialog[open] { display: flex; flex-direction: column; }
.pp-menu-dialog::backdrop { background: color-mix(in srgb, var(--navy-dark) 48%, transparent); }
.pp-menu-dialog * { box-sizing: border-box; }
.pp-menu-dialog .btn { min-height: var(--control-height-touch); font-size: var(--t-sub); white-space: normal; }
.pp-menu-head { flex: none; padding: var(--s-4) var(--s-5) 0; border-bottom: 1px solid var(--line); }
.pp-menu-title { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-3); }
.pp-menu-title h2 { margin: 0; font: 650 var(--t-title)/1.3 Inter, sans-serif; color: var(--text-heading); }
.pp-menu-title p { margin: var(--s-1) 0 0; font-size: var(--t-sub); line-height: 1.5; color: var(--muted); }
.pp-menu-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-2) var(--s-3); }
.pp-menu-field { display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; font-size: var(--t-sub); line-height: 1.4; font-weight: 600; color: var(--navy-dark); }
.pp-menu-search { grid-column: span 2; }
.pp-menu-field input, .pp-menu-field select { width: 100%; min-width: 0; height: var(--control-height-touch); padding: var(--s-2); border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface-card); color: var(--ink); font: 400 var(--t-body)/1.4 Inter, sans-serif; }
.pp-menu-tools { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2); padding: var(--s-2) 0; font-size: var(--t-sub); font-variant-numeric: tabular-nums; }
.pp-menu-tools #ppMenuCount { margin-right: auto; }
.pp-menu-tools [aria-pressed="true"] { background: var(--navy); color: var(--paper); border-color: var(--navy); }
.pp-menu-warning { margin: 0 0 var(--s-2); padding: var(--s-2); font-size: var(--t-sub); line-height: 1.4; color: var(--warn-fg); background: var(--warn-bg); border-radius: var(--r-s); }
.pp-menu-results { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: var(--s-2) var(--s-5); scrollbar-gutter: stable; }
.pp-menu-item { display: grid; grid-template-columns: 1.25rem minmax(0, 1fr) auto; gap: var(--s-3); align-items: start; min-height: var(--control-height-touch); margin: 0; padding: var(--s-3); border-bottom: 1px solid var(--line); border-radius: var(--r-s); cursor: pointer; }
.pp-menu-item:hover { background: var(--wash); }
.pp-menu-item--selected { background: var(--wash); box-shadow: inset 3px 0 var(--navy); }
.pp-menu-item--unavailable { color: var(--warn-fg); }
.pp-menu-item input[type="checkbox"] { width: 1.15rem; height: 1.15rem; min-width: 0; min-height: 0; margin: var(--s-1) 0 0; accent-color: var(--navy); cursor: pointer; }
.pp-menu-copy { display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; overflow-wrap: anywhere; }
.pp-menu-copy strong { font-size: var(--t-body); line-height: 1.5; color: var(--text-heading); }
.pp-menu-meta { font-size: var(--t-sub); line-height: 1.5; color: var(--muted); }
.pp-menu-description { font-size: var(--t-sub); line-height: 1.6; white-space: pre-wrap; }
.pp-menu-price { max-width: 7rem; padding-top: var(--s-1); font-size: var(--t-body); line-height: 1.5; font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums; text-align: right; }
.pp-menu-footer { flex: none; display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-5); border-top: 1px solid var(--line); background: var(--wash); }
.pp-menu-footer > div { flex: 1; min-width: 0; }
.pp-menu-footer strong { display: block; font-size: var(--t-body); font-variant-numeric: tabular-nums; }
.pp-menu-footer span { display: block; margin-top: var(--s-1); color: var(--muted); font-size: var(--t-sub); line-height: 1.4; }
@media (max-width: 640px) {
  .pp-menu-dialog { width: 100vw; height: 100dvh; border: 0; border-radius: 0; }
  .pp-menu-head { padding: var(--s-3) var(--s-3) 0; }
  .pp-menu-title { margin-bottom: var(--s-2); }
  .pp-menu-title h2 { font-size: var(--t-section); }
  .pp-menu-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
  .pp-menu-field input, .pp-menu-field select { font-size: 1rem; }
  .pp-menu-tools { gap: var(--s-1); }
  .pp-menu-results { padding: 0 var(--s-2); }
  .pp-menu-item { grid-template-columns: 1.15rem minmax(0, 1fr) auto; gap: var(--s-2); padding: var(--s-3) var(--s-2); }
  .pp-menu-price { max-width: 4.75rem; font-size: var(--t-sub); }
  .pp-menu-footer { flex-wrap: wrap; gap: var(--s-2); padding: var(--s-2) var(--s-3) max(var(--s-2), env(safe-area-inset-bottom)); }
  .pp-menu-footer > div { flex-basis: calc(100% - 9rem); }
  .pp-menu-footer span { display: none; }
  .pp-menu-footer #ppMenuAdd { flex: 1 0 100%; }
}

/* ---- fetch-1025: THE PROPOSAL DOCUMENT and the saved versions on the record. The document is one sheet:
   the venue's mark, "designed exclusively for", the title in Cormorant Garamond (the one editorial moment - AGENTS.md
   reserves the face for it), the fact grid, the itemized table by section, the totals, the footnote, the confidential
   footer. Every colour a token, no inline styles; @media print hides the bar and lets the paper carry the colour. ---- */
.pdx-proposals .pp-versions { display: flex; flex-direction: column; gap: var(--s-1); margin-top: var(--s-2); }
.pp-version { display: flex; align-items: center; gap: var(--s-3); font-size: var(--t-mid); flex-wrap: wrap; }
.pp-version-v { font-weight: 700; color: var(--navy-dark); min-width: 2.2rem; font-variant-numeric: tabular-nums; }
.pp-version .btn { margin-left: auto; }
/* ---- fetch-1224: THE CLIENT'S LOOK on the record (Pipeline record card; a section body on the event page) - the frozen lines
   as the database priced them, the pieces the client added apart, the note, one door (Add to proposal). Tokens only. ---- */
.pdx-look { display: flex; flex-direction: column; gap: var(--s-2); }
.pdx-rec-card .pdx-look { margin: 0 0 var(--s-3); }
.pdx-look--section { padding: 0; }
.pdx-look-facts { color: var(--muted); font-size: var(--t-sub); }
.pdx-look-tbl { width: 100%; border-collapse: collapse; font-size: var(--t-mid); }
.pdx-look .pdx-look-tbl td { padding: var(--s-1) 0; border-top: 1px solid var(--hair); vertical-align: top; white-space: normal; overflow-wrap: anywhere; } /* .card table td is nowrap for data tables; a look's line must wrap on a phone or its amount runs off the card */
.pdx-look-tbl tbody:first-child tr:first-child td { border-top: 0; }
.pdx-look-name { min-width: 0; }
.pdx-look-detail { display: block; font-size: var(--t-sub); }
.pdx-look .pdx-look-tbl td.pdx-look-amt { text-align: right; white-space: nowrap; padding-left: var(--s-3); }
.pdx-look-sec td { padding-top: var(--s-2); font-size: var(--t-sub); font-weight: 600; color: var(--muted); }
.pdx-look-note { margin: 0; line-height: 1.5; overflow-wrap: anywhere; }
.pdx-look-door { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.pdx-look-door .btn { min-height: var(--control-height-touch); }
.pdx-look-rule { margin: 0; }
@media (max-width: 640px) { .pdx-look .pdx-look-tbl td.pdx-look-amt { white-space: normal; } .pdx-look-door .btn { flex: 1 1 100%; } }

.pdoc-wrap { max-width: 52rem; margin: 0 auto; }
.pdoc-bar { display: flex; align-items: center; gap: var(--s-3); justify-content: space-between; margin-bottom: var(--s-4); flex-wrap: wrap; }
.pdoc { background: var(--paper); color: var(--ink); padding: var(--s-6); border: 1px solid var(--line); border-radius: var(--r-s); font-family: Inter, Arial, sans-serif; font-size: var(--t-body); line-height: 1.55; overflow-wrap: anywhere; }
/* fetch-1087: approved Design A. One quiet masthead, complete saved menu, then the itemized estimate. */
.pdoc-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); padding-bottom: var(--s-5); border-bottom: 1px solid var(--gold); }
.pdoc-mark { max-width: 52%; max-height: 5rem; height: auto; width: 13rem; object-fit: contain; object-position: left center; display: block; margin: 0; }
.pdoc-mark-text { font-family: 'Cormorant Garamond', Georgia, serif; font-size: var(--t-title); color: var(--navy-dark); }
.pdoc-doc-label { display: flex; flex-direction: column; gap: var(--s-1); text-align: right; font-size: var(--t-sub); color: var(--navy); }
.pdoc-doc-label strong { color: var(--navy-dark); letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
.pdoc-event { padding: var(--s-5) 0; border-bottom: 1px solid var(--line); }
.pdoc-title { font-family: Inter, Arial, sans-serif; font-weight: 600; font-size: var(--t-title); color: var(--navy-dark); margin: 0; line-height: 1.3; }
.pdoc-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: var(--s-3) var(--s-5); margin-top: var(--s-4); }
.pdoc-fact-l { font-size: var(--t-sub); color: var(--navy); font-weight: 400; margin-bottom: var(--s-1); }
.pdoc-fact-v { font-weight: 500; font-variant-numeric: tabular-nums; }
.pdoc-menu { padding-top: var(--s-5); }
.pdoc h2 { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; font-size: var(--t-display); color: var(--navy-dark); margin: 0 0 var(--s-4); line-height: 1.2; }
.pdoc-menu-section { margin: 0 0 var(--s-5); padding-bottom: var(--s-5); border-bottom: 1px solid var(--line); }
.pdoc-menu-section:last-child { margin-bottom: 0; }
.pdoc h3.pdoc-menu-section-title { margin: 0 0 var(--s-3); font: 600 var(--t-sub)/1.5 Inter, Arial, sans-serif; color: var(--navy); text-transform: uppercase; letter-spacing: .09em; }
.pdoc-menu-item + .pdoc-menu-item { margin-top: var(--s-4); }
.pdoc-menu-copy { min-width: 0; }
.pdoc-menu-copy h4 { font: 600 var(--t-body)/1.4 Inter, Arial, sans-serif; color: var(--navy-dark); margin: 0 0 var(--s-2); }
.pdoc-menu-detail { font-size: var(--t-body); color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.pdoc-estimate { margin-top: var(--s-5); }
.pdoc-tbl { width: 100%; border-collapse: collapse; font-size: var(--t-sub); }
.pdoc-tbl th { background: transparent; color: var(--navy); font-size: var(--t-sub); font-weight: 500; padding: var(--s-2); border-bottom: 1px solid var(--line); text-align: left; }
.pdoc-tbl td { padding: var(--s-3) var(--s-2); border-bottom: 1px solid var(--hair); vertical-align: top; }
.pdoc-tbl th:first-child, .pdoc-tbl td:first-child { padding-left: 0; }
.pdoc-tbl th:last-child, .pdoc-tbl td:last-child { padding-right: 0; }
.pdoc-tbl .pdoc-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pdoc-detail { color: var(--navy); font-size: var(--t-sub); margin-top: var(--s-1); white-space: pre-line; }
.pdoc-sec td { background: transparent; font-weight: 600; font-size: var(--t-sub); letter-spacing: .06em; text-transform: uppercase; color: var(--navy-dark); padding-top: var(--s-4); border-bottom: 1px solid var(--line); }
.pdoc-sub td { font-weight: 600; border-bottom: 1px solid var(--line); }
.pdoc-grand td { font-weight: 600; border-top: 2px solid var(--navy); padding-top: var(--s-2); }
.pdoc-total td { font-weight: 600; font-size: var(--t-section); color: var(--navy-dark); border-top: 2px solid var(--navy); border-bottom: none; }
.pdoc-minimums, .pdoc-contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: var(--s-3) var(--s-5); margin-top: var(--s-4); }
.pdoc-foot { margin: var(--s-4) 0 0; font-size: var(--t-sub); color: var(--navy); line-height: 1.6; white-space: pre-line; }
.pdoc-next { margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--gold); }
.pdoc-next h2 { font-size: var(--t-title); }
.pdoc-conf { display: flex; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; margin-top: var(--s-5); padding-top: var(--s-3); border-top: 1px solid var(--line); font-size: var(--t-sub); color: var(--navy); }
.pp-description-label { display: block; margin-top: var(--s-2); font-size: var(--t-sub); color: var(--navy); }
.pp-tbl textarea.pp-description { display: block; width: 100%; min-width: 13rem; min-height: var(--control-height-touch); resize: vertical; font: var(--t-body)/1.5 Inter, Arial, sans-serif; margin-top: var(--s-1); }
/* fetch-1094: source-assigned photos stay beside their dish, with optional omission in the draft. */
.pp-photo { display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-3) 0; }
.pp-photo-image { display: block; flex: 0 0 5rem; width: 5rem; height: 4rem; object-fit: contain; background: var(--wash); border-radius: var(--r-s); }
.pp-photo--omitted .pp-photo-image { opacity: .45; }
.pp-photo-copy { min-width: 0; }
.pp-photo-status { font-size: var(--t-sub); color: var(--navy); }
.pp-photo-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-top: var(--s-1); }
.pp-photo-actions .btn, .pp-photo-choice { min-height: var(--control-height-touch); }
.pp-photo-choice { display: inline-flex; align-items: center; gap: var(--s-2); cursor: pointer; font-size: var(--t-sub); }
.pp-tbl .pp-photo-choice input { width: 1.1rem; height: 1.1rem; min-width: 1.1rem; accent-color: var(--navy); }
.pdoc-menu-item--photo { display: grid; grid-template-columns: minmax(0, 1fr) 12rem; gap: var(--s-5); align-items: start; }
.pdoc-photo-frame { margin: 0; min-width: 0; }
.pdoc-photo { display: block; width: 100%; max-height: 10rem; object-fit: contain; object-position: center top; }
.pdoc-photo-error { display: none; padding: var(--s-3); color: var(--warn-fg); background: var(--warn-bg); font-size: var(--t-sub); }
.pdoc-photo-frame--error .pdoc-photo { display: none; }
.pdoc-photo-frame--error .pdoc-photo-error { display: block; }
.pdoc-bar-acts { display: flex; gap: var(--s-2); flex-wrap: wrap; } /* fetch-1029: Send beside Print */
.pdoc-send { max-width: 40rem; margin: 0 auto var(--s-4); }
.pdoc-send-subject { padding: var(--s-2) 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pdoc-send .actions .btn-gold { margin-left: auto; }
.pdoc-share { max-width: 40rem; margin: 0 auto var(--s-4); } /* fetch-1140: the Client portal panel, in the Send panel's frame */
.pdoc-share .actions .btn-primary { margin-left: auto; }
.pp-portal { display: inline-flex; align-items: center; gap: var(--s-1); font-size: var(--t-label); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--navy); border: 1px solid var(--line); border-radius: 999px; padding: 2px var(--s-2); white-space: nowrap; } /* fetch-1140: On client portal / Accepted beside a saved version */
.pp-portal--accepted { color: var(--ok-fg); border-color: var(--ok-fg); }
.ctr-envelope { margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--hair); } /* fetch-1142: the signature card on the event's Contract section */
.ctr-envelope .pdoc-facts { margin-top: var(--s-2); }
.ctr-envelope .actions { margin-top: var(--s-3); }
.ctr-envelope .pp-portal { white-space: normal; border-radius: var(--r-m); } /* fetch-1150: "Signed by the client - awaiting countersignature" is wider than a 390px card, and the chip ran off its edge; on this card it wraps (a wrapped pill reads as a tag, so the radius steps down). The section is on the event page by default now, so the phone meets it */
.ctr-sign-frame { margin-top: var(--s-3); }
.ctr-sign-frame iframe { display: block; width: 100%; min-height: 40rem; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--paper); }
.ctr-head { margin-bottom: var(--s-4); } /* fetch-1142: the contract's letterhead in the proposal document's language (.pdoc-head: the venue's mark left, a gold hairline under) - the signed PDF carries the same one */
.ctr-head-facts { min-width: 0; text-align: right; }
.ctr-head-kicker { color: var(--gold-dark); font-size: var(--t-sub); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.ctr-head-title { margin-top: var(--s-1); color: var(--navy-dark); font-size: var(--t-title); font-weight: 700; line-height: 1.2; }
.ctr-head-sub { margin-top: var(--s-1); color: var(--muted); font-size: var(--t-sub); }
/* fetch-1144: a readable screen contract, with a form that fits Safari's native date input. */
.ctr-doc { width: 100%; min-width: 0; padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--r-m); }
.ctr-controls { margin-bottom: var(--s-5); padding-bottom: var(--s-4); border-bottom: 1px solid var(--hair); }
.ctr-toolbar, .ctr-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; }
.ctr-toolbar { justify-content: space-between; margin-bottom: var(--s-4); }
.ctr-actions { min-width: 0; }
.ctr-doc .btn { max-width: 100%; min-height: var(--control-height-touch); white-space: normal; }
.ctr-fields.grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); }
.ctr-fields .field { min-width: 0; }
.ctr-fields label { display: block; margin-bottom: var(--s-1); font-size: var(--t-sub); }
.ctr-fields input { display: block; width: 100%; min-width: 0; max-width: 100%; min-height: var(--control-height-touch); font-size: 1rem; box-sizing: border-box; }
.ctr-fields input[type="date"] { appearance: none; -webkit-appearance: none; }
.ctr-fields input[type="date"]::-webkit-date-and-time-value { min-height: 1.4em; text-align: left; }
.ctr-template { margin-top: var(--s-3); font-size: var(--t-sub); overflow-wrap: anywhere; }
.ctr-body { font-size: 1rem; line-height: 1.7; overflow-wrap: anywhere; }
.ctr-clause { margin: 0 0 var(--s-4); text-align: left; }
.ctr-heading { margin: var(--s-5) 0 var(--s-2); font-weight: 700; break-after: avoid; }
.ctr-signatures { margin-top: var(--s-6); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); font-size: var(--t-sub); }
.ctr-signatures > div { border-top: 1px solid var(--ink); padding-top: var(--s-2); }
.ctr-head-title, .ctr-head-sub { overflow-wrap: anywhere; }
@media screen and (max-width: 900px) {
  .ctr-fields.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 640px) {
  .ctr-doc { padding: var(--s-3); }
  .ctr-toolbar { align-items: stretch; }
  .ctr-actions { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); }
  .ctr-fields.grid { grid-template-columns: minmax(0, 1fr); }
  .ctr-head { flex-direction: column; align-items: flex-start; }
  .ctr-head .pdoc-mark { width: auto; max-width: 100%; max-height: 4rem; }
  .ctr-head-facts { text-align: left; }
  .ctr-head-title { font-size: var(--t-section); }
  .ctr-signatures { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
}
@media print {
  .ctr-doc { padding: 0; border: 0; border-radius: 0; }
  .ctr-controls { display: none !important; }
  .ctr-body { font-size: 10pt; line-height: 1.5; }
  .ctr-clause { margin-bottom: var(--s-2); orphans: 3; widows: 3; }
  .ctr-signatures { break-inside: avoid; }
}
@media screen and (max-width: 640px) {
  .pdoc { padding: var(--s-4); }
  .pdoc-head { gap: var(--s-3); }
  .pdoc-bar .btn { min-height: var(--control-height-touch); }
  .pdoc-tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .pdoc-tbl, .pdoc-tbl tbody { display: block; }
  .pdoc-tbl tr { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); }
  .pdoc-tbl td { min-width: 0; }
  .pdoc-tbl .pdoc-sec td { flex: 1; }
  .pdoc-tbl .pdoc-item-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-1) var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--hair); }
  .pdoc-item-row td { padding: 0; border: 0; }
  .pdoc-item-row td:first-child { grid-column: 1; grid-row: 1; font-weight: 500; }
  .pdoc-item-row td:nth-child(2) { grid-column: 1; grid-row: 3; text-align: left; color: var(--navy); }
  .pdoc-item-row td:nth-child(3) { grid-column: 1; grid-row: 2; text-align: left; color: var(--navy); }
  .pdoc-item-row td:nth-child(2)::before, .pdoc-item-row td:nth-child(3)::before { content: attr(data-label) " "; }
  .pdoc-item-row td:last-child { grid-column: 2; grid-row: 1 / 4; align-self: center; font-weight: 500; }
  .pp-tbl textarea.pp-description { font-size: 1rem; }
  .pdoc-menu-item--photo { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
  .pdoc-photo-frame { width: 100%; max-width: 16rem; }
  .pdoc-photo { max-height: 12rem; }
}
@page proposal { size: Letter; margin: 15mm; }
@media print {
  body:has(#proposalDoc) { page: proposal; padding: 0; }
  .pdoc-wrap { max-width: none; margin: 0; }
  .pdoc { border: none; border-radius: 0; padding: 0; font-size: var(--t-sub); }
  .pdoc, .pdoc * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pdoc-tbl tr, .pdoc-fact { break-inside: avoid; }
  .pdoc-tbl td { padding-top: var(--s-1); padding-bottom: var(--s-1); }
  .pdoc-sec td { break-after: avoid; padding-top: var(--s-2); }
  .pdoc-head { padding-bottom: var(--s-4); }
  .pdoc-event { padding: var(--s-4) 0; }
  .pdoc-menu { padding-top: var(--s-4); }
  .pdoc-menu-section { margin-bottom: var(--s-4); padding-bottom: var(--s-4); }
  .pdoc-menu-detail, .pdoc-menu-copy h4 { font-size: var(--t-sub); }
  .pdoc-menu-section-title, .pdoc h2, .pdoc-menu-copy h4 { break-after: avoid; }
  .pdoc-menu-detail { orphans: 3; widows: 3; }
  .pdoc-menu-item, .pdoc-summary { break-inside: avoid; }
  .pdoc-menu-item--photo { grid-template-columns: minmax(0, 1fr) 1.7in; gap: var(--s-4); }
  .pdoc-photo { max-height: 1.25in; }
  .pdoc-estimate--after-menu { break-before: page; margin-top: 0; }
  .pdoc-next, .pdoc-minimums { break-inside: avoid; }
  .pdoc-minimums, .pdoc-contact, .pdoc-foot { margin-top: var(--s-2); }
  .pdoc-next { margin-top: var(--s-2); padding-top: var(--s-1); }
  .pdoc-next h2 { font-size: var(--t-section); margin-bottom: var(--s-1); }
  .pdoc-conf { margin-top: var(--s-1); padding-top: var(--s-1); }
}
.loan-workbench { max-width: 860px; margin-inline: auto; }
.card.loan-workbench.loan-quick { max-width: 680px; padding: var(--s-5); }
.loan-workbench .page-header { margin-bottom: var(--s-5); }
.loan-quick .page-header { align-items: flex-start; margin-bottom: 0; padding-bottom: var(--s-4); }
.loan-account { display: block; color: var(--muted); font-size: var(--t-sub); line-height: 1.5; margin-top: var(--s-1); overflow-wrap: anywhere; }
.loan-fields { min-width: 0; border: 0; padding: 0; margin: 0; }
.loan-workbench h2, .loan-return h2, .loan-ledger h2 { font-size: var(--t-section); color: var(--navy-dark); margin: 0 0 var(--s-3); }
.loan-workbench .field, .loan-return .field { min-width: 0; }
.loan-workbench .field label, .loan-return .field label, .loan-field-label { display: block; font-size: var(--t-sub); font-weight: 600; color: var(--navy-dark); margin-bottom: var(--s-2); }
.loan-workbench input:not([type="hidden"]), .loan-workbench select, .loan-return input:not([type="hidden"]), .loan-return select { min-height: var(--control-height-touch); width: 100%; font-size: 1rem; }
.loan-workbench .btn, .loan-return .btn, .loan-ledger .btn { min-height: var(--control-height-touch); }
.loan-help { color: var(--mute-fg); font-size: var(--t-sub); line-height: 1.5; margin: var(--s-2) 0; }
/* fetch-1494: the Comments boxes on borrow and return, and the comments the loan list shows (line breaks kept). */
.loan-workbench textarea, .loan-return textarea { width: 100%; min-width: 0; min-height: calc(var(--control-height-touch) * 2); font-size: 1rem; line-height: 1.5; resize: vertical; }
.loan-comment { white-space: pre-line; overflow-wrap: anywhere; }
.loan-quick-step { padding-block: var(--s-4); border-top: 1px solid var(--line); }
.loan-quick-step:first-child { padding-top: 0; border-top: 0; }
.loan-quick-step > h2 { margin-bottom: var(--s-1); }
.loan-quick-item { min-width: 0; }
.loan-quick-item + .loan-quick-item { margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--hair); }
.loan-item-inputs { display: grid; grid-template-columns: minmax(0, 1fr) 88px; gap: var(--s-3); align-items: end; }
.loan-item-inputs > * { min-width: 0; }
.loan-item-inputs input { box-sizing: border-box; }
.loan-quick .loan-item-choice { margin: var(--s-2) 0 0; padding: 0; border: 0; }
.loan-quick .loan-suggestions { margin-bottom: 0; }
.loan-quick .loan-add-item { width: auto; margin: var(--s-2) 0 0; padding-inline: 0; border: 0; background: transparent; color: var(--navy); }
.loan-quick-item > [data-lexdel] { margin: var(--s-3) 0 0; }
.loan-quick-photos { display: grid; gap: var(--s-3); }
.loan-quick-photos .loan-photo-field { padding: 0; border: 0; background: transparent; }
.loan-quick-photos .loan-photo-field + .loan-photo-field { padding-top: var(--s-4); border-top: 1px solid var(--hair); }
.loan-quick-photos .loan-photo-preview { align-items: flex-start; }
.loan-quick .loan-photo-preview img { width: 96px; height: 80px; }
.loan-photo-change { flex: 1 1 8rem; min-width: 0; max-width: 100%; }
.loan-photo-change .actions { display: grid; grid-template-columns: minmax(0, 1fr); margin-top: var(--s-2); }
.loan-photo-change .actions .btn { width: 100%; }
.loan-section-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s-3); margin-bottom: var(--s-3); }
.loan-section-head h2 { margin: 0; }
.loan-item-row, .loan-trip, .loan-signature-section { padding-block: var(--s-4); border-top: 1px solid var(--line); }
.loan-item-choice { display: flex; align-items: center; gap: var(--s-3); margin-block: var(--s-3); }
.loan-item-details { display: grid; grid-template-columns: 120px minmax(0,1fr); align-items: start; gap: var(--s-5); margin-top: var(--s-4); }
.loan-catalog-photo { display: block; width: 72px; height: 72px; object-fit: cover; border: 1px solid var(--line); border-radius: var(--r-s); }
.loan-photo-field { min-width: 0; }
.loan-photo-preview { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-3); margin-block: var(--s-3); }
.loan-photo-preview img { width: 120px; height: 100px; object-fit: cover; border-radius: var(--r-s); border: 1px solid var(--line); }
.loan-photo-link { display: inline-flex; flex-shrink: 0; align-items: center; gap: var(--s-2); font-size: var(--t-sub); white-space: nowrap; }
.loan-add-item { width: 100%; margin-bottom: var(--s-5); border-style: dashed; }
.loan-suggestions { display: grid; gap: var(--s-2); margin-block: var(--s-3); }
/* fetch-1040: borrowing something the catalog does not know yet. The offer only appears when
   the search genuinely matched nothing, so the ordinary type-and-match path is untouched.
   Tokens only — the UI-debt ratchet fails the build on a raw hex or a px font-size. */
/* fetch-1041: the borrow-or-return chooser a scanned poster lands on. Two targets, each a real
   tap size on a phone, because the person reading this is holding equipment. Tokens only — the
   UI-debt ratchet sweeps this file and fails the build on a raw hex or a px font-size. */
.loan-choice { display: grid; gap: var(--s-3); margin: var(--s-4) auto; max-width: 30rem; }
.loan-choice-arm { display: block; width: 100%; min-height: calc(var(--control-height-touch) * 2); padding: var(--s-4); text-align: left; font: inherit; }
.loan-choice-title { display: block; font-size: var(--t-section); font-weight: 700; }
.loan-choice-sub { display: block; margin-top: var(--s-1); font-size: var(--t-sub); opacity: .85; }
.loan-out-filter { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin: 0 0 var(--s-3); }
.loan-unlisted-offer { display: grid; gap: var(--s-2); margin-top: var(--s-2); padding-top: var(--s-2); border-top: 1px solid var(--line); }
.loan-item-choice--unlisted { align-items: flex-start; justify-content: space-between; gap: var(--s-3); padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-s); background: var(--wash); }
.loan-item-choice--unlisted .loan-help { margin: var(--s-1) 0 var(--s-2); }
.loan-suggestion { display: flex; align-items: center; gap: var(--s-3); text-align: left; justify-content: flex-start; white-space: normal; }
.loan-suggestion .loan-help { display: block; }
.loan-signature-pad { display: block; width: 100%; max-width: 560px; height: auto; border: 1px dashed var(--muted); border-radius: var(--r-s); background: var(--surface-card); touch-action: none; margin-block: var(--s-3); }
.loan-saved-signature { display: block; max-width: 100%; width: 200px; height: 60px; object-fit: contain; object-position: left; }
.loan-submit { margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.loan-quick .loan-submit { margin-top: 0; }
.loan-submit .btn-primary { min-width: 180px; }
.loan-trip details { margin-top: var(--s-4); }
.loan-workbench summary, .loan-ledger summary { cursor: pointer; min-height: var(--control-height-touch); padding-block: var(--s-2); font-size: var(--t-body); }
.loan-list-item, .loan-receipt-item { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); padding-block: var(--s-3); border-top: 1px solid var(--hair); }
.loan-list-item > .actions { justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.loan-item-description { flex: 1; min-width: 0; }
.loan-proof summary { font-size: var(--t-sub); }
.loan-return-item { padding-block: var(--s-3); border-top: 1px solid var(--line); }
.loan-return-item > strong { display: block; margin-bottom: var(--s-3); }
.loan-return .grid { margin-top: var(--s-3); }
.loan-wide { grid-column: 1 / -1; }
.loan-fields [hidden] { display: none !important; }
.equipment-loan-header { margin-bottom: var(--s-4); }
#app:has(#equipmentLoanHeader, #equipmentLoanPanel, #loanWorkbench, #loanQrBack) > .toolbar { display: none; }
.equipment-loan-header .pgh { margin-bottom: 0; }
.equipment-loan-header .pgh-top { align-items: center; }
.equipment-loan-header .pgh-acts { margin-left: auto; }
.equipment-loan-header .pgh-acts > .btn { min-height: var(--control-height-touch); }
.equipment-loan-header .pgh-more { width: var(--control-height-touch); height: var(--control-height-touch); }
.equipment-loan-header .pgh-morelist .btn { min-height: var(--control-height-touch); width: 100%; justify-content: flex-start; text-align: left; }
/* fetch-1034: Equipment's five views share one compact header. Keep this opt-in:
   other pgh consumers retain their layout and scroll treatment. */
.equipment-header { margin-bottom: var(--s-4); min-width: 0; }
.equipment-header .pgh { display: flex; flex-wrap: wrap; gap: 0 var(--s-3); margin-bottom: 0; }
.equipment-header .pgh-top, .equipment-header .pgh-tabs { flex: 1 1 100%; min-width: 0; }
.equipment-header .pgh-top { flex-wrap: nowrap; }
.equipment-header .pgh-titles { flex: 1 1 auto; }
.equipment-header .pgh-h { line-height: 1.25; }
.equipment-header .pgh-acts { margin-left: auto; flex: 0 0 auto; }
.equipment-header .pgh-tabs { overflow: visible; flex-wrap: wrap; gap: 0 var(--s-5); margin-top: var(--s-2); }
.equipment-header .pgh-tab { min-height: var(--control-height-touch); min-width: var(--control-height-touch); font-size: var(--t-body); font-family: inherit; }
.equipment-header .pgh-tab .n { font-variant-numeric: tabular-nums; }
.equipment-header .pgh-nav { display: flex; flex: 1 1 auto; flex-wrap: wrap; gap: var(--s-2); min-width: 0; margin-top: var(--s-2); }
.equipment-header .pgh-nav .sel { width: auto; max-width: 100%; font-size: var(--t-body); }
.equipment-header .pgh-row { flex: 1 1 auto; min-width: 0; margin-top: var(--s-2); }
.equipment-header .pgh-search { flex: 1 1 auto; padding-block: 0; min-height: var(--control-height-touch); }
.equipment-header .pgh-search input { min-height: var(--control-height-touch); }
.equipment-header .pgh-seg { width: auto; padding: 1px; gap: 1px; overflow: visible; mask-image: none; -webkit-mask-image: none; }
.equipment-header .pgh-more { width: var(--control-height-touch); height: var(--control-height-touch); }
.equipment-header .pgh-morelist .btn { width: 100%; min-height: var(--control-height-touch); text-align: left; justify-content: flex-start; }
.equipment-header .pgh-morelist { min-width: 12rem; max-width: calc(100vw - var(--s-6)); }
.equipment-header #importBtn { display: inline-flex; } /* The old phone-wide CSV hide must not leave More empty. */
.equipment-header--inventory .pgh-row:has(.pgh-search) { order: 1; flex: 1 1 12rem; }
.equipment-header--inventory .pgh-row:has(.pgh-seg) { order: 2; flex: 0 0 auto; }
.equipment-header--inventory .pgh-nav { order: 3; flex-basis: 100%; }
@media (max-width: 640px) {
  .equipment-header .pgh-tabs { gap: 0 var(--s-2); }
  .equipment-header .pgh-tab { flex: 1 1 calc(33.333% - var(--s-2)); padding-inline: var(--s-1); text-align: center; }
  .equipment-header .pgh-nav .sel { flex: 1 1 8rem; min-width: 0; }
  .equipment-header--inventory .pgh-row:has(.pgh-seg) { flex: 1 1 auto; }
  .equipment-header--inventory .pgh-seg { flex: 1; }
  .equipment-header--inventory .pgh-seg button { flex: 1; padding-inline: var(--s-2); }
}
@media (max-width: 360px) {
  .equipment-header .pgh-top { flex-wrap: wrap; }
  .equipment-header .pgh-acts { margin-left: 0; }
  .equipment-header .pgh-titles { flex-basis: 100%; }
}
.loan-ledger { display: grid; gap: var(--s-4); }
.loan-ledger > .card { margin-bottom: 0; }
.loan-out-section { min-width: 0; }
.loan-out-section > .loan-section-head { padding-bottom: var(--s-3); border-bottom: 1px solid var(--line); }
.loan-runs { display: grid; gap: var(--s-3); }
.loan-run { min-width: 0; padding-top: var(--s-3); border-top: 1px solid var(--line); }
.loan-run:first-child { padding-top: 0; border-top: 0; }
.loan-run > .loan-section-head { margin-bottom: 0; }
.loan-run h3 { margin: 0; color: var(--navy-dark); font-size: var(--t-body); line-height: 1.4; }
.loan-run .loan-list-item:first-of-type { border-top: 0; }
.loan-run .loan-list-item { min-width: 0; }
.loan-run .loan-photo-link { white-space: normal; }
.loan-secondary > details + details { border-top: 1px solid var(--line); margin-top: var(--s-2); padding-top: var(--s-2); }
@media print { .loan-qr-controls { display: none !important; } }
@media (max-width: 640px) {
  .loan-workbench, .card.loan-workbench.loan-quick { padding: var(--s-4); }
  .loan-workbench .grid, .loan-return .grid, .loan-item-details { grid-template-columns: minmax(0,1fr); }
  .loan-item-details > .field { max-width: 140px; }
  .loan-quick-step { padding-block: var(--s-4); }
  .loan-quick-step:first-child { padding-top: 0; }
  .loan-item-inputs { grid-template-columns: minmax(0, 1fr) 88px; gap: var(--s-2); }
  .loan-list-item { align-items: stretch; flex-direction: column; }
  .loan-list-item > .actions { justify-content: flex-start; }
  .loan-photo-field .actions .btn { flex: 1; }
  .loan-submit { display: grid; grid-template-columns: minmax(0, 1fr) auto; width: 100%; }
  .loan-submit .btn-primary { min-width: 0; }
  .loan-submit .loan-help { grid-column: 1 / -1; }
  .loan-return { padding: var(--s-4); }
  .equipment-loan-header .pgh-top { flex-wrap: nowrap; }
  .equipment-loan-header .pgh-titles { flex: 1 1 auto; }
  .equipment-loan-header .pgh-acts { width: auto; }
  .equipment-loan-header .pgh-tabs { column-gap: var(--s-2); }
  .equipment-loan-header .pgh-tab { flex: 1 1 calc(33.333% - var(--s-2)); min-height: var(--control-height-touch); padding-inline: var(--s-1); text-align: center; }
  .loan-out-section, .loan-secondary { padding: var(--s-4); }
  .loan-run .loan-list-item > .actions .btn { flex: 1 1 auto; }
}
@media (max-width: 360px) {
  .card.loan-workbench.loan-quick { padding-block: var(--s-3); }
  .loan-quick-step { padding-block: var(--s-3); }
  .loan-quick-step:first-child { padding-top: 0; }
  .loan-item-inputs { grid-template-columns: minmax(0, 1fr); }
  .loan-submit { grid-template-columns: minmax(0, 1fr); }
  .loan-submit .btn { width: 100%; }
  .equipment-loan-header .pgh-top { flex-wrap: wrap; }
  .equipment-loan-header .pgh-titles, .equipment-loan-header .pgh-acts { width: 100%; }
}
/* fetch-1065: reconciliation controls remain readable and touchable in both timesheet shells. */
[data-delivery-details] > summary { min-height: var(--control-height-touch, 44px); padding-block: var(--s-2); font-weight: 600; cursor: pointer; }
[data-delivery-row] { margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--line); }
[data-delivery-row] .field { display: grid; gap: var(--s-1); margin-block: var(--s-3); min-width: 0; }
[data-delivery-row] .btn, [data-delivery-row] [data-delivery-field] { min-height: var(--control-height-touch, 44px); }
/* fetch-1036: the checklist library uses the shared type, spacing and touch tokens. */
.ck1036-tools { display: flex; flex-wrap: wrap; align-items: end; gap: var(--s-3); margin-bottom: var(--s-5); }
.ck1036-tools .field { flex: 1 1 12rem; min-width: 0; max-width: 20rem; }
.ck1036-tools label { display: block; font-size: var(--t-sub); margin-bottom: var(--s-1); }
.ck1036-tools select { width: 100%; min-height: var(--control-height-touch); font: inherit; }
.ck1036-tools .hdd { margin-left: auto; }
.ck-page .ck1036-tools .btn, #ck1036New, #ck1036Close, #ck1036Continue, #ck1036Cancel { min-height: var(--control-height-touch); }
.ck-page .ck957-picker { margin-top: var(--s-3); }
.ck-page .ck-card p { overflow-wrap: anywhere; }
#ck1036SavedTasks { margin-top: var(--s-4); }
@media (max-width: 600px) {
  .ck1036-tools { gap: var(--s-2); }
  .ck1036-tools .field { flex-basis: calc(50% - var(--s-2)); }
  .ck1036-tools .hdd { margin-left: 0; }
}
/* fetch-1079: PDF preparation and delivery stay usable on a phone. */
.beo-email-panel .btn, .beo-pdf-toolbar .btn {
  min-height: var(--control-height-touch);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: normal;
  text-align: center;
}
.beo-email-panel .grid, .beo-email-panel .field { min-width: 0; }
.beo-email-panel input { min-width: 0; width: 100%; min-height: var(--control-height-touch); }
.beo-email-panel .actions { flex-wrap: wrap; gap: var(--s-2); }
.beo-pdf-panel { margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--line); }
.beo-pdf-status { font-size: var(--t-body); margin: var(--s-2) 0; }
.beo-pdf-detail { font-size: var(--t-sub); overflow-wrap: anywhere; margin: var(--s-2) 0; }
/* fetch-1092: direct timeline entry, a quiet draft workbench, and the staff reader. */
/* fetch-1217: the loose nav row, the hand-rolled title card and the save bar are gone - the page
   header primitive draws all three now (.pgh). What is left is the working column and, from
   1000px up, the event-order rail beside it: the trainee record's rail shape (.trec-cols--rail),
   one column on anything narrower, reference under the thing being written. */
.tlw-layout { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: var(--s-4); }
.tlw-main { display: grid; gap: var(--s-4); min-width: 0; }
.notice + .tlw-layout { margin-top: var(--s-3); } /* the draft error notice moved out of the retired save bar */
.tlw-layout > .card, .tlw-main > .card { min-width: 0; margin: 0; }
@media (min-width: 1000px) { .tlw-layout:has(.tlb-rail) { grid-template-columns: minmax(0, 1.55fr) minmax(17rem, 1fr); } }
.tlw-layout h3, .tlw-conflict h3 { font: 650 var(--t-section)/1.4 Inter, Arial, sans-serif; color: var(--navy-dark); margin: 0 0 var(--s-3); }
.tlw-compose .field, .tlw-detail .field { display: grid; gap: var(--s-1); margin: 0 0 var(--s-3); min-width: 0; }
.tlw-compose .field > span, .tlw-detail .field > span { font-size: var(--t-sub); font-weight: 550; color: var(--navy); }
.tlw-compose .field textarea, .tlw-detail .field textarea, .tlw-editrow input { min-width: 0; width: 100%; min-height: var(--control-height-touch); font-family: Inter, Arial, sans-serif; font-size: var(--t-body); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-s); padding: var(--s-2); }
.tlw-compose textarea { line-height: 1.8; resize: vertical; }
.tlw-hint { font-size: var(--t-sub); line-height: 1.5; color: var(--navy); margin: var(--s-2) 0 var(--s-3); }
.tlw-reuse, .tlw-parsed { border-top: 1px solid var(--line); margin-top: var(--s-5); padding-top: var(--s-4); }
.tlw-reuse .actions { flex-wrap: wrap; }
.tlw-editor-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
.tlw-editor-head .muted { font-size: var(--t-sub); }
.tlw-step { padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
.tlw-editrow { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) var(--control-height-touch); gap: var(--s-2); align-items: center; }
.tlw-editrow input[type="time"] { font-variant-numeric: tabular-nums; }
.tlw-editrow input[data-opstl-field="task"] { font-weight: 550; }
.tlw-more { min-width: 0; padding: var(--s-1); min-height: var(--control-height-touch); font-size: var(--t-section); }
.tlw-detail { margin-top: var(--s-3); }
.tlw-detail-preview { font-size: var(--t-sub); line-height: 1.5; color: var(--navy); white-space: pre-wrap; overflow-wrap: anywhere; margin-top: var(--s-1); }
/* the card's own foot: what the draft is, and the two quiet ways back out of it. Undo is a text
   button, never a danger button - the trainee record's .trec-undo shape. */
.tlw-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s-2) var(--s-3); margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--hair); }
.tlw-footacts { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.tlw-quiet { border: 0; background: none; padding: var(--s-1) var(--s-2); min-height: var(--control-height-touch); font: inherit; font-size: var(--t-sub); color: var(--muted); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; border-radius: var(--r-s); }
.tlw-quiet:hover:not(:disabled) { color: var(--navy-dark); }
.tlw-quiet:disabled { opacity: .5; cursor: default; text-decoration: none; }
.tlw-quiet:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
#opsTlDraftStatus { font-size: var(--t-sub); color: var(--navy); }
/* a time read forward from the step above, because no AM or PM was typed */
.tlw-assumed { display: inline-block; margin-left: var(--s-2); padding: 0 var(--s-1); border-radius: var(--r-s); background: var(--mute-bg); color: var(--mute-fg); font-size: var(--t-sub); font-weight: 600; font-variant-numeric: normal; }
.tlw-readrow { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.tlw-readrow > :first-child { font-variant-numeric: tabular-nums; }
.tlw-conflict p { font-size: var(--t-body); }
.tlw-layout .btn { min-height: var(--control-height-touch); }

/* ---- fetch-1217: the Timelines LANDING, off inline styles and onto the venue hue as a token.
   Colour here is an IDENTITY (which venue), never a judgement, which is the line Jack drew on
   2026-09-19. ---- */
.tll-venue { border-left: 4px solid var(--tlv, var(--line)); padding-top: var(--s-3); }
.tll-vhead { margin-bottom: var(--s-1); }
.tll-vname { color: var(--tlv, var(--navy-dark)); }
.tll-vn { font-size: var(--t-sub); }
.tll-row { padding: var(--s-3) 0; border-bottom: 1px solid var(--hair); align-items: center; cursor: pointer; gap: var(--s-3); }
.tll-row:last-of-type { border-bottom: 0; }
.tll-who { flex: 1; min-width: 0; }
.tll-t { font-size: var(--t-body); }
.tll-m { font-size: var(--t-sub); }
.tll-n { font-size: var(--t-sub); white-space: nowrap; }
.tll-more { padding: var(--s-3) 0 var(--s-1); cursor: pointer; justify-content: center; }
.tll-more > span { font-size: var(--t-sub); font-weight: 600; color: var(--muted); }
.tll-tpl { margin-top: var(--s-4); }
.tll-tplrow { padding: var(--s-2) 0; border-bottom: 1px solid var(--hair); }
.tll-tplrow:last-child { border-bottom: 0; }
.tll-tplname { font-size: var(--t-sub); }
.tll-tplh { font: 700 var(--t-body)/1.4 Inter, Arial, sans-serif; color: var(--text-heading); margin: 0 0 var(--s-2); }

/* ---- fetch-1217: the event-order reference rail. The sections reuse fetch-1199's .beoq-*
   presentation, so collapse, chevron and sticky-open behaviour come for free. Two things have to
   be undone for a rail: the open header is sticky to the PHONE NAV height, which is not this
   container's top, and the BEO's tables are print matrices built for 850px. The narrow reading
   layer below is the phone layer (portal.css:1583-1609) re-aimed at a container query, so one
   open section reads as labelled cards at rail width on any screen. ---- */
.tlb-rail { align-self: start; padding: var(--s-4); container-type: inline-size; }
.tlb-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: var(--s-1) var(--s-3); margin: 0 0 var(--s-3); }
.tlb-head h3 { font: 700 var(--t-body)/1.4 Inter, Arial, sans-serif; color: var(--text-heading); margin: 0; }
.tlb-head .muted { font-size: var(--t-sub); }
.tlb-doc { background: var(--surface-card); color: var(--ink); border: 0; padding: 0; max-width: none; }
.tlb-doc .bR-wm, .tlb-doc .bR-wm1, .tlb-doc .bR-wm2 { display: none; }
.tlb-sec.is-open > .beoq-h { position: static; }
.tlb-sec:first-of-type { border-top: 0; }
@container (max-width: 640px) {
  .tlb-doc .beo-readable-table { display: block; overflow: visible; width: 100%; margin: var(--s-3) 0; border: 0; table-layout: auto; }
  .tlb-doc .beo-readable-table colgroup { display: none; }
  .tlb-doc .beo-readable-table thead, .tlb-doc .beo-readable-table tbody { display: block; }
  .tlb-doc .beo-readable-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2) var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
  .tlb-doc .beo-readable-table [data-beo-head], .tlb-doc .beo-readable-table [data-beo-empty], .tlb-doc .beo-readable-table [data-beo-summary-label] { display: none; }
  .tlb-doc .beo-readable-table th, .tlb-doc .beo-readable-table td { display: block; min-width: 0; width: auto !important; max-width: none; padding: 0 !important; border: 0 !important; font-size: var(--t-sub) !important; text-align: left !important; white-space: normal !important; overflow-wrap: anywhere; word-break: normal; }
  .tlb-doc .beo-readable-table [data-beo-wide], .tlb-doc .beo-readable-table [data-beo-band] > td { grid-column: 1 / -1; }
  .tlb-doc .beo-readable-table [data-beo-band] { grid-template-columns: minmax(0, 1fr); background: var(--wash); padding: var(--s-3); }
  .tlb-doc .beo-readable-table [data-beo-band] > td { background: transparent !important; font-weight: 700; }
  .tlb-doc .beo-readable-table td[data-beo-label]::before { content: attr(data-beo-label); display: block; margin-bottom: var(--s-1); color: var(--muted); font-size: var(--t-sub); font-weight: 600; }
  .tlb-doc .bR-hdr { display: block; overflow-wrap: anywhere; }
  .tlb-doc .bR-hdr > div { margin-bottom: var(--s-3); }
  .tlb-doc .bR-hdr .r { text-align: left; }
  .tlb-doc [style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
  .tlb-doc .bR-food [data-beo-band] > th { grid-column: 1 / -1; background: transparent; }
  .tlb-doc .bR-food .beo-course { background: transparent; }
}
.sa-ros-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
[data-sa-ros], [data-sa-ros-back] { min-height: var(--control-height-touch); }
/* fetch-1182: the staff app shell - sticky Crystal banner + account menu, line-icon nav, the
   next-shift hero, row links and folds. Tokens only. Lives in staff.html AND portal.css because
   index.html?staff still boots the same scheduling.js views. */
.sa-page { max-width: 480px; margin: 0 auto; padding: var(--s-3) var(--s-3) 0; }
.sa-bar { position: sticky; top: 0; z-index: 60; background: var(--surface-card); border-bottom: 1px solid var(--brand-gold-mid); padding-top: env(safe-area-inset-top); }
.sa-bar-in { max-width: 480px; margin: 0 auto; display: flex; align-items: center; gap: var(--s-2); padding: var(--s-1) var(--s-3); min-height: 52px; }
.sa-mark { width: 28px; height: 28px; flex: none; fill: none; stroke: var(--brand-gold-mid); stroke-width: 1.6; stroke-linecap: round; }
.sa-word { flex: 1; min-width: 0; font-size: var(--t-sub); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-gold-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sa-bar-right { display: flex; align-items: center; gap: var(--s-1); flex: none; position: relative; z-index: 63; } /* above the menu backdrop: the person icon closes what it opened */
.sa-bar-right .sa-lang { margin-top: 0; min-height: var(--control-height-touch); padding: 0 var(--s-3); font-size: var(--t-sub); }
.sa-bar-btn { width: var(--control-height-touch); height: var(--control-height-touch); display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; background: none; border-radius: 50%; color: var(--navy); cursor: pointer; }
.sa-bar-btn:disabled { opacity: .45; }
.sa-bar-acct { color: var(--brand-gold-dark); border: 1px solid var(--brand-gold-mid); }
.sa-bar-acct[aria-expanded="true"] { background: var(--wash); }
.sa-menu-back { position: fixed; inset: 0; z-index: 61; border: 0; padding: 0; background: none; cursor: default; }
.sa-menu { position: absolute; right: var(--s-3); top: calc(100% + var(--s-1)); z-index: 62; width: min(280px, calc(100vw - var(--s-5))); background: var(--surface-card); border: 1px solid var(--line); border-radius: var(--r-l); padding: var(--s-3); box-shadow: 0 8px 24px rgba(36,43,66,.16); }
.sa-menu-who { padding-bottom: var(--s-2); border-bottom: 1px solid var(--hair); overflow-wrap: anywhere; }
.sa-menu-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); padding: var(--s-2) 0; font-size: var(--t-body); }
.sa-menu-row .sa-lang { margin-top: 0; min-height: var(--control-height-touch); padding: 0 var(--s-3); font-size: var(--t-sub); }
.sa-menu-out { width: 100%; min-height: var(--control-height-touch); color: var(--bad-fg); }
.sa-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; background: var(--surface-card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.sa-nav-btn { flex: 1; min-width: 0; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0; border: 0; border-top: 2px solid transparent; background: none; color: var(--muted); font: inherit; font-size: var(--t-sub); cursor: pointer; }
.sa-nav-btn[aria-current="page"] { color: var(--navy-dark); font-weight: 700; border-top-color: var(--brand-gold-mid); }
.sa-nav-space { height: 76px; }
.sa-hero { border-left: 3px solid var(--brand-gold-mid); }
.sa-hero-hi { font-size: var(--t-body); font-weight: 600; color: var(--text-heading); }
.sa-hero-lab { text-transform: uppercase; letter-spacing: .08em; margin-top: var(--s-2); }
.sa-hero-when { font-size: var(--t-title); font-weight: 700; color: var(--text-heading); line-height: 1.25; }
.sa-hero .btn { width: 100%; white-space: normal; }
.sa-num { font-variant-numeric: tabular-nums; }
.sa-rows { padding-top: 0; padding-bottom: 0; }
.sa-rowlink { width: 100%; min-height: 56px; display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) 0; border: 0; border-bottom: 1px solid var(--hair); background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.sa-rowlink:last-child { border-bottom: 0; }
.sa-rowlink > .ci { color: var(--brand-gold-dark); }
.sa-rowsub { display: block; }
.sa-chev { flex: none; color: var(--muted); font-size: var(--t-title); line-height: 1; transition: transform .15s; }
.sa-chev.is-open { transform: rotate(90deg); }
.sa-fold { padding-top: 0; padding-bottom: 0; }
.sa-fold-body { border-top: 1px solid var(--hair); padding: var(--s-3) 0 var(--s-4); }
.sa-evhead { margin: 0 var(--s-1) var(--s-2); }
.sa-calurl { flex: 1; min-width: 0; margin-top: 0; font-size: var(--t-label); }
.sa-right .btn { display: block; margin: var(--s-1) 0 0 auto; }
@media (prefers-reduced-motion: reduce) { .sa-chev { transition: none; } }
/* fetch-1182 round 2 (Jack 09-19): NO BANDS. The staff app was a stack of boxed cards, several with a
   coloured left band, whose headings were the same size and colour as the rows under them. One
   reading surface per screen now; inside it a section is a plain heading, its rows and a fine rule
   (the direction of the fetch-1170 band inventory). Status notices keep their emphasis. */
.sa-page { font-size: var(--t-body); }
.sa-surface { background: var(--surface-card); border: 1px solid var(--line); border-radius: var(--r-l); padding: 0 var(--s-4); margin-bottom: var(--s-3); }
.sa-surface .card:not(.notice) { background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; margin: 0; padding: var(--s-4) 0; }
.sa-surface > .card:not(.notice):first-child, .sa-surface > :first-child > .card:not(.notice):first-child { border-top: 0; }
.sa-surface .notice { margin: var(--s-3) 0; }
.sa-surface .card > strong:first-child, .sa-surface .sa-line > strong.sa-main:first-child, .sa-surface .sa-rowlink strong { display: block; font-size: var(--t-section); font-weight: 700; line-height: 1.3; color: var(--text-heading); }
.sa-surface .sa-line > strong.sa-main:first-child { flex: 1; }
.sa-surface .card > strong:first-child + .muted { margin-bottom: var(--s-2); }
.sa-surface .stf-row { padding: var(--s-2) 0; }
.sa-surface .card > .stf-row:last-child { border-bottom: 0; }
.sa-surface .stf-row .sa-main > strong { font-weight: 600; color: var(--ink); }
.sa-surface .sa-rows, .sa-surface .sa-fold { padding: 0; }
.sa-hero { border-left: 0; }
.sa-hero .sa-hero-hi { font-size: var(--t-body); font-weight: 600; color: var(--muted); }
/* fetch-1413: Shifts > Who's working - the view switch, the venue and role disclosure rows and the
   crew rows. Tokens only. In staff.html AND portal.css, like the rest of the shell (fetch-1182). */
.sa-seg { display: flex; gap: var(--s-1); padding: 2px; margin-bottom: var(--s-2); background: var(--surface-card); border: 1px solid var(--line); border-radius: var(--r-m); }
.sa-seg-btn { flex: 1; min-width: 0; min-height: var(--control-height-touch); padding: 0 var(--s-2); border: 0; border-radius: var(--r-s); background: none; color: var(--muted); font: inherit; cursor: pointer; }
.sa-seg-btn[aria-pressed="true"] { background: var(--navy); color: var(--surface-card); font-weight: 600; }
.sa-crew-q { margin: 0 0 var(--s-2); min-height: var(--control-height-touch); font-size: 1rem; } /* 16px: an iPhone zooms the page on a smaller field */
.sa-crew-meta { margin: 0 var(--s-1) var(--s-2); }
.sa-surface .card.sa-crew-v:not(.notice) { padding: 0; }
.sa-crew-vh, .sa-crew-rh { width: 100%; display: flex; align-items: center; gap: var(--s-2); padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.sa-crew-vh { min-height: 56px; font-weight: 600; }
.sa-crew-vh .badge { margin-left: var(--s-1); font-weight: 600; }
.sa-crew-rh { min-height: var(--control-height-touch); border-top: 1px solid var(--hair); }
.sa-crew-rows { padding-bottom: var(--s-2); }
.sa-crew-row { display: flex; gap: var(--s-2); align-items: baseline; padding: var(--s-1) 0; }
.sa-crew-t { flex: none; width: 9.5em; color: var(--navy); font-size: var(--t-sub); }
.sa-crew-role { display: block; margin-top: 0; }
.sa-ros-list { list-style: none; padding: 0; margin: 0; }
.sa-ros-time { min-width: 5rem; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.sa-ros-task { overflow-wrap: anywhere; }
.sa-ros-detail { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .tlw-layout { grid-template-columns: minmax(0, 1fr); }
  .tlw-compose .field textarea, .tlw-detail .field textarea, .tlw-editrow input { font-size: 1rem; }
  .tlw-editrow { grid-template-columns: 8.5rem minmax(0, 1fr) var(--control-height-touch); }
  .tlw-foot { align-items: flex-start; }
}
@media (max-width: 420px) {
  .tlw-editrow { grid-template-columns: minmax(0, 1fr) var(--control-height-touch); }
  .tlw-editrow input[data-opstl-field="task"] { grid-row: 2; grid-column: 1 / -1; }
  .tlw-editrow .tlw-more { grid-column: 2; grid-row: 1; }
}
/* fetch-1251: Crystal event stationery. This opt-in workspace keeps the event order beside
   one notebook; the other Readiness tools retain their shared header and layout. */
.readiness-workspace--notebook { --tlw-paper: color-mix(in srgb, var(--paper) 78%, var(--wash)); --tlw-rule: color-mix(in srgb, var(--navy) 18%, transparent); --tlw-margin: color-mix(in srgb, var(--gold-dark) 40%, transparent); --tlw-rule-height: 2.125rem; }
.readiness-header--notebook.pgh { padding: var(--s-4) var(--s-5); gap: var(--s-3) var(--s-4); margin-bottom: var(--s-5); background: var(--wash); border-color: color-mix(in srgb, var(--navy) 16%, var(--paper)); box-shadow: 0 2px 5px color-mix(in srgb, var(--navy-dark) 3%, transparent); }
.readiness-header--notebook.pgh .pgh-h { line-height: 1.25; letter-spacing: -.02em; overflow-wrap: anywhere; }
.readiness-header--notebook.pgh .pgh-tile { min-height: var(--control-height-touch); padding: var(--s-2) var(--s-3); background: transparent; }
.readiness-header--notebook.pgh .pgh-tile[aria-pressed="true"] { background: var(--paper); }
.readiness-header--notebook.pgh .pgh-tile small { margin-top: 0; }
.readiness-header--notebook.pgh .pgh-tab { border-radius: 0; }
.readiness-header--notebook.pgh .pgh-nav--tail { gap: var(--s-2); }
.readiness-workspace--notebook .readiness-layout { gap: var(--s-5); }
.readiness-workspace--notebook .tlw-workspace-switch { display: none; }
.readiness-workspace--notebook .readiness-main > .tlw-layout { margin: 0; }
.readiness-workspace--notebook .tlw-main { gap: var(--s-3); }
.readiness-workspace--notebook .readiness-reference > .tlb-rail { position: relative; padding: var(--s-5) var(--s-4) var(--s-3); background: var(--paper); border: var(--s-2) solid color-mix(in srgb, var(--muted) 26%, var(--paper)); border-top-width: var(--s-3); border-radius: var(--r-s); box-shadow: 0 4px 10px color-mix(in srgb, var(--navy-dark) 7%, transparent); }
.readiness-workspace--notebook .readiness-reference > .tlb-rail::before { content: ''; position: absolute; z-index: 1; top: calc(-1 * var(--s-4)); left: 50%; transform: translateX(-50%); width: 4.25rem; height: .875rem; border: 1px solid var(--gold-dark); border-radius: var(--s-1); background: linear-gradient(var(--brand-gold-light), var(--gold)); box-shadow: 0 2px 3px color-mix(in srgb, var(--navy-dark) 13%, transparent); pointer-events: none; }
.readiness-workspace--notebook .tlb-head { margin: 0; padding: 0 0 var(--s-4); border-bottom: 2px solid var(--navy); }
.readiness-workspace--notebook .tlb-head h3 { font-size: var(--t-section); font-weight: 600; }
.readiness-workspace--notebook .tlb-rail .beoq-toggle { min-height: var(--control-height-touch); padding: var(--s-3) 0; }
.readiness-workspace--notebook .tlb-rail :is(.beoq-h, .beoq-t, .beoq-s) { font-family: Inter, Arial, sans-serif; }
.readiness-workspace--notebook .tlb-rail .beoq-t { font-size: var(--t-sub); }
.readiness-workspace--notebook .tlb-rail .beoq-s { font-size: var(--t-sub); line-height: 1.5; }
.readiness-workspace--notebook .tlb-rail .beoq-body { padding-inline: 0; }
.readiness-workspace--notebook .tlw-notebook { position: relative; min-width: 0; background: var(--tlw-paper); border: .4375rem solid var(--navy-dark); border-left-width: 1.1875rem; border-bottom-width: .5rem; border-radius: var(--r-s) var(--r-m) var(--r-m) var(--r-s); box-shadow: 0 9px 22px color-mix(in srgb, var(--navy-dark) 15%, transparent); }
.readiness-workspace--notebook .tlw-notebook::before { content: ''; position: absolute; z-index: 1; pointer-events: none; left: -1rem; top: 2rem; bottom: 2rem; width: 1.375rem; background: repeating-linear-gradient(to bottom, transparent 0 1.25rem, var(--gold-dark) 1.3125rem, var(--brand-gold-light) 1.4375rem, var(--gold) 1.5625rem, transparent 1.6875rem 2.875rem); filter: drop-shadow(1px 1px 1px color-mix(in srgb, var(--navy-dark) 20%, transparent)); }
.readiness-workspace--notebook .tlw-notebook::after { content: ''; position: absolute; left: 1px; right: 0; bottom: -.25rem; height: .25rem; border-radius: 0 0 var(--r-s) 0; background: repeating-linear-gradient(to bottom, var(--tlw-paper) 0 1px, var(--line) 1px 2px); pointer-events: none; }
.tlw-notebook .tlw-bookhead { padding: var(--s-4) var(--s-5) 0 var(--s-6); }
.tlw-notebook .btn:has(.tlw-icon) { display: inline-flex; align-items: center; gap: var(--s-2); }
.tlw-notebook .tlw-stationery { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-3); flex-wrap: wrap; padding-bottom: var(--s-2); margin-bottom: var(--s-2); border-bottom: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); }
.tlw-notebook .tlw-brandgroup { display: flex; align-items: center; gap: var(--s-2) var(--s-4); flex-wrap: wrap; flex: 1 1 auto; min-width: 0; }
.tlw-notebook .tlw-brandgroup > :is(.tlw-brand, .tlw-booktitle, .tlw-bookmodes) { flex-shrink: 0; }
.tlw-notebook .tlw-brandgroup .tlw-bookmodes { margin: 0; max-width: 100%; }
.tlw-notebook .tlw-brand { display: block; width: 8.75rem; height: 3rem; object-fit: contain; object-position: left center; }
.tlw-notebook .tlw-bookactions { display: flex; align-items: center; justify-content: flex-end; gap: var(--s-1); margin-left: auto; }
.tlw-notebook .tlw-bookactions > .btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: var(--control-height-touch); font-size: var(--t-sub); }
.tlw-notebook .tlw-iconbtn { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: var(--control-height-touch); min-width: var(--control-height-touch); height: var(--control-height-touch); min-height: var(--control-height-touch); box-sizing: border-box; padding: var(--s-2); border: 1px solid transparent; border-radius: var(--r-s); background: transparent; color: var(--navy); font: inherit; cursor: pointer; list-style: none; }
.tlw-notebook .tlw-iconbtn::-webkit-details-marker { display: none; }
.tlw-notebook .tlw-iconbtn:hover:not(:disabled), .tlw-notebook .tlw-bookmore[open] > .tlw-iconbtn { background: var(--hair); border-color: var(--line); color: var(--navy-dark); }
.tlw-notebook .tlw-bookmore { position: relative; flex: 0 0 auto; }
.tlw-notebook .tlw-bookmenu { position: absolute; top: calc(100% + var(--s-1)); right: 0; z-index: 20; width: 16rem; max-width: calc(100vw - 5rem); box-sizing: border-box; padding: var(--s-2); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: 0 6px 20px color-mix(in srgb, var(--navy-dark) 16%, transparent); scroll-margin-block: var(--s-4) calc(var(--s-4) + 4.5rem); }
.tlw-notebook .tlw-bookmenu .actions { display: block; margin: 0; }
.tlw-notebook .tlw-bookmenu button { display: flex; align-items: center; justify-content: flex-start; gap: var(--s-2); width: 100%; min-height: var(--control-height-touch); padding: var(--s-2); border: 0; border-radius: var(--r-s); background: transparent; color: var(--navy); text-align: left; text-decoration: none; font: 500 var(--t-sub)/1.5 Inter, Arial, sans-serif; white-space: normal; }
.tlw-notebook .tlw-bookmenu button:hover:not(:disabled) { background: var(--wash); color: var(--navy-dark); }
.tlw-notebook .tlw-edition { color: var(--navy); font: 500 var(--t-sub)/1.6 Inter, Arial, sans-serif; text-align: right; letter-spacing: .09em; text-transform: uppercase; }
.tlw-notebook .tlw-edition :is(span, small) { display: block; color: var(--muted); font-size: var(--t-sub); letter-spacing: .035em; }
.tlw-notebook .tlw-bookmeta { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-1) var(--s-3); flex-wrap: wrap; margin-bottom: 0; color: var(--muted); font-size: var(--t-sub); line-height: 1.5; font-variant-numeric: tabular-nums; }
.tlw-notebook .tlw-bookmeta > span:first-child { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }
.tlw-notebook .tlw-bookmeta > .tnum { white-space: nowrap; }
.tlw-notebook .tlw-booktitle { margin: 0; color: var(--navy-dark); font: 600 var(--t-figure)/1.15 'Cormorant Garamond', Georgia, serif; letter-spacing: -.025em; overflow-wrap: anywhere; }
.tlw-notebook .tlw-booktitle .tlw-plus { color: var(--gold-dark); font-weight: 400; }
.tlw-notebook .tlw-bookdate { margin: var(--s-2) 0 var(--s-3); color: var(--muted); font-size: var(--t-sub); line-height: 1.5; overflow-wrap: anywhere; }
.tlw-notebook .tlw-booktabs { display: flex; flex-wrap: wrap; gap: 0 var(--s-5); margin: 0 var(--s-5) 0 var(--s-6); border-bottom: 1px solid var(--line); }
.tlw-notebook .tlw-booktabs button { padding: var(--s-2) 0; min-height: var(--control-height-touch); border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--muted); font: 500 var(--t-sub)/1.4 Inter, Arial, sans-serif; cursor: pointer; }
.tlw-notebook .tlw-booktabs button:is([aria-pressed="true"], [aria-selected="true"]) { color: var(--navy-dark); border-bottom-color: var(--gold-dark); font-weight: 600; }
.tlw-notebook .tlw-booktabs button:hover:not(:disabled) { color: var(--navy-dark); }
.tlw-notebook .tlw-bookhead .tlw-booktabs { margin-inline: 0; }
.tlw-notebook .tlw-header-controls { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-1) var(--s-2); flex-wrap: wrap; margin-block: var(--s-1) var(--s-2); }
.tlw-notebook .tlw-header-controls > #opsTlNotebookNav { flex: 1 1 12rem; min-width: 0; }
.tlw-notebook .tlw-header-controls .tlw-booktabs { gap: 0 var(--s-3); }
.tlw-notebook .tlw-header-pager { display: flex; align-items: center; justify-content: flex-end; gap: var(--s-1); margin-left: auto; }
.tlw-notebook .tlw-header-pager button { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-1); min-height: var(--control-height-touch); }
.tlw-notebook .tlw-header-pager .tlw-quiet { padding-inline: var(--s-2); white-space: normal; }
.tlw-notebook .tlw-bookmodes { display: flex; gap: var(--s-1); width: fit-content; max-width: calc(100% - var(--s-6) - var(--s-5)); padding: 2px; margin: var(--s-3) var(--s-5) var(--s-3) var(--s-6); background: var(--hair); border: 1px solid var(--line); border-radius: var(--r-s); }
.tlw-notebook .tlw-bookmodes button { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: var(--control-height-touch); padding: var(--s-2) var(--s-4); border: 1px solid transparent; border-radius: var(--s-1); background: transparent; color: var(--navy); font: 500 var(--t-sub)/1.4 Inter, Arial, sans-serif; cursor: pointer; }
.tlw-notebook .tlw-bookmodes button:is([aria-pressed="true"], [aria-selected="true"]) { background: var(--paper); border-color: var(--line); color: var(--navy-dark); box-shadow: 0 1px 3px color-mix(in srgb, var(--navy-dark) 8%, transparent); }
.tlw-notebook .tlw-pagepicker { display: grid; gap: var(--s-1); min-width: 0; margin: var(--s-3) var(--s-5) var(--s-3) var(--s-6); font-size: var(--t-sub); color: var(--navy); }
.tlw-notebook .tlw-pagepicker .sel { min-width: 0; width: 100%; min-height: var(--control-height-touch); background: var(--tlw-paper); }
.tlw-notebook .tlw-bookhead .tlw-pagepicker { margin-inline: 0; }
.tlw-notebook button:disabled { cursor: default; opacity: .5; }
.tlw-notebook #opsTlNotebookPage { min-width: 0; }
.tlw-notebook :is(.tlw-compose, .tlw-editor, .tlw-reference) { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.tlw-notebook .tlw-compose .field { gap: 0; margin: 0 var(--s-4) 0 var(--s-1); }
.tlw-notebook .tlw-compose .field > span { margin: 0 0 var(--s-2) calc(var(--s-6) - var(--s-1)); }
.tlw-notebook .tlw-compose #opsTlBulkText { display: block; box-sizing: border-box; width: 100%; height: 25.5rem; min-height: 17rem; padding: .375rem var(--s-3) .375rem var(--s-6); margin: 0; border: 0; border-radius: 0; background-color: transparent; background-image: linear-gradient(to right, transparent 1.625rem, var(--tlw-margin) 1.625rem, var(--tlw-margin) calc(1.625rem + 1px), transparent calc(1.625rem + 1px)), repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--tlw-rule-height) - 1px), var(--tlw-rule) calc(var(--tlw-rule-height) - 1px), var(--tlw-rule) var(--tlw-rule-height)); background-attachment: local; color: var(--navy-dark); caret-color: var(--navy); font: 400 var(--t-body)/var(--tlw-rule-height) Inter, Arial, sans-serif; font-variant-numeric: tabular-nums; tab-size: 4; resize: vertical; box-shadow: none; }
.tlw-notebook .tlw-compose #opsTlBulkText:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.tlw-notebook .tlw-compose #opsTlBulkText::placeholder { color: var(--muted); opacity: 1; }
.tlw-notebook .tlw-compose > :is(.tlw-hint, .tlw-editor-head, .actions, .tlw-parsed, .tlw-reuse), .tlw-notebook .tlw-compose > .btn { margin-inline: var(--s-6) var(--s-5); }
.tlw-notebook .tlw-compose > .tlw-hint { margin-top: var(--s-3); }
.tlw-notebook .tlw-compose > .tlw-editor-head { padding-block: var(--s-2); }
.tlw-notebook .tlw-compose-actions { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-4); flex-wrap: wrap; margin: var(--s-3) var(--s-5) 0 var(--s-6); }
.tlw-notebook .tlw-compose-actions .tlw-hint { flex: 1 1 15rem; margin: 0; }
.tlw-notebook .tlw-writing-help { margin: var(--s-1) var(--s-5) 0 var(--s-6); font-size: var(--t-sub); color: var(--navy); }
.tlw-notebook .tlw-writing-help > summary { display: flex; align-items: center; gap: var(--s-2); min-height: var(--control-height-touch); cursor: pointer; list-style: none; }
.tlw-notebook .tlw-writing-help > summary::-webkit-details-marker { display: none; }
.tlw-notebook .tlw-writing-help > summary::before { content: '+'; font-size: var(--t-section); width: 1em; text-align: center; }
.tlw-notebook .tlw-writing-help[open] > summary::before { content: '\2212'; }
.tlw-notebook .tlw-writing-help .tlw-hint { margin: 0 0 var(--s-3); }
.tlw-notebook .tlw-compose .tlw-parsed, .tlw-notebook .tlw-compose .tlw-reuse { margin-top: var(--s-4); padding-top: var(--s-3); }
.tlw-notebook .tlw-editor, .tlw-notebook .tlw-reference { min-height: 25.5rem; margin: 0 var(--s-5) 0 var(--s-6); padding-block: var(--s-2) var(--s-3); }
.tlw-notebook .tlw-editor-head { align-items: center; flex-wrap: wrap; }
.tlw-notebook .tlw-editor-head h3 { margin: 0; font-size: var(--t-body); font-weight: 600; }
.tlw-notebook .tlw-step { border-bottom-color: var(--tlw-rule); }
.tlw-notebook .tlw-editrow input { background: var(--tlw-paper); }
.tlw-notebook .tlw-editrow input[data-opstl-field="task"] { font-weight: 400; }
.tlw-notebook .tlw-readrow { border-bottom-color: var(--tlw-rule); font-size: var(--t-body); line-height: 1.6; }
.tlw-notebook .tlw-readrow > :first-child { color: var(--navy); font-weight: 600; }
.tlw-notebook .tlw-reference > .actions { flex-wrap: wrap; margin-top: var(--s-4); }
.tlw-notebook .tlw-reference-use { margin-top: var(--s-5); padding-top: var(--s-3); border-top: 1px solid var(--line); }
.tlw-notebook .tlw-reference-use .tlw-hint { margin: 0 0 var(--s-3); }
.tlw-notebook #opsTlNotebookPage > :is(.tlw-hint, .notice, .empty-state), .tlw-notebook > .notice { margin: var(--s-4) var(--s-5) var(--s-4) var(--s-6); }
.tlw-notebook .tlw-foot { margin: var(--s-4) 0 0; padding: var(--s-3) var(--s-5) var(--s-3) var(--s-6); border-top: 1px solid var(--line); }
.tlw-notebook .tlw-foot #opsTlDraftStatus { flex: 1 1 12rem; line-height: 1.5; }
@media (min-width: 900px) {
  .readiness-workspace--notebook .readiness-layout--reference { grid-template-columns: minmax(14rem, .85fr) minmax(0, 2fr); }
  .readiness-workspace--notebook .readiness-layout--reference > .readiness-reference { grid-column: 1; grid-row: 1; position: sticky; top: var(--s-4); }
  .readiness-workspace--notebook .readiness-layout--reference > .readiness-main { grid-column: 2; grid-row: 1; }
}
@media (min-width: 641px) and (max-width: 1099px) {
  .readiness-header--notebook.pgh { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .readiness-header--notebook.pgh :is(.pgh-titles, .pgh-tiles) { grid-column: 1 / -1; }
  .readiness-header--notebook.pgh .pgh-acts { align-self: end; }
  .readiness-header--notebook.pgh .pgh-nav--tail { grid-column: 1; }
}
@media (max-width: 899px) and (min-width: 641px) {
  .readiness-workspace--notebook .readiness-layout--reference > .readiness-reference { margin-top: var(--s-3); }
}
@media (max-width: 640px) {
  .readiness-header--notebook.pgh { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s-2); padding: var(--s-3); margin-bottom: var(--s-4); }
  .readiness-header--notebook.pgh :is(.pgh-titles, .pgh-tiles), .readiness-header--notebook.pgh > .pgh-tabs { grid-column: 1 / -1; }
  .readiness-header--notebook.pgh .pgh-scope { grid-column: 1 / 3; }
  .readiness-header--notebook.pgh > .pgh-nav:not(.pgh-nav--tail) { grid-column: 3 / -1; display: block; }
  .readiness-header--notebook.pgh > .pgh-nav--tail { grid-column: 1 / 5; align-self: center; gap: var(--s-1); }
  .readiness-header--notebook.pgh:not(:has(.pgh-acts:not(:empty))) > .pgh-nav--tail { grid-column: 1 / -1; }
  .readiness-header--notebook.pgh .pgh-acts { grid-column: 5 / -1; align-self: center; }
  .readiness-header--notebook.pgh .pgh-nav--tail .btn, .readiness-header--notebook.pgh .pgh-acts .btn { padding-inline: var(--s-2); font-size: var(--t-sub); }
  .readiness-header--notebook.pgh .pgh-picker-trigger { padding-inline: var(--s-2); gap: var(--s-1); font-size: var(--t-sub); }
  .readiness-header--notebook.pgh .pgh-navfield:has(#readinessEvent) { min-width: 0; }
  .readiness-header--notebook.pgh .pgh-h { font-size: var(--t-title); }
  .readiness-header--notebook.pgh .pgh-tile { gap: var(--s-2); padding: var(--s-2); }
  .readiness-header--notebook.pgh .pgh-tile strong { font-size: var(--t-sub); }
  .readiness-header--notebook.pgh .pgh-acts { justify-content: flex-start; }
  .readiness-workspace--notebook .tlw-workspace-switch { display: flex; gap: var(--s-2); margin-bottom: var(--s-4); }
  .readiness-workspace--notebook .tlw-workspace-switch button { flex: 1; min-width: 0; min-height: var(--control-height-touch); padding: var(--s-2); border: 1px solid var(--line); border-radius: var(--r-s); background: transparent; color: var(--navy); font: 500 var(--t-sub)/1.4 Inter, Arial, sans-serif; cursor: pointer; }
  .readiness-workspace--notebook .tlw-workspace-switch button[aria-pressed="true"] { border-color: var(--navy); background: var(--navy); color: var(--paper); }
  .readiness-workspace--notebook[data-notebook-workspace="timeline"] .readiness-reference { display: none; }
  .readiness-workspace--notebook[data-notebook-workspace="beo"]:has(.readiness-reference) .readiness-main { display: none; }
  .readiness-workspace--notebook .readiness-reference > .tlb-rail { margin-top: var(--s-1); padding-inline: var(--s-3); }
  .readiness-workspace--notebook .tlw-notebook { border-top-width: .3125rem; border-right-width: .25rem; border-bottom-width: .375rem; border-left-width: .8125rem; }
  .readiness-workspace--notebook .tlw-notebook::before { left: -.6875rem; width: 1.1875rem; }
  .tlw-notebook .tlw-bookhead { padding: var(--s-3) var(--s-3) 0 var(--s-5); }
  .tlw-notebook .tlw-stationery { gap: var(--s-2); padding-bottom: var(--s-2); margin-bottom: var(--s-2); }
  .tlw-notebook .tlw-brandgroup { display: grid; grid-template-columns: 7rem minmax(0, 1fr); align-items: center; gap: var(--s-2); flex: 1 1 100%; width: 100%; }
  .tlw-notebook .tlw-brandgroup .tlw-bookmodes { grid-column: 1 / -1; }
  .tlw-notebook .tlw-brand { width: 7rem; height: 2.375rem; flex-shrink: 0; }
  .tlw-notebook .tlw-bookactions { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, var(--control-height-touch)); gap: var(--s-1); width: 100%; margin-left: 0; }
  .tlw-notebook .tlw-bookactions > .btn-primary { min-width: 0; padding-inline: var(--s-2); white-space: normal; line-height: 1.3; }
  .tlw-notebook .tlw-bookactions:not(:has(.tlw-bookmore)) { display: flex; width: auto; margin-left: auto; }
  .tlw-notebook .tlw-edition { letter-spacing: .025em; }
  .tlw-notebook .tlw-booktitle { font-size: var(--t-display); }
  .tlw-notebook .tlw-booktabs { gap: 0 var(--s-4); margin-inline: var(--s-5) var(--s-3); }
  .tlw-notebook .tlw-header-controls .tlw-booktabs { gap: 0 var(--s-2); }
  .tlw-notebook .tlw-bookmodes { max-width: calc(100% - var(--s-5) - var(--s-3)); margin: var(--s-2) var(--s-3) var(--s-2) var(--s-5); }
  .tlw-notebook .tlw-bookmodes button { padding-inline: var(--s-2); }
  .tlw-notebook .tlw-pagepicker { margin-inline: var(--s-5) var(--s-3); }
  .tlw-notebook .tlw-pagepicker .sel { font-size: max(1rem, var(--t-body)); }
  .tlw-notebook .tlw-compose .field { margin-inline: var(--s-1) var(--s-2); }
  .tlw-notebook .tlw-compose #opsTlBulkText { padding-left: var(--s-5); padding-right: var(--s-2); font-size: max(1rem, var(--t-body)); background-image: linear-gradient(to right, transparent 1.125rem, var(--tlw-margin) 1.125rem, var(--tlw-margin) calc(1.125rem + 1px), transparent calc(1.125rem + 1px)), repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--tlw-rule-height) - 1px), var(--tlw-rule) calc(var(--tlw-rule-height) - 1px), var(--tlw-rule) var(--tlw-rule-height)); }
  .tlw-notebook .tlw-compose > :is(.tlw-hint, .tlw-editor-head, .actions, .tlw-parsed, .tlw-reuse), .tlw-notebook .tlw-compose > .btn, .tlw-notebook .tlw-editor, .tlw-notebook .tlw-reference { margin-inline: var(--s-5) var(--s-3); }
  .tlw-notebook .tlw-compose-actions, .tlw-notebook .tlw-writing-help, .tlw-notebook #opsTlNotebookPage > :is(.tlw-hint, .notice, .empty-state), .tlw-notebook > .notice { margin-inline: var(--s-5) var(--s-3); }
  .tlw-notebook .tlw-readrow { grid-template-columns: 5.5rem minmax(0, 1fr); gap: var(--s-2); }
  .tlw-notebook .tlw-foot { padding-inline: var(--s-5) var(--s-3); }
}
@media (max-width: 359px) {
  .tlw-notebook .tlw-brandgroup .tlw-booktitle { font-size: var(--t-title); }
  .tlw-notebook .tlw-bookactions > .btn-primary { flex-direction: column; gap: 0; padding: var(--s-1); }
  .tlw-notebook .tlw-bookmodes button { flex-direction: column; gap: 0; padding-block: var(--s-1); }
}
@media (prefers-reduced-motion: reduce) { .tlw-notebook * { scroll-behavior: auto; } }
@media print {
  .readiness-workspace--notebook .tlw-notebook { border: 0; box-shadow: none; background: var(--paper); }
  .readiness-workspace--notebook .tlw-notebook::before, .readiness-workspace--notebook .tlw-notebook::after, .readiness-workspace--notebook .tlw-workspace-switch, .tlw-notebook .tlw-bookactions, .tlw-notebook .tlw-header-controls { display: none; }
}
@media (max-width: 600px) {
  .beo-email-panel .grid { grid-template-columns: 1fr; }
  .beo-pdf-panel .actions > .btn { flex: 1 1 auto; }
}

/* fetch-1100: browse company-owned venue photos and freeze them into proposals. */
.pp-rooms { margin: var(--s-5) 0; padding: var(--s-4) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pp-rooms-heading { display: flex; align-items: start; justify-content: space-between; gap: var(--s-4); }
.pp-rooms-heading h2, .pp-rooms-heading h3 { margin: 0 0 var(--s-2); color: var(--navy-dark); font-size: var(--t-section); }
.pp-rooms-heading p { margin: 0 0 var(--s-2); font-size: var(--t-sub); }
.pp-rooms .btn, .pp-rooms-dialog .btn { min-height: var(--control-height-touch); }
.pp-rooms-dialog { width: min(64rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--r-m); color: var(--ink); background: var(--paper); }
.pp-rooms-dialog[open] { display: flex; flex-direction: column; gap: var(--s-4); }
.pp-rooms-dialog::backdrop { background: color-mix(in srgb, var(--navy-dark) 55%, transparent); }
.pp-rooms-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-3); }
.pp-rooms-toolbar select { min-height: var(--control-height-touch); min-width: 10rem; max-width: 100%; font-size: var(--t-body); }
.pp-rooms-toolbar [role="status"] { margin-left: auto; font-size: var(--t-sub); }
.pp-room-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: max-content; align-content: start; gap: var(--s-4); overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
.pp-room-option { border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; cursor: pointer; }
.pp-room-option:has(input:checked) { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.pp-room-option > img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.pp-room-option > span { display: flex; gap: var(--s-2); padding: var(--s-3); align-items: start; min-height: var(--control-height-touch); }
.pp-room-option input { width: 1.2rem; height: 1.2rem; flex-shrink: 0; }
.pp-room-option strong, .pp-room-option small { display: block; font-size: var(--t-sub); overflow-wrap: anywhere; }
.pp-room-option small { color: var(--muted); margin-top: var(--s-1); }
.pp-rooms-footer { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); font-size: var(--t-sub); }
.pp-room-chosen-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); margin-top: var(--s-4); }
.pp-room-chosen { display: flex; align-items: start; gap: var(--s-3); padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-s); font-size: var(--t-sub); min-width: 0; overflow-wrap: anywhere; }
.pp-room-chosen > img { width: 7rem; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r-s); }
.pp-room-chosen .actions { gap: var(--s-2); flex-wrap: wrap; }
.pdoc-venue { margin: var(--s-6) 0; }
.pdoc-venue h2 { color: var(--navy-dark); font-size: var(--t-title); margin: 0 0 var(--s-4); }
.pdoc-venue-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.pdoc-venue-item { break-inside: avoid; min-width: 0; }
.pdoc-venue .pdoc-photo-frame { width: 100%; margin: 0; }
.pdoc-venue .pdoc-photo { width: 100%; height: auto; max-height: 18rem; object-fit: contain; }
.pdoc-venue-item > p { font-size: var(--t-sub); color: var(--muted); margin: var(--s-2) 0 0; }
@media (max-width: 760px) {
  .pp-rooms-heading { flex-wrap: wrap; }
  .pp-rooms-dialog { width: 100vw; height: 100dvh; max-width: 100vw; max-height: 100dvh; margin: 0; border-radius: 0; padding: var(--s-4); }
  .pp-room-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pp-rooms-toolbar select { font-size: 1rem; }
  .pp-room-chosen-list { grid-template-columns: 1fr; }
  .pp-rooms-footer > span { max-width: 45%; }
}
@media (max-width: 440px) {
  .pp-room-grid { grid-template-columns: 1fr; }
  .pdoc-venue-grid { grid-template-columns: 1fr; }
}
@media print {
  .pdoc-venue-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pdoc-venue .pdoc-photo { max-height: 2.6in; }
}

/* fetch-1101: menu photo preview retains the list beneath its modal. */
.pp-menu-camera { white-space: nowrap; padding-inline: var(--s-2); margin-left: auto; display: flex; align-items: center; justify-content: center; gap: var(--s-1); min-height: var(--control-height-touch); margin-top: var(--s-2); font-size: var(--t-sub); }
.pp-menu-photo-dialog { width: min(48rem, calc(100vw - var(--s-4))); max-height: calc(100dvh - var(--s-4)); padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--paper); color: var(--ink); overflow: auto; }
.pp-menu-photo-dialog::backdrop { background: var(--navy-dark); opacity: .65; }
.pp-menu-photo-dialog h2 { font-size: var(--t-section); margin: 0; overflow-wrap: anywhere; }
.pp-menu-photo-dialog .btn { min-height: var(--control-height-touch); flex-shrink: 0; }
.pp-menu-photo-dialog img { display: block; width: 100%; max-height: 65dvh; object-fit: contain; margin-top: var(--s-3); }
.pp-menu-copy { margin: 0; cursor: pointer; }

/* fetch-1102: venue-led proposal identity and a gallery that uses its available space. */
.pdoc { border-top: .3rem solid var(--navy-dark); }
.pdoc-brand { min-width: 0; }
.pdoc-brand .pdoc-mark { width: 15rem; max-width: 100%; max-height: 5rem; }
.pdoc-brand-name { margin-top: var(--s-3); color: var(--gold-dark); font-size: var(--t-sub); letter-spacing: .1em; text-transform: uppercase; }
.pdoc-eyebrow { color: var(--navy); font-size: var(--t-sub); margin: 0 0 var(--s-2); }
.pdoc .pdoc-title { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 2.4rem; }
.pdoc-venue-grid:has(> :only-child) { grid-template-columns: 1fr; }
.pdoc-venue .pdoc-photo { width: 100%; height: auto; max-height: none; object-fit: contain; }
.pdoc-venue-item:only-child .pdoc-photo-frame { width: 100%; }
@media print { .pdoc-venue .pdoc-photo { max-height: 4.2in; } }

.pp-days { margin: var(--s-4) 0; padding: var(--s-4) 0; border-block: 1px solid var(--line); }
.pp-days-heading, .pp-day-label { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.pp-days-heading p { margin: var(--s-1) 0; }
.pp-days-list { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.pp-day-label { margin-top: var(--s-3); }
.pp-day-label input { display: block; max-width: 13rem; }
.pp-days .btn { min-height: var(--control-height-touch); }
.pp-day-cell { min-width: 6rem; }

.pdoc-send textarea { width: 100%; min-height: 12rem; resize: vertical; }
.pdoc-attachment { padding: var(--s-4); margin-top: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-s); }
.pdoc-attachment .actions { flex-wrap: wrap; }
.pdoc-send .btn { min-height: var(--control-height-touch); }
@media (max-width: 640px) { .pdoc-send input, .pdoc-send textarea, .pp-day-label input { font-size: 1rem; } }

.pdoc-day-table { margin-bottom: var(--s-5); }
.pdoc-day-table caption { text-align: left; color: var(--navy); font-weight: 600; padding-bottom: var(--s-2); }
.pdoc-day-table .pdoc-num { white-space: normal; }

.pdoc-venue .pdoc-photo { aspect-ratio: 16 / 9; object-fit: cover; }
.pdoc-venue-item:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* fetch-1103: a bounded, grouped photo library with full-photo previews. */
.pp-rooms-toolbar > label { display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; flex: 1 1 12rem; font-size: var(--t-sub); }
.pp-rooms-toolbar input { min-height: var(--control-height-touch); width: 100%; font-size: var(--t-body); }
.pp-room-option > label { display: flex; gap: var(--s-2); padding: var(--s-3); align-items: start; min-height: var(--control-height-touch); cursor: pointer; }
.pp-room-preview-open { display: block; padding: 0; width: 100%; border: 0; background: var(--wash); color: var(--navy); cursor: pointer; }
.pp-room-preview-open img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.pp-room-preview-open span { display: block; padding: var(--s-2); font-size: var(--t-sub); }
.pp-room-page { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); font-size: var(--t-sub); }
.pp-room-detail { overflow-y: auto; min-height: 0; }
.pp-room-detail > img { display: block; width: 100%; max-height: 55dvh; object-fit: contain; }
.pp-room-detail-choice { display: flex; align-items: center; gap: var(--s-2); min-height: var(--control-height-touch); }
.pp-room-detail-choice input { width: 1.2rem; height: 1.2rem; }
@media (max-width: 640px) {
  .pp-rooms-toolbar input { font-size: 1rem; }
  .pp-rooms-toolbar > label { flex-basis: 8rem; }
  .pp-rooms-dialog .pp-rooms-heading p { margin-bottom: 0; }
  .pp-room-page { flex-wrap: wrap; }
}

/* fetch-1107: the shared Outlook signature, using approved CSE assets and personal details. */
.cse-email-signature { max-width: 32rem; padding: var(--s-3) 0; background: var(--surface-card); color: var(--navy-dark); font-family: Inter, Arial, sans-serif; font-size: var(--t-sub); line-height: 1.5; overflow-wrap: anywhere; }
.cse-email-signature p { margin: 0 0 var(--s-1); padding: 0; }
.cse-email-signature a { color: var(--navy-dark); text-decoration: underline; }
.cse-email-signature .cse-sig-name { font-family: "Times New Roman", Georgia, serif; font-size: var(--t-display); font-style: italic; line-height: 1.15; }
.cse-email-signature .cse-sig-links { font-size: var(--t-sub); }
.cse-email-signature .cse-sig-venues { margin-top: var(--s-5); font-family: "Times New Roman", Georgia, serif; font-size: var(--t-section); font-style: italic; }
.cse-email-signature .cse-sig-diamond { color: var(--gold); padding: 0 var(--s-1); }
.cse-email-signature img { display: block; max-width: 100%; height: auto; border: 0; }
.cse-email-signature .cse-sig-wordmark { width: 22.5rem; margin: var(--s-3) 0; }
.cse-email-signature .cse-sig-tagline { width: 26.25rem; margin-top: var(--s-3); }
#emailSignatureSettings { margin-top: var(--s-4); }
#emailSignatureSettings .btn { min-height: var(--control-height-touch); }
#emailSignatureSettings .field, #ppSendSignature { min-width: 0; }
#sigPreview, #ppSendSignature { border-top: 1px solid var(--line); margin-top: var(--s-4); padding-top: var(--s-3); }
#emailSignatureSettings > .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) {
  #emailSignatureSettings > .grid { grid-template-columns: minmax(0, 1fr); }
  #emailSignatureSettings input { font-size: 1rem; }
}
/* fetch-1148: deposit facts and Finance payment matches. */
.payment-progress { margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--line); min-width: 0; }
.payment-row-head, .payment-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s-2); }
.payment-row-head strong { min-width: 0; overflow-wrap: anywhere; }
.payment-row { padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
.payment-row p { margin: var(--s-1) 0; font-variant-numeric: tabular-nums; }
.payment-detail, .payment-empty { color: var(--muted); font-size: var(--t-sub); line-height: 1.5; }
.payment-state { font-size: var(--t-sub); color: var(--navy); font-weight: 600; }
.payment-state[data-payment-state="received"] { color: var(--ok-fg); }
.payment-review { padding: var(--s-3); background: var(--warn-bg); color: var(--warn-fg); font-size: var(--t-sub); line-height: 1.5; }
.payment-editor { padding-top: var(--s-3); font-size: var(--t-sub); line-height: 1.5; }
.payment-editor h4 { font-size: var(--t-body); margin: 0; }
.payment-mapping { margin: var(--s-3) 0; }
.payment-mapping label, .payment-match label { display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; }
.payment-mapping select, .payment-match select, .payment-match input { width: 100%; max-width: 100%; min-width: 0; min-height: var(--control-height-touch); font-size: var(--t-body); }
.payment-match { min-width: 0; margin: var(--s-3) 0; border: 1px solid var(--line); border-radius: var(--r-s); padding: var(--s-3); }
.payment-match-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-2); margin-bottom: var(--s-2); }
.payment-progress .btn { min-height: var(--control-height-touch); }
.payment-actions { justify-content: flex-start; }
@media (max-width:640px) { .payment-mapping select, .payment-match select, .payment-match input { font-size: 1rem; } }
.payment-confirm { display: flex; align-items: center; gap: var(--s-2); min-height: var(--control-height-touch); margin: var(--s-3) 0; }
.payment-confirm input { flex: 0 0 auto; }

/* fetch-1169: Admin is a focused settings workspace. Navigation owns the subject;
   one plain heading owns each panel. Spacing and rules distinguish content, while
   filled surfaces remain available for states and actions that need attention. */
#adminWorkspace { max-width: var(--w-mid); min-width: 0; margin-inline: auto; color: var(--ink); }
#adminWorkspace .admin-page-head { display: flex; align-items: center; gap: var(--s-3); margin: 0 0 var(--s-5); }
#adminWorkspace .admin-page-head h1 { display: flex; align-items: center; gap: var(--s-3); margin: 0; color: var(--text-heading); font-size: var(--t-display); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
#adminWorkspace .admin-page-head .ci { flex: 0 0 auto; color: var(--navy); }
#adminWorkspace .admin-layout { display: grid; grid-template-columns: 14rem minmax(0, 1fr); align-items: start; gap: var(--s-6); }
#adminWorkspace .admin-nav { display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; }
#adminWorkspace .admin-nav-label { margin: var(--s-5) 0 var(--s-2); padding-inline: var(--s-3); color: var(--navy); font-size: var(--t-sub); font-weight: 600; }
#adminWorkspace .admin-nav-label:first-child { margin-top: 0; }
#adminWorkspace [data-admin-subject] { display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: var(--control-height-touch); padding: var(--s-3); border: 0; border-left: 3px solid transparent; border-radius: 0 var(--r-s) var(--r-s) 0; background: transparent; color: var(--navy); text-align: left; font: inherit; font-size: var(--t-body); line-height: 1.4; cursor: pointer; }
#adminWorkspace [data-admin-subject] .ci { flex: 0 0 auto; }
#adminWorkspace [data-admin-subject]:hover { background: var(--wash); color: var(--navy-dark); }
#adminWorkspace [data-admin-subject]:is([aria-current="page"], [aria-selected="true"], .active) { border-left-color: var(--gold-dark); color: var(--navy-dark); font-weight: 700; }
#adminWorkspace .admin-mobile { display: none; }
#adminWorkspace .admin-main { min-width: 0; padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface-card); }
#adminWorkspace .admin-views { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-5); margin: calc(-1 * var(--s-2)) 0 var(--s-5); border-bottom: 1px solid var(--line); }
#adminWorkspace .admin-views:empty, #adminWorkspace .admin-views[hidden] { display: none; }
#adminWorkspace [data-admin-view] { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: var(--control-height-touch); max-width: 100%; padding: var(--s-2) 0; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--navy); font: inherit; font-size: var(--t-body); line-height: 1.4; white-space: normal; text-align: left; cursor: pointer; }
#adminWorkspace [data-admin-view]:hover { color: var(--navy-dark); border-bottom-color: var(--line); }
#adminWorkspace [data-admin-view]:is([aria-current="page"], [aria-selected="true"], .active) { color: var(--navy-dark); border-bottom-color: var(--gold-dark); font-weight: 700; }
#adminWorkspace .admin-content, #adminWorkspace .admin-panel, #adminWorkspace .admin-panel-body { min-width: 0; }
#adminWorkspace .admin-panel[hidden] { display: none; }
#adminWorkspace .admin-panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-5); }
#adminWorkspace .admin-panel-head h2, #adminWorkspace .admin-recovery-section > h2, #adminWorkspace .admin-import-title { display: flex; align-items: center; gap: var(--s-2); min-width: 0; margin: 0; color: var(--text-heading); font-size: var(--t-title); font-weight: 650; line-height: 1.3; }
#adminWorkspace .admin-panel-head h2 .ci, #adminWorkspace .admin-recovery-section > h2 .ci, #adminWorkspace .admin-import-title .ci { flex: 0 0 auto; }
#adminWorkspace .admin-panel-head > .btn { flex: 0 0 auto; max-width: 100%; white-space: normal; }
#adminWorkspace .admin-import-title { margin-bottom: var(--s-3); }
#adminWorkspace .admin-panel-hint { flex: 1 1 100%; max-width: 64ch; margin: 0; color: var(--muted); font-size: var(--t-body); line-height: 1.55; }
#adminWorkspace .admin-group { margin: var(--s-6) 0; padding-top: var(--s-5); border-top: 1px solid var(--line); }
#adminWorkspace .admin-group h3 { margin: 0 0 var(--s-2); color: var(--text-heading); font-size: var(--t-section); font-weight: 650; line-height: 1.4; }
#adminWorkspace .admin-group p { margin: var(--s-2) 0 var(--s-4); line-height: 1.55; }
#adminWorkspace .admin-help { margin: 0 0 var(--s-5); padding-bottom: var(--s-3); border-bottom: 1px solid var(--line); font-size: var(--t-sub); line-height: 1.6; }
#adminWorkspace .admin-help > summary { min-height: var(--control-height-touch); box-sizing: border-box; padding-block: var(--s-3); color: var(--navy); cursor: pointer; }
#adminWorkspace .admin-help > summary .ci { vertical-align: middle; margin-right: var(--s-1); }
#adminWorkspace .admin-help p, #adminWorkspace .admin-user-guide { max-width: 76ch; color: var(--muted); line-height: 1.6; }
#adminWorkspace .admin-recovery-section + .admin-recovery-section { margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--line); }
#adminWorkspace .admin-recovery-section > h2 { margin-bottom: var(--s-3); }
#adminWorkspace .admin-status-root { min-width: 0; }
#adminWorkspace .admin-health-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
#adminWorkspace .admin-health-row { min-width: 0; }
#adminWorkspace .admin-health-detail { min-width: 0; max-width: 65%; white-space: normal; overflow-wrap: anywhere; text-align: right; }
/* fetch-1247 (C02): the Operational Health / System Status mark - colour AND shape, tokens only; ohDot() pairs it with an
   .sr-only state word. Global rather than #adminWorkspace-scoped, so the mark holds wherever ohRow renders. */
.oh-dot { display: inline-block; width: 10px; height: 10px; vertical-align: middle; flex: none; }
.oh-dot--ok { background: var(--ok-fg); border-radius: 50%; }
.oh-dot--warn { background: var(--warn-fg); border-radius: 1px; transform: rotate(45deg) scale(.8); }
.oh-dot--bad { background: var(--bad-fg); }
.oh-dot--mute { border: 2px solid var(--muted); border-radius: 50%; }
#adminWorkspace .admin-import-root { min-width: 0; }
#adminWorkspace :is(.btn, button.cappill, .rowdel) { min-height: var(--control-height-touch); }
#adminWorkspace .rowdel { min-width: var(--control-height-touch); }
#adminWorkspace :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { min-width: 0; max-width: 100%; box-sizing: border-box; font-size: var(--t-body); }
#adminWorkspace :is(input:not([type="checkbox"]):not([type="radio"]), select) { min-height: var(--control-height-touch); }
#adminWorkspace .field { min-width: 0; }
#adminWorkspace .field label { font-size: var(--t-sub); line-height: 1.5; }
#adminWorkspace .grid--settings { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); max-width: 48rem; }
#adminWorkspace .user-filterbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: var(--s-2) var(--s-3); margin: 0 0 var(--s-5); }
#adminWorkspace .user-filterbar :is(input, select) { width: 100%; }
#adminWorkspace #userSearch { grid-column: 1 / -1; }
#adminWorkspace .user-filterbar .uf-count { align-self: center; justify-self: end; margin: 0; color: var(--muted); font-size: var(--t-sub); }
#adminWorkspace .admin-user-filters { min-width: 0; }
#adminWorkspace .admin-user-filters > summary { min-height: var(--control-height-touch); box-sizing: border-box; padding-block: var(--s-3); color: var(--navy); font-size: var(--t-sub); font-weight: 600; line-height: 1.5; cursor: pointer; }
#adminWorkspace .admin-user-filters > summary .ci { vertical-align: middle; margin-inline: var(--s-1); }
#adminWorkspace .admin-user-filters[open], #adminWorkspace .admin-user-filters[open] ~ .uf-count { grid-column: 1 / -1; }
#adminWorkspace .admin-filter-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); margin-top: var(--s-2); }
#adminWorkspace .user-card { margin: 0; padding: var(--s-4) 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
#adminWorkspace details.user-card:not([open]) { padding-block: var(--s-4); }
#adminWorkspace .user-head { align-items: flex-start; gap: var(--s-3); min-height: var(--control-height-touch); font-size: var(--t-body); line-height: 1.5; overflow-wrap: anywhere; }
#adminWorkspace .user-head .uc-caret { flex: 0 0 auto; margin-top: var(--s-2); }
#adminWorkspace .user-avatar { font-family: inherit; font-size: var(--t-body); }
#adminWorkspace details.user-card[open] .user-head { margin-bottom: var(--s-4); }
#adminWorkspace .user-selects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); margin-bottom: var(--s-5); }
#adminWorkspace .user-sel-lbl { min-width: 0; gap: var(--s-2); color: var(--navy); font-size: var(--t-sub); text-transform: none; letter-spacing: normal; }
#adminWorkspace .user-sel-lbl .sel { width: 100%; min-width: 0; }
#adminWorkspace .user-sel-lbl:has([data-uvenue]) { grid-column: 1 / -1; }
#adminWorkspace .cap-group { margin-top: var(--s-4); }
#adminWorkspace .cap-group-lbl { margin-bottom: var(--s-2); font-size: var(--t-sub); text-transform: none; letter-spacing: normal; }
#adminWorkspace .cap-pills { gap: var(--s-2); }
#adminWorkspace button.cappill { max-width: 100%; padding-inline: var(--s-3); border-radius: var(--r-s); white-space: normal; text-align: left; line-height: 1.4; }
#adminWorkspace .admin-invite { margin-top: var(--s-5); padding-top: var(--s-5); border-top: 1px solid var(--line); }
#adminWorkspace .admin-invite > h3 { display: flex; align-items: center; gap: var(--s-2); margin: 0 0 var(--s-3); color: var(--text-heading); font-size: var(--t-section); font-weight: 650; line-height: 1.4; }
#adminWorkspace .admin-invite > h3 .ci { flex: 0 0 auto; }
#adminWorkspace .admin-invite-controls { display: flex; flex-wrap: wrap; align-items: end; gap: var(--s-3); min-width: 0; }
#adminWorkspace .admin-invite-controls :is(input, select) { flex: 1 1 15rem; width: 100%; }
#adminWorkspace .admin-invite-controls > .btn { max-width: 100%; white-space: normal; }
#adminWorkspace .pr-scroll { min-width: 0; max-width: 100%; margin-block: var(--s-3); }
#adminWorkspace .pr-matrix { width: 100%; }
#adminWorkspace .pr-matrix :is(th, td) { padding-block: var(--s-3); }
#adminWorkspace .pr-matrix th { font-size: var(--t-sub); text-transform: none; letter-spacing: normal; }
#adminWorkspace .pr-bar select { width: 100%; }
#adminWorkspace :is(.actions, .nrb-acts, .pr-bar) { gap: var(--s-3); }
#adminWorkspace .nrb { margin-top: var(--s-5); padding: var(--s-5) 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; }
#adminWorkspace .nrb-legend { font-size: var(--t-section); color: var(--text-heading); }
#adminWorkspace .nrl-row { padding: var(--s-3) 0; border: 0; border-bottom: 1px solid var(--hair); border-radius: 0; }
#adminWorkspace .nrl-row.is-new { outline: 2px solid var(--gold); outline-offset: var(--s-1); box-shadow: none; }
@media (min-width: 961px) {
  #adminWorkspace .admin-nav { position: sticky; top: var(--s-5); }
}
@media (max-width: 960px) {
  #adminWorkspace .admin-layout { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
  #adminWorkspace .admin-nav { display: none; }
  #adminWorkspace .admin-mobile { display: flex; flex-direction: column; gap: var(--s-2); margin-bottom: var(--s-4); }
  #adminWorkspace .admin-mobile label { font-size: var(--t-sub); color: var(--navy); font-weight: 600; }
  #adminWorkspace #adminSubject { width: 100%; min-height: var(--control-height-touch); }
}
@media (max-width: 640px) {
  #adminWorkspace .admin-page-head { margin-bottom: var(--s-4); }
  #adminWorkspace .admin-page-head h1 { font-size: var(--t-title); }
  #adminWorkspace .admin-main { padding: var(--s-4); }
  #adminWorkspace .admin-views { gap: var(--s-1) var(--s-4); margin-bottom: var(--s-4); }
  #adminWorkspace .admin-panel-head h2, #adminWorkspace .admin-recovery-section > h2, #adminWorkspace .admin-import-title { font-size: var(--t-section); }
  #adminWorkspace .admin-panel-hint { font-size: var(--t-sub); }
  #adminWorkspace :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { font-size: 1rem; }
  #adminWorkspace .grid--settings, #adminWorkspace .admin-filter-fields, #adminWorkspace .user-selects { grid-template-columns: minmax(0, 1fr); }
  #adminWorkspace .admin-invite-controls > .btn { flex: 1 1 100%; }
  #adminWorkspace .admin-group { margin-block: var(--s-5); }
  #adminWorkspace .admin-health-grid { grid-template-columns: minmax(0, 1fr); }
  #adminWorkspace .admin-health-row { display: grid; grid-template-columns: minmax(0, 1fr); }
  #adminWorkspace .admin-health-detail { max-width: 100%; text-align: left; }
  #adminWorkspace .pr-matrix td:first-child { white-space: normal; }
  #adminWorkspace .pr-matrix :is(th, td) { padding-inline: var(--s-1); }
  #adminWorkspace :is(.nrb-hint, .nrb-hint--flush) { margin-left: 0; }
  #adminWorkspace :is(#nxTitle, #nxBody) { width: 100%; }
}
/* fetch-1399: Admin > Salesperson names (snBodyHTML). One row per spelling: the spelling and its source, the counts,
   the person, the action. Compact admin density on a desktop; a phone stacks each row and every control is 44px. */
#adminWorkspace .sn-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); margin-bottom: var(--s-3); }
#adminWorkspace .sn-sum { flex: 1 1 22rem; margin: 0; color: var(--muted); font-size: var(--t-body); font-variant-numeric: tabular-nums; }
#adminWorkspace .sn-bulknote { flex: 1 1 100%; color: var(--ink); font-size: var(--t-sub); }
#adminWorkspace .sn-group { margin: var(--s-3) 0 var(--s-1); color: var(--muted); font-size: var(--t-label); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
#adminWorkspace .sn-list { list-style: none; margin: 0; padding: 0; }
#adminWorkspace .sn-row { display: grid; grid-template-columns: minmax(10rem, 1.3fr) minmax(7rem, .7fr) minmax(12rem, 1.6fr) minmax(5.5rem, auto); gap: var(--s-1) var(--s-3); align-items: center; padding: var(--s-2) 0; border-bottom: 1px solid var(--hair); }
#adminWorkspace .sn-row > * { min-width: 0; }
#adminWorkspace :is(.sn-name, .sn-count, .sn-who) { display: flex; flex-direction: column; gap: 2px; }
#adminWorkspace .sn-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: var(--t-body); }
#adminWorkspace .sn-meta { color: var(--muted); font-size: var(--t-sub); }
#adminWorkspace .sn-count { font-variant-numeric: tabular-nums; }
#adminWorkspace .sn-n { color: var(--ink); font-size: var(--t-body); }
#adminWorkspace .sn-pick { width: 100%; min-width: 0; }
#adminWorkspace .sn-person { color: var(--ink); font-size: var(--t-body); font-weight: 600; }
#adminWorkspace .sn-who.sn-linked { flex-direction: row; align-items: center; gap: var(--s-2); color: var(--ok-fg); font-size: var(--t-body); }
#adminWorkspace .sn-act { display: flex; align-items: center; justify-content: flex-end; gap: var(--s-1); }
#adminWorkspace .sn-note { grid-column: 1 / -1; margin: 0; color: var(--ink); font-size: var(--t-sub); }
#adminWorkspace .sn-note--err { color: var(--bad-fg); }
#adminWorkspace .sn-empty { margin: var(--s-2) 0; color: var(--muted); font-size: var(--t-body); }
#adminWorkspace .sn-fold { margin-top: var(--s-3); }
#adminWorkspace .sn-fold > summary { display: list-item; min-height: var(--control-height-touch); align-content: center; cursor: pointer; color: var(--navy); font-size: var(--t-body); font-weight: 600; }
@media (max-width: 640px) {
  #adminWorkspace .sn-row { grid-template-columns: minmax(0, 1fr); gap: var(--s-2); padding: var(--s-3) 0; }
  #adminWorkspace .sn-count { flex-direction: row; flex-wrap: wrap; gap: var(--s-2); }
  #adminWorkspace .sn-pick { min-height: var(--control-height-touch); }
  #adminWorkspace :is(.sn-go, .sn-bar > .btn) { flex: 1 1 auto; min-height: var(--control-height-touch); }
  #adminWorkspace .sn-act { justify-content: flex-start; }
}


  /* fetch-1193: Add shares the punch columns; each date owns one visible +. */
  .tcp-daylabel { display: flex; align-items: center; justify-content: space-between; gap: var(--s-1); min-width: 0; }
  .tcp-daylabel > span { min-width: 0; white-space: normal; }
  .tcp-daylabel .tcp-addbtn { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 var(--control-height-touch, 44px); width: var(--control-height-touch, 44px); min-width: var(--control-height-touch, 44px); min-height: var(--control-height-touch, 44px); padding: var(--s-1); border-color: transparent; background: transparent; font-size: var(--t-body); opacity: 1; }
  .tcp-table thead th:first-child { width: 13%; }
  .tcp-table thead th:nth-child(10) { width: 9%; }
  .tcp-addrow > td { vertical-align: top; background: var(--wash); }
  .tcp-addrow > td:nth-child(2), .tcp-addrow > td:nth-child(3), .tcp-addrow > td:nth-child(4) { padding: var(--s-1); }
  .tcp-addrow label, .tcm-addrow label { display: grid; gap: var(--s-1); min-width: 0; color: var(--muted); font-size: var(--t-sub); }
  .tcp-addrow :is(input, select), .tcm-addrow :is(input, select) { box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; min-height: var(--control-height-touch, 44px); padding: var(--s-1) var(--s-2); border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface-card, White); color: var(--ink); font: inherit; font-size: var(--t-body); }
  .tcp-addrow [data-tcadfield=brk], .tcm-addrow [data-tcadfield=brk] { text-align: right; font-variant-numeric: tabular-nums; }
  .tcp-addmetadata, .tcp-adddetails { display: grid; gap: var(--s-2); min-width: 0; }
  .tcp-addactions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--s-1); }
  .tcp-addactions .btn { min-width: var(--control-height-touch, 44px); min-height: var(--control-height-touch, 44px); padding: var(--s-1) var(--s-2); white-space: normal; font-size: var(--t-sub); }
  #tcDraftStatus { font-size: var(--t-sub); line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }
  #tcDraftStatus:empty { display: none; }
  .tcm-dayhead .tcp-daylabel { flex: 1; justify-content: flex-start; }
  .tcm-addrow { display: grid; gap: var(--s-2); min-width: 0; padding: var(--s-2) 0 var(--s-3); border-bottom: 1px solid var(--line); }
  .tcm-addrow .tcp-addfields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); min-width: 0; }
  @media (max-width: 640px) {
    .tcm-addrow :is(input, select) { font-size: max(1rem, var(--t-body)); }
    .tcm-addrow .tcp-addmetadata { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tcm-addrow .tcp-addmetadata > :last-child { grid-column: 1 / -1; }
  }

  /* fetch-1195: rail controls leave the person sheet at the top of the workbench. */
  .tc-rail-controls { display: grid; flex: 0 0 auto; gap: var(--s-2); padding: var(--s-1) var(--s-1) var(--s-3); border-bottom: 1px solid var(--line); margin-bottom: var(--s-2); }
  .tc-rail-week { display: grid; grid-template-columns: var(--control-height-touch, 44px) minmax(0, 1fr) var(--control-height-touch, 44px); align-items: center; gap: var(--s-1); }
  .tc-rail-week .tc-wkbtn { min-width: var(--control-height-touch, 44px); min-height: var(--control-height-touch, 44px); padding: var(--s-1); }
  .tc-rail-week .tc-wkmain { min-width: 0; text-align: center; }
  .tc-rail-week .tc-wkmain strong, .tc-rail-week .tc-wksub { display: block; }
  .tc-venue-select { display: block; min-width: 0; }
  .tc-venue-select .sel { width: 100%; min-width: 0; min-height: var(--control-height-touch, 44px); border-inline-start: 3px solid var(--vc, var(--navy)); }
  .tc-rail-filters { display: grid; grid-template-columns: minmax(0, 1fr) var(--control-height-touch, 44px); gap: var(--s-2); align-items: center; }
  .tc-export-icon { width: var(--control-height-touch, 44px); min-width: var(--control-height-touch, 44px); min-height: var(--control-height-touch, 44px); padding: var(--s-1); font-size: var(--t-body); }
  .tcw-list { min-height: 0; }
  .tcp-table thead th:nth-child(1) { width: 13%; }
  .tcp-table thead th:nth-child(2), .tcp-table thead th:nth-child(4) { width: 10%; }
  .tcp-table thead th:nth-child(3) { width: 13%; }
  .tcp-table thead th:nth-child(5) { width: 8%; }
  .tcp-table thead th:nth-child(6) { width: 21%; }
  .tcp-table thead th:nth-child(7) { width: 9%; }
  .tcp-table thead th:nth-child(8), .tcp-table thead th:nth-child(9) { width: 8%; }
  .tcp-cellcontrol { display: flex; align-items: center; min-width: 0; }
  .tcp-cellcontrol .tcp-cellbtn { flex: 1 1 auto; min-width: 0; }
  .tcp-table tbody tr .tcp-cellcontrol .tcp-splitbtn { opacity: 1; }
  .tcp-cellcontrol .tcp-splitspace { flex: 0 0 var(--control-height-sm, 32px); }
  .tcp-cellcontrol .tcp-splitbtn { flex: 0 0 var(--control-height-sm, 32px); width: var(--control-height-sm, 32px); min-width: var(--control-height-sm, 32px); min-height: var(--control-height-sm, 32px); padding: var(--s-1); font-size: var(--t-sub); }
  .tcp-addrow .tcp-addactions { margin-top: var(--s-2); }
  @media (hover: none) {
    .tcp-cellcontrol .tcp-splitspace { flex-basis: var(--control-height-touch, 44px); }
    .tcp-cellcontrol .tcp-splitbtn { flex-basis: var(--control-height-touch, 44px); width: var(--control-height-touch, 44px); min-height: var(--control-height-touch, 44px); }
  }
  @media (min-width: 641px) and (max-width: 900px) {
    .tcw-rail { max-height: none; }
    .tcw-list { max-height: 16rem; }
    .tc-rail-controls { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; }
  }

  /* fetch-1197: quiet row actions and compact, readable punch context. */
  .tcp-entry-context { display: grid; gap: var(--s-1); min-width: 0; line-height: 1.35; overflow-wrap: anywhere; }
  .tcp-entry-context > :first-child { font-weight: 500; }
  .tcp-entry-context > :last-child { font-size: var(--t-sub); }
  .tcp-addrow .tcp-addmetadata { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--s-1); }
  .tcp-addrow .tcp-addmetadata :is(input, select) { padding-inline: var(--s-1); }
  .tcp-addrow .tcp-addmetadata > :last-child { grid-column: 1 / -1; }
  .tcp-addrow .tcp-field-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tcp-addrow .tcp-addactions { gap: var(--s-1); margin-top: var(--s-1); align-items: center; }
  .tcp-addrow .tcp-addactions .btn { border-color: transparent; background: transparent; }
  @media (hover: hover) and (pointer: fine) {
    .tcp-table tbody tr .tcp-addbtn, .tcp-table tbody tr .tcp-cellcontrol .tcp-splitbtn { opacity: 0; }
    .tcp-table tbody tr:hover .tcp-addbtn, .tcp-table tbody tr:focus-within .tcp-addbtn,
    .tcp-table tbody tr:hover .tcp-cellcontrol .tcp-splitbtn, .tcp-table tbody tr:focus-within .tcp-cellcontrol .tcp-splitbtn { opacity: 1; }
  }

/* fetch-1219: Event Recaps. One control header, then quiet record disclosures. */
.recaps-page { min-width: 0; }
.recaps-page .pgh { margin-bottom: var(--s-3); }
.recaps-page .pgh-top { flex-wrap: nowrap; }
.recaps-page .pgh-titles { flex: 1 1 auto; }
.recaps-page .pgh-h { font-size: var(--t-section); }
.recaps-page .pgh-acts { flex: 0 0 auto; gap: var(--s-1); }
.recaps-page .pgh.pgh--compact .pgh-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
.recaps-page .pgh-navfield > span { color: var(--text-heading); }
.recaps-page .pgh-nav select { font-size: var(--t-body); }
.recaps-page :is(.btn, .pgh-more) { min-height: var(--control-height-touch); }
.recaps-page .pgh-more { min-width: var(--control-height-touch); }
.recap-insights { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-3); }
.recap-insights .btn { font-size: var(--t-sub); }
.recap-help { color: var(--mute-fg); font-size: var(--t-sub); line-height: 1.5; }
.recap-insights .recap-help { margin: 0; }
.recaps-page > .recap-help { margin: var(--s-4) 0 0; max-width: 75ch; }
.recap-insight-report { margin-bottom: var(--s-3); }
.recap-list { background: var(--surface-card); border: 1px solid var(--line); border-radius: var(--r-m); }
.recap-entry { min-width: 0; }
.recap-entry + .recap-entry { border-top: 1px solid var(--rule-soft); }
.recap-entry > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-1) var(--s-2); align-items: center; padding: var(--s-3); min-height: var(--control-height-touch); cursor: pointer; list-style: none; }
.recap-entry > summary::-webkit-details-marker { display: none; }
.recap-entry > summary::marker { content: ""; }
.recap-entry > summary:focus-visible { outline-offset: -3px; }
.recap-entry-main { min-width: 0; }
.recap-entry-main > strong { display: block; font-size: var(--t-body); font-weight: 700; color: var(--text-heading); line-height: 1.5; overflow-wrap: anywhere; }
.recap-meta { display: flex; flex-wrap: wrap; column-gap: var(--s-2); row-gap: var(--s-1); margin-top: var(--s-1); color: var(--mute-fg); font-size: var(--t-sub); line-height: 1.5; }
.recap-meta > span { overflow-wrap: anywhere; }
.recap-meta > span + span::before { content: "\00b7"; padding-right: var(--s-2); }
.recap-dept { font-weight: 600; }
.recap-status { grid-column: 1; display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2); font-size: var(--t-sub); color: var(--mute-fg); }
.recap-status .recap-tone--bad { color: var(--bad-fg); font-weight: 600; }
.recap-status .recap-tone--warn { color: var(--warn-fg); font-weight: 600; }
.recap-status .recap-tone--ok { color: var(--ok-fg); }
.recap-flag { display: inline-flex; align-items: center; gap: var(--s-1); }
.recap-flag::before { content: "\00b7"; }
.recap-entry > summary:hover { background: var(--wash); }
.recap-entry:first-child > summary { border-radius: var(--r-m) var(--r-m) 0 0; }
.recap-entry:last-child:not([open]) > summary { border-radius: 0 0 var(--r-m) var(--r-m); }
.recap-praise-mark { display: inline-flex; align-items: center; gap: var(--s-1); }
.recap-praise-mark .ci { color: var(--brand-gold-dark); }
.recap-chevron { grid-column: 2; grid-row: 1 / 3; color: var(--mute-fg); font-size: var(--t-title); }
.recap-entry[open] > summary .recap-chevron { transform: rotate(90deg); }
.recap-entry[open] > summary { padding-bottom: var(--s-3); }
.recap-entry-body { padding: 0 var(--s-3) var(--s-5); max-width: 85ch; }
.recap-entry-body > .btn { margin-bottom: var(--s-2); }
.recap-note { margin-top: var(--s-4); }
.recap-note h3 { font: inherit; font-size: var(--t-sub); font-weight: 600; color: var(--text-heading); margin: 0 0 var(--s-1); }
.recap-note > div { white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--t-body); line-height: 1.6; }
.recap-praise { padding-top: var(--s-4); border-top: 1px solid var(--rule-soft); }
.recap-add-dialog { box-sizing: border-box; width: calc(100% - var(--s-5)); max-width: 30rem; border: 1px solid var(--line); color: var(--ink); }
.recap-add-dialog::backdrop { background: color-mix(in srgb, var(--brand-blue-deep) 55%, transparent); }
.recap-add-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.recap-add-head h2 { margin: 0; font-size: var(--t-section); color: var(--text-heading); }
.recap-add-dialog p { font-size: var(--t-body); line-height: 1.5; }
.recap-add-links { display: grid; gap: var(--s-2); }
.recap-add-links .btn { display: flex; align-items: center; justify-content: space-between; text-decoration: none; }
@media (max-width: 360px) {
  .recaps-page .pgh-acts .btn-primary { padding-inline: var(--s-2); font-size: var(--t-sub); }
}
@media (min-width: 700px) {
  .recaps-page .pgh { display: grid; grid-template-columns: minmax(8rem, 1fr) minmax(16rem, 2fr) auto; align-items: center; gap: var(--s-4); }
  .recaps-page .pgh-top { display: contents; }
  .recaps-page .pgh-titles { grid-column: 1; grid-row: 1; }
  .recaps-page .pgh-h { font-size: var(--t-title); }
  .recaps-page .pgh-acts { grid-column: 3; grid-row: 1; }
  .recaps-page .pgh.pgh--compact .pgh-nav { grid-column: 2; grid-row: 1; margin-top: 0; }
  .recap-entry > summary { grid-template-columns: minmax(0, 1fr) minmax(8rem, auto) auto; column-gap: var(--s-4); }
  .recap-status { grid-column: 2; max-width: 22rem; justify-content: flex-end; }
  .recap-chevron { grid-column: 3; grid-row: 1; }
}

/* fetch-1233: Linen catalog reuses the shared modal, with its own responsive form width. */
.linen-catalog-icon { min-width: var(--control-height-touch); min-height: var(--control-height-touch); }
.linen-catalog-dialog { max-width: 68rem; }
.linen-catalog-dialog .linen-catalog-body { padding: 0; }
.linen-catalog-dialog .linen-catalog-row { grid-template-columns: minmax(9rem, 2fr) minmax(7rem, 1.4fr) repeat(3, minmax(4.5rem, .7fr)) var(--control-height-touch); }
.linen-catalog-dialog .cse-modal-head { position: sticky; top: calc(-1 * var(--s-4)); padding-block: var(--s-2); background: var(--surface-card); z-index: 1; }
.linen-catalog-dialog .linen-catalog-actions { flex-wrap: wrap; position: sticky; bottom: calc(-1 * var(--s-4)); padding-block: var(--s-3); background: var(--surface-card); }
@media (max-width: 1024px) {
  .linen-catalog-dialog .linen-catalog-row { grid-template-columns: repeat(3, minmax(0, 1fr)) var(--control-height-touch); }
}
@media (max-width: 640px) {
  .linen-catalog-dialog .linen-catalog-row { grid-template-columns: repeat(auto-fit, minmax(min(100%, 6em), 1fr)); }
}

/* fetch-1234: the Team Staffing home shares one header and the forecast's report language. */
#staffingHomeHeader .pgh { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
#staffingHomeHeader .pgh-top { flex: 1 1 100%; }
#staffingHomeHeader .pgh-nav { display: flex; flex-wrap: wrap; align-items: center; margin: 0; gap: var(--s-2); }
#staffingHomeHeader .pgh-row { margin: 0; }
#staffingHomeHeader .pgh-chips { margin: 0; flex: 1 1 auto; }
#staffingHomeHeader .pgh-nav--tail { margin-left: auto; }
#staffingHomeHeader .pgh-seg button { min-height: var(--control-height-touch); }
#staffingHomeHeader .pgh-navfield { min-width: 0; }
#staffingHomeHeader .pgh-meta { line-height: 1.5; }
/* fetch-1236: the same venue scope is compact on phones; formulas use the Crystal gear. */
#staffingHomeHeader .stf-formula-gear { display: inline-flex; align-items: center; justify-content: center; width: var(--control-height-touch); min-width: var(--control-height-touch); min-height: var(--control-height-touch); padding: var(--s-2); cursor: pointer; }
#staffingHomeHeader .stf-formula-gear:hover:not(:disabled), #staffingHomeHeader .stf-formula-gear[aria-pressed="true"] { background: var(--wash); border-color: var(--navy); color: var(--navy-dark); }
#staffingHomeHeader .stf-formula-gear:disabled { cursor: wait; }
#staffingHomeHeader .pgh-scope { flex: 1 1 12rem; margin: 0; min-width: 0; }
#staffingHomeHeader .pgh-scope-choices:empty { display: none; }
#staffingVenuePicker :is(.pgh-picker-trigger, .pgh-chip) { min-height: var(--control-height-touch); font-size: var(--t-body); box-sizing: border-box; }
#staffingVenuePicker .pgh-picker-list { width: 100%; max-width: 100%; }
#staffingVenuePicker .pgh-picker-value, #staffingVenuePicker .pgh-chip { color: color-mix(in srgb, var(--vc) 58%, var(--ink)); }
#staffingVenuePicker .pgh-chip { background: var(--paper); border-color: transparent; }
#staffingVenuePicker .pgh-chip.on { background: var(--wash); border-color: var(--vc); }
#staffingVenuePicker .pgh-chip:hover { background: var(--wash); }
.cul-budget-totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(12rem, 1fr); align-items: center; gap: var(--s-5); padding: var(--s-5) 0; margin-bottom: var(--s-3); border-bottom: 1px solid var(--rule-soft); }
.cul-budget-number { font-size: var(--t-figure); font-weight: 650; line-height: 1.2; letter-spacing: -.04em; color: var(--text-heading); overflow-wrap: anywhere; }
.cul-budget-totals p { margin: 0; line-height: 1.6; }
.cul-budget-table { width: 100%; }
.cul-budget-table td { overflow-wrap: anywhere; }
.cul-budget-table .cul-evtc { min-width: 9rem; max-width: 24rem; }
.cul-budget-table .cul-source { max-width: 16rem; text-align: left; }
.cul-budget-table .cul-venue { text-align: left; }
.cul-saved-bench { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); margin-top: var(--s-3); }
.cul-saved-bench span { font-size: var(--t-sub); }
.cul-formula-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-5); }
.cul-formula-venue { min-width: 0; }
.cul-formula-venue h3 { font-size: var(--t-body); margin: 0 0 var(--s-3); color: var(--text-heading); }
.cul-formula-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
.cul-formula-pair .field { min-width: 0; }
.cul-formula-pair label { font-size: var(--t-sub); }
.cul-formula-pair input { width: 100%; }
@media (max-width: 1050px) {
  .cul-formula-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cul-budget-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cul-budget-totals p { grid-column: 1 / -1; }
}
@media (max-width: 1050px) {
  .cul-budget-table, .cul-budget-table tbody { display: block; }
  .cul-budget-table thead { display: none; }
  .cul-budget-table tr.lf-row { display: grid; padding: var(--s-3) 0; border-bottom: 1px solid var(--rule-soft); }
  .cul-budget-table tr.lf-row td { display: block; padding: 0; border: 0; text-align: left; min-width: 0; }
  .cul-budget-table td[data-l]::before { content: attr(data-l); display: block; font-size: var(--t-label); font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
  .cul-budget-table tr.lf-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
  .cul-budget-table .cul-evtc, .cul-budget-table .cul-source { grid-column: 1 / -1; max-width: none; }
  .cul-budget-table .lf-date { grid-row: 1; }
  .cul-budget-table .cul-venue { grid-row: 1; text-align: right; }
  .cul-budget-table .cul-evtc { grid-row: 2; }
  .cul-budget-table .lf-evt { margin: 0; }
}
@media (max-width: 640px) {
  #staffingHomeHeader .pgh > .pgh-nav:not(.pgh-nav--tail) { flex: 1 1 100%; }
  #staffingHomeHeader .pgh-navfield { flex: 1 1 8rem; }
  #staffingHomeHeader .pgh-navfield .sel { width: 100%; }
  #staffingHomeHeader .pgh-nav--tail { width: auto; margin-left: 0; flex: 0 0 auto; }
  #staffingHomeHeader .pgh-chips { gap: var(--s-1); }
  .cul-budget-totals { gap: var(--s-3); padding-block: var(--s-4); }
  .cul-budget-number { font-size: var(--t-display); }
  .cul-formula-grid { grid-template-columns: minmax(0, 1fr); }
}
/* fetch-1236: Budgets section finder. Navigation does not hide the source tables. */
.stf-finder { display:flex; align-items:center; flex-wrap:wrap; gap:var(--s-3); margin-block:var(--s-3) var(--s-4); padding-block:var(--s-2); border-bottom:1px solid var(--line); }
.stf-find-field { flex:0 1 18rem; min-width:0; }
.stf-find-field label { display:block; margin-bottom:var(--s-1); font-size:var(--t-sub); font-weight:600; color:var(--navy); }
.stf-find-input { display:flex; align-items:center; gap:var(--s-1); }
.stf-find-input input { min-height:var(--control-height-touch); min-width:0; width:100%; font:inherit; font-size:var(--t-body); }
.stf-find-input .btn { min-height:var(--control-height-touch); }
.stf-find-results { flex:1 1 24rem; display:flex; flex-wrap:wrap; gap:var(--s-1); }
.stf-find-link { min-height:var(--control-height-touch); display:flex; flex-direction:column; justify-content:center; gap:var(--s-1); padding:var(--s-2) var(--s-3); border:1px solid var(--line); border-radius:var(--r-s); background:var(--surface-card); color:var(--navy); text-align:left; font:inherit; font-size:var(--t-sub); cursor:pointer; }
.stf-find-link:hover { background:var(--wash); border-color:var(--navy); }
.stf-find-link:focus-visible { outline:2px solid var(--focus-ring); outline-offset:2px; }
.stf-find-link small { font-size:var(--t-sub); color:var(--muted); }
#lfActualsSection, #lfForecastSection, #lfHiringSection, #lfCulinarySection, [id^="staffFormulaTitle_"], #culFormulaTitle { scroll-margin-top:var(--s-4); }
@media(max-width:640px) { .stf-find-field, .stf-find-results { flex-basis:100%; } .stf-find-link { flex:1 1 calc(50% - var(--s-2)); } }

/* fetch-1236 — Performance chart inspection, confined to the scorecard. */
.sd-scorecard .pgh .pgh-nav { align-items: flex-end; }
.sd-scorecard [data-sdmine] { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: var(--control-height-touch); cursor: pointer; }
.sd-scorecard [data-sdmine] .ci { flex: 0 0 auto; }
.sd-scorecard .sd-chart-interactive { min-width: 0; position: relative; }
.sd-scorecard .sd-chart-hit { width: 100%; min-height: 220px; cursor: crosshair; touch-action: pan-y; border-radius: var(--r-s); }
.sd-scorecard .sd-chart-hit:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: var(--s-1); }
.sd-scorecard .sd-chart-plot { display: block; width: 100%; height: 220px; overflow: visible; }
.sd-scorecard .sd-chart-selection { fill: color-mix(in srgb, var(--navy) 8%, transparent); }
.sd-scorecard .sd-chart-crosshair { stroke: var(--focus-ring); stroke-width: 1.5; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; pointer-events: none; }
.sd-scorecard .sd-chart-mark { vector-effect: non-scaling-stroke; transition: filter 100ms ease-out; }
.sd-scorecard .sd-chart-mark--inspected { filter: drop-shadow(0 2px 3px color-mix(in srgb, var(--navy) 22%, transparent)); }
.sd-scorecard .sd-chart-nav { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: var(--s-2); margin-top: var(--s-4); }
.sd-scorecard .sd-chart-nav label { display: grid; gap: var(--s-1); min-width: 0; font-size: var(--t-sub); color: var(--muted); }
.sd-scorecard .sd-chart-nav :is(button, select) { min-height: var(--control-height-touch); min-width: var(--control-height-touch); width: 100%; max-width: 100%; }
.sd-scorecard .sd-chart-years { margin: var(--s-2) 0; font-size: var(--t-sub); line-height: 1.5; color: var(--muted); text-align: center; }
.sd-scorecard .sd-chart-inspector { min-height: 10rem; margin-top: var(--s-4); padding: var(--s-4); border: 1px solid var(--rule-soft); border-radius: var(--r-m); background: var(--surface-card); box-shadow: 0 6px 20px color-mix(in srgb, var(--navy) 8%, transparent); font-size: var(--t-sub); line-height: 1.5; font-variant-numeric: tabular-nums; }
.sd-scorecard .sd-chart-inspector p { margin: 0 0 var(--s-2); overflow-wrap: anywhere; }
.sd-scorecard .sd-chart-inspector strong { color: var(--text-heading); }
.sd-scorecard .sd-chart-exact > span { display: block; font-size: var(--t-title); font-weight: 600; line-height: 1.5; }
.sd-scorecard .sd-chart-parts { display: grid; gap: var(--s-2); margin: var(--s-3) 0; }
.sd-scorecard .sd-chart-parts > div { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: baseline; gap: var(--s-2); }
.sd-scorecard .sd-chart-parts small { display: block; font-size: var(--t-sub); color: var(--muted); }
.sd-scorecard .sd-chart-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.sd-scorecard .sd-chart-inspector .btn { white-space: normal; font-size: var(--t-sub); }
.sd-scorecard .sd-chart-filter { margin: var(--s-3) 0; border-left: 2px solid var(--gold); padding-left: var(--s-3); font-size: var(--t-sub); line-height: 1.5; }
.sd-scorecard .sd-chart-filter p { margin: var(--s-2) 0; }
.sd-scorecard .sd-chart-skeleton { min-height: 220px; background: linear-gradient(0deg, var(--wash), var(--surface-card)); border-radius: var(--r-m); border-bottom: 1px solid var(--rule-soft); }
.sd-scorecard .sd-chart-legend > button { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--control-height-touch); padding: var(--s-1) var(--s-2); border: 1px solid transparent; border-radius: var(--r-s); font: inherit; color: var(--muted); background: transparent; cursor: pointer; }
.sd-scorecard .sd-chart-legend > button:hover { background: var(--wash); color: var(--text-heading); }
.sd-scorecard .sd-chart-legend > button[aria-pressed="true"] { border-color: var(--rule); color: var(--text-heading); background: var(--wash); }
@media (max-width: 640px) {
  .sd-scorecard .sd-chart-inspector { padding: var(--s-3); }
  .sd-scorecard .sd-chart-interactive .sd-chart-axis--dense > span:nth-child(even) { padding-top: 0; }
  .sd-scorecard .sd-chart-parts > div { grid-template-columns: auto minmax(0, 1fr); }
  .sd-scorecard .sd-chart-parts > div > strong { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .sd-scorecard .sd-chart-interactive * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .sd-scorecard .sd-chart-plot { break-inside: avoid; }
  .sd-scorecard .sd-chart-inspector { box-shadow: none; }
  .sd-scorecard .sd-chart-mark { filter: none; transition: none; }
}

/* fetch-1236 · Staffing chart inspection. Existing card/table/type tokens remain the owners. */
.lf-hiring-chart { margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--rule-soft); }
.lf-chart-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-3); margin-bottom: var(--s-3); }
.lf-chart-toolbar h3, .lf-chart-inspector h3 { margin: 0; font-size: var(--t-mid); color: var(--text-heading); }
.lf-chart-toolbar p, .lf-chart-inspector p { margin: var(--s-1) 0 0; color: var(--muted); font-size: var(--t-sub); line-height: 1.5; }
.lf-chart-roles { display: flex; gap: var(--s-1); }
.lf-chart-roles .btn[aria-pressed="true"] { border-color: var(--brand-blue-traditional); background: var(--wash); color: var(--text-heading); }
.lf-hiring-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(16rem, 1fr); align-items: start; gap: var(--s-5); }
.lf-hiring-plot-area { min-width: 0; }
.lf-chart-scale { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2); color: var(--muted); font-size: var(--t-sub); margin-bottom: var(--s-2); }
.lf-hiring-plot { display: block; width: 100%; height: 12rem; min-height: var(--control-height-touch); overflow: visible; cursor: crosshair; touch-action: pan-y; border-radius: var(--r-s); }
.lf-hiring-plot:focus-visible, .lf-chart-mark:focus-visible { outline: 2px solid var(--brand-gold-dark); outline-offset: 3px; }
.lf-hiring-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.lf-hiring-guide { stroke: var(--brand-gold-dark); stroke-width: 2; stroke-dasharray: 5 4; fill: none; vector-effect: non-scaling-stroke; }
.lf-hiring-cursor { stroke: var(--brand-blue-deep); stroke-width: 1; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; pointer-events: none; }
.lf-hiring-bar { stroke: var(--brand-blue-traditional); stroke-width: .5; vector-effect: non-scaling-stroke; }
.lf-hiring-bar.is-inspected { stroke-width: 2; filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--brand-blue-deep) 20%, transparent)); }
.lf-hiring-months { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); margin-top: var(--s-2); color: var(--muted); font-size: var(--t-sub); text-align: center; }
.lf-hiring-controls { display: flex; align-items: end; gap: var(--s-2); margin-top: var(--s-3); }
.lf-hiring-controls label { display: grid; flex: 1; min-width: 0; gap: var(--s-1); font-size: var(--t-sub); color: var(--muted); }
.lf-hiring-controls .sel { min-width: 0; width: 100%; }
.lf-hiring-controls .btn { min-width: var(--control-height-touch); }
.lf-chart-help { margin: var(--s-2) 0 0; font-size: var(--t-sub); line-height: 1.5; color: var(--muted); }
.lf-chart-inspector { padding: var(--s-3); border: 1px solid var(--rule); border-radius: var(--r-m); background: var(--surface-card); box-shadow: 0 3px 10px color-mix(in srgb, var(--brand-blue-deep) 7%, transparent); text-align: left; white-space: normal; overflow-wrap: anywhere; }
.lf-chart-inspector--empty { min-height: 12rem; display: grid; align-content: start; gap: var(--s-2); }
.lf-chart-inspector-head { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: var(--s-2); }
.lf-chart-inspector-head > div { flex: 1; min-width: 10rem; }
.lf-chart-inspector dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); margin: var(--s-3) 0; }
.lf-chart-inspector dl > div { min-width: 0; }
.lf-chart-inspector dt { font-size: var(--t-sub); color: var(--muted); }
.lf-chart-inspector dd { margin: var(--s-1) 0 0; font-size: var(--t-body); font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.lf-chart-mark { box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; width: 100%; min-width: var(--control-height-touch); min-height: var(--control-height-touch); margin-top: var(--s-1); padding: var(--s-1); background: transparent; border: 1px solid transparent; border-radius: var(--r-s); font: inherit; cursor: pointer; text-align: left; }
.lf-chart-mark .dg { margin: 0; }
.lf-chart-mark .dg-meter line { stroke-dasharray: 3 2; }
.lf-chart-mark .dg-meter rect { rx: 1; }
.lf-chart-mark:hover, .lf-chart-mark.is-inspected { border-color: var(--rule); background: var(--wash); }
.lf-chart-mark-label { font-size: var(--t-sub); color: var(--muted); margin-top: var(--s-1); }
.lf-chart-inspector-row[hidden] { display: none !important; }
.lf-table .lf-chart-inspector-row > td { padding: var(--s-2) 0 var(--s-3); border: 0; }
.lf-chart-loading { min-height: 14rem; }
.lf-chart-loading > p { font-size: var(--t-body); color: var(--muted); }
.lf-chart-skeleton { height: 8rem; border-radius: var(--r-s); background: linear-gradient(90deg, var(--wash), var(--hair), var(--wash)); opacity: .65; }
@media (max-width: 760px) {
  .lf-hiring-layout { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
  .lf-hiring-months span:nth-child(even) { visibility: hidden; }
  .lf-table--cards .lf-chart-inspector-row { display: block; }
  .lf-table--cards .lf-chart-inspector-row > td { display: block; width: 100%; }
  .lf-chart-mark { padding: var(--s-1) 0; }
  .lf-chart-inspector dl { gap: var(--s-2); }
  .lf-table--months td[data-l="Servers"], .lf-table--months td[data-l="Bartenders"] { white-space: normal; overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  .lf-hiring-chart *, .lf-chart-mark, .lf-chart-inspector { animation: none !important; transition: none !important; }
}
@media print {
  .lf-chart-mark { border: 0; padding: 0; }
  .lf-chart-mark-label, .lf-chart-inspector-head .btn, .lf-hiring-controls, .lf-chart-roles { display: none; }
  .lf-chart-inspector { box-shadow: none; }
}

/* fetch-1244: visit-only event linen worksheet. */
.linen-worksheet { padding: 0 var(--s-3) var(--s-3); }
.linen-source-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.linen-worksheet-help, .linen-worksheet-note, .linen-worksheet-warning { font-size: var(--t-sub); line-height: 1.5; }
.linen-worksheet-help { color: var(--muted); margin-block: var(--s-3); }
.linen-worksheet-row { display: grid; grid-template-columns: minmax(0, 1fr) 6rem; gap: var(--s-1) var(--s-3); align-items: center; padding-block: var(--s-3); border-top: 1px solid var(--hair); }
.linen-worksheet-row label { font-size: var(--t-sub); line-height: 1.5; overflow-wrap: anywhere; }
.linen-worksheet-row .linen-item-note { display: block; }
.linen-worksheet-row input { text-align: right; }
.linen-worksheet-note { grid-column: 1 / -1; color: var(--muted); }
.linen-worksheet-warning { color: var(--bad-fg); }
.linen-worksheet-row input[aria-invalid="true"] { border-color: var(--bad-fg); }
.linen-worksheet > .btn:last-child { margin-top: var(--s-2); white-space: normal; }

/* fetch-1281 (Data Truth T6): the event page's money card - Reserve and Portal side by side, then the ledger.
   No figure is coloured: which source is right is rulings 1 and 2, so neither may look wrong. */
.fin-table.evt-money-t { width: auto; min-width: min(100%, 20rem); } /* fetch-1377: one figure per row, the charge of record */
.evt-money-t tbody th { text-align: left; font-weight: 600; color: var(--navy); font-size: var(--t-body); padding: var(--s-2) var(--s-3); white-space: nowrap; }
.evt-money-t tbody th, .evt-money-t tbody td { border-bottom: 1px solid var(--hair); }
.evt-money-t tbody tr:last-child th, .evt-money-t tbody tr:last-child td { border-bottom: 0; }
.evt-money-t td.evt-money-say { white-space: normal; color: var(--muted); font-size: var(--t-sub); text-align: right; }
.evt-money-ledger { margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  /* .card table is a sideways-scrolling block with nowrap cells at this width; this three-column table must fit instead. */
  .card table.evt-money-t { display: table; width: 100%; }
  .card table.evt-money-t th, .card table.evt-money-t td { padding: var(--s-2) var(--s-1); }
  .card table.evt-money-t td.evt-money-say { white-space: normal; max-width: none; }
}

/* fetch-1293: read-only responsibility comparisons inside the existing Admin panel. */
[data-admin-panel="responsibilities"] .btn, .responsibility-picker select { min-height: var(--control-height-touch); }
.responsibility-picker { max-width: 38rem; margin-block: var(--s-3); }
.responsibility-picker select { width: 100%; min-width: 0; }
.responsibility-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); border: 0; padding: 0; margin-block: var(--s-3); min-width: 0; }
.responsibility-choices legend { font-weight: 600; margin-bottom: var(--s-2); }
.responsibility-choice { display: flex; gap: var(--s-2); align-items: center; min-height: var(--control-height-touch); padding: var(--s-2); border: 1px solid var(--line); border-radius: var(--r-s); cursor: pointer; font-size: var(--t-sub); }
.responsibility-choice input { width: auto; flex: 0 0 auto; }
.responsibility-choice:has(input:checked) { background: var(--wash); border-color: var(--navy); }
.responsibility-section { margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--line); }
.responsibility-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
.responsibility-row { min-width: 0; padding: var(--s-3); border: 1px solid var(--hair); border-radius: var(--r-s); overflow-wrap: anywhere; }
.responsibility-row h4 { margin: 0 0 var(--s-2); font-size: var(--t-body); }
.responsibility-row p { margin: var(--s-2) 0 0; font-size: var(--t-sub); }
.responsibility-values { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); margin: 0; }
.responsibility-values dt { font-size: var(--t-sub); color: var(--muted); }
.responsibility-values dd { margin: 0; font-weight: 600; }
.responsibility-other { margin-block: var(--s-3); }
.responsibility-other summary { min-height: var(--control-height-touch); align-content: center; cursor: pointer; font-weight: 600; }
.responsibility-notes, .responsibility-warnings { padding-left: var(--s-4); font-size: var(--t-sub); }
.responsibility-notes li, .responsibility-warnings li { margin-block: var(--s-2); }
@media (max-width: 640px) { .responsibility-choices, .responsibility-rows { grid-template-columns: minmax(0, 1fr); } }

/* fetch-1321: mascot-led knowledge search; all operational controls use Inter. */
.wiki-guide { max-width: 880px; margin: 0 auto; padding: var(--s-3) 0 var(--s-6); }
.wiki-guide-tools { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.wiki-guide-tools .btn, .wiki-ask-row .btn { min-height: var(--control-height-touch); }
/* fetch-1333: the Wiki's tools are the Ask card's top strip, one hairline above the question. */
.wiki-ask-tools { padding-bottom: var(--s-4); margin-bottom: var(--s-4); border-bottom: 1px solid var(--hair); }
.wiki-ask-tools .btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); }
.wiki-ask-tools .ci { flex: 0 0 auto; }
.wiki-ask-tools--foot { padding: var(--s-4) 0 0; margin: var(--s-4) 0 0; border-bottom: 0; border-top: 1px solid var(--hair); }
.wiki-guide-welcome { display: flex; align-items: center; justify-content: center; gap: var(--s-5); padding: var(--s-6) 0; }
.wiki-guide-mascot { width: 210px; height: 250px; object-fit: contain; }
.wiki-guide-welcome h2 { font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 600; line-height: 1.1; margin: var(--s-2) 0 var(--s-3); color: var(--navy-dark); }
.wiki-guide-welcome p { font-size: var(--t-body); color: var(--muted); }
.wiki-guide-welcome .wiki-guide-eyebrow { font-size: var(--t-sub); font-weight: 700; letter-spacing: .1em; color: var(--navy); }
.wiki-guide-welcome--compact { padding: var(--s-4) 0; justify-content: flex-start; }
.wiki-guide-welcome--compact .wiki-guide-mascot { width: 78px; height: 100px; }
.wiki-guide-welcome--compact h2 { font-size: var(--t-title); }
.wiki-guide-welcome--compact .wiki-guide-eyebrow { display: none; }
.wiki-ask-form { background: var(--surface-card); border: 1px solid var(--line); border-radius: var(--r-l); padding: var(--s-5); }
.wiki-ask-form label { display: block; font-size: var(--t-body); font-weight: 700; margin-bottom: var(--s-3); color: var(--navy-dark); }
.wiki-ask-row { display: flex; gap: var(--s-2); }
.wiki-ask-row input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: var(--r-m); padding: var(--s-3); font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface-card); }
.wiki-ask-form .muted { font-size: var(--t-sub); line-height: 1.5; margin: var(--s-3) 0 0; }
#wikiAskStatus { font-size: var(--t-sub); color: var(--navy); margin-top: var(--s-2); }
.wiki-conversation { margin: var(--s-5) 0; }
.wiki-question { font: inherit; font-size: var(--t-body); font-weight: 600; margin: 0 0 var(--s-3); padding: var(--s-3) var(--s-4); border-left: 2px solid var(--gold); overflow-wrap: anywhere; }
.wiki-answer { background: var(--surface-card); border: 1px solid var(--line); border-radius: var(--r-l); padding: var(--s-5); }
.wiki-answer-label { font-size: var(--t-sub); font-weight: 700; color: var(--navy); margin-bottom: var(--s-3); }
.wiki-answer-label span { font-weight: 400; color: var(--muted); }
.wiki-answer-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; font-size: var(--t-body); }
.wiki-citation { display: inline-block; min-width: 44px; min-height: 44px; border: 0; background: transparent; color: var(--navy); font: inherit; font-weight: 700; cursor: pointer; }
.wiki-sources { border-top: 1px solid var(--line); margin-top: var(--s-4); padding-top: var(--s-2); }
.wiki-sources summary { min-height: 44px; align-content: center; cursor: pointer; font-size: var(--t-sub); font-weight: 600; }
.wiki-source { padding: var(--s-3) 0; font-size: var(--t-sub); }
.wiki-source-link, .wiki-text-action { border: 0; background: transparent; color: var(--navy); text-decoration: underline; font: inherit; min-height: 44px; padding: var(--s-2) 0; cursor: pointer; text-align: left; }
.wiki-source-link { display: block; font-weight: 600; }
.wiki-source blockquote { margin: var(--s-2) 0; padding-left: var(--s-3); border-left: 2px solid var(--line); line-height: 1.5; white-space: pre-wrap; }
.wiki-browse-tools { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; margin-bottom: var(--s-4); }
.wiki-browse-tools input { min-height: 44px; max-width: 100%; }
.wiki-article-tools { display: flex; gap: var(--s-2); flex-wrap: wrap; }
@media(max-width:640px) {
  .wiki-ask-tools .btn { flex: 1 1 auto; }
  /* fetch-1333: the tool strip made the Ask card taller, so the phone welcome is the compact row
     (Crystal beside the words, no eyebrow) and the question and Ask Crystal clear the Page tips
     pill and the bottom tab bar on a 390x844 first screen. */
  .wiki-guide-welcome { flex-direction: row; justify-content: flex-start; gap: var(--s-3); text-align: left; padding: var(--s-3) 0; }
  .wiki-guide-mascot { width: 88px; height: 104px; flex: 0 0 auto; }
  .wiki-guide-welcome .wiki-guide-eyebrow { display: none; }
  .wiki-guide-welcome h2 { font-size: 1.75rem; margin: 0 0 var(--s-2); }
  .wiki-guide-welcome p { margin: 0; }
  .wiki-guide-welcome--compact { flex-direction: row; text-align: left; gap: var(--s-3); }
  .wiki-guide-welcome--compact h2 { font-size: var(--t-section); }
  .wiki-ask-form, .wiki-answer { padding: var(--s-4); }
  .wiki-ask-row { flex-direction: column; }
  .wiki-ask-row input { width: 100%; box-sizing: border-box; }
}
@media print { .wiki-guide-tools, .wiki-ask-form, .wiki-guide-welcome, .wiki-text-action { display: none; } }
/* fetch-1333: Crystal University - course cards in the Wiki's tile look, lessons as full-width rows. */
.wiki-uni-note { font-size: var(--t-sub); line-height: 1.5; margin: 0 0 var(--s-4); }
.wiki-uni-course { border-top: 3px solid var(--gold); padding-block: var(--s-2); }
.wiki-uni-sum { min-height: var(--control-height-touch); align-content: center; cursor: pointer; color: var(--navy); }
.wiki-uni-title { font-size: var(--t-section); font-weight: 700; }
.wiki-uni-count { font-size: var(--t-sub); color: var(--muted); }
.wiki-uni-blurb { font-size: var(--t-sub); line-height: 1.5; color: var(--muted); margin: var(--s-1) 0 var(--s-3); }
.wiki-uni-part { font-size: var(--t-body); font-weight: 700; color: var(--navy-dark); margin: var(--s-4) 0 var(--s-1); }
.wiki-uni-lessons { list-style: none; margin: 0 0 var(--s-2); padding: 0; }
.wiki-uni-lessons li + li { border-top: 1px solid var(--hair); }
/* A titled part owns its lessons behind one indent rule; a lesson at the headings' level (a
   single-article part, the Required shelf) sits flush, so it never reads as the step above. */
.wiki-uni-group { margin: var(--s-4) 0 var(--s-3); }
.wiki-uni-group .wiki-uni-part { margin: 0 0 var(--s-1); }
.wiki-uni-group-body { margin-left: var(--s-1); padding-left: var(--s-3); border-left: 2px solid var(--line); }
.wiki-uni-group-body > .wiki-uni-lessons:last-child { margin-bottom: 0; }
.wiki-uni-lessons--course { margin-top: var(--s-3); border-block: 1px solid var(--hair); }
.wiki-uni-chapter { border-top: 1px solid var(--hair); }
.wiki-uni-chapter:last-child { border-bottom: 1px solid var(--hair); margin-bottom: var(--s-2); }
.wiki-uni-chsum { padding-inline: var(--s-1); }
.wiki-uni-chtitle { font-size: var(--t-body); font-weight: 600; }
.wiki-uni-chapter .wiki-uni-lessons { padding-left: var(--s-4); }
.wiki-uni-lesson { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: var(--s-1); width: 100%; min-height: var(--control-height-touch); padding: var(--s-2) var(--s-1); border: 0; background: transparent; font: inherit; text-align: left; color: var(--navy); cursor: pointer; }
.wiki-uni-lesson:hover { background: var(--wash); }
.wiki-uni-lesson:focus-visible, .wiki-uni-sum:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.wiki-uni-lesson-t { font-size: var(--t-body); font-weight: 500; overflow-wrap: anywhere; }
.wiki-uni-lesson-s { font-size: var(--t-sub); color: var(--muted); }
.wiki-uni-libh { font-size: var(--t-section); color: var(--navy); margin: 0; }
.wiki-uni-lib .btn { min-height: var(--control-height-touch); }
/* fetch-1342: Crystal University progress - My learning, the read tick, the article's mark bar, the learning ledger. Gold stays the course rule; progress is navy. */
.uni-strip { border-top: 3px solid var(--gold); }
.uni-strip-h { font-size: var(--t-section); color: var(--navy); margin: 0 0 var(--s-1); }
.uni-strip-sum { font-size: var(--t-sub); color: var(--muted); margin: 0 0 var(--s-2); }
.uni-rows { list-style: none; margin: 0; padding: 0; }
.uni-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-2) var(--s-3); align-items: center; padding: var(--s-2) 0; border-top: 1px solid var(--hair); }
.uni-row-t { font-size: var(--t-body); font-weight: 600; color: var(--navy-dark); }
.uni-row-s { font-size: var(--t-sub); color: var(--muted); overflow-wrap: anywhere; }
.uni-bar { display: block; width: 100%; height: 6px; margin-top: var(--s-1); appearance: none; -webkit-appearance: none; border: 0; border-radius: var(--r-s); background: var(--wash); overflow: hidden; }
.uni-bar::-webkit-progress-bar { background: var(--wash); border-radius: var(--r-s); }
.uni-bar::-webkit-progress-value { background: var(--navy); border-radius: var(--r-s); }
.uni-bar::-moz-progress-bar { background: var(--navy); border-radius: var(--r-s); }
.uni-strip .btn, .uni-mark .btn { min-height: var(--control-height-touch); }
.wiki-uni-lesson.is-read .wiki-uni-lesson-t { color: var(--muted); }
.wiki-uni-done { display: inline-flex; align-items: center; gap: var(--s-1); font-size: var(--t-label); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ok-fg); }
.uni-course-read { font-size: var(--t-sub); font-weight: 600; color: var(--ok-fg); margin-left: var(--s-2); white-space: nowrap; }
.uni-mark { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); margin: var(--s-4) 0 var(--s-3); padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--wash); }
.uni-mark-t { display: inline-flex; align-items: center; gap: var(--s-1); flex: 1 1 12rem; font-size: var(--t-body); font-weight: 600; color: var(--navy); }
.uni-ledger > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-1) var(--s-2); min-height: var(--control-height-touch); align-content: center; cursor: pointer; }
.uni-ledger > summary:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.uni-ledger-h { font-size: var(--t-section); font-weight: 700; color: var(--navy); }
.uni-ledger-n { font-size: var(--t-sub); color: var(--muted); }
.uni-ledger-tools { margin: var(--s-3) 0; }
.uni-ledger-tools label { display: block; font-size: var(--t-sub); color: var(--muted); margin-bottom: var(--s-1); }
.uni-ledger-tools .sel { width: 100%; max-width: 28rem; min-height: var(--control-height-touch); }
.uni-ledger-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-1) var(--s-3); padding: var(--s-2) 0; border-top: 1px solid var(--hair); font-size: var(--t-sub); line-height: 1.45; overflow-wrap: anywhere; }
.uni-ledger-who { font-size: var(--t-body); font-weight: 600; color: var(--navy-dark); }
.uni-ledger-when { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* fetch-1343: one Reports opening, visible library and report-scoped Crystal workflow.
   Reuses the Six-Control header, view toggle and menu; Crystal is gender-neutral. */
.rpt-library-header { min-width: 0; margin-bottom: var(--s-4); }
.rpt-guide { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); align-items: center; gap: var(--s-2) var(--s-5); max-width: 64rem; margin: 0 auto; padding: var(--s-3) 0 var(--s-4); border: 0; background: transparent; }
.rpt-guide-intro { display: contents; }
.rpt-guide-mascot { grid-column: 1; grid-row: 1 / span 5; align-self: center; width: 7.5rem; height: 9rem; object-fit: contain; }
.rpt-guide-intro > div { grid-column: 2; min-width: 0; }
.rpt-guide-intro h2 { font: 600 clamp(1.75rem, 3vw, 2.25rem)/1.12 'Cormorant Garamond', Georgia, serif; color: var(--navy-dark); margin: 0 0 var(--s-2); overflow-wrap: anywhere; }
.rpt-guide-intro p { font-size: var(--t-body); line-height: 1.5; color: var(--muted); margin: 0; }
.rpt-guide-intro .rpt-guide-eyebrow { font-size: var(--t-sub); font-weight: 700; letter-spacing: .06em; color: var(--navy); margin-bottom: var(--s-1); }
.rpt-guide form, .rpt-guide-examples, .rpt-guide-scope, .rpt-guide-links { grid-column: 2; min-width: 0; }
.rpt-guide form label { display: block; font-size: var(--t-sub); font-weight: 600; margin-bottom: var(--s-1); }
.rpt-guide-ask { display: flex; align-items: stretch; flex-wrap: wrap; gap: var(--s-2); }
.rpt-guide-ask input, .rpt-context-ask input, .rpt-save-view input { min-width: 0; flex: 1 1 12rem; box-sizing: border-box; min-height: var(--control-height-touch); padding: var(--s-2) var(--s-3); font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface-card); border: 1px solid var(--line); border-radius: var(--r-s); }
.rpt-guide .btn, .rpt-context-guide .btn, .rpt-view-summary .btn, .rpt-save-view .btn { min-height: var(--control-height-touch); white-space: normal; }
.rpt-guide-examples { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); margin: 0; }
.rpt-guide-examples > span { color: var(--muted); font-size: var(--t-sub); }
.rpt-guide-examples .btn { font-size: var(--t-sub); white-space: normal; text-align: left; }
.rpt-guide-scope { color: var(--muted); font-size: var(--t-sub); line-height: 1.5; margin: 0; overflow-wrap: anywhere; }
.rpt-guide-links { display: flex; flex-wrap: wrap; gap: var(--s-2); padding-top: var(--s-2); }
#reportsHeader.rpt-library-header .rpt-library-controls .pgh { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); margin: 0; padding: var(--s-3) 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
#reportsHeader.rpt-library-header .pgh-top { display: flex; flex: 0 1 auto; order: 2; min-width: 0; margin-left: auto; }
#reportsHeader.rpt-library-header .pgh-acts { width: auto; flex-wrap: wrap; }
#reportsHeader.rpt-library-header .pgh-tabs { display: flex; flex: 1 1 auto; flex-wrap: wrap; order: 1; width: auto; max-width: none; gap: var(--s-4); border: 0; box-shadow: none; overflow: visible; }
#reportsHeader.rpt-library-header .pgh-tab { flex: 0 1 auto; min-height: var(--control-height-touch); padding: var(--s-2) var(--s-1); font-size: var(--t-body); }
#reportsHeader.rpt-library-header .pgh-row { flex: 1 1 100%; order: 3; min-width: 0; gap: var(--s-2); }
#reportsHeader.rpt-library-header .pgh-search { min-width: 0; flex: 1 1 12rem; }
#reportsHeader.rpt-library-header .pgh-search input { min-width: 0; }
#reportsHeader.rpt-library-header .pgh-row > .sel { min-width: 0; max-width: 100%; flex: 0 1 12rem; }
#reportsHeader.rpt-library-header .pgh-metarow { flex: 1 1 100%; min-width: 0; order: 4; }
#reportsHeader.rpt-library-header .pgh-metarow .pgh-meta { flex-basis: 10rem; }
#reportsHeader.rpt-library-header .pgh-nav { display: flex; flex-wrap: wrap; order: 3; min-width: 0; }
.rpt-library-filter { margin-top: var(--s-2); font-size: var(--t-sub); }
.rpt-library-filter > summary { display: list-item; min-height: var(--control-height-touch); width: fit-content; padding: var(--s-2) var(--s-3); box-sizing: border-box; align-content: center; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface-card); color: var(--navy); font: inherit; cursor: pointer; }
.rpt-library-filter > summary:hover { border-color: var(--navy); }
.rpt-library-filter > summary:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.rpt-library-filter > label { display: inline-grid; gap: var(--s-1); margin: var(--s-2) var(--s-2) 0 0; min-width: 0; width: min(100%, 20rem); vertical-align: bottom; }
.rpt-library-filter > label > select { min-width: 0; width: 100%; }
.reports-page #rptPanel { min-width: 0; }
.rpt-entry-meta, .rpt-entry-kind { display: block; margin-top: var(--s-1); color: var(--muted); font-size: var(--t-sub); font-weight: 400; line-height: 1.4; overflow-wrap: anywhere; }
.rpt-lrow > *, .rpt-tile strong { min-width: 0; overflow-wrap: anywhere; }
.rpt-workflow { min-width: 0; }
.rpt-workflow #reportsHeader { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-3) var(--s-4); padding-bottom: var(--s-3); border-bottom: 1px solid var(--line); }
.rpt-workflow #reportsHeader .pgh { display: contents; }
.rpt-workflow #reportsHeader .pgh-top { grid-column: 1; grid-row: 1; display: block; min-width: 0; }
.rpt-workflow #reportsHeader .pgh-titles { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--s-1) var(--s-3); min-width: 0; }
.rpt-workflow #reportsHeader .pgh-h { grid-column: 2; grid-row: 1; font-family: Inter, sans-serif; font-size: var(--t-title); line-height: 1.25; }
.rpt-workflow #reportsHeader .pgh-back { grid-column: 1; grid-row: 1; }
.rpt-workflow #reportsHeader .pgh-acts:empty { display: none; }
.rpt-workflow #reportsHeader .pgh-nav { grid-column: 1; grid-row: 2; grid-template-columns: minmax(12rem, 2fr) repeat(3, minmax(6rem, 1fr)) auto; }
.rpt-workflow #reportsHeader .pgh-navfield:has(#rptReport) { grid-column: auto; }
.rpt-workflow #reportsHeader .pgh-nav > :is(.pgh-navfield, #rptClearDates) { order: 0; }
#reportsHeader .pgh-nav > #rptFilters { justify-content: center; } /* fetch-1505: the door's words sit like Clear dates beside it */
@media (min-width: 1100px) { .rpt-workflow #reportsHeader .pgh-nav:has(#rptFilters) { grid-template-columns: minmax(12rem, 2fr) repeat(3, minmax(6rem, 1fr)) auto auto; } } /* fetch-1505: the Filters door takes the row's last column beside Clear dates, never a row of its own; under 1100px the nav flows as before (:has(#id) outranks those rules, hence the guard) */
.rpt-workflow #reportsHeader .pgh-scope { grid-column: 2; grid-row: 2; align-self: end; justify-self: stretch; min-width: 10rem; max-width: 14rem; }
.rpt-workflow #reportsHeader > .rpt-split { grid-column: 2; grid-row: 1; align-self: start; justify-self: end; }
@media (max-width: 1099px) {
  .rpt-workflow #reportsHeader .pgh-nav { grid-column: 1 / -1; grid-row: 3; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr)); }
  .rpt-workflow #reportsHeader .pgh-navfield:has(#rptReport) { grid-column: 1 / -1; }
  .rpt-workflow #reportsHeader .pgh-top { grid-column: 1 / -1; }
  .rpt-workflow #reportsHeader .pgh-scope { grid-column: 1; grid-row: 2; justify-self: start; width: min(100%, 14rem); }
  .rpt-workflow #reportsHeader > .rpt-split { grid-column: 2; grid-row: 2; }
}

.rpt-context-guide { display: flex; align-items: center; gap: var(--s-3); margin: var(--s-3) 0; }
.rpt-context-guide > form { flex: 1 1 auto; min-width: 0; }
.rpt-context-guide > form > label { display: block; margin-bottom: var(--s-1); font-size: var(--t-sub); font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.rpt-context-mascot { width: 4rem; height: 4.75rem; object-fit: contain; flex: 0 0 auto; }
.rpt-context-ask { display: flex; flex: 1 1 auto; align-items: end; flex-wrap: wrap; gap: var(--s-2); min-width: 0; }
.rpt-context-ask > label { flex: 1 1 100%; font-size: var(--t-sub); font-weight: 600; line-height: 1.4; }
.rpt-context-ask .rpt-guide-scope { flex: 1 1 100%; }
.rpt-view-tabs { display: flex; flex-wrap: wrap; overflow: visible; align-items: stretch; gap: var(--s-1) var(--s-5); margin: var(--s-3) 0 0; } /* fetch-1389: the grey rule is the shared .pgh-tabs inset shadow */
.rpt-view-tabs .pgh-tab { min-height: var(--control-height-touch); min-width: 0; padding: var(--s-2) var(--s-1); white-space: normal; text-align: left; }
.rpt-view-panel { min-width: 0; padding-block: var(--s-4); }
.rpt-view-panel > :first-child { margin-top: 0; }
.rpt-view-panel :is(h2, h3) { font-size: var(--t-section); color: var(--text-heading); margin: 0 0 var(--s-3); }
.rpt-view-panel p { line-height: 1.5; overflow-wrap: anywhere; }
.rpt-source-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: var(--s-5); align-items: start; }
.rpt-source-grid > * { min-width: 0; }
.rpt-source-grid dl { margin: 0; }
.rpt-source-grid .rpt-definition { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
.rpt-source-grid .rpt-definition > div { min-width: 0; }
.rpt-source-grid dt { margin-top: var(--s-3); font-size: var(--t-sub); color: var(--muted); }
.rpt-source-grid dt:first-child { margin-top: 0; }
.rpt-source-grid dd { margin: var(--s-1) 0 0; font-size: var(--t-body); line-height: 1.5; overflow-wrap: anywhere; }
.rpt-source-definition { display: grid; grid-template-columns: minmax(5rem, .35fr) minmax(0, 1fr); gap: var(--s-2) var(--s-3); }
.rpt-source-grid .rpt-source-definition :is(dt, dd) { margin: 0; }
.rpt-source-grid fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.rpt-source-grid > div > fieldset + fieldset { margin-top: var(--s-5); }
.rpt-source-grid legend { margin-bottom: var(--s-2); padding: 0; font-size: var(--t-body); font-weight: 600; color: var(--text-heading); }
.rpt-input-options { display: grid; align-items: start; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: var(--s-1) var(--s-3); }
.rpt-input-options > .btn { min-height: var(--control-height-touch); white-space: normal; align-self: start; }
.rpt-input-options > button:first-of-type { grid-column: 1; }
.rpt-input-options > p { grid-column: 1 / -1; margin: 0 0 var(--s-2); color: var(--muted); font-size: var(--t-sub); }
.rpt-input-options label { display: flex; align-items: center; gap: var(--s-2); min-height: var(--control-height-touch); min-width: 0; padding: var(--s-1) 0; box-sizing: border-box; font-size: var(--t-body); line-height: 1.4; cursor: pointer; overflow-wrap: anywhere; }
.rpt-input-options input[type=checkbox] { flex: 0 0 auto; width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--navy); }
.rpt-input-options label:has(input:disabled) { color: var(--muted); cursor: not-allowed; }
.rpt-view-summary { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2) var(--s-3); padding-block: var(--s-3); margin-block: var(--s-3); border-block: 1px solid var(--line); font-size: var(--t-sub); line-height: 1.5; overflow-wrap: anywhere; }
.rpt-view-summary > div { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.rpt-view-summary > :is(p, span) { flex: 1 1 10rem; margin: 0; }
.rpt-save-view { display: flex; align-items: end; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.rpt-save-view > label, .rpt-save-view > .field { display: grid; flex: 1 1 14rem; min-width: 0; max-width: 32rem; gap: var(--s-1); font-size: var(--t-sub); }
.rpt-save-view label > input { width: 100%; flex-basis: auto; }
.rpt-split { display: inline-flex; align-items: stretch; max-width: 100%; vertical-align: middle; }
.rpt-split > .btn { min-width: 0; min-height: var(--control-height-touch); border-top-right-radius: 0; border-bottom-right-radius: 0; white-space: normal; }
.rpt-split > .cmenu { flex: 0 0 auto; }
.rpt-split > .cmenu > .cmenu-trigger { height: 100%; min-width: var(--control-height-touch); min-height: var(--control-height-touch); margin-left: -1px; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.rpt-split :is(.btn, .cmenu-trigger):focus-visible { position: relative; z-index: 1; }
.rpt-insight-list { list-style: none; margin: 0; padding: 0; }
.rpt-insight-list > li { padding-block: var(--s-4); }
.rpt-insight-list > li + li { border-top: 1px solid var(--line); }
.rpt-insight-list > li:first-child { padding-top: 0; }
.rpt-insight-list :is(h3, h4) { margin: 0 0 var(--s-2); font-size: var(--t-body); line-height: 1.4; }
.rpt-insight-list p { margin: var(--s-1) 0; font-size: var(--t-body); }
.rpt-sources { min-width: 0; margin-block: var(--s-4); }
.rpt-sources > summary { min-height: var(--control-height-touch); padding-block: var(--s-2); box-sizing: border-box; align-content: center; color: var(--navy); font-size: var(--t-body); font-weight: 600; cursor: pointer; }
.rpt-sources .rpt-tbl-wrap { max-width: 100%; overflow: auto; }
.rpt-sources table { width: 100%; font-size: var(--t-sub); }
.rpt-sources :is(th, td) { overflow-wrap: anywhere; }
.rpt-guide :is(input, button):focus-visible, .rpt-workflow :is(input, button, summary):focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
@media (max-width: 640px) {
  .rpt-workflow #reportsHeader .pgh-titles { grid-template-columns: auto minmax(0, 1fr); }
  .rpt-workflow #reportsHeader .pgh-h { grid-column: 2; grid-row: 1; font-size: var(--t-section); }
  .rpt-workflow #reportsHeader .pgh-sub { display: none; }
  .rpt-workflow #reportsHeader .pgh-meta { grid-column: 1 / -1; grid-row: 2; }
  .rpt-workflow #reportsHeader .pgh-scope { min-width: 0; }
  .rpt-workflow #reportsHeader .pgh-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rpt-library-header { margin-bottom: var(--s-3); }
  .rpt-guide { display: block; padding: var(--s-2) 0 var(--s-3); }
  .rpt-guide-intro { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-2); }
  .rpt-guide-mascot { width: 4.5rem; height: 5.5rem; flex: 0 0 auto; }
  .rpt-guide-intro h2 { font-size: 1.65rem; margin-bottom: var(--s-1); }
  .rpt-guide-intro .rpt-guide-eyebrow { letter-spacing: .04em; }
  .rpt-guide-ask { flex-wrap: wrap; }
  .rpt-guide-ask input { flex-basis: 10rem; }
  .rpt-guide-ask > .btn { flex: 0 1 auto; padding-inline: var(--s-3); }
  .rpt-guide-examples, .rpt-guide-scope, .rpt-guide-links { margin-top: var(--s-2); }
  #reportsHeader.rpt-library-header .pgh-tabs { gap: var(--s-2); }
  #reportsHeader.rpt-library-header .pgh-tab { font-size: var(--t-sub); }
  #reportsHeader.rpt-library-header .pgh-top { margin-left: 0; }
  #reportsHeader.rpt-library-header .pgh-search { flex-basis: 10rem; }
  #reportsHeader.rpt-library-header .pgh-row > .sel { flex: 1 1 8rem; }
  #reportsHeader.rpt-library-header :is(input, select) { font-size: 1rem; }
  .rpt-tile :is(.rpt-entry-meta, .rpt-entry-kind) { display: block; }
  .rpt-context-guide { gap: var(--s-2); align-items: flex-start; }
  .rpt-context-mascot { width: 3rem; height: 3.5rem; }
  .rpt-context-ask { gap: var(--s-2); }
  .rpt-context-ask input { flex-basis: 10rem; width: auto; }
  .rpt-context-ask .btn { padding-inline: var(--s-3); }
  .rpt-view-tabs { gap: var(--s-1) var(--s-3); }
  .rpt-view-tabs .pgh-tab { font-size: var(--t-sub); }
  .rpt-source-grid { gap: var(--s-4); }
  .rpt-source-definition { display: block; }
  .rpt-source-grid .rpt-source-definition dt { margin-top: var(--s-3); }
  .rpt-source-grid .rpt-source-definition dd { margin-top: var(--s-1); }
  .rpt-input-options { grid-template-columns: minmax(0, 1fr); }
  .rpt-view-summary { gap: var(--s-2); }
  .rpt-save-view > label, .rpt-save-view > .field { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .reports-page .rpt-tile { transition: none; }
}
@media print {
  .rpt-workflow #reportsHeader { display: block; border: 0; padding: 0; }
  .rpt-workflow #reportsHeader :is(.pgh, .pgh-top, .pgh-titles) { display: block; margin: 0; padding: 0; border: 0; }
  .rpt-guide, .rpt-library-controls, .rpt-context-guide, .rpt-view-tabs, .rpt-save-view, .rpt-split, .rpt-view-summary :is(button, .cmenu), .rpt-source-grid fieldset { display: none !important; }
  .rpt-view-panel, .rpt-view-summary, .rpt-source-grid { display: block; padding: 0; }
  .rpt-view-summary { border: 0; margin-block: var(--s-2); }
  .rpt-sources > summary { min-height: 0; padding: 0; }
  .rpt-sources::details-content { display: block; content-visibility: visible; }
  .rpt-sources .rpt-tbl-wrap { max-height: none; overflow: visible; }
}
/* fetch-1323: Wiki ownership, intentional feedback and reviewed text imports. */
.wiki-care,.wiki-text-import,.wiki-review-row{margin-top:var(--s-4);padding-top:var(--s-4);border-top:1px solid var(--line)}
.wiki-care h3,.wiki-feedback-form h3{font-size:var(--t-section);margin:0 0 var(--s-3)}
.wiki-care summary,.wiki-text-import summary{cursor:pointer;font-weight:600;padding:var(--s-2) 0}
.wiki-care-fields{display:grid;grid-template-columns:2fr 1fr 1fr;gap:var(--s-3);margin:var(--s-3) 0}
.wiki-care label,.wiki-feedback-form label,.wiki-review-row label{display:grid;gap:var(--s-2);font-size:var(--t-sub);margin-bottom:var(--s-3)}
.wiki-feedback-actions{display:flex;gap:var(--s-2);align-items:center;flex-wrap:wrap;margin-top:var(--s-4)}
.wiki-feedback-actions>span{font-size:var(--t-sub);color:var(--muted)}
.wiki-feedback-form{margin-top:var(--s-3);padding:var(--s-4);border:1px solid var(--line);border-radius:var(--r-m);background:var(--wash)}
.wiki-feedback-form textarea,.wiki-review-row textarea{width:100%;min-height:6rem;resize:vertical;white-space:pre-wrap}
.wiki-review-row p{white-space:pre-wrap;overflow-wrap:anywhere}
.wiki-review-row .row{flex-wrap:wrap;gap:var(--s-2)}
.wiki-text-preview{max-height:20rem;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;padding:var(--s-3);background:var(--wash);border:1px solid var(--line);border-radius:var(--r-s)}
.wiki-text-import input[type=file]{max-width:100%}
@media(max-width:640px){.wiki-care-fields{grid-template-columns:1fr}.wiki-care .btn,.wiki-feedback-actions .btn,.wiki-feedback-form .btn,.wiki-review-row .btn,.wiki-text-import .btn{min-height:var(--control-height-touch)}.wiki-care .sel,.wiki-review-row .sel{width:100%;min-width:0}}
/* fetch-1326: Crystal's written search conversation. */
.cmd-box--crystal { display:flex; flex-direction:column; max-height:80dvh; }
.cmd-crystal-welcome { display:flex; align-items:center; gap:var(--s-3); padding:var(--s-4); }
.cmd-crystal-welcome img { width:4.5rem; height:5.25rem; object-fit:contain; flex:none; }
.cmd-crystal-welcome > div { flex:1; min-width:0; }
.cmd-crystal-welcome h2 { margin:0 0 var(--s-1); color:var(--navy); font-size:var(--t-section); }
.cmd-crystal-welcome p { margin:0; color:var(--muted); font-size:var(--t-sub); line-height:1.5; }
.cmd-box--crystal .btn { min-height:var(--control-height-touch); }
.cmd-crystal-scroll { overflow-y:auto; min-height:0; }
.cmd-box--crystal .cmd-list { max-height:none; overflow:visible; }
.cmd-result-text { flex:1; min-width:0; }
.cmd-crystal-ask { display:flex; align-items:center; gap:var(--s-3); padding:var(--s-3) var(--s-4); border-top:1px solid var(--line); }
.cmd-crystal-ask span { font-size:var(--t-sub); color:var(--muted); }
.cmd-crystal-answer { padding:var(--s-4); border-top:1px solid var(--line); font-size:var(--t-body); line-height:1.6; overflow-wrap:anywhere; }
.cmd-crystal-answer h3 { margin:0 0 var(--s-3); font-size:var(--t-body); }
.cmd-crystal-answer p { white-space:pre-wrap; margin:var(--s-2) 0; }
.cmd-crystal-sources { display:flex; flex-direction:column; align-items:flex-start; gap:var(--s-1); }
.cmd-crystal-sources button { min-height:var(--control-height-touch); text-align:left; }
@media(max-width:640px) { .cmd-backdrop:has(.cmd-box--crystal) { padding-top:var(--s-4); } .cmd-box--crystal { max-height:calc(100dvh - 2 * var(--s-4)); } .cmd-crystal-welcome { gap:var(--s-2); padding:var(--s-3); } .cmd-crystal-welcome img { width:3.5rem; height:4rem; } .cmd-crystal-welcome #cmdClose { padding-inline:var(--s-2); } .cmd-crystal-ask { flex-wrap:wrap; } }
.wiki-browse-tools [data-wikihome] { min-height: var(--control-height-touch); }
/* fetch-1341 (Jack, 2026-09-27): Training Videos - the library shelves, poster cards and the upload
   progress bar. Tokens only (the UI-debt ratchet). Phone-shot portrait video is the norm, so a card
   frame is 3:4 and the article player letterboxes a video instead of cropping it to a strip. */
.wiki-vid-page { display: flex; flex-direction: column; gap: var(--s-5); }
.wiki-vid-sh { display: flex; align-items: baseline; gap: var(--s-2); margin: 0 0 var(--s-3); font-size: var(--t-section); color: var(--text-heading); }
.wiki-vid-count { font-size: var(--t-sub); font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.wiki-vid-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: var(--s-4) var(--s-3); }
.wiki-vid { display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.wiki-vid-frame { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--brand-blue-deep); }
.wiki-vid-img, .wiki-vid-ph { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.wiki-vid-ph { background: linear-gradient(160deg, var(--brand-blue-traditional), var(--brand-blue-deep)); }
.wiki-vid-play { position: absolute; left: 50%; top: 50%; width: var(--control-height-touch); height: var(--control-height-touch); transform: translate(-50%, -50%); border-radius: 50%; background: color-mix(in srgb, var(--brand-blue-deep) 62%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--paper) 70%, transparent); }
.wiki-vid-play::after { content: ""; position: absolute; left: 55%; top: 50%; transform: translate(-50%, -50%); border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent var(--paper); }
.wiki-vid-time { position: absolute; right: var(--s-2); bottom: var(--s-2); padding: 1px var(--s-2); border-radius: var(--r-s); background: color-mix(in srgb, var(--brand-blue-deep) 80%, transparent); color: var(--paper); font-size: var(--t-label); font-weight: 700; font-variant-numeric: tabular-nums; }
.wiki-vid-none { position: absolute; left: var(--s-2); right: var(--s-2); top: 50%; transform: translateY(-50%); color: var(--paper); font-size: var(--t-sub); font-weight: 600; text-align: center; }
.wiki-vid-title { font-size: var(--t-body); font-weight: 700; line-height: 1.3; color: var(--text-heading); overflow-wrap: anywhere; }
.wiki-vid-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1); }
.wiki-vid-sec { font-size: var(--t-sub); color: var(--muted); }
.wiki-vid:hover .wiki-vid-frame { border-color: var(--navy); }
.wiki-vid:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; border-radius: var(--r-m); }
.wiki-upbar { flex: 1 1 10rem; max-width: 20rem; height: var(--s-2); accent-color: var(--brand-blue-traditional); }
/* A floor plan or a portrait video must show whole: the fetch-641 "cover" crop cut the Roof's evacuation maps to a 320px strip. */
.wiki-media img, .wiki-media video { object-fit: contain; max-height: min(70vh, 40rem); }
.wiki-media img { background: var(--paper); }
.wiki-media video { background: var(--brand-blue-deep); }
@media (max-width: 640px) { .wiki-vid-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* fetch-1384: Client Kudos - the client-review library (Team > Feedback > Client reviews) and its filing dialog.
   Rows are hairline rows inside the one list card, like the praise wall; the quote clamps to four lines until opened. */
.ckr-row { display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-3) 0; border-top: 1px solid var(--line); }
.ckr-main { flex: 1; min-width: 0; }
.ckr-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1); font-size: var(--t-sub); }
.ckr-stars { color: var(--gold-dark); letter-spacing: .05em; }
.ckr-quote { margin: var(--s-2) 0 0; padding: 0 0 0 var(--s-3); border-left: 2px solid var(--gold); font-size: var(--t-body); line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.ckr-quote--clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.ckr-more { margin-top: var(--s-1); }
.ckr-where { margin-top: var(--s-2); font-size: var(--t-sub); color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.ckr-tags { display: flex; flex-wrap: wrap; gap: var(--s-1); margin-top: var(--s-2); }
.ckr-tag { font-size: var(--t-sub); padding: 2px var(--s-2); border: 1px solid var(--line); border-radius: var(--r-l); background: var(--wash); }
.ckr-note { margin-top: var(--s-2); font-size: var(--t-sub); color: var(--ok-fg); }
.ckr-dialog { box-sizing: border-box; width: calc(100% - var(--s-5)); max-width: 44rem; border: 1px solid var(--line); color: var(--ink); padding: 0; }
.ckr-dialog::backdrop { background: color-mix(in srgb, var(--navy-dark) 50%, transparent); }
.ckr-dhead { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface-card); z-index: 1; }
.ckr-dhead h2 { margin: 0; font-size: var(--t-section); }
#ckrBody { padding: var(--s-3) var(--s-4); }
.ckr-dfoot { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: var(--s-2); padding: var(--s-3) var(--s-4); border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--surface-card); }
.ckr-err { flex: 1 1 12rem; font-size: var(--t-sub); color: var(--bad-fg); }
.ckr-err:empty { display: none; }
.ckr-form { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.ckr-field { display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; }
.ckr-field > span { font-size: var(--t-sub); font-weight: 600; }
.ckr-full { grid-column: 1 / -1; }
.ckr-field textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: var(--t-body); line-height: 1.5; padding: var(--s-2); border: 1px solid var(--line); border-radius: var(--r-s); resize: vertical; }
.ckr-starrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1); }
.ckr-star { width: var(--control-height-touch); height: var(--control-height-touch); border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface-card); color: var(--gold-dark); font-size: var(--t-title); line-height: 1; cursor: pointer; }
.ckr-star[aria-pressed="true"] { background: var(--wash); border-color: var(--gold); }
.ckr-results, .ckr-crew, .ckr-venues { display: flex; flex-wrap: wrap; gap: var(--s-1); }
.ckr-results:empty { display: none; }
.ckr-result { display: flex; flex-direction: column; align-items: flex-start; min-height: var(--control-height-touch); padding: var(--s-1) var(--s-2); border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface-card); font: inherit; font-size: var(--t-sub); text-align: left; cursor: pointer; max-width: 100%; }
.ckr-person { display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: var(--control-height-touch); padding: var(--s-1) var(--s-3); border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface-card); font: inherit; font-size: var(--t-sub); cursor: pointer; text-align: left; }
.ckr-person small { color: var(--muted); font-size: var(--t-label); }
.ckr-person[aria-pressed="true"] { border-color: var(--gold); background: var(--wash); font-weight: 600; }
.ckr-vpick { min-height: var(--control-height-touch); padding: 0 var(--s-2); border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface-card); cursor: pointer; }
.ckr-vpick[aria-pressed="true"] { border-color: var(--gold); background: var(--wash); }
.ckr-picked { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2); border: 1px solid var(--line); border-radius: var(--r-s); background: var(--wash); }
.ckr-picked-main { flex: 1; min-width: 0; }
.ckr-check { display: flex; align-items: center; gap: var(--s-2); min-height: var(--control-height-touch); font-size: var(--t-body); }
.ckr-check input { width: 20px; height: 20px; }
/* fetch-1537: the emails waiting from reviews@ sit above the library - a small-caps label and a hairline, no band */
.ckr-inbox { margin-bottom: var(--s-3); padding-bottom: var(--s-2); border-bottom: 1px solid var(--line); }
.ckr-inbox-h { margin: 0 0 var(--s-1); font-size: var(--t-label); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ckr-inbox-list .ckr-mail:first-child { border-top: 0; }
.ckr-mail { align-items: center; }
.ckr-mail > .btn { flex-shrink: 0; min-height: var(--control-height-touch); }
.ckr-mailsnip { margin: var(--s-1) 0 0; font-size: var(--t-sub); color: var(--ink); overflow-wrap: anywhere; }
.ckr-mailsrc { border: 1px solid var(--line); border-radius: var(--r-s); background: var(--wash); }
.ckr-mailsrc > summary { min-height: var(--control-height-touch); display: flex; align-items: center; padding: 0 var(--s-2); cursor: pointer; font-size: var(--t-sub); font-weight: 600; }
.ckr-mailsubj { padding: 0 var(--s-2); font-size: var(--t-sub); font-weight: 600; }
.ckr-mailtext { max-height: 16rem; overflow: auto; padding: var(--s-2); font-size: var(--t-sub); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.ckr-sugg { margin-bottom: var(--s-1); }
.ckr-person small.ckr-named { color: var(--ink); font-weight: 600; }
@media (max-width: 640px) {
  .ckr-form { grid-template-columns: 1fr; }
  .ckr-dialog { width: 100%; max-width: none; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; }
  .ckr-row .cmenu { flex-shrink: 0; }
}

/* fetch-1384 fold-in: the Feedback page at full width - the praise wall is a grid of cards (was a 1,100px column of rows,
   each with a bare trash can); a row's actions sit behind a quiet menu trigger that only shows its frame on hover or focus. */
.fbp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(20rem, 100%), 1fr)); gap: var(--s-3); }
.fbp-card { display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface-card); }
.fbp-head { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-1); min-width: 0; }
.fbp-head .cmenu { margin-left: auto; }
.fbp-name { font-size: var(--t-body); overflow-wrap: anywhere; }
.fbp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1); font-size: var(--t-sub); color: var(--muted); }
.fbp-why { margin: 0; font-size: var(--t-body); line-height: 1.45; overflow-wrap: anywhere; }
.ckr-list .ckr-row:first-child { border-top: 0; padding-top: 0; }
.fbp-head .cmenu-trigger, .ckr-row .cmenu-trigger, [data-cmenu^="fbrow-"] .cmenu-trigger, [data-cmenu^="eomrow-"] .cmenu-trigger { border-color: transparent; background: transparent; }
.fbp-head .cmenu-trigger:hover, .ckr-row .cmenu-trigger:hover, [data-cmenu^="fbrow-"] .cmenu-trigger:hover, [data-cmenu^="eomrow-"] .cmenu-trigger:hover,
.fbp-head .cmenu-trigger:focus-visible, .ckr-row .cmenu-trigger:focus-visible, [data-cmenu^="fbrow-"] .cmenu-trigger:focus-visible, [data-cmenu^="eomrow-"] .cmenu-trigger:focus-visible { border-color: var(--line); background: var(--surface-card); }
.fb-header .pgh-scope-choices:empty { display: none; }
.fb-header .pgh-navfield select { min-width: 12rem; }
.fbp-del { margin-left: auto; }
@media (min-width: 700px) {
  /* fetch-1384: the venue dropdown and the search share one row; the month sits inline with its label */
  .fb-header { display: grid; grid-template-columns: minmax(12rem, 20rem) minmax(0, 1fr); column-gap: var(--s-3); }
  .fb-header > * { grid-column: 1 / -1; }
  .fb-header > .pgh-scope { grid-column: 1; align-self: center; margin-top: var(--s-3); }
  .fb-header > .pgh-scope + .pgh-row { grid-column: 2; margin-top: var(--s-3); }
  .fb-header .pgh-navfield { display: inline-flex; flex-direction: row; align-items: center; gap: var(--s-2); }
}
.fbp-dialog { max-width: 34rem; }
/* fetch-1414: the Time off calendar (time-off-calendar.js) - HR's vacation and request-off calendar as a month of
   who is out. A chip's colour is the person's ROSTER department (identity, not status), drawn from tokens the
   palette already has; the day's list says the department in words, so colour never carries it alone. */
.toc { margin-top: var(--s-3); }
/* fetch-1502 (Jacki: "the header could be a little more organized"): ONE BAND. The title and what is shown, Calendar |
   Balances, the month or the year, the department or the search, and the action share one line from 1180px, and two
   below it (the controls under the title). A grid, with .pgh-top as display: contents so its title and actions are the
   grid's own items (the Readiness header's way). A list's label sits inside its field, as #reportsHeader's do: still
   visible, with no row of its own - the floating "Month" and "Department" labels were most of the old header's height. */
.toc-header.pgh { display: grid; align-items: center; gap: var(--s-2) var(--s-3); }
.toc-header.pgh > .pgh-top { display: contents; }
.toc-header.pgh .pgh-titles { grid-area: t; min-width: 0; }
.toc-header.pgh .pgh-acts { grid-area: a; justify-self: end; }
.toc-header.pgh > .pgh-row, .toc-header.pgh > .pgh-nav { margin: 0; min-width: 0; }
.toc-header.pgh > .pgh-row:has(.pgh-seg) { grid-area: s; }
.toc-header.pgh > .pgh-nav { grid-area: n; justify-self: end; display: grid; align-items: center; gap: var(--s-1); }
.toc-header.pgh > .pgh-row:has(.pgh-search) { grid-area: q; }
.toc-header--calendar.pgh { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "t t a" "s n n"; }
.toc-header--calendar.pgh > .pgh-nav { grid-template-columns: var(--control-height-touch) minmax(9.5rem, 11rem) var(--control-height-touch) minmax(9.5rem, 11rem); }
.toc-header--calendar.pgh .pgh-navfield:has(#tocDept) { margin-left: var(--s-2); }
.toc-header--balances.pgh { grid-template-columns: auto auto minmax(0, 1fr) auto; grid-template-areas: "t t t a" "s n q q"; }
.toc-header--balances.pgh > .pgh-nav { grid-template-columns: minmax(6.5rem, 8rem); }
.toc-header.pgh .pgh-navfield { position: relative; display: block; min-width: 0; }
.toc-header.pgh .pgh-navfield > span { position: absolute; top: var(--s-1); left: var(--s-2); font-size: var(--t-sub); font-weight: 600; line-height: 1; color: var(--muted); pointer-events: none; }
.toc-header.pgh .pgh-navfield select { min-height: var(--control-height-touch); height: auto; padding: calc(1em + var(--s-2)) var(--s-5) var(--s-1) var(--s-2); font-size: var(--t-sub); line-height: 1.3; }
.toc-header.pgh .pgh-search { padding-block: 0; }
.toc-header.pgh .pgh-search input { min-height: var(--control-height-touch); }
@media (min-width: 1180px) {
  .toc-header--calendar.pgh { grid-template-columns: minmax(0, 1fr) auto auto auto; grid-template-areas: "t s n a"; }
  .toc-header--balances.pgh { grid-template-columns: minmax(0, 1fr) auto auto minmax(12rem, 18rem) auto; grid-template-areas: "t s n q a"; }
}
.toc-legend { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-2); margin-top: var(--s-2); }
.toc-chip { --dc: var(--muted); display: flex; align-items: baseline; gap: var(--s-1); min-width: 0; padding: 1px var(--s-1) 1px var(--s-2); border-left: 3px solid var(--dc); border-radius: 0 var(--r-s) var(--r-s) 0; background: color-mix(in srgb, var(--dc) 13%, var(--paper)); color: var(--ink); font-size: var(--t-label); line-height: 1.45; text-align: left; }
.toc-legend .toc-chip { display: inline-flex; }
.toc-chip[data-dept="Sales"] { --dc: var(--pipe-blue); }
.toc-chip[data-dept="Operations"] { --dc: var(--ok-fg); }
.toc-chip[data-dept="Culinary"] { --dc: var(--pipe-orange); }
.toc-chip[data-dept="Finance"] { --dc: var(--pipe-purple); }
.toc-chip[data-dept="HR"] { --dc: var(--gold-dark); }
.toc-chip--req { background: var(--mute-bg); color: var(--mute-fg); }
.toc-chip-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toc-chip-t { flex: none; font-weight: 600; color: var(--mute-fg); }
.toc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--s-1); }
.toc-dow { padding: 0 var(--s-1); font-size: var(--t-sub); font-weight: 600; color: var(--muted); }
.toc-day { appearance: none; box-sizing: border-box; display: flex; flex-direction: column; align-items: stretch; gap: 2px; min-width: 0; min-height: 5.25rem; padding: var(--s-1); border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface-card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.toc-day.is-weekend { background: var(--wash); }
.toc-day:hover { border-color: var(--rule); }
.toc-day:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.toc-day-top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-1); font-size: var(--t-sub); }
.toc-dn { font-weight: 600; font-variant-numeric: tabular-nums; }
.toc-dn small { font-size: var(--t-label); font-weight: 400; color: var(--muted); }
.toc-day.is-today .toc-dn { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.toc-out, .toc-more { font-size: var(--t-label); color: var(--muted); font-variant-numeric: tabular-nums; }
.toc-ban { display: block; box-sizing: border-box; padding: 1px var(--s-2); border-radius: var(--r-s); font-size: var(--t-label); line-height: 1.45; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toc-ban--holiday { background: var(--info-bg); color: var(--info-fg); }
.toc-ban--blackout { background: var(--warn-bg); color: var(--warn-fg); }
.toc-ban--btn { appearance: none; width: 100%; min-height: var(--control-height-sm); margin-bottom: var(--s-2); border: 0; font: inherit; font-size: var(--t-sub); cursor: pointer; }
.toc-ban--btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.toc-aday { box-sizing: border-box; min-width: 0; padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface-card); }
.toc-panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-1) var(--s-2); margin-bottom: var(--s-2); }
.toc-panel-head h3 { margin: 0; font-size: var(--t-section); }
.toc-panel-head h3:focus { outline: none; }
.toc-sub { font-size: var(--t-sub); font-weight: 400; color: var(--muted); }
.toc-rows { display: flex; flex-direction: column; }
.toc-row { display: flex; align-items: center; gap: var(--s-2); min-width: 0; padding: var(--s-2) 0; border-top: 1px solid var(--hair); }
.toc-row > .toc-chip { flex: none; }
.toc-row-main { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.toc-nm { font-size: var(--t-body); font-weight: 600; overflow-wrap: anywhere; }
.toc-row-main .toc-sub { overflow-wrap: anywhere; }
.toc-note { margin: var(--s-1) 0 0; font-size: var(--t-sub); color: var(--ok-fg); }
.toc-note--bad { color: var(--bad-fg); }
.toc-add-on { width: 100%; margin-top: var(--s-3); }
.toc-edit { flex: 1 1 auto; display: grid; grid-template-columns: minmax(0, 1fr) 6rem; gap: var(--s-2); min-width: 0; }
.toc-edit > .toc-nm, .toc-edit-f--wide, .toc-edit-acts, .toc-err { grid-column: 1 / -1; }
.toc-edit-f { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.toc-edit-f label { font-size: var(--t-sub); font-weight: 600; }
.toc-edit-f .sel, .toc-form .sel { box-sizing: border-box; width: 100%; }
.toc-edit-acts { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.toc-remove { margin-left: auto; color: var(--bad-fg); }
.toc-err { font-size: var(--t-sub); color: var(--bad-fg); }
.toc-err:empty { display: none; }
.toc-dialog { max-width: 36rem; }
.toc-dbody { padding: var(--s-3) var(--s-4); }
/* fetch-1502: the day, as a dialog - what the box beside the month held, opened on a click of the day */
.toc-dayview { max-width: 34rem; }
.toc-dayview-h { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.toc-dayview-h h2 { margin: 0; font-size: var(--t-section); }
.toc-dayview-h h2:focus { outline: none; }
.toc-dayview .toc-rows > .toc-row:first-child { border-top: 0; }
.toc-row--hit { margin-inline: calc(var(--s-2) * -1); padding-inline: var(--s-2); border-radius: var(--r-s); background: var(--wash); box-shadow: inset 3px 0 0 var(--gold); }
.toc-form p.toc-hint--warn { color: var(--warn-fg); }
.toc-uncounted { margin: 0 0 var(--s-3); border-left-color: var(--warn-fg); background: var(--warn-bg); color: var(--ink); font-size: var(--t-sub); }
.toc-uncounted-main { min-width: 0; }
.toc-uncounted-list { display: grid; gap: var(--s-1); margin: var(--s-2) 0 0; padding: 0; list-style: none; }
.toc-uncounted-list li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); }
.toa-intro--solo { margin-bottom: var(--s-3); }
.toa-said { display: block; margin-top: var(--s-1); font-size: var(--t-sub); font-weight: 400; color: var(--ok-fg); }
.toc-form { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.toc-form .field { min-width: 0; margin: 0; }
.toc-form-wide { grid-column: 1 / -1; }
.toc-form p.toc-sub { margin: 0; }
.toc-check { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); min-height: var(--control-height-touch); font-size: var(--t-body); }
.toc-agenda { display: flex; flex-direction: column; gap: var(--s-2); }
.toc-aday.is-today { border-color: var(--rule); }
@media (max-width: 640px) {
  .toc-header--calendar.pgh { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t a" "s s" "n n"; }
  .toc-header--calendar.pgh > .pgh-nav { justify-self: stretch; grid-template-columns: var(--control-height-touch) minmax(0, 1fr) var(--control-height-touch); }
  .toc-header--calendar.pgh .pgh-navfield:has(#tocDept) { grid-column: 1 / -1; margin-left: 0; }
  .toc-header--balances.pgh { grid-template-columns: minmax(6.5rem, 7.5rem) minmax(0, 1fr) auto; grid-template-areas: "t t a" "s s s" "n q q"; }
  .toc-header--balances.pgh > .pgh-nav { justify-self: stretch; grid-template-columns: minmax(0, 1fr); }
  .toc-header.pgh .pgh-seg { display: flex; width: 100%; box-sizing: border-box; overflow: visible; mask-image: none; -webkit-mask-image: none; }
  .toc-header.pgh .pgh-seg button { flex: 1 1 0; }
  .toc-header.pgh .pgh-navfield select { font-size: max(var(--t-sub), 1rem); }
  .toc-legend { display: none; }
  .toc-form { grid-template-columns: 1fr; }
  .toc-ban--btn { min-height: var(--control-height-touch); }
  .toc-edit-acts .btn { min-height: var(--control-height-touch); }
}

/* fetch-1469 (Amanda's 10-02 note rows 24-30; Jack's rulings 48-51): THE PROPOSAL'S COVER PAGE. The venue's mark and the brand name
   centered at the top, the headline over the event name, the venue photos, the salesperson's contact and the footer; the estimate starts
   page 2 with the event's facts under its heading; the menu photos take the last page alone. The old masthead rules above (.pdoc-head,
   .pdoc-doc-label, .pdoc-brand) stay for the contract's letterhead and for client-portal snapshots published before this ticket. */
.pdoc-cover { padding-bottom: var(--s-5); margin-bottom: var(--s-5); border-bottom: 1px solid var(--line); }
.pdoc-cover-brand { text-align: center; padding-bottom: var(--s-4); border-bottom: 1px solid var(--gold); }
.pdoc-cover-brand .pdoc-mark { width: 15rem; max-width: 70%; max-height: 5rem; margin: 0 auto; object-position: center; }
.pdoc-cover-brand .pdoc-mark-text { text-align: center; }
.pdoc-cover-head { text-align: center; padding: var(--s-5) 0; }
.pdoc-cover-head .pdoc-eyebrow { margin: 0 0 var(--s-2); font-size: var(--t-body); letter-spacing: .04em; }
.pdoc-cover .pdoc-venue { margin: 0 0 var(--s-5); }
.pdoc-cover .pdoc-next { margin-top: 0; text-align: center; }
.pdoc-cover .pdoc-contact { justify-items: center; }
.pdoc-cover .pdoc-conf { margin-top: var(--s-4); }
.pdoc-estimate .pdoc-event { padding: 0 0 var(--s-4); margin-bottom: var(--s-4); }
.pdoc-estimate .pdoc-facts { margin-top: 0; }
.pdoc-menu-photos { margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--gold); }
.pdoc-menu-photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.pdoc-menu-photo { min-width: 0; break-inside: avoid; }
.pdoc-menu-photo .pdoc-photo-frame { width: 100%; }
.pdoc-menu-photo .pdoc-photo { width: 100%; max-height: none; aspect-ratio: 4 / 3; object-fit: cover; }
.pdoc-menu-photo-name { margin: var(--s-2) 0 0; font-weight: 600; color: var(--navy-dark); font-size: var(--t-sub); }
@media (max-width: 440px) { .pdoc-menu-photo-grid { grid-template-columns: 1fr; } }
@media print {
  .pdoc-cover { break-after: page; margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
  .pdoc-estimate { break-before: page; margin-top: 0; }
  .pdoc-menu-photos { break-before: page; margin-top: 0; padding-top: 0; border-top: 0; }
  .pdoc-cover-brand { padding-bottom: var(--s-3); }
  .pdoc-cover-brand .pdoc-mark { max-height: 4rem; }
  .pdoc-cover-head { padding: var(--s-3) 0; }
  .pdoc-cover-head .pdoc-title { font-size: 2rem; } /* a three-line title still leaves a three-photo cover on one page */
  .pdoc-cover .pdoc-venue { margin-bottom: var(--s-4); }
  .pdoc-cover .pdoc-venue .pdoc-photo { max-height: none; }
  .pdoc-venue--3 .pdoc-venue-item:last-child .pdoc-photo { aspect-ratio: 3 / 1; }
  .pdoc-venue--5 .pdoc-venue-grid, .pdoc-venue--6 .pdoc-venue-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pdoc-venue--5 .pdoc-venue-item:last-child:nth-child(odd) { grid-column: auto; }
  .pdoc-venue--5 .pdoc-photo, .pdoc-venue--6 .pdoc-photo { aspect-ratio: 4 / 3; }
  .pdoc-menu-photo .pdoc-photo { max-height: none; }
}
/* fetch-1469 (Amanda's row 24): the builder's price boxes carry a dollar sign */
.pp-money { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.pp-money-sign { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
/* fetch-1469 (Jack 10-05): a one-tap mail / call icon button beside the inquiry record's Email and Phone fields */
.pdx-edit .inq-field-act { display: flex; align-items: center; gap: var(--s-1); }
.pdx-edit .inq-field-act input { flex: 1 1 auto; min-width: 0; }
.pdx-edit .inq-field-act .btn.icon-btn { flex: none; }
/* fetch-1471: Open Dates by Weekday - the reading (the summary matrix, List by weekday, Grid by month), its phone transform
   (a date becomes one line with its open venues; a venue's month becomes weekday lines) and its print rules (Letter, a month
   never splits). Tokens only; the month label is a small-caps label over a hairline, never a band (rule 13). */
.rpt-od .card { padding: var(--s-4) var(--s-5); margin-bottom: var(--s-3); }
.rpt-od h2 { font-size: var(--t-section); color: var(--navy-dark); margin: 0 0 var(--s-1); }
.rpt-od-summary p { margin: 0 0 var(--s-3); color: var(--muted); font-size: var(--t-sub); line-height: 1.5; }
.rpt-od table { border-collapse: collapse; width: 100%; }
.rpt-od th, .rpt-od td { text-align: left; padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--hair); font-variant-numeric: tabular-nums; vertical-align: top; font-size: var(--t-body); }
.rpt-od thead th { font-size: var(--t-label); letter-spacing: .4px; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
.rpt-od-scroll { overflow-x: auto; }
.rpt-od-matrix td strong, .rpt-od-counts strong, .rpt-od-days { color: var(--navy-dark); font-weight: 650; }
.rpt-od-wds { display: none; }
.rpt-od-head { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); align-items: baseline; margin-bottom: var(--s-2); }
.rpt-od-counts { color: var(--muted); font-size: var(--t-sub); display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-3); }
.rpt-od-tbl th[scope="row"] { font-weight: 600; white-space: nowrap; color: var(--navy-dark); }
.rpt-od-month th { padding: var(--s-3) var(--s-3) var(--s-1); font-size: var(--t-label); letter-spacing: .5px; text-transform: uppercase; color: var(--gold-dark); border-bottom: 1px solid var(--line); font-weight: 700; }
.rpt-od-cell--held { color: var(--muted); font-size: var(--t-sub); }
.rpt-od-block h2 small { font-weight: 500; color: var(--muted); font-size: var(--t-sub); margin-left: var(--s-2); }
.rpt-od-grid td { min-width: 5.5em; }
.rpt-od-of { display: block; font-size: var(--t-label); color: var(--muted); margin-top: 2px; }
.rpt-od-grid td.rpt-od-none .rpt-od-days { color: var(--muted); font-weight: 400; }
.rpt-od-grid .rpt-od-wdl { display: none; }
.rpt-od-grid .rpt-od-wds { display: inline; }
.rpt-od-empty { color: var(--muted); font-size: var(--t-sub); margin: 0; }
@media screen and (max-width: 700px) { /* screen only: a Letter page less its margins is 700.8px wide and A4 is narrower, so paper must never take the phone layout */
  .rpt-od-matrix .rpt-od-wdl { display: none; }
  .rpt-od-matrix .rpt-od-wds { display: inline; }
  .rpt-od-matrix th, .rpt-od-matrix td { padding: var(--s-2) var(--s-1); font-size: var(--t-sub); }
  .rpt-od-matrix td strong { display: block; }
  .rpt-od-matrix td .muted { font-size: var(--t-label); }
  .rpt-od-tbl thead { display: none; }
  .rpt-od-tbl, .rpt-od-tbl tbody, .rpt-od-tbl tr, .rpt-od-tbl th, .rpt-od-tbl td { display: block; padding: 0; border: 0; }
  .rpt-od-tbl tr.rpt-od-row { display: grid; grid-template-columns: 6.5em minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-1) var(--s-2); align-items: center; padding: var(--s-2) 0; border-bottom: 1px solid var(--hair); min-height: var(--control-height-touch); } /* the date, then the open venues two to a line; a held venue is simply absent */
  .rpt-od-tbl tr.rpt-od-row th { grid-row: 1 / span 2; }
  .rpt-od-tbl td.rpt-od-cell--held { display: none; }
  .rpt-od-tbl tr.rpt-od-row--held::after { content: "Held at every venue"; grid-column: 2 / -1; color: var(--muted); font-size: var(--t-sub); } /* rule 15: a date drawn under "Open Thursdays" with nothing open says so */
  .rpt-od-month th { display: block; padding: var(--s-3) 0 var(--s-1); }
  .rpt-od-grid thead { display: none; }
  .rpt-od-grid, .rpt-od-grid tbody, .rpt-od-grid tr, .rpt-od-grid th, .rpt-od-grid td { display: block; padding: 0; border: 0; min-width: 0; }
  .rpt-od-grid tr { padding: var(--s-2) 0; border-bottom: 1px solid var(--hair); }
  .rpt-od-grid th[scope="row"] { margin-bottom: var(--s-1); }
  .rpt-od-grid td { display: grid; grid-template-columns: 3.2em 1fr auto; gap: 0 var(--s-2); align-items: baseline; padding: 2px 0; }
  .rpt-od-grid td::before { content: attr(data-wd); font-size: var(--t-label); letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
  .rpt-od-of { margin: 0; }
}
@page rptOpenDates { size: letter; margin: 0.6in; }
@media print {
  body:has(.rpt-od-page) { page: rptOpenDates; } /* on the body, as the proposal's is: a named page on the report alone starts it on a fresh sheet after a blank one */
  .rpt-od-page .rpt-view-summary { display: none !important; } /* the header's own print rule already hides the view toggle */
  .rpt-od .card { border: 0; padding: 0; margin-bottom: var(--s-4); box-shadow: none; }
  .rpt-od-tbl th, .rpt-od-tbl td { padding: 2px var(--s-2); }
  .rpt-od-month th { padding-top: var(--s-2); }
  .rpt-od-summary, .rpt-od-block, tbody.rpt-od-mgroup { break-inside: avoid; }
  .rpt-od-day { margin-top: var(--s-5); }
  .rpt-od thead { display: table-header-group; }
  .rpt-od .vchip { border: 0; background: none; padding: 0; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
/* fetch-1477 (Miranda's 10-06 note; Jack picked the meeting packet): Event Recaps by Venue - one section per venue, each held event with every
   department's recap under it, a department that filed nothing named beside the Home card's door to file it. Print is Letter, one venue per page,
   a department's recap never splits. Tokens only; the venue is the calendar's chip (rule 5), the department a Crystal glyph (rule 1). */
.rpt-rp .card { padding: var(--s-4) var(--s-5); margin-bottom: var(--s-3); }
.rpt-rp-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-1) var(--s-4); margin-bottom: var(--s-2); }
.rpt-rp-head h2 { font-size: var(--t-section); color: var(--navy-dark); margin: 0; }
.rpt-rp-base { margin: 0; color: var(--muted); font-size: var(--t-sub); }
.rpt-rp-event { padding: var(--s-3) 0 var(--s-2); border-top: 1px solid var(--hair); }
.rpt-rp-eh { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-1) var(--s-3); margin: 0; font-size: var(--t-body); font-weight: 700; color: var(--text-heading); line-height: 1.5; }
.rpt-rp-title { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-align: left; overflow-wrap: anywhere; }
button.rpt-rp-title { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
button.rpt-rp-title:hover, button.rpt-rp-title:focus-visible { color: var(--navy-dark); text-decoration-style: solid; }
.rpt-rp-meta { font-weight: 500; color: var(--muted); font-size: var(--t-sub); }
.rpt-rp-dept { margin-top: var(--s-3); padding-left: var(--s-4); border-left: 2px solid var(--hair); max-width: 85ch; }
.rpt-rp-dh { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); margin: 0; font-size: var(--t-sub); font-weight: 600; letter-spacing: .3px; text-transform: uppercase; color: var(--text-heading); }
.rpt-rp-dh .ci { color: var(--muted); flex: none; }
.rpt-rp-who, .rpt-rp-tone { font-weight: 500; letter-spacing: 0; text-transform: none; }
.rpt-rp-who { color: var(--muted); }
.rpt-rp-tone { font-weight: 600; }
.rpt-rp-tone.recap-tone--bad { color: var(--bad-fg); }
.rpt-rp-tone.recap-tone--warn { color: var(--warn-fg); }
.rpt-rp-tone.recap-tone--ok { color: var(--ok-fg); }
.rpt-rp-f { margin-top: var(--s-2); }
.rpt-rp-f h5 { font: inherit; font-size: var(--t-sub); font-weight: 600; color: var(--text-heading); margin: 0 0 2px; }
.rpt-rp-f > div { white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--t-body); line-height: 1.55; }
.rpt-rp-praise { padding-top: var(--s-2); border-top: 1px solid var(--rule-soft); }
.rpt-rp-clean { margin: var(--s-2) 0 0; color: var(--muted); font-size: var(--t-sub); }
.rpt-rp-none { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); margin: var(--s-2) 0 0; color: var(--muted); font-size: var(--t-sub); }
.rpt-rp-empty { margin: 0; }
@media screen and (max-width: 700px) { /* field mode: the title stays a 44px target, the recap keeps its left rule */
  .rpt-rp .card { padding: var(--s-3) var(--s-3); }
  button.rpt-rp-title { display: inline-flex; align-items: center; min-height: var(--control-height-touch); }
  .rpt-rp-dept { padding-left: var(--s-3); }
}
@page rptRecapPacket { size: letter; margin: 0.6in; }
@media print {
  body:has(.rpt-rp-page) { page: rptRecapPacket; } /* on the body, as the proposal's and Open Dates' are: a named page on the report alone starts it on a fresh sheet after a blank one */
  .rpt-rp .card { border: 0; padding: 0; margin: 0 0 var(--s-4); box-shadow: none; }
  .rpt-rp-venue + .rpt-rp-venue { break-before: page; } /* Jack 10-06: one venue per page */
  .rpt-rp-head { break-after: avoid; }
  .rpt-rp-eh { break-after: avoid; }
  .rpt-rp-dept, .rpt-rp-none { break-inside: avoid; }
  .rpt-rp-file { display: none !important; } /* a door is for the screen */
  button.rpt-rp-title { text-decoration: none; }
  .rpt-rp .vchip { border: 0; background: none; padding: 0; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
/* fetch-1472 (Amanda's row 31; Jack's ruling 52, reading B 10-06): the Headings & fonts section of Proposal rules - one table, every heading a row
   with its words and its own type. The previews wear the document's own type for each kind of heading (the stylesheet's defaults), so the
   draft's font - drawn by the section's one generated <style> - reads over them. The document itself carries its set the same way
   (.pdoc--fonts + <style class="pdoc-fonts">, one rule per .pdoc-h--<key>): no inline style anywhere. */
.prh { margin-top: var(--s-3); }
.prh .prh-state { margin: 0 0 var(--s-2); }
.prh .prh-tbl { min-width: 58rem; }
.prh .prh-ff { min-width: 8.5rem; }
.prh .prh-fs { max-width: 5rem; }
.prh .prh-tbl .pr-w-name input { min-width: 9rem; }
.prh .prh-tbl select { min-width: 0; }
.prh-cell { max-width: 15rem; overflow-wrap: anywhere; }
.prh-prev { display: inline-block; max-width: 100%; color: var(--navy-dark); line-height: 1.3; }
.prh-prev--title { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; font-size: var(--t-title); }
.prh-prev--headline { font-family: Inter, Arial, sans-serif; font-size: var(--t-body); letter-spacing: .04em; }
.prh-prev--section { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; font-size: var(--t-section); }
.prh-prev--sub { font-family: Inter, Arial, sans-serif; font-weight: 600; font-size: var(--t-sub); text-transform: uppercase; letter-spacing: .09em; color: var(--navy); }
.prh-prev--label { font-family: Inter, Arial, sans-serif; font-size: var(--t-sub); color: var(--navy); }
.prh-acts { align-items: center; }
.prh-msg { flex: 1 1 14rem; font-size: var(--t-sub); color: var(--navy); }
.prh-msg.err { color: var(--bad-fg); }
.prh-ask { flex: 1 1 100%; margin: 0; font-size: var(--t-sub); color: var(--navy-dark); }
.prh .prh-undo--off.btn { display: none; }
@media (max-width: 640px) { /* a phone: each heading stacks - the preview, the words, the font, then weight and size, then letters and the undo - so nothing scrolls sideways (rule 16) */
  .prh .prh-tbl { min-width: 0; }
  .prh .prh-tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .prh .prh-tbl tr[data-prhkey] { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; column-gap: var(--s-2); border-bottom: 1px solid var(--hair); padding-bottom: var(--s-2); }
  .prh .prh-tbl tr[data-prhkey] td { border-bottom: 0; padding-left: 0; padding-right: 0; }
  .prh .prh-tbl tr[data-prhkey] td.prh-cell, .prh .prh-tbl tr[data-prhkey] td.pr-w-name, .prh .prh-tbl tr[data-prhkey] td:nth-child(3) { grid-column: 1 / -1; max-width: none; }
  .prh .prh-tbl tr[data-prhkey] td.prh-cell { padding-bottom: 0; }
  .prh .prh-tbl tr[data-prhkey] input, .prh .prh-tbl tr[data-prhkey] select { min-width: 0; max-width: none; min-height: var(--control-height-touch); }
  .prh .prh-tbl tr[data-prhkey] td:last-child { justify-self: end; }
  .prh .prh-tbl tr.pr-sec { display: block; }
  .prh .prh-tbl tr.pr-sec td { display: block; }
}
/* ===== fetch-1489: Fill open dates, the CALENDAR READING (Jack 10-07: "chips looks better", "draw on both dates", seven days). The grid is
   the Sales Calendar's (.cal-grid, .cal-cell, .cal-chip, .cal-daynum - unchanged); these rules add the venue strip, the chip as a button,
   the card beside a chip, the phone's agenda and the phone's bottom sheet. Tokens only. ===== */
.cl-fill { position: relative; } /* the card is positioned inside the section, so it scrolls with the grid */
.cl-cal .cal-grid { margin-bottom: var(--s-3); }
.cl-cal-grid .cal-cell:not(.cal-empty) { cursor: default; } /* the chips and the strip are the controls, not the cell */
.cl-cal-grid .cal-cell { min-width: 0; overflow: hidden; } /* fetch-1506 (Jack 10-08: November's chips a different size, December's columns misaligned): a grid cell keeps CSS Grid's automatic minimum, so a nowrap chip title was the cell's min-content and its whole column grew to fit the longest title in it (399 px beside 153 px, the grid wider than its card). Giving the cell up its automatic minimum keeps the seven columns equal; a long title ellipsizes inside its chip, and the card carries the whole name. */
.cl-cal-past { background: var(--wash); }
.cl-cal-past .cal-daynum { color: var(--muted); opacity: .55; }
.cl-cal-strip { display: flex; align-items: center; gap: var(--s-1); margin: 0 0 var(--s-1); padding: 1px var(--s-1); min-height: 20px; max-width: 100%; border: 0; border-radius: var(--r-s); background: transparent; font: inherit; color: inherit; cursor: pointer; }
.cl-cal-strip:hover { background: var(--wash); }
.cl-cal-v { width: 9px; height: 9px; border-radius: 50%; background: var(--vc); border: 2px solid var(--vc); flex: 0 0 auto; } /* filled = open */
.cl-cal-v.is-held { background: transparent; border-color: color-mix(in srgb, var(--vc) 45%, var(--paper)); } /* a ring = held; the words beside it carry the meaning */
.cl-cal-base { font-size: var(--t-label); color: var(--muted); white-space: nowrap; }
.cl-cal-base.is-none { opacity: .7; }
.cl-cal-chip { display: block; width: 100%; text-align: left; appearance: none; border: 0; font: inherit; font-size: var(--t-label); color: inherit; white-space: nowrap; text-overflow: ellipsis; } /* .cal-chip's tint, padding and left edge apply; the button chrome goes */
.cal-chip.cl-cal-chip--alt { border-left-style: dashed; } /* an alternate date the client named: a dashed edge and the ALT prefix */
.cl-cal-more { display: block; border: 0; background: none; font: inherit; font-size: var(--t-label); color: var(--muted); cursor: pointer; padding: 1px var(--s-1); }
.cl-cal-more:hover { color: var(--ink); }
.cl-card { position: absolute; z-index: 300; width: 22rem; max-width: calc(100% - var(--s-4)); background: var(--surface-card); border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: var(--r-l); box-shadow: 0 18px 50px rgba(20, 33, 61, .22); }
.cl-card-h { display: flex; align-items: flex-start; gap: var(--s-2); padding: var(--s-3) var(--s-4) var(--s-2); }
.cl-card-hd { min-width: 0; flex: 1 1 auto; }
.cl-card-t { font-weight: 700; color: var(--navy); font-size: var(--t-body); }
.cl-card-m { font-size: var(--t-sub); color: var(--muted); margin-top: 2px; }
.cl-card-h .icon-btn { flex: 0 0 auto; }
.cl-card-b { padding: 0 var(--s-4) var(--s-3); max-height: 60vh; overflow-y: auto; }
.cl-card-venue { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) 0; border-bottom: 1px solid var(--hair); font-size: var(--t-sub); }
.cl-card-venue:last-child { border-bottom: 0; }
.cl-card-held { color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-card-state { margin-left: auto; color: var(--muted); white-space: nowrap; }
.cl-card-state.is-open { color: var(--ok-fg); font-weight: 600; }
.cl-cand { border-left: 3px solid var(--vc, var(--gold)); padding: var(--s-2) var(--s-3); background: var(--wash); border-radius: var(--r-s); margin-top: var(--s-2); }
.cl-cand-n { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); font-size: var(--t-mid); color: var(--navy); }
.cl-cand-why { margin: var(--s-1) 0 0; font-size: var(--t-sub); line-height: 1.5; color: var(--navy); }
.cl-cand-why.is-alt { color: var(--warn-fg); }
.cl-cand dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px var(--s-3); margin: var(--s-2) 0 0; font-size: var(--t-sub); line-height: 1.5; }
.cl-cand dt { color: var(--muted); }
.cl-cand dd { margin: 0; overflow-wrap: anywhere; }
.cl-cand .btn { margin-top: var(--s-2); }
.cl-cal-agenda .cl-cal-day { padding: var(--s-3); }
.cl-cal-day-h { display: flex; align-items: center; gap: var(--s-2); }
.cl-cal-day-h h3 { margin: 0; font-size: var(--t-body); font-weight: 700; color: var(--navy); flex: 1 1 auto; min-width: 0; }
.cl-cal-day-h .cl-cal-strip { margin: 0; }
.cl-cal-row { display: flex; align-items: center; gap: var(--s-2); width: 100%; min-height: var(--control-height-touch); padding: var(--s-1) 0; border: 0; border-top: 1px solid var(--hair); background: none; font: inherit; font-size: var(--t-mid); text-align: left; color: inherit; cursor: pointer; }
.cl-cal-row-n { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--ink); }
.cl-cal-row-g { color: var(--muted); font-size: var(--t-sub); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cl-card--sheet { position: fixed; left: var(--s-3); right: var(--s-3); bottom: var(--s-3); top: auto; width: auto; max-width: none; }
@media (max-width: 640px) {
  .cl-card { position: fixed; left: var(--s-3); right: var(--s-3); bottom: var(--s-3); top: auto !important; width: auto; max-width: none; }
  .cl-card-b { max-height: 55vh; }
  .cl-cal-strip { min-height: var(--control-height-touch); }
}
@media print { .cl-card, .cl-cal-strip { display: none; } }
.pgh:has(#clientFillVenuePicker) .pgh-scope-choices:empty { display: none; } /* fetch-1489: the venue picker is the whole scope - no empty choices box beside it */
.pgh:has(#clientFillVenuePicker) .pgh-picker { flex: 0 1 18rem; } /* fetch-1489: a control, not a row - the picker keeps a control's width */
/* ── fetch-1497 · MANAGER SCHEDULE: ONE CARD, THE GRID FILLS THE PAGE (Jack 10-07) ──────────────────────────────
   The toolbar row sits on the grid's own card (the Event staff shape, fetch-1229); the grid scrolls inside the card
   and takes the viewport height below its measured top (--schd-grid-top, bindSchedule's schedPinGrid). People are
   edited in their rows; request-offs open in a side sheet; the codes legend is a popover. Tokens only. */
.schd-panel { padding: 0; overflow: visible; border: 1px solid var(--line); border-top: 2px solid var(--brand-blue-deep); border-radius: var(--r-m); }
.schd-toolbar { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2); border-bottom: 1px solid var(--line); background: var(--surface-card); border-radius: var(--r-m) var(--r-m) 0 0; }
.schd-toolbar > #managerScheduleStrip.pgh.pgh--schedule { flex: 1 1 auto; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.schd-toolbar .pgh-nav:first-child { border-radius: var(--r-s); background: var(--wash); }
.schd-toolbar .pgh-navlabel { font-weight: 600; }
.schd-toolbar .pgh-seg button[aria-pressed="true"] { background: var(--brand-blue-deep); color: var(--paper); }
.schd-panel > .rsync-banner { margin: 0; border-radius: 0; }
.schd-panel > .empty-state { margin: var(--s-3); }
.schd-panel:not(.schd-panel--phone) { margin-bottom: 0; }
/* the grid takes the window height; the version line waits just below the fold, so the page keeps only a small bottom pad */
.wrap:has(.schd-panel:not(.schd-panel--phone)) { padding-bottom: var(--s-3); }
@media (min-width: 641px) {
  /* every control stays in view: a narrow desktop wraps the toolbar to a second line rather than scrolling it */
  .schd-toolbar > #managerScheduleStrip.pgh.pgh--schedule { flex-wrap: wrap; overflow: visible; row-gap: var(--s-1); }
  .schd-panel .schd-wrap { width: auto; }
  .schd-panel .schd-wrap::after { border-radius: 0 0 var(--r-m) 0; }
  .schd-panel .schd { border: 0; border-radius: 0 0 var(--r-m) var(--r-m); max-height: max(16rem, calc(100dvh - var(--schd-grid-top, 16rem) - var(--schd-grid-bottom, 0px) - var(--s-2))); overscroll-behavior: contain; }
  .schd-panel .schd-row { grid-template-columns: 12rem repeat(7, minmax(6rem, 1fr)); min-width: 58rem; }
  .schd-panel .schd-personrow > .schd-name { gap: var(--s-1); padding: 2px var(--s-1) 2px var(--s-2); }
  .schd-panel .schd-dayhead { font-weight: 700; font-size: var(--t-sub); }
  .schd-panel .schd-dayhead .muted { font-size: var(--t-label); font-weight: 400; }
  .schd .schd-name.schd-name--edit, .schd .schd-name:has(.cmenu-list:not([hidden])) { z-index: 6; }
  .schd-addrow--open > .schd-name { grid-column: 1 / -1; }
}
.schd-evtime, .schd-cellnote { font-size: var(--t-label); }
.schd-nmwrap { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.schd-nm { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--ink); text-align: left; }
button.schd-nm { cursor: pointer; border-radius: var(--r-s); }
button.schd-nm:hover { color: var(--navy); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
button.schd-nm:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.schd-nmeta { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-label); font-weight: 400; line-height: 1.2; color: var(--muted); }
.schd-rownote { font-size: var(--t-sub); font-weight: 600; color: var(--ok-fg); }
.schd-noterow { display: block; min-width: 0; }
.schd-noterow .schd-rownote { position: sticky; left: 0; display: flex; align-items: center; gap: var(--s-2); padding: var(--s-1) var(--s-2); }
.schd-pmenu { flex: 0 0 auto; }
.schd-pmenu .cmenu-trigger { color: var(--muted); background: transparent; border-color: transparent; }
.schd-personrow:not(:hover) .schd-pmenu .cmenu-trigger:not(:focus-visible):not([aria-expanded="true"]) { opacity: .45; }
.schd-pmenu .cmenu-trigger:hover { background: var(--wash); border-color: var(--line); color: var(--ink); }
.schd-name.schd-saved { animation: schdSavedPulse .9s ease both; }
/* the person editor: in the row - it covers the name cell, its list drops over the days */
.schd-name--edit { position: relative; }
.schd-ed { position: absolute; top: 0; left: 0; z-index: 7; width: min(24rem, 86vw); padding: var(--s-2); background: var(--surface-card); border: 1px solid var(--gold); border-radius: var(--r-m); box-shadow: 0 var(--s-2) var(--s-5) color-mix(in srgb, var(--ink) 18%, transparent); color: var(--ink); font-weight: 400; text-align: left; }
.schd-ed--up { top: auto; bottom: 0; display: flex; flex-direction: column-reverse; }
.schd-ed-in { box-sizing: border-box; width: 100%; min-height: var(--control-height-sm); padding: 0 var(--s-2); border: 1px solid var(--line); border-radius: var(--r-s); font: inherit; font-size: var(--t-body); }
.schd-ed-in:focus { outline: 2px solid var(--focus-ring); outline-offset: -1px; border-color: var(--gold); }
.schd-ed-lab { display: block; margin: 0 0 var(--s-1); color: var(--muted); font-size: var(--t-sub); font-weight: 700; }
.schd-ed-list { list-style: none; margin: var(--s-1) 0 0; padding: 0; }
.schd-opt { display: flex; flex-direction: column; justify-content: center; gap: 1px; min-height: var(--control-height-sm); padding: var(--s-1) var(--s-2); border-radius: var(--r-s); cursor: pointer; font-size: var(--t-sub); }
.schd-opt > span { font-weight: 600; }
.schd-opt small { color: var(--muted); font-size: var(--t-sub); }
.schd-opt:hover, .schd-opt.is-hi { background: var(--wash); }
.schd-opt.is-hi { box-shadow: inset 2px 0 0 var(--gold); }
.schd-opt-none { padding: var(--s-2); color: var(--muted); font-size: var(--t-sub); }
.schd-ed-foot { display: flex; align-items: center; gap: var(--s-2); margin-top: var(--s-2); }
.schd-ed-key { flex: 1 1 auto; min-width: 0; color: var(--muted); font-size: var(--t-sub); }
.schd-ed-err { margin-top: var(--s-1); color: var(--bad-fg); font-size: var(--t-sub); font-weight: 600; }
/* the add row: the whole foot row is the form */
.schd-ed--add { position: static; width: auto; max-width: 56rem; border: 0; box-shadow: none; padding: var(--s-2) var(--s-1); background: transparent; }
.schd-add-grid { display: grid; grid-template-columns: minmax(14rem, 1.3fr) minmax(11rem, 1fr) auto; gap: var(--s-3); align-items: start; }
.schd-add-f { position: relative; min-width: 0; }
.schd-ed--add .schd-ed-list { position: absolute; left: 0; right: 0; bottom: calc(100% - var(--s-5)); z-index: 7; margin: 0; padding: var(--s-1); background: var(--surface-card); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: 0 var(--s-2) var(--s-5) color-mix(in srgb, var(--ink) 18%, transparent); }
.schd-ed--add .schd-ed-list:not(:has(.schd-opt)) { display: none; }
.schd-crewpick { display: flex; flex-wrap: wrap; gap: var(--s-1); }
.schd-crewpick button { display: inline-flex; align-items: center; gap: var(--s-1); min-height: var(--control-height-sm); padding: 0 var(--s-2); border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface-card); color: var(--ink); font: inherit; font-size: var(--t-sub); cursor: pointer; }
.schd-crewpick button[aria-checked="true"] { border-color: var(--vc); box-shadow: inset 0 0 0 1px var(--vc); font-weight: 700; }
.schd-crewpick .vdot { display: inline-block; flex: 0 0 auto; width: var(--s-2); height: var(--s-2); border-radius: 50%; background: var(--vc); }
.schd-addtools { grid-column: 2 / -1; display: flex; align-items: center; }
.sched-agenda-arch { margin-top: var(--s-2); }
.schd-addtile { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-1); font-size: var(--t-sub); font-weight: 600; }
/* the codes legend */
.schd-codeswrap { position: relative; flex: 0 0 auto; }
.schd-codes { position: absolute; right: 0; top: calc(100% + var(--s-1)); z-index: 30; width: 19rem; padding: var(--s-3); background: var(--surface-card); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: 0 var(--s-2) var(--s-5) color-mix(in srgb, var(--ink) 18%, transparent); }
.schd-codes-h { margin-bottom: var(--s-2); font-size: var(--t-sub); font-weight: 700; }
.schd-codes dl { display: grid; gap: var(--s-2); margin: 0; }
.schd-codes dl > div { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: var(--s-2); align-items: baseline; }
.schd-codes dl > div:first-child { grid-template-columns: minmax(0, 1fr); gap: 2px; }
.schd-codes dt, .schd-codes dd { margin: 0; }
.schd-codes dd { color: var(--muted); font-size: var(--t-sub); }
.schd-codes .schd-code { color: var(--vc); font-size: var(--t-sub); }
/* request-offs: a side sheet over the grid (native modal dialog) */
dialog.schd-sheet { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(26rem, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; padding: 0; overflow: auto; border: 0; border-left: 1px solid var(--line); background: var(--surface-card); color: var(--ink); box-shadow: calc(-1 * var(--s-2)) 0 var(--s-5) color-mix(in srgb, var(--ink) 18%, transparent); }
dialog.schd-sheet::backdrop { background: color-mix(in srgb, var(--ink) 28%, transparent); }
.schd-sheet-body { padding: var(--s-3) var(--s-4) var(--s-5); }
.schd-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); margin: 0 0 var(--s-3); }
.schd-sheet-head h2 { margin: 0; font-size: var(--t-section); }
.schd-sheet-sub { margin: var(--s-4) 0 var(--s-1); color: var(--muted); font-size: var(--t-sub); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.schd-ro-form .field { margin: 0 0 var(--s-2); }
.schd-ro-form :is(input, select) { box-sizing: border-box; width: 100%; min-height: var(--control-height-touch); }
.schd-ro-dates { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-2); }
.schd-ro-list { list-style: none; margin: 0; padding: 0; }
.schd-ro-row { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) 0; border-bottom: 1px solid var(--hair); }
.schd-ro-who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: var(--t-sub); }
.schd-ro-acts { flex: 0 0 auto; display: flex; gap: var(--s-1); }
.schd-ro-acts .btn { min-height: var(--control-height-touch); }
/* phone: the same one card - schedule + Filters, the day strip, the day's people */
@media (max-width: 640px) {
  /* the card keeps the page's width, so Schedule + Filters sit exactly where every other schedule view puts them; the day
     strip keeps its fetch-944 bleed past the card's edges (44px days even at 320) */
  .schd-panel--phone .schd-toolbar { padding: var(--s-2); border-bottom: 0; background: transparent; }
  .schd-panel--phone #schedAgendaDays { border-block: 1px solid var(--line); }
  .sched-agenda-meta { margin: calc(-1 * var(--s-1)) 0 var(--s-1); }
  .schd-panel--phone .sched-agenda-days { margin-block: 0; }
  .schd-panel--phone .sched-agenda { padding: var(--s-3); }
  .sched-agenda-row .schd-pmenu .cmenu-trigger { opacity: 1; }
  .sched-agenda-duty strong { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
  .sched-agenda-add { display: inline-flex; align-items: center; gap: var(--s-1); margin-top: var(--s-3); min-height: var(--control-height-touch); }
  .sched-agenda-editor .schd-ed { position: static; width: auto; box-shadow: none; }
  .schd-add-grid { grid-template-columns: minmax(0, 1fr); }
  .schd-ed--add .schd-ed-list { position: static; box-shadow: none; }
  .schd-ed-foot { flex-wrap: wrap; }
  .schd-ed-foot .btn, .schd-crewpick button, .schd-ed-in { min-height: var(--control-height-touch); }
  .schd-opt { min-height: var(--control-height-touch); }
  dialog.schd-sheet { width: 100vw; border-left: 0; }
}

/* fetch-1516: Recap analysis shares the saved-report reading primitives, scoped here only. */
.recap-analysis { margin-block: var(--s-3) var(--s-5); }
.recap-analysis .rpt-reading-heading { flex-wrap: wrap; }
.recap-analysis .recap-analysis-scope { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-1) var(--s-3); color: var(--muted); font-size: var(--t-sub); line-height: 1.5; }
.recap-analysis .recap-analysis-coverage { margin-block: var(--s-2); font-size: var(--t-sub); font-weight: 600; color: var(--text-heading); font-variant-numeric: tabular-nums; }
.recap-analysis .recap-analysis-notice { margin-block: var(--s-2); padding-left: var(--s-3); border-left: 2px solid var(--warn-fg); font-size: var(--t-sub); color: var(--text-heading); }
.recap-analysis .recap-analysis-overview > .rpt-reading-fold { margin-top: var(--s-1); }
.recap-analysis .recap-analysis-priorities { border-top: 2px solid var(--navy); }
.recap-analysis .recap-analysis-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2) var(--s-4); padding: 0; margin: 0 0 var(--s-3); list-style: none; font-size: var(--t-sub); line-height: 1.5; font-variant-numeric: tabular-nums; }
.recap-analysis .recap-analysis-sources { padding: 0; margin: var(--s-3) 0 0; list-style: none; }
.recap-analysis .recap-analysis-sources > li + li, .recap-analysis .recap-analysis-evidence + .recap-analysis-evidence { border-top: 1px solid var(--line); margin-top: var(--s-2); padding-top: var(--s-2); }
.recap-analysis .recap-analysis-source { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-1) var(--s-2); }
.recap-analysis .recap-analysis-source-link { display: flex; align-items: center; flex-basis: 100%; min-height: var(--control-height-touch); color: var(--navy); font-size: var(--t-sub); line-height: 1.5; text-decoration: underline; text-underline-offset: 0.2em; }
.recap-analysis .recap-analysis-source .vchip { font-size: var(--t-sub); }
.recap-analysis .recap-analysis-venue { margin-top: var(--s-1); }
.recap-analysis .rpt-reading-fold > summary:focus-visible, .recap-analysis .recap-analysis-source-link:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
@media (max-width: 640px) {
  .recap-analysis .rpt-reading-section { padding: var(--s-3); }
  .recap-analysis .recap-analysis-facts { grid-template-columns: minmax(0, 1fr); }
}

.recap-analysis .recap-analysis-generated { margin-left: auto; }
.recap-analysis :is(p, blockquote) { max-width: 80ch; }

/* fetch-1516 (approved compact header): one owner for scope and actions; desktop fields
   keep their useful width, and the action menu uses the shared mouse/touch/keyboard door. */
.recaps-page .recap-analysis-header.pgh { display: grid; grid-template-columns: minmax(11rem, 1fr) 9.5rem 12.5rem 9.5rem var(--control-height-touch); align-items: center; gap: var(--s-3); padding: var(--s-4); margin-bottom: var(--s-4); }
.recap-analysis-header .pgh-top, .recaps-page .recap-analysis-header.pgh.pgh--compact > .pgh-nav { display: contents; }
.recap-analysis-header .pgh-titles { grid-column: 1; grid-row: 1; min-width: 0; }
.recap-analysis-header .pgh-h { font-size: var(--t-title); }
.recap-analysis-header .pgh-meta { line-height: 1.5; }
.recap-analysis-header .pgh-navfield:has(#recapDeptSel) { grid-column: 2; grid-row: 1; }
.recap-analysis-header .pgh-scope { grid-column: 3; grid-row: 1; min-width: 0; display: block; margin: 0; }
.recap-analysis-header .pgh-scope::before { content: 'Venue'; display: block; margin-bottom: var(--s-1); color: var(--text-heading); font-size: var(--t-sub); line-height: normal; }
.recap-analysis-header .pgh-scope-choices:empty { display: none; }
.recap-analysis-header .pgh-navfield:has(#recapPeriodSel) { grid-column: 4; grid-row: 1; }
.recap-analysis-header .pgh-acts { grid-column: 5; grid-row: 1; align-self: center; }
.recap-analysis-header .pgh-navfield:has(#recapFrom) { grid-column: 2; grid-row: 2; }
.recap-analysis-header .pgh-navfield:has(#recapTo) { grid-column: 3; grid-row: 2; }
.recap-analysis-header :is(select, input, .pgh-picker-trigger) { width: 100%; min-height: var(--control-height-touch); height: var(--control-height-touch); box-sizing: border-box; font-size: var(--t-body); }
.recap-analysis-header .pgh-picker { min-width: 0; width: 100%; }
.recap-analysis-header .pgh-picker-trigger { gap: var(--s-2); padding-inline: var(--s-3); }
.recap-analysis-header .pgh-picker-list { left: 0; right: 0; width: 100%; min-width: 100%; }
.recap-analysis-header .pgh-picker-list .pgh-chip { width: 100%; min-height: var(--control-height-touch); justify-content: flex-start; border-color: transparent; color: var(--ink); font-size: var(--t-body); }
.recap-analysis-header .cmenu-list { min-width: 17.5rem; }
.recap-analysis-header .cmenu-trigger { min-width: var(--control-height-touch); min-height: var(--control-height-touch); color: var(--navy); border-color: var(--line); }
.recap-analysis-header .cmenu-i { min-height: var(--control-height-touch); }
.recap-analysis-header .cmenu-i small { line-height: 1.5; margin-top: var(--s-1); }
.recap-analysis-header .cmenu-i:disabled { color: var(--muted); cursor: default; }
.recap-analysis-header > .pgh-status { grid-column: 1 / -1; margin: 0; color: var(--navy); font-size: var(--t-sub); line-height: 1.5; }
.recap-analysis-header > .pgh-status[role="alert"] { color: var(--bad-fg); }
.recap-analysis-header > .pgh-status:empty { display: none; }
.recaps-page .recap-analysis.rpt-reading { max-width: none; margin: 0 0 var(--s-5); }
@media (max-width: 1050px) and (min-width: 801px) {
  .recaps-page .recap-analysis-header.pgh { grid-template-columns: minmax(11rem, 1fr) 9rem 10rem 9rem var(--control-height-touch); }
}
@media (max-width: 800px) {
  .recaps-page .recap-analysis-header.pgh { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
  .recap-analysis-header .pgh-titles { grid-column: 1 / 3; }
  .recap-analysis-header .pgh-acts { grid-column: 3; justify-self: end; }
  .recap-analysis-header .pgh-navfield:has(#recapDeptSel) { grid-column: 1; grid-row: 2; }
  .recap-analysis-header .pgh-scope { grid-column: 2; grid-row: 2; }
  .recap-analysis-header .pgh-navfield:has(#recapPeriodSel) { grid-column: 3; grid-row: 2; }
  .recap-analysis-header .pgh-navfield:has(#recapFrom) { grid-column: 1; grid-row: 3; }
  .recap-analysis-header .pgh-navfield:has(#recapTo) { grid-column: 2; grid-row: 3; }
}
@media (max-width: 640px) {
  .recaps-page .recap-analysis-header.pgh { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: var(--s-3); }
  .recap-analysis-header .pgh-titles { grid-column: 1 / -1; padding-right: calc(var(--control-height-touch) + var(--s-3)); }
  .recap-analysis-header .pgh-acts { grid-column: 2; }
  .recap-analysis-header .pgh-h { font-size: var(--t-section); }
  .recap-analysis-header .pgh-navfield:has(#recapPeriodSel) { grid-column: 1 / -1; grid-row: 3; }
  .recap-analysis-header .pgh-navfield:has(#recapFrom) { grid-column: 1; grid-row: 4; }
  .recap-analysis-header .pgh-navfield:has(#recapTo) { grid-column: 2; grid-row: 4; }
  .recap-analysis-header :is(select, input, .pgh-picker-trigger) { font-size: 1rem; }
  .recap-analysis-header .cmenu-list { min-width: 0; }
}

/* fetch-1518: current permission settings are facts, with setup behind one disclosure. */
.permissions-settings { list-style: none; margin: var(--s-3) 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2) var(--s-4); }
.permissions-settings li { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s-1) var(--s-2); padding-block: var(--s-2); border-bottom: 1px solid var(--hair); font-size: var(--t-sub); }
.permissions-settings small { grid-column: 1 / -1; color: var(--muted); font-size: var(--t-sub); }
#permissionsCurrent h3 { margin-block: var(--s-3) var(--s-2); }
@media (max-width: 640px) { .permissions-settings { grid-template-columns: minmax(0, 1fr); } }
