/* fz-kit.css — Shared component kit for the FZ redesign. Owner: kit agent (pairs with ops-kit.jsx + ops-ui.jsx).
   Avatars, avatar stack, uploader, metric cards, progress/segment bars, pills, toolbar, view toggle, skeleton, page head, section cards, drawers/modals base.
   Loaded AFTER nova-shell.css (see index.php), so equal-specificity rules here win.
   Light is the base theme; dark lives under [data-theme="dark"] (app.jsx always sets it on <html>).

   API + usage: SP/redesign/KIT.md. Only --fz-* tokens are used (DESIGN-SYSTEM.md).
   Kit classes are prefixed `.fz-<component>`; page files use `.fz-p-<screen>` / `.fz-<page>-…`.

   Sections
     0. Tone plumbing (--fz-k / --fz-k-soft / --fz-k-ink per component tone)
     1. Person avatar (.fsw-avatar) — photo + premium initials, beats brand.css:94
     2. Client avatar (.fz-cav), avatar stack (.fz-avstack)
    2b. Cover photo (.fz-cover — OpsCoverPhoto) + frosted photo button (.fz-cover-btn)   [refine v3.10]
    2c. Client hero photo (OpsAvatarUpload `cover` — .fz-hph-*, .fz-avup.is-cover)        [refine r2]
     3. Photo uploader (.fz-avup), photo menu, crop modal (.fz-crop)
     4. Page head (.xcs-pagehead — shared by OpsPageHead and every hand-written header)
     5. Module panel (.fz-panel)
     6. Metric card + grid (.fz-metric, .fz-metrics)
     7. Progress (.fz-prog), segment bar (.fz-segbar), status pill (.fz-pill)
     8. Toolbar, filter pill, search, view toggle
     9. Skeleton
    10. Empty states (.fsw-empty, .fsw-list-empty) — CSS only, markup unchanged
    11. Drawer shell (.fsw-drawer*) — width token, floating card, phone sheet, header */


/* ═══ 0. TONE PLUMBING ══════════════════════════════════════════════════════
   Each toned component reads three local aliases. They are NOT new colours —
   just a pointer at the matching status token, so every component below
   needs one rule per property instead of seven. */
.fz-pill, .fz-metric, .fz-prog, .fz-fpill, .fz-panel {
  --fz-k: var(--fz-neutral); --fz-k-soft: var(--fz-neutral-soft); --fz-k-ink: var(--fz-neutral-ink);
}
.fz-prog { --fz-k: var(--fz-accent); --fz-k-soft: var(--fz-accent-soft); --fz-k-ink: var(--fz-accent-ink); }
.fz-pill.is-ok, .fz-metric.is-ok, .fz-prog.is-ok, .fz-fpill.is-ok, .fz-panel.is-ok
  { --fz-k: var(--fz-ok);      --fz-k-soft: var(--fz-ok-soft);      --fz-k-ink: var(--fz-ok-ink); }
.fz-pill.is-warn, .fz-metric.is-warn, .fz-prog.is-warn, .fz-fpill.is-warn, .fz-panel.is-warn
  { --fz-k: var(--fz-warn);    --fz-k-soft: var(--fz-warn-soft);    --fz-k-ink: var(--fz-warn-ink); }
.fz-pill.is-crit, .fz-metric.is-crit, .fz-prog.is-crit, .fz-fpill.is-crit, .fz-panel.is-crit
  { --fz-k: var(--fz-crit);    --fz-k-soft: var(--fz-crit-soft);    --fz-k-ink: var(--fz-crit-ink); }
.fz-pill.is-info, .fz-metric.is-info, .fz-prog.is-info, .fz-fpill.is-info, .fz-panel.is-info
  { --fz-k: var(--fz-info);    --fz-k-soft: var(--fz-info-soft);    --fz-k-ink: var(--fz-info-ink); }
.fz-pill.is-violet, .fz-metric.is-violet, .fz-prog.is-violet, .fz-fpill.is-violet, .fz-panel.is-violet
  { --fz-k: var(--fz-violet);  --fz-k-soft: var(--fz-violet-soft);  --fz-k-ink: var(--fz-violet-ink); }
.fz-pill.is-neutral, .fz-metric.is-neutral, .fz-prog.is-neutral, .fz-fpill.is-neutral, .fz-panel.is-neutral
  { --fz-k: var(--fz-neutral); --fz-k-soft: var(--fz-neutral-soft); --fz-k-ink: var(--fz-neutral-ink); }
.fz-pill.is-accent, .fz-metric.is-accent, .fz-prog.is-accent, .fz-fpill.is-accent, .fz-panel.is-accent
  { --fz-k: var(--fz-accent);  --fz-k-soft: var(--fz-accent-soft);  --fz-k-ink: var(--fz-accent-ink); }
.fz-pill.is-teal, .fz-metric.is-teal, .fz-prog.is-teal, .fz-fpill.is-teal, .fz-panel.is-teal
  { --fz-k: var(--fz-teal);    --fz-k-soft: var(--fz-teal-soft);    --fz-k-ink: var(--fz-teal-ink); }

/* Kit-local depth aliases (refine v3.10). Not palette colours — white / black
   at a low alpha, so they sit on whatever surface token a skin defines:
     --fz-kit-hl        1px light catching the TOP edge of a raised surface
     --fz-kit-sheen     the faint top-down surface gradient on dark modules
     --fz-kit-veil      hover wash laid OVER any background (works on surface-1/2/3)
     --fz-kit-veil-2    the stronger wash (pressed / hovered filled controls)
     --fz-kit-glass     pale frosted glass ON A PHOTO (light themes): the overlay
     --fz-kit-glass-sh  pill (.fz-pill.is-overlay) and the photo button
     --fz-kit-glass-fx  (.fz-cover-btn) share it. Dark themes keep their own
                        smoked values per rule on purpose (button .62, pill .74).
   Text sizes read the global scale (--fz-fs-meta = 13px since v3.10). */
:root {
  --fz-kit-hl: rgba(255, 255, 255, .78);
  --fz-kit-sheen: rgba(255, 255, 255, 0);
  --fz-kit-veil: rgba(20, 24, 22, .045);
  --fz-kit-veil-2: rgba(20, 24, 22, .08);
  /* .92, not .86: at .86 the darker photo areas behind a premium-light "At
     risk" pill pulled #8A5400 ink to 4.3–4.5:1 (fix r3). */
  --fz-kit-glass: rgba(255, 255, 255, .92);
  --fz-kit-glass-sh: 0 1px 2px rgba(10, 14, 12, .16), inset 0 0 0 1px rgba(255, 255, 255, .55);
  --fz-kit-glass-fx: blur(8px) saturate(140%);
}
[data-theme="dark"] {
  --fz-kit-hl: rgba(255, 255, 255, .05);
  --fz-kit-sheen: rgba(255, 255, 255, .022);
  --fz-kit-veil: rgba(255, 255, 255, .05);
  --fz-kit-veil-2: rgba(255, 255, 255, .085);
}


/* ═══ 1. PERSON AVATAR (.fsw-avatar) ════════════════════════════════════════
   One circle for every person mention (OpsAvatar / OpsPerson, ~30 call sites).
   Initials: soft surface-3 disc + text-2 letters in the display face — calm,
   readable in both themes (light 7.1:1, dark 6.0:1), no random user colours.
   brand.css:94 paints every non-empty avatar ink/card with !important at
   (0,3,0); the same selector here (loaded later) replaces it, and the photo
   variant (0,4,0) clears the background so the image owns the circle. */
.fsw-avatar {
  position: relative;
  overflow: hidden;
  border-radius: var(--fz-r-pill);
  box-shadow: none;
  font-family: var(--fz-font-display);
  font-weight: var(--fz-fw-semi);
  letter-spacing: .02em;
  line-height: 1;
  user-select: none;
  -webkit-user-select: none;
  vertical-align: middle;
}
.fsw-avatar:not(.is-empty):not(.is-sys) {
  background: var(--fz-surface-3) !important;
  color: var(--fz-text-2) !important;
}
.fsw-avatar.has-photo:not(.is-empty):not(.is-sys) {
  background: var(--fz-surface-3) !important;   /* shows only while the image decodes */
  color: transparent !important;
}
.fsw-avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  border-radius: inherit;
}
/* Initials floor = 11px (refine r2). opsAvatarFont (ops-ui.jsx) floors at 9px,
   so 20–26px person avatars printed 9–10px letters — below the brief's "avoid
   10–11px text". The inline font-size is the only hook (React writes
   "font-size: 9px"; ": 19px" / ": 100px" never match), and !important beats it.
   Client avatars and the "+N" chip get the same floor in JSX (opsKitAvatarFont). */
.fsw-avatar:not(.has-photo)[style*="font-size: 9px"],
.fsw-avatar:not(.has-photo)[style*="font-size: 10px"] {
  font-size: 11px !important;
  letter-spacing: -.02em;
}
/* Unknown / system actor: dashed outline, never a filled disc. */
.fsw-avatar.is-empty,
.fsw-avatar.is-sys {
  background: transparent;
  color: var(--fz-text-3);
  border: 1px dashed var(--fz-border-strong);
  box-shadow: none;
}
.fsw-person { gap: var(--fz-s-2); }
.fsw-person-name { color: var(--fz-text-1); }
.fsw-person.is-muted .fsw-person-name { color: var(--fz-text-2); }
.fsw-person.is-none { color: var(--fz-text-3); }


/* ═══ 2. CLIENT AVATAR (.fz-cav) + AVATAR STACK (.fz-avstack) ═══════════════
   Clients are rounded squares (people are circles) — the shape alone tells
   them apart. Radius ≈ 25% of the side, stepped to the ladder by size class. */
.fz-cav {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  overflow: hidden;
  vertical-align: middle;
  background: var(--fz-surface-3);
  color: var(--fz-text-1);
  font-family: var(--fz-font-display);
  font-weight: var(--fz-fw-bold);
  letter-spacing: .01em;
  line-height: 1;
  user-select: none;
  -webkit-user-select: none;
}
.fz-cav.is-r1 { border-radius: calc(var(--fz-r-xs) - 2px); }
.fz-cav.is-r2 { border-radius: var(--fz-r-xs); }
.fz-cav.is-r3 { border-radius: var(--fz-r-sm); }
.fz-cav.is-r4 { border-radius: var(--fz-r-md); }
.fz-cav.is-r5 { border-radius: var(--fz-r-xl); }
.fz-cav.has-photo { color: transparent; }
/* ≤24px squares carry the 11px initials floor (opsKitAvatarFont): tighten them. */
.fz-cav.is-r1:not(.has-photo) { letter-spacing: -.02em; }
.fz-cav.is-empty { background: transparent; color: var(--fz-text-3); border: 1px dashed var(--fz-border-strong); }

/* Overlapping stack. The ring is the surface the stack sits on — set
   --fz-avstack-ring on a parent that is not surface-1 (e.g. a surface-2 tile).
   Geometry (local aliases, not new tokens):
     --fz-avs-ov   overlap after a PHOTO   (6px; 4px in tight ≤24px stacks)
     --fz-avs-ovi  overlap after INITIALS  (4px; 2px tight) — two-letter
                   initials fill ~65% of the disc, so a photo-sized overlap
                   cut the second letter ("DA" read "D▯", QA r1)
     --fz-avs-rw   ring width              (2px; 1px tight)
   An initials disc that has a neighbour on its right also centres its
   letters in the part that stays visible (padding-right = overlap + ring),
   so nothing is ever covered: xs "DA" keeps 2px clear on both sides, md 3.6px. */
.fz-avstack {
  --fz-avs-ov: calc(var(--fz-s-1) * 1.5);
  --fz-avs-ovi: var(--fz-s-1);
  --fz-avs-rw: 2px;
  display: inline-flex;
  align-items: center;
  flex: none;
  min-width: 0;
  vertical-align: middle;
}
.fz-avstack.is-tight {
  --fz-avs-ov: var(--fz-s-1);
  --fz-avs-ovi: calc(var(--fz-s-1) / 2);
  --fz-avs-rw: 1px;
}
.fz-avstack > .fsw-avatar,
.fz-avstack > .fz-avstack-more {
  box-shadow: 0 0 0 var(--fz-avs-rw) var(--fz-avstack-ring, var(--fz-surface-1));
}
.fz-avstack > * + * { margin-left: calc(var(--fz-avs-ov) * -1); }
.fz-avstack > .fsw-avatar:not(.has-photo) + * { margin-left: calc(var(--fz-avs-ovi) * -1); }
.fz-avstack > .fsw-avatar:not(.has-photo):not(:last-child) { padding-right: calc(var(--fz-avs-ovi) + var(--fz-avs-rw)); }
.fz-panel .fz-metric .fz-avstack,
.fsw-card .fsw-card .fz-avstack { --fz-avstack-ring: var(--fz-surface-2); }
/* .fsw-avatar is position:relative (photo layer), which paints it ABOVE any
   static sibling regardless of DOM order — the "+N" chip slid under the last
   avatar. Positioned too, it paints in DOM order: last = on top. No z-index,
   so it never climbs over sticky table headers or popovers. */
.fz-avstack-more {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: var(--fz-r-pill);
  background: var(--fz-surface-2);
  color: var(--fz-text-2);
  font-family: var(--fz-font-body);
  font-weight: var(--fz-fw-semi);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1;
  border: 1px solid var(--fz-border);
}


/* ═══ 2b. COVER PHOTO (.fz-cover — OpsCoverPhoto) ═══════════════════════════
   Photo-first client cards (refine v3.10). The box is reserved up front, so a
   lazy photo never shifts the layout:
     · placed straight in a card: width 100% + aspect-ratio var(--fz-cover-ar,
       16/10) — set --fz-cover-ar (or aspect-ratio) per breakpoint;
     · the ONLY child of a photo box that reserves the size (aspect-ratio or a
       fixed height): fills it (height 100%; with an auto-height box the % is
       auto and the ratio applies again); max-height 100% also stops it ever
       overhanging a shorter box.
   (No blanket height:100% — in a stretched grid/flex card it would resolve
   against the whole card and swallow the card body.)
   Corners: --fz-cover-r (0 by default — a card usually rounds only the top via
   its own overflow:hidden). Layers: .fz-cover-media (clipped: photo or
   placeholder + scrims) and .fz-cover-ov (NOT clipped: pill top-left, ⋯
   top-right, so a dropdown may hang out of it). */
.fz-cover {
  position: relative;
  display: block;
  width: 100%;
  max-height: 100%;
  aspect-ratio: var(--fz-cover-ar, 16 / 10);
  border-radius: var(--fz-cover-r, 0);
  flex: none;
  min-width: 0;
  isolation: isolate;
}
.fz-cover:only-child { height: 100%; }
.fz-cover-media {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  border-radius: inherit;
  container-type: inline-size;   /* initials scale with the card (cqi) */
  background: var(--fz-cover-bg);
}
.fz-cover-img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: 50% 35%;      /* JSX sets the client's focal point inline */
  border-radius: inherit;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}
/* Placeholder: SAME box, large initials on a deterministic muted gradient
   (.is-p0–p5, from the client id — opsKitCoverTone). A faint light from the top-left + a soft floor
   keep it from reading as a flat swatch. Light themes get mid-tone versions
   with deep tinted initials; dark themes deep versions with pale initials. */
.fz-cover-ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 90% at 16% 0%, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 58%),
    linear-gradient(to top, rgba(0, 0, 0, .06), rgba(0, 0, 0, 0) 55%),
    var(--fz-cover-bg);
}
/* Initials = the placeholder's portrait: large, medium weight, a touch of
   tracking — a monogram, not a generic avatar letter (judge r1, 5 Oct 2026). */
.fz-cover-ini {
  font-family: var(--fz-font-display);
  font-size: clamp(56px, 20cqi, 96px);
  font-weight: var(--fz-fw-medium);
  letter-spacing: .04em;
  line-height: 1;
  color: var(--fz-cover-ink);
  user-select: none;
  -webkit-user-select: none;
  /* the overlay row (pill/⋯) sits at the top: nudge the letters a touch down */
  transform: translateY(4%);
}
/* Palettes — six muted hues spread round the wheel (sage, rosewood, plum,
   moss/olive, pine/navy, graphite/bronze). p1 was a teal that sat next to the
   sage p0 (dark: same R and G, only B differed) on a green-blob background,
   so a third of the grid read as one green-teal; it now fills the empty rose
   gap between plum and bronze (fix r3). Light (base) first. */
:is(.fz-cover, .fz-tone).is-p0 { --fz-cover-bg: linear-gradient(150deg, #DCE8DE 0%, #C3D5C8 100%); --fz-cover-ink: #2C4A37; }  /* sage   */
:is(.fz-cover, .fz-tone).is-p1 { --fz-cover-bg: linear-gradient(150deg, #EEDBD9 0%, #DDC2BF 100%); --fz-cover-ink: #5A2F35; }  /* rosewood (warm, so it stays clear of the plum p2: ΔE ≥ 7.5) */
:is(.fz-cover, .fz-tone).is-p2 { --fz-cover-bg: linear-gradient(150deg, #E6DCE7 0%, #D0C1D4 100%); --fz-cover-ink: #4C3553; }  /* plum   */
:is(.fz-cover, .fz-tone).is-p3 { --fz-cover-bg: linear-gradient(150deg, #E3E6D3 0%, #CCD1B6 100%); --fz-cover-ink: #464C29; }  /* moss   */
:is(.fz-cover, .fz-tone).is-p4 { --fz-cover-bg: linear-gradient(150deg, #D8E2EA 0%, #BFCEDA 100%); --fz-cover-ink: #2A4256; }  /* pine   */
:is(.fz-cover, .fz-tone).is-p5 { --fz-cover-bg: linear-gradient(150deg, #E2E5E1 0%, #C9CFCA 100%); --fz-cover-ink: #2F3833; }  /* graphite-jade */
/* Dark: every gradient now ENDS ≥ ~8 L* above --fz-surface-1 (#151817, L* 7.9)
   — the old ends (L* 7–8, p5 graphite even below the card) let the photo area
   dissolve into the card body, so a no-photo card read as a grey box. p5 is a
   warm bronze/umber now instead of a second near-black. */
[data-theme="dark"] :is(.fz-cover, .fz-tone).is-p0 { --fz-cover-bg: linear-gradient(150deg, #2E4A3A 0%, #233A2E 55%, #1D3027 100%); --fz-cover-ink: #D3EADB; }  /* sage   */
[data-theme="dark"] :is(.fz-cover, .fz-tone).is-p1 { --fz-cover-bg: linear-gradient(150deg, #4C2F38 0%, #3A242B 55%, #35212A 100%); --fz-cover-ink: #F0D8DF; }  /* rosewood */
[data-theme="dark"] :is(.fz-cover, .fz-tone).is-p2 { --fz-cover-bg: linear-gradient(150deg, #4A3350 0%, #392840 55%, #322439 100%); --fz-cover-ink: #EBD8EE; }  /* plum   */
[data-theme="dark"] :is(.fz-cover, .fz-tone).is-p3 { --fz-cover-bg: linear-gradient(150deg, #434A2C 0%, #333A22 55%, #2B301D 100%); --fz-cover-ink: #E4E9CC; }  /* olive  */
[data-theme="dark"] :is(.fz-cover, .fz-tone).is-p4 { --fz-cover-bg: linear-gradient(150deg, #2A4256 0%, #213444 55%, #1C2C3A 100%); --fz-cover-ink: #D3E1EE; }  /* navy   */
[data-theme="dark"] :is(.fz-cover, .fz-tone).is-p5 { --fz-cover-bg: linear-gradient(150deg, #54402F 0%, #3F3023 55%, #33271D 100%); --fz-cover-ink: #F0E0D0; }  /* bronze */
/* Key light top-left, a faint fill bottom-right, a floor that settles the
   colour block, and a 1px DARK bottom edge: the cover sinks into the card body
   the way a photo with a soft vignette would. (It was a light rim, which read
   as a bevel / seam line right where the cover meets the darker body.) */
[data-theme="dark"] .fz-cover-ph {
  background:
    radial-gradient(120% 90% at 18% 0%, rgba(255, 255, 255, .11), rgba(255, 255, 255, 0) 60%),
    radial-gradient(80% 70% at 85% 110%, rgba(255, 255, 255, .04), rgba(255, 255, 255, 0) 70%),
    linear-gradient(to top, rgba(0, 0, 0, .18), rgba(0, 0, 0, 0) 40%),
    var(--fz-cover-bg);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .22);
}
[data-theme="dark"] .fz-cover-ini { opacity: .8; text-shadow: 0 1px 0 rgba(0, 0, 0, .25); }

/* Overlay layer: top row, pill left / button right. A scrim only over a real
   photo and only where the overlay sits — a short top veil, never the face area. */
.fz-cover-ov {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--fz-s-2);
  padding: var(--fz-s-3);
  pointer-events: none;
  border-radius: inherit;
}
.fz-cover-ov > * { pointer-events: auto; }
.fz-cover-ov > .is-end,
.fz-cover-ov > :only-child.fz-cover-btn { margin-left: auto; }
.fz-cover-ov > .is-bottom { align-self: flex-end; }
.fz-cover.has-photo.has-ov .fz-cover-media::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
  pointer-events: none;
  top: 0;
  height: min(42%, 88px);
  background: linear-gradient(to bottom, rgba(6, 9, 8, .30), rgba(6, 9, 8, .12) 45%, rgba(6, 9, 8, 0));
}

/* Hover zoom hook: the CARD (any ancestor) adds .is-hover-zoom. Mouse only,
   GPU transform, ≤1.02, and nothing at all for reduced motion. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .fz-cover-img { transition: transform 200ms var(--fz-ease); will-change: auto; }
  .is-hover-zoom:hover .fz-cover-img,
  .is-hover-zoom:focus-visible .fz-cover-img { transform: scale(1.02); }
}

/* Round frosted button for the photo (the card's "⋯"): 32px disc, 44px hit
   area on touch screens via an invisible halo. Same glass as the overlay pill. */
.fz-cover-btn {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--fz-r-pill);
  background: var(--fz-kit-glass);
  color: var(--fz-text-1);
  box-shadow: var(--fz-kit-glass-sh);
  -webkit-backdrop-filter: var(--fz-kit-glass-fx);
  backdrop-filter: var(--fz-kit-glass-fx);
  font: inherit;
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--fz-t-fast) var(--fz-ease), transform var(--fz-t-fast) var(--fz-ease);
}
.fz-cover-btn::before { content: ''; position: absolute; inset: -6px; border-radius: inherit; }
.fz-cover-btn:hover { background: rgba(255, 255, 255, .96); }
.fz-cover-btn:active { transform: scale(.94); }
.fz-cover-btn:focus-visible { outline: 2px solid var(--fz-focus); outline-offset: 2px; border-radius: var(--fz-r-pill); }
.fz-cover-btn:disabled { opacity: .5; cursor: not-allowed; }
.fz-cover-btn .fsw-ic { width: 16px; height: 16px; }
[data-theme="dark"] .fz-cover-btn {
  background: rgba(12, 16, 15, .62);
  color: var(--fz-text-1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3), inset 0 0 0 1px rgba(255, 255, 255, .10);
}
[data-theme="dark"] .fz-cover-btn:hover { background: rgba(22, 28, 26, .78); }
@media (prefers-reduced-motion: reduce) { .fz-cover-btn:active { transform: none; } }


/* ═══ 2c. CLIENT HERO PHOTO (OpsAvatarUpload `cover` → .fz-hph-*) ═══════════
   Refine r2: the client detail hero leads with the SAME cover photo as the
   Clients card (800/1600 cover files + the client's focal point; no photo =
   the large-initials placeholder in the same box) instead of a 72/96px square.
     · ≥641px: a 4:5 portrait tile in the hero's photo column (.fz-hph-tile,
       152px; 128px below 1024).
     · ≤640px: a full-width 16:9 band ABOVE the identity block (.fz-hph-band);
       the hero grid then drops its photo column (.fz-hph-top).
   Only the frosted button bottom-right is interactive (.fz-avup-cbtn: camera
   → Change photo / Adjust framing / Remove photo; "Add photo" pill when there
   is none). The page layout itself stays in fz-client-detail.css; the two
   .fz-hph-top rules below only undo its phone photo column, at higher
   specificity so load order does not matter. */
.fz-avup.is-cover { display: block; flex: none; width: 100%; line-height: 0; }
.fz-avup.is-cover.is-busy .fz-cover-media { opacity: .7; }
/* No top veil: nothing sits at the top of these photos (the card's veil is
   for its status pill and ⋯). */
.fz-cover.fz-avup-cover.has-photo.has-ov .fz-cover-media::after { content: none; }
.fz-cover.fz-avup-cover .fz-cover-ov { align-items: flex-end; }
.fz-avup-cbtn { width: 36px; height: 36px; }
.fz-avup-cbtn.is-label {
  width: auto;
  gap: var(--fz-s-2);
  grid-auto-flow: column;
  padding: 0 var(--fz-s-3) 0 var(--fz-s-3);
  font-size: var(--fz-fs-meta);
  font-weight: var(--fz-fw-semi);
  line-height: 1;
  white-space: nowrap;
}

.fz-hph-av { line-height: 0; }
.fz-hph-av .fz-avup.is-cover { width: auto; }
.fz-cover.fz-hph-tile {
  --fz-cover-ar: 4 / 5;
  --fz-cover-r: var(--fz-r-lg);
  width: 152px;
}
.fz-cover.fz-hph-tile .fz-cover-ov { padding: var(--fz-s-2); }
@media (max-width: 1023px) {
  .fz-cover.fz-hph-tile { width: 128px; }
}

.fz-hph-band { display: block; width: 100%; min-width: 0; }
.fz-cover.fz-hph-banner {
  --fz-cover-ar: 16 / 9;
  --fz-cover-r: var(--fz-r-lg);
  width: 100%;
}
.fz-hph-banner .fz-avup-cbtn { width: 40px; height: 40px; }
.fz-hph-banner .fz-avup-cbtn.is-label { width: auto; padding: 0 var(--fz-s-4) 0 var(--fz-s-3); }
@media (max-width: 640px) {
  .fz-cd .fz-cd-hero-top.fz-hph-top { grid-template-columns: minmax(0, 1fr); }
  .fz-cd .fz-cd-hero-top.fz-hph-top .fz-cd-hero-eyebrow,
  .fz-cd .fz-cd-hero-top.fz-hph-top .fz-cd-hero-name { grid-column: 1; }
}


/* ═══ 3. PHOTO UPLOADER, MENU, CROP ═════════════════════════════════════════ */
.fz-avup {
  position: relative;
  display: inline-flex;
  flex: none;
  vertical-align: middle;
}
.fz-avup-btn {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  display: inline-flex;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  border-radius: var(--fz-r-pill);
  min-height: 0;
  line-height: 0;
}
.fz-avup.is-client .fz-avup-btn { border-radius: var(--fz-r-sm); }
.fz-avup-btn:disabled { cursor: progress; opacity: .7; }
.fz-avup-btn:focus-visible { outline: 2px solid var(--fz-focus); outline-offset: 3px; }
/* Hover: the whole avatar dims a touch and the badge turns lime — obvious, not loud. */
.fz-avup-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--fz-scrim);
  opacity: 0;
  transition: opacity var(--fz-t-fast) var(--fz-ease);
  pointer-events: none;
}
.fz-avup.is-client .fz-avup-btn::after { border-radius: var(--fz-r-sm); }
.fz-avup-btn:hover:not(:disabled)::after { opacity: .5; }
/* Camera badge ≈ ⅓ of the avatar (JSX sets --fz-avup-b, min 14px) with its
   centre on the rim, so it never covers the initials or the face. Small avatars
   (< 44px, .is-small) push it a little further out; tiny ones (< 28px, .is-tiny)
   only show it on hover / keyboard focus (the button's label says "Upload a photo"). */
.fz-avup-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: var(--fz-avup-b, 32%);
  height: var(--fz-avup-b, auto);
  aspect-ratio: 1 / 1;
  border-radius: var(--fz-r-pill);
  background: var(--fz-surface-1);
  color: var(--fz-text-1);
  box-shadow: 0 0 0 2px var(--fz-surface-1), var(--fz-shadow-soft);
  transition: background-color var(--fz-t-fast) var(--fz-ease), color var(--fz-t-fast) var(--fz-ease), opacity var(--fz-t-fast) var(--fz-ease);
}
.fz-avup.is-small .fz-avup-badge { right: calc(var(--fz-s-1) * -1); bottom: calc(var(--fz-s-1) * -1); }
.fz-avup.is-tiny .fz-avup-badge { opacity: 0; }
.fz-avup.is-tiny .fz-avup-btn:hover .fz-avup-badge,
.fz-avup.is-tiny .fz-avup-btn:focus-visible .fz-avup-badge { opacity: 1; }
.fz-avup-btn:hover:not(:disabled) .fz-avup-badge,
.fz-avup-btn:focus-visible .fz-avup-badge {
  background: var(--fz-accent);
  color: var(--fz-text-on-accent);
}
.fz-avup-file { display: none !important; }

/* Floating menu (portal on <body>, position:fixed inline). Above every overlay
   layer (drawers 1150/1250, modals 1200/1300) because it can open inside a modal. */
.fz-avup-menu {
  z-index: 1400;
  min-width: 200px;
}
.fsw-menu .fz-avup-mi {
  flex-direction: row;
  align-items: center;
  gap: var(--fz-s-3);
  font-size: var(--fz-fs-body);
  font-weight: var(--fz-fw-medium);
}
.fsw-menu .fz-avup-mi .fsw-ic { color: var(--fz-text-2); flex: none; }
.fsw-menu .fz-avup-mi.is-danger,
.fsw-menu .fz-avup-mi.is-danger .fsw-ic { color: var(--fz-crit-ink); }

/* Crop modal body. */
.fz-crop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--fz-s-4);
  padding-top: var(--fz-s-2);
}
.fz-crop-vp {
  position: relative;
  width: min(280px, 100%);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--fz-r-md);
  background: var(--fz-surface-3);
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.fz-crop-vp:active { cursor: grabbing; }
.fz-crop-vp.is-busy { cursor: progress; }
.fz-crop-vp:focus-visible { outline: 2px solid var(--fz-focus); outline-offset: 3px; }
.fz-crop-img {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none !important;
  max-height: none !important;
  pointer-events: none;
  user-select: none;
  will-change: transform;
}
/* The mask shows the final shape: circle for a person, rounded square for a client. */
.fz-crop-mask {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--fz-accent-line), 0 0 0 999px var(--fz-scrim);
}
.fz-crop-vp.is-square .fz-crop-mask { border-radius: 22%; }
.fz-crop-zoom {
  display: flex;
  align-items: center;
  gap: var(--fz-s-3);
  width: min(280px, 100%);
}
.fz-crop-zoom input[type="range"] {
  flex: 1 1 auto;
  min-width: 0;
  accent-color: var(--fz-focus);
  margin: 0;
}
.fz-crop-zb {
  appearance: none;
  display: grid;
  place-items: center;
  width: var(--fz-s-7);
  height: var(--fz-s-7);
  flex: none;
  border: 1px solid var(--fz-border);
  border-radius: var(--fz-r-pill);
  background: var(--fz-surface-2);
  color: var(--fz-text-1);
  font: inherit;
  font-size: var(--fz-fs-section);
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--fz-t-fast) var(--fz-ease), border-color var(--fz-t-fast) var(--fz-ease);
}
.fz-crop-zb:hover:not(:disabled) { background: var(--fz-surface-hover); border-color: var(--fz-border-strong); }
.fz-crop-zb:disabled { opacity: .45; cursor: default; }
.fz-crop .fz-crop-err {
  align-self: stretch;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: var(--fz-s-2);
  line-height: 1.45;
}
.fz-crop .fz-crop-err .fsw-ic { flex: none; margin-top: 2px; }
.fz-crop .fz-crop-err > span { min-width: 0; }


/* ═══ 4. PAGE HEAD (.xcs-pagehead) ══════════════════════════════════════════
   Same markup everywhere (OpsPageHead renders it; old pages write it by hand).
   Big display title, one short muted line, actions on the right; on narrow
   screens the actions wrap under the title instead of squeezing it.
   Specificity: nova-shell.css §6 and ops-theme.css:2388 write the title at
   (0,3,1) !important and styles.css:18289 paints a gradient in dark at (0,2,2)
   !important — the (0,3,1)+!important rules below, loaded later, win all of them.
   ops-theme.css:1472 turns the head into a column ≤1200px; a wrapping row
   reads better (title keeps ≥320px, actions drop under it only when needed). */
:root .xcs-app .xcs-pagehead {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--fz-s-4) var(--fz-s-6);
  padding: 0 0 var(--fz-s-2);
  margin: 0;
}
:root .xcs-app .xcs-pagehead > div:first-child {
  flex: 1 1 320px;
  min-width: 0;
}
/* Title: 32px desktop / 26px phone (refine v3.10, owner range 28–32 / 24–28);
   min() keeps it inside that range whatever --fz-fs-title is set to. */
:root .xcs-app .xcs-pagehead h1 {
  font-family: var(--fz-font-display) !important;
  font-size: min(var(--fz-fs-title), 32px) !important;
  font-weight: var(--fz-fw-bold) !important;
  line-height: 1.15 !important;
  letter-spacing: -.022em !important;
  margin: 0 !important;
  color: var(--fz-text-1) !important;
  background: none !important;
  -webkit-text-fill-color: var(--fz-text-1) !important;
  overflow-wrap: break-word;
}
:root .xcs-app .xcs-pagehead .xcs-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--fz-s-2);
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 0 var(--fz-s-2) !important;
  font-family: var(--fz-font-body) !important;
  font-size: var(--fz-fs-meta) !important;
  font-weight: var(--fz-fw-medium) !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: var(--fz-text-3) !important;
}
:root .xcs-app .xcs-pagehead-sub {
  margin: var(--fz-s-2) 0 0 !important;
  max-width: 72ch;
  font-family: var(--fz-font-body);
  font-size: var(--fz-fs-body) !important;
  font-weight: var(--fz-fw-regular) !important;
  line-height: 1.5 !important;
  color: var(--fz-text-3) !important;
}
:root .xcs-app .xcs-pagehead-cta {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--fz-s-2) !important;
  min-width: 0;
}
/* Count badge glued to the title ("All clients 25", OpsPageHead `count`). The h1
   forces -webkit-text-fill-color with !important and that property INHERITS, so
   the badge sets its own fill. */
:root .xcs-app .xcs-pagehead h1 .fz-pagehead-n {
  display: inline-grid;
  place-items: center;
  vertical-align: .32em;
  min-width: 28px;
  height: 26px;
  margin-left: var(--fz-s-3);
  padding: 0 var(--fz-s-2);
  border-radius: var(--fz-r-pill);
  background: var(--fz-surface-3);
  color: var(--fz-text-2);
  -webkit-text-fill-color: var(--fz-text-2);
  font-family: var(--fz-font-body);
  font-size: var(--fz-fs-meta);
  font-weight: var(--fz-fw-semi);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1;
}
@media (max-width: 768px) {
  :root .xcs-app .xcs-pagehead { gap: var(--fz-s-3) !important; align-items: flex-end !important; }
  :root .xcs-app .xcs-pagehead h1 { font-size: min(var(--fz-fs-title), 26px) !important; }
  :root .xcs-app .xcs-pagehead h1 .fz-pagehead-n { height: 24px; min-width: 26px; margin-left: var(--fz-s-2); vertical-align: .2em; }
  :root .xcs-app .xcs-pagehead-cta { width: auto; justify-content: flex-start; }
  :root .xcs-app .xcs-pagehead-sub { font-size: var(--fz-fs-meta) !important; }
}


/* ═══ 5. MODULE PANEL (.fz-panel) ═══════════════════════════════════════════
   The one module card: surface-1, 24px radius, no border; light gets the soft
   resting shadow, dark stays flat (surfaces carry depth). Header = optional
   tinted icon tile, display-font title (+ count), short meta line, actions /
   "View all →" on the right. */
/* Refine v3.10: lighter-weight — still no border; more air (24px pad on
   desktop, 20px between header and body), depth from the surface tone, a 1px
   top highlight and the soft resting shadow (dark too, where it used to be flat),
   plus a barely-there top-down sheen in dark. The desktop pad is published as
   --fz-card-pad INSIDE the panel, so flush tables that indent their cells with
   var(--fz-card-pad) stay aligned with the header. */
.fz-panel {
  display: flex;
  flex-direction: column;
  gap: var(--fz-s-4);
  min-width: 0;
  padding: var(--fz-card-pad);
  background: var(--fz-surface-1);
  color: var(--fz-text-1);
  border-radius: var(--fz-r-xl);
  box-shadow: inset 0 1px 0 var(--fz-kit-hl), var(--fz-shadow-soft);
}
[data-theme="dark"] .fz-panel {
  background-image: linear-gradient(180deg, var(--fz-kit-sheen), rgba(255, 255, 255, 0) 180px);
}
@media (min-width: 769px) {
  .fz-panel { --fz-card-pad: var(--fz-s-6); gap: var(--fz-s-5); }
  .fz-panel .fz-panel { --fz-card-pad: var(--fz-s-5); gap: var(--fz-s-4); }
}
.fz-panel .fz-panel { background: var(--fz-surface-2); box-shadow: none; border-radius: var(--fz-r-md); }
[data-theme="dark"] .fz-panel .fz-panel { background-image: none; box-shadow: inset 0 1px 0 var(--fz-kit-hl); }
.fz-panel-h {
  display: flex;
  align-items: flex-start;
  gap: var(--fz-s-3);
  min-width: 0;
}
.fz-panel-ico {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--fz-s-8);
  height: var(--fz-s-8);
  border-radius: var(--fz-r-sm);
  background: var(--fz-surface-2);
  color: var(--fz-text-2);
}
.fz-panel.is-ok .fz-panel-ico, .fz-panel.is-warn .fz-panel-ico, .fz-panel.is-crit .fz-panel-ico,
.fz-panel.is-info .fz-panel-ico, .fz-panel.is-violet .fz-panel-ico, .fz-panel.is-accent .fz-panel-ico,
.fz-panel.is-neutral .fz-panel-ico {
  background: var(--fz-k-soft);
  color: var(--fz-k-ink);
}
.fz-panel-ht { flex: 1 1 auto; min-width: 0; }
/* Block, not flex (QA polish): the count pill is INLINE content and OpsPanel
   glues it to the title's last word (.fz-panel-tl, nowrap), so when a long
   title wraps the pill follows that word instead of dropping onto a line of
   its own. Next to the icon tile the first line is centred on the tile by a
   top pad of (tile − one line) / 2 — 1.3em = this line-height. */
.fz-panel .fz-panel-t {
  display: block;
  margin: 0;
  font-family: var(--fz-font-display);
  font-size: var(--fz-fs-section);
  font-weight: var(--fz-fw-semi);
  letter-spacing: -.015em;
  line-height: 1.3;
  color: var(--fz-text-1);
  overflow-wrap: anywhere;
}
.fz-panel-tl { white-space: nowrap; }
.fz-panel-ico + .fz-panel-ht .fz-panel-t {
  box-sizing: border-box;
  min-height: var(--fz-s-8);
  padding-top: max(0px, calc((var(--fz-s-8) - 1.3em) / 2));
}
.fz-panel-n {
  display: inline-grid;
  place-items: center;
  vertical-align: .15em;
  /* Negative block margins: the 24px pill never stretches the 26px title line. */
  margin: calc(-1 * var(--fz-s-1)) 0 calc(-1 * var(--fz-s-1)) var(--fz-s-2);
  min-width: var(--fz-s-6);
  height: var(--fz-s-6);
  padding: 0 var(--fz-s-2);
  border-radius: var(--fz-r-pill);
  background: var(--fz-surface-3);
  color: var(--fz-text-2);
  font-family: var(--fz-font-body);
  font-size: var(--fz-fs-meta);
  font-weight: var(--fz-fw-semi);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1;
}
.fz-panel.is-ok .fz-panel-n, .fz-panel.is-warn .fz-panel-n, .fz-panel.is-crit .fz-panel-n,
.fz-panel.is-info .fz-panel-n, .fz-panel.is-violet .fz-panel-n, .fz-panel.is-accent .fz-panel-n {
  background: var(--fz-k-soft);
  color: var(--fz-k-ink);
}
.fz-panel .fz-panel-sub {
  margin: var(--fz-s-1) 0 0;
  font-size: var(--fz-fs-meta);
  line-height: 1.45;
  color: var(--fz-text-3);
}
.fz-panel-act {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--fz-s-2);
  flex: 0 1 auto;
  margin-left: auto;
  min-width: 0;
}
.fz-panel-all {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: var(--fz-s-1);
  min-height: var(--fz-s-7);
  padding: 0 var(--fz-s-3);
  border: 0;
  border-radius: var(--fz-r-pill);
  background: transparent;
  color: var(--fz-accent-ink);
  font: inherit;
  font-size: var(--fz-fs-meta);
  font-weight: var(--fz-fw-semi);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--fz-t-fast) var(--fz-ease), transform var(--fz-t-fast) var(--fz-ease);
}
.fz-panel-all:hover:not(:disabled) { background: var(--fz-accent-soft); }
.fz-panel-all:active:not(:disabled) { transform: scale(.97); }
.fz-panel-all:focus-visible { outline: 2px solid var(--fz-focus); outline-offset: 2px; }
.fz-panel-all:disabled { opacity: .45; cursor: not-allowed; }
.fz-panel-b {
  display: flex;
  flex-direction: column;
  gap: var(--fz-s-3);
  min-width: 0;
}
.fz-panel.is-flush { padding-left: 0; padding-right: 0; }
.fz-panel.is-flush > .fz-panel-h { padding: 0 var(--fz-card-pad); }
@media (max-width: 640px) {
  /* Never wrap the icon tile away from its title: the title column shrinks
     (and wraps its own text) instead; actions stay their natural width. */
  .fz-panel-ht { flex: 1 1 0; }
  .fz-panel-act { flex: 0 0 auto; max-width: 60%; }
  .fz-panel-ico { width: var(--fz-s-7); height: var(--fz-s-7); }
  .fz-panel-ico + .fz-panel-ht .fz-panel-t {
    min-height: var(--fz-s-7);
    padding-top: max(0px, calc((var(--fz-s-7) - 1.3em) / 2));
  }
}


/* ═══ 6. METRIC CARD + GRID ═════════════════════════════════════════════════
   On the page: a surface-1 card (20px). Inside an OpsPanel: a surface-2 tile
   (16px) — the context decides, no prop needed. Tone colours the NUMBER (and
   the leading dot), never the card.
   Refine v3.10 — calmer: a 13px muted label, ONE strong number, one short
   13px context line, optional subtle progress at the foot. No border; depth =
   surface tone + a 1px top highlight + the soft resting shadow (dark too). */
.fz-metric {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--fz-s-2);
  min-width: 0;
  padding: var(--fz-card-pad);
  background: var(--fz-surface-1);
  color: var(--fz-text-1);
  border-radius: var(--fz-r-lg);
  box-shadow: inset 0 1px 0 var(--fz-kit-hl), var(--fz-shadow-soft);
  text-align: left;
  transition: background-color var(--fz-t-med) var(--fz-ease), box-shadow var(--fz-t-med) var(--fz-ease), transform var(--fz-t-med) var(--fz-ease);
}
[data-theme="dark"] .fz-metric {
  background-image: linear-gradient(180deg, var(--fz-kit-sheen), rgba(255, 255, 255, 0) 120px);
}
.fz-panel .fz-metric {
  background: var(--fz-surface-2);
  box-shadow: none;
  border-radius: var(--fz-r-md);
  padding: var(--fz-s-4);
}
[data-theme="dark"] .fz-panel .fz-metric { box-shadow: inset 0 1px 0 var(--fz-kit-hl); }
.fz-metric.is-click { cursor: pointer; }
/* Hover = a wash over whatever surface the tile has (so a skin's own glass
   background survives), a hair of lift on mouse devices. */
.fz-metric.is-click:hover { background-color: var(--fz-surface-hover); }
.fz-panel .fz-metric.is-click:hover { background-color: var(--fz-surface-3); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .fz-metric.is-click:hover { transform: translateY(-1px); }
  .fz-metric.is-click:active { transform: translateY(0) scale(.99); }
}
.fz-metric.is-click:focus-visible { outline: 2px solid var(--fz-focus); outline-offset: 2px; }
.fz-metric.is-on,
.fz-panel .fz-metric.is-on { box-shadow: inset 0 0 0 2px var(--fz-accent-line); }
.fz-metric-l {
  display: flex;
  align-items: center;
  gap: var(--fz-s-2);
  min-width: 0;
  font-size: var(--fz-fs-meta);
  font-weight: var(--fz-fw-medium);
  line-height: 1.35;
  color: var(--fz-text-2);
}
.fz-metric-lt { min-width: 0; overflow-wrap: anywhere; }
.fz-metric-ico {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--fz-s-6);
  height: var(--fz-s-6);
  border-radius: var(--fz-r-pill);
  background: var(--fz-k-soft);
  color: var(--fz-k-ink);
}
.fz-metric-dot {
  flex: none;
  width: var(--fz-s-2);
  height: var(--fz-s-2);
  border-radius: var(--fz-r-pill);
  background: var(--fz-k);
}
.fz-metric-v {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--fz-s-1) var(--fz-s-2);
  min-width: 0;
  font-family: var(--fz-font-display);
  font-weight: var(--fz-fw-semi);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.025em;
  line-height: 1.05;
}
.fz-metric-num { font-size: var(--fz-fs-num); color: var(--fz-text-1); }
.fz-metric.is-sm .fz-metric-num { font-size: var(--fz-fs-num-sm); }
.fz-metric.is-lg .fz-metric-num { font-size: var(--fz-fs-num-xl); font-weight: var(--fz-fw-bold); }
.fz-metric.is-ok .fz-metric-num, .fz-metric.is-warn .fz-metric-num, .fz-metric.is-crit .fz-metric-num,
.fz-metric.is-info .fz-metric-num, .fz-metric.is-violet .fz-metric-num, .fz-metric.is-accent .fz-metric-num {
  color: var(--fz-k-ink);
}
.fz-metric-of {
  font-family: var(--fz-font-body);
  font-size: var(--fz-fs-body);
  font-weight: var(--fz-fw-medium);
  letter-spacing: 0;
  color: var(--fz-text-3);
}
.fz-metric.is-sm .fz-metric-of { font-size: var(--fz-fs-meta); }
.fz-metric-h {
  font-size: var(--fz-fs-meta);
  line-height: 1.45;
  color: var(--fz-text-3);
  overflow-wrap: anywhere;
}
.fz-metric.is-sm .fz-metric-h { font-size: var(--fz-fs-meta); }
/* Foot (progress / segments / avatars): pinned to the bottom so a row of tiles
   lines its bars up; a default (md) progress bar in here slims to 6px. */
.fz-metric-x { margin-top: auto; padding-top: var(--fz-s-2); min-width: 0; }
.fz-metric-x > .fz-prog.is-md .fz-prog-track { height: 6px; }
.fz-metric.is-sm { gap: var(--fz-s-1); }

/* Grid: at most --fz-metrics-cols columns, never narrower than --fz-metrics-min. */
.fz-metrics {
  display: grid;
  gap: var(--fz-gap);
  grid-template-columns: repeat(auto-fit, minmax(max(var(--fz-metrics-min, 180px), calc((100% - (var(--fz-metrics-cols, 4) - 1) * var(--fz-gap)) / var(--fz-metrics-cols, 4))), 1fr));
  min-width: 0;
}
.fz-panel .fz-metrics { gap: var(--fz-s-3); }
@media (max-width: 640px) {
  .fz-metrics { grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); }
  .fz-metric { padding: var(--fz-s-4); }
  .fz-metric-num { font-size: var(--fz-fs-num-sm); }
  .fz-metric.is-lg .fz-metric-num { font-size: var(--fz-fs-num); }
}


/* ═══ 7. PROGRESS, SEGMENT BAR, STATUS PILL ═════════════════════════════════ */
.fz-prog {
  display: flex;
  flex-direction: column;
  gap: var(--fz-s-2);
  min-width: 0;
}
.fz-prog-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--fz-s-3);
  min-width: 0;
  font-size: var(--fz-fs-meta);
  line-height: 1.35;
  color: var(--fz-text-2);
}
.fz-prog-l { min-width: 0; overflow-wrap: anywhere; }
.fz-prog-pct {
  flex: none;
  font-weight: var(--fz-fw-semi);
  font-variant-numeric: tabular-nums;
  color: var(--fz-text-1);
}
.fz-prog-track {
  position: relative;
  height: var(--fz-s-2);
  border-radius: var(--fz-r-pill);
  background: var(--fz-surface-3);
}
.fz-prog.is-sm .fz-prog-track { height: var(--fz-s-1); }
.fz-prog.is-lg .fz-prog-track { height: var(--fz-s-3); }
.fz-prog-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  max-width: 100%;
  border-radius: inherit;
  background: var(--fz-k);
}
/* Light: lime on the pale surface-3 track is ~1.3:1, so the fill gets a dark-green
   hairline. --fz-focus (#3A8F18) measures 3.38:1 against surface-3 (accent-line
   #3F9C1B was only 2.89:1 there). Status tones are dark enough on their own. */
/* One :not() with a list = (0,1,0), so the dark reset below (0,3,0) really wins. */
.fz-prog:not(.is-ok, .is-warn, .is-crit, .is-info, .is-violet, .is-neutral) .fz-prog-fill {
  box-shadow: inset 0 0 0 1px var(--fz-focus);
}
[data-theme="dark"] .fz-prog .fz-prog-fill { box-shadow: none; }
.fz-prog-mark {
  position: absolute;
  top: calc(var(--fz-s-1) * -1);
  bottom: calc(var(--fz-s-1) * -1);
  width: 2px;
  margin-left: -1px;
  border-radius: var(--fz-r-pill);
  background: var(--fz-text-1);
}

.fz-segwrap { display: flex; flex-direction: column; gap: var(--fz-s-2); min-width: 0; }
.fz-segbar {
  display: flex;
  gap: calc(var(--fz-s-1) / 2);
  height: var(--fz-s-2);
  min-width: 0;
  border-radius: var(--fz-r-pill);
  overflow: hidden;
}
.fz-segbar.is-sm { height: var(--fz-s-1); }
.fz-segbar.is-lg { height: var(--fz-s-3); }
.fz-seg {
  flex: 1 1 0;
  min-width: 3px;
  height: 100%;
  background: var(--fz-surface-3);
}
.fz-segbar:not(.is-items) .fz-seg:not(.is-rest) { flex-shrink: 0; flex-basis: 0; }
.fz-seg.is-ok      { background: var(--fz-ok); }
.fz-seg.is-warn    { background: var(--fz-warn); }
.fz-seg.is-crit    { background: var(--fz-crit); }
.fz-seg.is-info    { background: var(--fz-info); }
.fz-seg.is-violet  { background: var(--fz-violet); }
.fz-seg.is-neutral { background: var(--fz-neutral); }
.fz-seg.is-accent  { background: var(--fz-accent); }
.fz-seg.is-teal    { background: var(--fz-teal); }
/* Light: lime has no edge on a white card or the pale track (~1.2:1) — the same
   --fz-focus hairline as the OpsProgress fill (3.38:1 on surface-3, 4.1:1 on
   white). Dark: lime carries itself. Legend dot matches its segment. */
.fz-seg.is-accent,
.fz-seglegend-dot.is-accent { box-shadow: inset 0 0 0 1px var(--fz-focus); }
[data-theme="dark"] .fz-seg.is-accent,
[data-theme="dark"] .fz-seglegend-dot.is-accent { box-shadow: none; }
.fz-seg.is-rest,
.fz-seg.is-empty   { background: var(--fz-surface-3); }
/* Core dark only (refine v3.10): the done green (#45C486) next to the lime
   current step read as two near-identical greens. In a per-item workflow bar
   that HAS a current step, done steps drop to a calmer green so the lime one is
   the only saturated segment. All-done bars (no current) keep the full green;
   burgundy/silver/premium-light already separate the hues. No :has → unchanged. */
:root[data-hud-skin="core"][data-theme="dark"] .fz-segbar.is-items:has(> .fz-seg.is-accent) > .fz-seg.is-ok {
  background: color-mix(in srgb, var(--fz-ok) 50%, var(--fz-surface-3));
}
/* One segment per item (e.g. one per reel): separate capsules. */
.fz-segbar.is-items { gap: 3px; border-radius: 0; overflow: visible; }
.fz-segbar.is-items .fz-seg { border-radius: var(--fz-r-pill); min-width: 4px; }
.fz-seglegend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--fz-s-1) var(--fz-s-4);
  font-size: var(--fz-fs-meta);
  line-height: 1.4;
  color: var(--fz-text-2);
}
.fz-seglegend-i { display: inline-flex; align-items: center; gap: var(--fz-s-2); white-space: nowrap; }
.fz-seglegend-i b { font-weight: var(--fz-fw-semi); color: var(--fz-text-1); font-variant-numeric: tabular-nums; }
.fz-seglegend-i.is-total { color: var(--fz-text-3); }
.fz-seglegend-dot { width: var(--fz-s-2); height: var(--fz-s-2); border-radius: var(--fz-r-pill); flex: none; background: var(--fz-surface-3); }
.fz-seglegend-dot.is-ok      { background: var(--fz-ok); }
.fz-seglegend-dot.is-warn    { background: var(--fz-warn); }
.fz-seglegend-dot.is-crit    { background: var(--fz-crit); }
.fz-seglegend-dot.is-info    { background: var(--fz-info); }
.fz-seglegend-dot.is-violet  { background: var(--fz-violet); }
.fz-seglegend-dot.is-neutral { background: var(--fz-neutral); }
.fz-seglegend-dot.is-accent  { background: var(--fz-accent); }
.fz-seglegend-dot.is-teal    { background: var(--fz-teal); }
/* Per-item "Empty" slots: same surface-3 as the capsule, plus an edge so the dot reads on surface-2. */
.fz-seglegend-dot.is-empty   { background: var(--fz-surface-3); box-shadow: inset 0 0 0 1px var(--fz-border-strong); }

/* Status pill: soft tint + ink (DESIGN-SYSTEM §5), optional base-colour dot. */
.fz-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--fz-s-1);
  height: var(--fz-s-6);
  padding: 0 var(--fz-s-3);
  border-radius: var(--fz-r-pill);
  background: var(--fz-k-soft);
  color: var(--fz-k-ink);
  font-family: var(--fz-font-body);
  font-size: var(--fz-fs-meta);
  font-weight: var(--fz-fw-semi);
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
  vertical-align: middle;
  flex: none;
}
.fz-pill.is-sm { height: var(--fz-s-5); padding: 0 var(--fz-s-2); font-size: var(--fz-fs-micro); }
.fz-pill-dot {
  width: 6px;
  height: 6px;
  margin-right: 2px;
  border-radius: var(--fz-r-pill);
  background: var(--fz-k);
  flex: none;
}
/* size="md" (refine v3.10): the card / photo pill — 30px, 13px text, 12px sides, 8px dot. */
.fz-pill.is-md {
  gap: 6px;
  height: 30px;
  padding: 0 var(--fz-s-3);
  font-size: var(--fz-fs-meta);
  letter-spacing: 0;
}
.fz-pill.is-md .fz-pill-dot { width: var(--fz-s-2); height: var(--fz-s-2); margin-right: 0; }
.fz-pill.is-md .fsw-ic { flex: none; }
/* variant="overlay": a frosted pill for photos. Its OWN backing (pale glass in
   light, smoked glass in dark) carries the contrast, so the ink reads on a white
   wall or a black jacket alike (measured worst case ≥ 4.5:1 with the backdrop
   blurred to mid-grey); the tone shows as a soft tint over the glass + the dot.
   Static blur only — nothing animates it. */
.fz-pill.is-overlay {
  background:
    linear-gradient(var(--fz-k-soft), var(--fz-k-soft)),
    var(--fz-kit-glass);
  color: var(--fz-k-ink);
  box-shadow: var(--fz-kit-glass-sh);
  -webkit-backdrop-filter: var(--fz-kit-glass-fx);
  backdrop-filter: var(--fz-kit-glass-fx);
}
[data-theme="dark"] .fz-pill.is-overlay {
  background:
    linear-gradient(var(--fz-k-soft), var(--fz-k-soft)),
    rgba(10, 14, 13, .74);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3), inset 0 0 0 1px rgba(255, 255, 255, .09);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .fz-pill.is-overlay { background: linear-gradient(var(--fz-k-soft), var(--fz-k-soft)), rgba(255, 255, 255, .94); }
  [data-theme="dark"] .fz-pill.is-overlay { background: linear-gradient(var(--fz-k-soft), var(--fz-k-soft)), rgba(10, 14, 13, .88); }
}


/* ═══ 8. TOOLBAR, FILTER PILL, SEARCH, VIEW TOGGLE ══════════════════════════ */
.fz-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--fz-s-2) var(--fz-s-3);
  min-width: 0;
}
.fz-toolbar-s,
.fz-toolbar-e {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--fz-s-2);
  min-width: 0;
}
.fz-toolbar-s { flex: 1 1 auto; }
.fz-toolbar-e { flex: 0 1 auto; margin-left: auto; }

/* Filter pills (refine v3.10) — read as one segmented control, like the owner's
   reference: soft filled pills with NO outline (tone dot + label + count in an
   inner circle); the selected one is SOLID — the ink colour as the fill (white
   on dark themes, near-black on light), label in the page colour, its count in a
   surface-1 disc. Height = --fz-ctl-h (40 desktop / 44 phone), the same as the
   search field, view toggle and header buttons beside it.
   The solid fill is a ::before layer inside an isolated button, so a page or a
   skin that repaints the selected pill's `background` can never leave the
   inverted label on a mismatched fill (fz-team drawer, premium-light skin). */
.fz-fpill {
  --fz-fpill-bg: var(--fz-surface-1);
  --fz-fpill-sh: 0 1px 2px rgba(20, 24, 22, .06);
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: var(--fz-s-2);
  height: var(--fz-ctl-h, 40px);
  padding: 0 var(--fz-s-4);
  border: 1px solid transparent;
  border-radius: var(--fz-r-pill);
  background: var(--fz-fpill-bg);
  box-shadow: var(--fz-fpill-sh);
  color: var(--fz-text-2);
  font: inherit;
  font-size: var(--fz-fs-body);
  font-weight: var(--fz-fw-medium);
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--fz-t-fast) var(--fz-ease), color var(--fz-t-fast) var(--fz-ease), box-shadow var(--fz-t-fast) var(--fz-ease), transform var(--fz-t-fast) var(--fz-ease);
}
/* Surface ladder: light page → white pill; light module → surface-2;
   dark page → surface-2; dark module → surface-3. */
:is(.fz-panel, .fsw-card, .fsw-modal, .fsw-drawer, .fz-pop, .fsw-menu) .fz-fpill { --fz-fpill-bg: var(--fz-surface-2); --fz-fpill-sh: none; }
[data-theme="dark"] .fz-fpill { --fz-fpill-bg: var(--fz-surface-2); --fz-fpill-sh: none; }
[data-theme="dark"] :is(.fz-panel, .fsw-card, .fsw-modal, .fsw-drawer, .fz-pop, .fsw-menu) .fz-fpill { --fz-fpill-bg: var(--fz-surface-3); }
.fz-fpill:hover:not(:disabled):not(.is-on) {
  background-image: linear-gradient(var(--fz-kit-veil-2), var(--fz-kit-veil-2));
  color: var(--fz-text-1);
}
.fz-fpill::before {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: var(--fz-text-1);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--fz-t-fast) var(--fz-ease);
}
.fz-fpill.is-on {
  color: var(--fz-bg);
  font-weight: var(--fz-fw-semi);
}
.fz-fpill.is-on::before { opacity: 1; }
.fz-fpill.is-on .fsw-ic { color: currentColor; }
.fz-fpill:focus-visible { outline: 2px solid var(--fz-focus); outline-offset: 2px; }
.fz-fpill:disabled { opacity: .45; cursor: not-allowed; }
@media (prefers-reduced-motion: no-preference) {
  .fz-fpill:active:not(:disabled) { transform: scale(.97); }
}
.fz-fpill-dot { width: var(--fz-s-2); height: var(--fz-s-2); border-radius: var(--fz-r-pill); background: var(--fz-k); flex: none; }
/* The selected pill's own dot keeps its tone, ringed so it reads on the fill. */
.fz-fpill.is-on .fz-fpill-dot { box-shadow: 0 0 0 2px var(--fz-surface-1); }
.fz-fpill-n {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  margin-right: calc(var(--fz-s-2) * -1);
  border-radius: var(--fz-r-pill);
  background: var(--fz-surface-3);
  color: var(--fz-text-1);
  font-size: var(--fz-fs-meta);
  font-weight: var(--fz-fw-semi);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
[data-theme="dark"] :is(.fz-panel, .fsw-card, .fsw-modal, .fsw-drawer, .fz-pop, .fsw-menu) .fz-fpill:not(.is-on) .fz-fpill-n { background: var(--fz-border-strong); }
.fz-fpill.is-on .fz-fpill-n { background: var(--fz-surface-1); color: var(--fz-text-1); }

/* Search: soft filled field, rounded rectangle (reference ≈ radius 14), icon
   inside, the same height as the pills. A faint edge stays — an input must
   still look like one inside a white modal. */
.fz-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 260px;
  max-width: 100%;
  min-width: 0;
  height: var(--fz-ctl-h, 40px);
  border: 1px solid var(--fz-border);
  border-radius: var(--fz-r-sm);
  background: var(--fz-surface-1);
  color: var(--fz-text-3);
  transition: border-color var(--fz-t-fast) var(--fz-ease), box-shadow var(--fz-t-fast) var(--fz-ease), background-color var(--fz-t-fast) var(--fz-ease);
}
:is(.fz-panel, .fsw-card, .fsw-modal, .fsw-drawer, .fz-pop) .fz-search { background: var(--fz-surface-2); }
[data-theme="dark"] .fz-search { background: var(--fz-surface-2); border-color: transparent; box-shadow: inset 0 0 0 1px var(--fz-border); }
[data-theme="dark"] :is(.fz-panel, .fsw-card, .fsw-modal, .fsw-drawer, .fz-pop) .fz-search { background: var(--fz-surface-sunken); }
.fz-search:hover:not(.is-disabled) { border-color: var(--fz-border-strong); }
[data-theme="dark"] .fz-search:hover:not(.is-disabled) { box-shadow: inset 0 0 0 1px var(--fz-border-strong); }
.fz-search:focus-within,
[data-theme="dark"] .fz-search:focus-within { border-color: var(--fz-focus); box-shadow: 0 0 0 1px var(--fz-focus); }
.fz-search.is-disabled { opacity: .5; }
.fz-search .fz-search-ico { position: absolute; left: var(--fz-s-3); pointer-events: none; color: var(--fz-text-3); transition: color var(--fz-t-fast) var(--fz-ease); }
.fz-search:focus-within .fz-search-ico { color: var(--fz-text-2); }
/* styles.css:17725 styles every dark input[type=search] at (0,2,1); match it. */
.fz-search input.fz-search-in,
[data-theme="dark"] .fz-search input.fz-search-in {
  appearance: none;
  -webkit-appearance: none;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0 var(--fz-s-7) 0 calc(var(--fz-s-3) + 16px + var(--fz-s-2));
  border: 0;
  border-radius: inherit;
  background: transparent;
  box-shadow: none;
  color: var(--fz-text-1);
  font-family: var(--fz-font-body);
  font-size: var(--fz-fs-body);
  outline: none;
}
.fz-search input.fz-search-in::placeholder { color: var(--fz-text-3); opacity: 1; }
.fz-search input.fz-search-in::-webkit-search-cancel-button,
.fz-search input.fz-search-in::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.fz-search-x {
  position: absolute;
  right: var(--fz-s-1);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: var(--fz-r-pill);
  background: transparent;
  color: var(--fz-text-3);
  cursor: pointer;
}
.fz-search-x:hover { background: var(--fz-surface-hover); color: var(--fz-text-1); }
.fz-search-x:active { background: var(--fz-surface-3); }
.fz-search-x:focus-visible { outline: 2px solid var(--fz-focus); outline-offset: 0; }
.fz-search input.fz-search-in:disabled { cursor: not-allowed; }

/* Segmented control = the SAME recipe as legacy .fsw-tabs / .fsw-seg (fz-base §5):
   a soft track, the selected option raised on a neutral surface with full-strength
   text (no lime fill). Refine v3.10: no outline on the track, 13px labels, and the
   track is --fz-ctl-h tall (4 + 32 + 4 = 40 desktop, 4 + 36 + 4 = 44 phone) so it
   lines up with the pills and the search beside it. */
.fz-viewtog {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  box-sizing: border-box;
  height: var(--fz-ctl-h, 40px);
  padding: var(--fz-s-1);
  border: 0;
  border-radius: var(--fz-r-pill);
  background: var(--fz-surface-3);
  flex: none;
}
[data-theme="dark"] .fz-viewtog { background: var(--fz-surface-2); box-shadow: none; }
[data-theme="dark"] :is(.fz-panel, .fsw-card, .fsw-modal, .fsw-drawer, .fz-pop) .fz-viewtog { background: var(--fz-surface-sunken); }
.fz-viewtog-b {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 100%;
  padding: 0 var(--fz-s-3);
  border: 0;
  border-radius: var(--fz-r-pill);
  background: transparent;
  color: var(--fz-text-2);
  font: inherit;
  font-size: var(--fz-fs-meta);
  font-weight: var(--fz-fw-semi);
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--fz-t-fast) var(--fz-ease), color var(--fz-t-fast) var(--fz-ease), box-shadow var(--fz-t-fast) var(--fz-ease), transform var(--fz-t-fast) var(--fz-ease);
}
.fz-viewtog-b:hover:not(.is-on):not(:disabled) { background: var(--fz-kit-veil-2); color: var(--fz-text-1); }
.fz-viewtog-b.is-on {
  background: var(--fz-surface-1);
  color: var(--fz-text-1);
  box-shadow: inset 0 1px 0 var(--fz-kit-hl), var(--fz-shadow-soft);
}
[data-theme="dark"] .fz-viewtog-b.is-on { background: var(--fz-surface-3); box-shadow: inset 0 1px 0 var(--fz-kit-hl), 0 1px 2px rgba(0, 0, 0, .3); }
.fz-viewtog-b:focus-visible { outline: 2px solid var(--fz-focus); outline-offset: 1px; }
.fz-viewtog-b:disabled { opacity: .45; cursor: not-allowed; }
@media (prefers-reduced-motion: no-preference) {
  .fz-viewtog-b:active:not(:disabled):not(.is-on) { transform: scale(.96); }
}
/* styles.css:17838 gives every dark :focus-visible element an 8px radius, which
   squares off the ring of these round controls. Give them their own shape back. */
[data-theme="dark"] .fz-avup-btn:focus-visible,
[data-theme="dark"] .fz-fpill:focus-visible,
[data-theme="dark"] .fz-viewtog-b:focus-visible,
[data-theme="dark"] .fz-search-x:focus-visible,
[data-theme="dark"] .fz-panel-all:focus-visible,
[data-theme="dark"] .fz-crop-zb:focus-visible { border-radius: var(--fz-r-pill); }
[data-theme="dark"] .fz-avup.is-client .fz-avup-btn:focus-visible { border-radius: var(--fz-r-sm); }

/* Touch floors on phones — the same 44px ops-theme gives the legacy filter row
   (.fsw-tog / .fsw-sel / .fsw-tab at ≤768), so mixed rows line up. */
@media (max-width: 768px) {
  .fz-fpill, .fz-search, .fz-viewtog { height: 44px; }  /* toggle: 4 + 36 + 4 */
  .fz-search { width: 100%; }
  .fz-toolbar-s > .fz-search { flex: 1 1 100%; }
  .fz-search-x { width: 40px; height: 40px; right: 2px; }
  .fz-search input.fz-search-in,
  [data-theme="dark"] .fz-search input.fz-search-in { padding-right: calc(40px + var(--fz-s-1)); }
  .fz-panel-all { min-height: 40px; margin: calc(var(--fz-s-1) * -1) 0; }  /* 40px hit, same 32px footprint */
  .fz-crop-zb { width: 40px; height: 40px; }
}


/* ═══ 9. SKELETON ═══════════════════════════════════════════════════════════
   Static placeholders (no looping shimmer — DESIGN-SYSTEM §12). */
.fz-skel {
  display: flex;
  align-items: flex-start;
  gap: var(--fz-s-3);
  min-width: 0;
}
.fz-skel.is-card {
  padding: var(--fz-card-pad);
  border-radius: var(--fz-r-lg);
  background: var(--fz-surface-1);
  box-shadow: var(--fz-shadow-soft);
}
[data-theme="dark"] .fz-skel.is-card { box-shadow: none; }
.fz-panel .fz-skel.is-card { background: var(--fz-surface-2); box-shadow: none; border-radius: var(--fz-r-md); }
.fz-skel-av {
  flex: none;
  width: var(--fz-s-7);
  height: var(--fz-s-7);
  border-radius: var(--fz-r-pill);
  background: var(--fz-surface-3);
}
.fz-skel-lines { display: flex; flex-direction: column; gap: var(--fz-s-2); flex: 1 1 auto; min-width: 0; padding-top: 2px; }
.fz-skel-line { display: block; height: var(--fz-s-3); border-radius: var(--fz-r-pill); background: var(--fz-surface-3); }
.fz-skel-line.is-title { height: var(--fz-s-4); margin-bottom: var(--fz-s-1); }


/* ═══ 10. EMPTY STATES ══════════════════════════════════════════════════════
   ONE look for every empty state (QA r1 found three patterns): a 40px soft
   icon disc, one strong line, at most one short muted line, optional action.
   Markup is OpsEmpty's (.fsw-empty > -ico, -title, -sub, action children).
   The CONTEXT picks the layout — no prop needed, like OpsMetricCard:
     · on the page, in a drawer or a modal: centred column, NO box;
     · inside a module (OpsPanel, .fsw-card): a compact surface-2 row —
       disc left, text beside it, action(s) on the right (under the text on
       phones). Same shape as Today's "Nothing on fire." row.
   Hooks for callers that need to force it: .fsw-empty.is-compact (row
   anywhere), .fsw-empty.is-center (column inside a module), and
   .fsw-empty.is-ok / -warn / -crit / -info (toned disc, e.g. "All clear"). */
.fsw-empty {
  gap: var(--fz-s-2);
  padding: var(--fz-s-6) var(--fz-s-4);
  color: var(--fz-text-3);
}
.fsw-empty-ico {
  display: grid;
  place-items: center;
  width: var(--fz-s-8);
  height: var(--fz-s-8);
  margin-bottom: var(--fz-s-1);
  border-radius: var(--fz-r-pill);
  background: var(--fz-surface-3);   /* reads on the page, a card, a modal and the surface-2 row alike (surface-2 vanished on the light page) */
  color: var(--fz-text-2);
  line-height: 0;
}
.fsw-empty-ico .fsw-ic { width: 18px; height: 18px; }
.fsw-empty-title {
  font-family: var(--fz-font-body);
  font-size: var(--fz-fs-body);
  font-weight: var(--fz-fw-semi);
  line-height: 1.4;
  color: var(--fz-text-1);
}
.fsw-empty-sub {
  max-width: 420px;
  font-size: var(--fz-fs-meta);
  line-height: 1.5;
  color: var(--fz-text-3);
}
.fsw-empty > button,
.fsw-empty > a { margin-top: var(--fz-s-2); }
/* Toned disc ("All clear" = ok, "Couldn't load" = crit…) — status colour + the title's words. */
.fsw-empty.is-ok   .fsw-empty-ico { background: var(--fz-ok-soft);   color: var(--fz-ok-ink); }
.fsw-empty.is-warn .fsw-empty-ico { background: var(--fz-warn-soft); color: var(--fz-warn-ink); }
.fsw-empty.is-crit .fsw-empty-ico { background: var(--fz-crit-soft); color: var(--fz-crit-ink); }
.fsw-empty.is-info .fsw-empty-ico { background: var(--fz-info-soft); color: var(--fz-info-ink); }

/* In-module row. Rows: title / sub; the disc spans both and the pair sits
   centred against it (title hugs the bottom of row 1, sub the top of row 2;
   a title without a sub spans both rows). Action(s) are auto-placed into the
   next free column(s) on the right, so two buttons sit side by side. */
.fz-panel .fsw-empty:not(.is-center),
.fsw-card .fsw-empty:not(.is-center),
.fsw-empty.is-compact {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  grid-auto-columns: auto;
  gap: 2px var(--fz-s-3);
  align-content: center;
  align-items: center;
  justify-items: start;
  min-height: calc(var(--fz-s-8) + var(--fz-s-3) * 2);
  padding: var(--fz-s-3) var(--fz-s-4);
  border-radius: var(--fz-r-md);
  background: var(--fz-surface-2);
  text-align: left;
}
:is(.fz-panel, .fsw-card) .fsw-empty:not(.is-center) > .fsw-empty-ico,
.fsw-empty.is-compact > .fsw-empty-ico { grid-column: 1; grid-row: 1 / span 2; margin: 0; }
:is(.fz-panel, .fsw-card) .fsw-empty:not(.is-center) > .fsw-empty-title,
.fsw-empty.is-compact > .fsw-empty-title { grid-column: 2; grid-row: 1; align-self: end; }
:is(.fz-panel, .fsw-card) .fsw-empty:not(.is-center):not(:has(> .fsw-empty-sub)) > .fsw-empty-title,
.fsw-empty.is-compact:not(:has(> .fsw-empty-sub)) > .fsw-empty-title { grid-row: 1 / span 2; align-self: center; }
:is(.fz-panel, .fsw-card) .fsw-empty:not(.is-center) > .fsw-empty-sub,
.fsw-empty.is-compact > .fsw-empty-sub { grid-column: 2; grid-row: 2; align-self: start; max-width: none; }
:is(.fz-panel, .fsw-card) .fsw-empty:not(.is-center) > :not(.fsw-empty-ico):not(.fsw-empty-title):not(.fsw-empty-sub),
.fsw-empty.is-compact > :not(.fsw-empty-ico):not(.fsw-empty-title):not(.fsw-empty-sub) {
  grid-row: 1 / span 2;
  align-self: center;
  margin: 0 0 0 var(--fz-s-1);
}
/* A module nested in a module is already surface-2: the row drops its own box. */
.fz-panel .fz-panel .fsw-empty:not(.is-center),
.fsw-card .fsw-card .fsw-empty:not(.is-center) { background: transparent; padding-left: 0; padding-right: 0; }
@media (max-width: 640px) {
  /* Phones: action(s) drop under the text (auto-placed below row 2) instead of squeezing it. */
  :is(.fz-panel, .fsw-card) .fsw-empty:not(.is-center) > :not(.fsw-empty-ico):not(.fsw-empty-title):not(.fsw-empty-sub),
  .fsw-empty.is-compact > :not(.fsw-empty-ico):not(.fsw-empty-title):not(.fsw-empty-sub) {
    grid-column: 2;
    grid-row: auto;
    justify-self: start;
    margin: var(--fz-s-2) 0 0;
  }
}
/* The 32 bare "Nothing here." lines: block ones become the same quiet
   surface-2 well as the in-module row above (no dashed outline any more —
   one empty language, QA r1); inline ones (inside table cells / sentences)
   only get the colour. The 1px transparent border keeps the old box size. */
.fsw-list-empty {
  color: var(--fz-text-3);
  font-size: var(--fz-fs-body);
  line-height: 1.45;
}
div.fsw-list-empty {
  padding: var(--fz-s-3) var(--fz-s-4);
  border: 1px solid transparent;
  border-radius: var(--fz-r-md);
  background: var(--fz-surface-2);
}
.fz-panel .fz-panel div.fsw-list-empty,
.fsw-card .fsw-card div.fsw-list-empty { background: transparent; padding-left: 0; padding-right: 0; }


/* ═══ 11. DRAWER SHELL (.fsw-drawer*) ═══════════════════════════════════════
   OpsDrawerShell, OpsTaskDrawer, list/reel drawers and the Today fallback all
   share this chrome. Desktop: a floating surface-1 card, 8px off the window
   edges, --fz-drawer-w wide, 24px radius. Phone (≤640): a full-screen sheet.
   z-index ladder untouched (scrim 1150, .is-top 1250 — ops-theme.css).
   Inner sections (task forms, reel trail) belong to fz-overlays.css. */
.fsw-drawer-scrim { background: var(--fz-scrim); }
.fsw-drawer {
  top: var(--fz-s-2);
  right: var(--fz-s-2);
  bottom: var(--fz-s-2);
  left: auto;
  width: min(var(--fz-drawer-w), calc(100% - var(--fz-s-4)));
  overflow: hidden;
  background: var(--fz-surface-1);
  color: var(--fz-text-1);
  border: 1px solid var(--fz-border);
  border-radius: var(--fz-r-xl);
  box-shadow: var(--fz-shadow-pop);
  animation: fzKitDrawerIn var(--fz-t-med) var(--fz-ease);
}
@keyframes fzKitDrawerIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fzKitSheetIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}
.fsw-drawer-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--fz-s-3);
  flex: none;
  min-height: 64px;
  padding: var(--fz-s-3) var(--fz-s-3) var(--fz-s-3) var(--fz-s-6);
  background: var(--fz-surface-1);
  border-bottom: 1px solid var(--fz-border);
}
.fsw-drawer-h.has-title { align-items: flex-start; padding-top: var(--fz-s-4); padding-bottom: var(--fz-s-4); }
.fsw-drawer-hl {
  display: flex;
  flex-direction: column;
  gap: var(--fz-s-1);
  flex: 1 1 auto;
  min-width: 0;
}
.fsw-drawer-h.has-title .fsw-drawer-hl { padding-top: var(--fz-s-1); }
.fsw-drawer-eyebrow {
  gap: var(--fz-s-2);
  font-size: var(--fz-fs-meta);
  font-weight: var(--fz-fw-medium);
  line-height: 1.4;
  color: var(--fz-text-3);
  min-width: 0;
}
.fsw-drawer-eyebrow .xcs-mono { font-family: var(--fz-font-mono); color: var(--fz-text-2); }
.fsw-drawer-h .fsw-drawer-htitle {
  margin: 0;
  font-family: var(--fz-font-display);
  font-size: var(--fz-fs-section);
  font-weight: var(--fz-fw-semi);
  letter-spacing: -.015em;
  line-height: 1.3;
  color: var(--fz-text-1);
  overflow-wrap: anywhere;
}
.fsw-drawer-hsub {
  font-size: var(--fz-fs-meta);
  line-height: 1.45;
  color: var(--fz-text-2);
}
.fsw-drawer-h .fsw-x {
  flex: none;
  width: var(--fz-s-8);
  height: var(--fz-s-8);
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
}
.fsw-drawer-b {
  flex: 1 1 auto;
  min-height: 0;
  padding: var(--fz-s-5) var(--fz-s-6) var(--fz-s-8);
  gap: var(--fz-s-4);
  background: var(--fz-surface-1);
}
@media (max-width: 640px) {
  .fsw-drawer {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    animation: fzKitSheetIn var(--fz-t-med) var(--fz-ease);
  }
  .fsw-drawer-h {
    min-height: 56px;
    padding: calc(var(--fz-s-2) + env(safe-area-inset-top, 0px)) var(--fz-s-2) var(--fz-s-2) var(--fz-s-4);
  }
  .fsw-drawer-h.has-title { padding-top: calc(var(--fz-s-3) + env(safe-area-inset-top, 0px)); padding-bottom: var(--fz-s-3); }
  .fsw-drawer-b {
    padding: var(--fz-s-4) var(--fz-s-4) calc(var(--fz-s-6) + env(safe-area-inset-bottom, 0px));
    gap: var(--fz-s-3);
  }
}
