/* ============================================================
   Field Operations — design system
   Standalone token set + components for the rebuilt module.
   Prefix: --fo- (tokens) / .fo- (components). No external deps.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* color · canvas & ink */
  --fo-canvas: #f6f6f4;
  --fo-surface: #ffffff;
  --fo-surface-2: #fbfbfa;
  --fo-ink: #181b21;
  --fo-ink-2: #5d6470;
  --fo-ink-3: #989fab;
  --fo-line: rgba(24, 27, 33, 0.07);
  --fo-line-strong: rgba(24, 27, 33, 0.12);

  /* color · accent (JLCS royal blue, from the brand logo) */
  --fo-accent: #0b3f9e;
  --fo-accent-deep: #082f78;
  --fo-accent-soft: #e9f0fb;
  --fo-accent-sky: #7db8ef;
  --fo-accent-ink: #ffffff;

  /* color · status */
  --fo-ok: #188150;
  --fo-ok-deep: #0a6b3e;
  --fo-ok-soft: #e8f4ee;
  --fo-warn: #a16207;
  --fo-warn-soft: #faf3e3;
  --fo-danger: #b3261e;
  --fo-danger-soft: #fbecea;
  --fo-info: #0e7490;
  --fo-info-soft: #e6f3f7;

  /* type — Plus Jakarta Sans is the JLCS display voice; UI text stays native */
  --fo-font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  --fo-font-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, sans-serif;
  --fo-mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;

  /* brand — the JLCS signature ramp (logo royal → logo sky) */
  --fo-grad: linear-gradient(135deg, #0b3f9e 0%, #2f6cc9 55%, #7db8ef 100%);
  --fo-grad-text: linear-gradient(90deg, #0b3f9e, #3d7ad1);

  /* radius */
  --fo-r-sm: 8px;
  --fo-r-md: 12px;
  --fo-r-lg: 16px;
  --fo-r-xl: 22px;

  /* elevation */
  --fo-shadow-1: 0 1px 2px rgba(24, 27, 33, 0.05);
  --fo-shadow-2: 0 10px 30px -14px rgba(24, 27, 33, 0.22);
  --fo-shadow-3: 0 24px 60px -24px rgba(24, 27, 33, 0.32);

  /* motion */
  --fo-ease: cubic-bezier(0.25, 0.6, 0.25, 1);
  --fo-spring: cubic-bezier(0.34, 1.26, 0.42, 1);
  --fo-fast: 140ms;
  --fo-base: 200ms;
  --fo-slow: 340ms;

  /* layout — thin rail, compact panel */
  --fo-side-w: 208px;
  --fo-rail-w: 54px;
  --fo-page-max: 1340px;
  --fo-page-wide: 1560px;   /* table-dense surfaces (rosters) earn a wider measure */

  /* liquid glass — the material for everything that floats above content
     (sidebar, menus, modals, toasts). Recipe follows Apple's Landmarks
     sample: a truly translucent milky gradient over heavy blur+saturation
     lensing, a specular rim brightest on the top edge, an inner glow, and
     layered depth. Needs the colorful canvas beneath it to read as glass. */
  --fo-glass-top: rgba(255, 255, 255, 0.5);
  --fo-glass-bottom: rgba(255, 255, 255, 0.22);
  --fo-glass-blur: 34px;
  --fo-glass-sat: 210%;
  --fo-glass-bright: 1.08;
  --fo-glass-border: rgba(255, 255, 255, 0.8);
  --fo-glass-rim:
      inset 0 1.5px 0 rgba(255, 255, 255, 1),
      inset 0 -1px 0 rgba(255, 255, 255, 0.5),
      inset 1.5px 0 0 rgba(255, 255, 255, 0.55),
      inset -1.5px 0 0 rgba(255, 255, 255, 0.55),
      inset 0 0 0 1px rgba(255, 255, 255, 0.25),
      inset 0 0 36px rgba(255, 255, 255, 0.35);
  --fo-glass-shadow:
      0 1px 1px rgba(15, 35, 70, 0.05),
      0 2px 4px rgba(15, 35, 70, 0.04),
      0 8px 16px -4px rgba(15, 35, 70, 0.08),
      0 20px 40px -10px rgba(15, 35, 70, 0.14),
      0 40px 80px -20px rgba(15, 35, 70, 0.2);
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--fo-font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--fo-ink);
  /* the aurora the glass refracts — JLCS sky over royal blue, one warm
     counterpoint. Content cards stay solid white above it. */
  /* the quietest possible canvas: a whisper of sky falling into blue-grey.
     Brand color lives in the chrome, not the wallpaper. */
  background:
    radial-gradient(110% 62% at 50% -22%, rgba(125, 184, 239, 0.14), transparent 60%),
    linear-gradient(180deg, #f5f7fa 0%, #edf0f5 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* fluid page-to-page navigation (Chrome's MPA view transitions) */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: fo-vt-out 0.14s ease both;
}

::view-transition-new(root) {
  animation: fo-vt-in 0.22s ease both;
}

@keyframes fo-vt-out {
  to { opacity: 0; }
}

@keyframes fo-vt-in {
  from { opacity: 0; }
}

/* ---------- Liquid glass material ---------- */
.fo-glass {
  background: linear-gradient(180deg, var(--fo-glass-top), var(--fo-glass-bottom));
  -webkit-backdrop-filter: blur(var(--fo-glass-blur)) saturate(var(--fo-glass-sat)) brightness(var(--fo-glass-bright));
  backdrop-filter: blur(var(--fo-glass-blur)) saturate(var(--fo-glass-sat)) brightness(var(--fo-glass-bright));
  border: 1px solid var(--fo-glass-border);
  box-shadow: var(--fo-glass-shadow), var(--fo-glass-rim);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .fo-glass {
    background: rgba(252, 252, 251, 0.97);
  }
}

h1, h2, h3, h4, p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

svg.fo-i {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

:focus-visible {
  outline: 2px solid var(--fo-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Scrollbars: ONE quiet treatment, everywhere ----------
   Invisible at rest. A hairline rounded thumb fades in only when you reach
   into a scrollable area (hover / focus-within), and deepens while you drag.
   The visible thumb is ~3px inside an 8px hit-track — as thin as stays usable.
   Every scroll surface inherits this; nothing overrides it. */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: transparent;                                   /* hidden at rest */
  border-radius: 999px;
  border: 2px solid transparent;                            /* shrinks the visible thumb to ~2px */
  background-clip: padding-box;
  transition: background-color 0.18s ease;
}

:hover::-webkit-scrollbar-thumb,
:focus-within::-webkit-scrollbar-thumb {
  background-color: rgba(24, 27, 33, 0.18);
}

::-webkit-scrollbar-thumb:hover {
  background-color: rgba(24, 27, 33, 0.34);
}

::-webkit-scrollbar-thumb:active {
  background-color: rgba(24, 27, 33, 0.44);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* Firefox has no ::-webkit-scrollbar — give it the standard properties ONLY.
   Setting scrollbar-width/color in Chrome 121+ DISABLES the custom hairline bar
   above and forces a thicker native scrollbar, so they must stay Firefox-scoped. */
@supports not selector(::-webkit-scrollbar) {
  * {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
  }
  :hover,
  :focus-within {
    scrollbar-color: rgba(24, 27, 33, 0.20) transparent;
  }
}

::selection {
  background: var(--fo-accent-soft);
}

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

/* ---------- Shell: sidebar + main ---------- */
.fo-shell {
  display: flex;
  min-height: 100vh;
}

/* Two states (rail is the default):
   · rail — a thin floating glass column, icons only and perfectly centered;
     hovering it grows a liquid-glass flyout OVER the content
   · pinned (html.nav-pinned) — the panel sits in the layout flow and pushes
     content right. The discreet pin in the footer switches modes.
   The inner column has a FIXED width in every state, so nothing reflows
   during the motion — the panel simply reveals it like a curtain. */
.fo-side {
  width: var(--fo-side-w);
  flex: none;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 70;
  transition: width 0.4s cubic-bezier(0.3, 0.9, 0.32, 1);
}

.fo-side-panel {
  position: absolute;
  top: 10px;
  left: 10px;
  /* hugs its tabs (user direction 2026-07-01): no bottom anchor — the panel
     is as tall as its content and GROWS when sub-tabs reveal on expand */
  max-height: calc(100vh - 20px);
  width: calc(100% - 10px);
  border-radius: 22px;
  /* the panel itself is liquid glass, floating over the aurora */
  background: linear-gradient(180deg, var(--fo-glass-top), var(--fo-glass-bottom));
  -webkit-backdrop-filter: blur(var(--fo-glass-blur)) saturate(var(--fo-glass-sat)) brightness(var(--fo-glass-bright));
  backdrop-filter: blur(var(--fo-glass-blur)) saturate(var(--fo-glass-sat)) brightness(var(--fo-glass-bright));
  border: 1px solid var(--fo-glass-border);
  box-shadow: var(--fo-glass-shadow), var(--fo-glass-rim);
  overflow: hidden;
  transition: width 0.46s var(--fo-spring), box-shadow 0.32s var(--fo-ease);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .fo-side-panel {
    background: rgba(250, 251, 253, 0.96);
  }
}

/* fixed-width content column — identical layout in rail, flyout and pinned */
.fo-side-inner {
  width: calc(var(--fo-side-w) - 12px);
  max-height: calc(100vh - 20px);
  overflow-y: auto;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  padding: 12px 5px;
  white-space: nowrap;
}

.fo-side-inner::-webkit-scrollbar { display: none; }

/* labels morph rather than pop */
.fo-brand-text,
.fo-nav a .lbl,
.fo-nav-label,
.fo-side-foot .who,
.fo-navpin {
  transition: opacity 0.2s var(--fo-ease) 0.16s, transform 0.3s var(--fo-ease) 0.16s;
}

@media (min-width: 921px) {
  /* rail is the default state */
  html:not(.nav-pinned) .fo-side {
    width: var(--fo-rail-w);
  }

  /* collapsed: labels fade out fast, vertical rhythm stays intact
     (the flyout also counts as open while the module hub is open) */
  html:not(.nav-pinned):not(:has(#moduleMenu.is-open)) .fo-side:not(:hover):not(:focus-within) .fo-brand-text,
  html:not(.nav-pinned):not(:has(#moduleMenu.is-open)) .fo-side:not(:hover):not(:focus-within) .fo-nav a .lbl,
  html:not(.nav-pinned):not(:has(#moduleMenu.is-open)) .fo-side:not(:hover):not(:focus-within) .fo-nav-label,
  html:not(.nav-pinned):not(:has(#moduleMenu.is-open)) .fo-side:not(:hover):not(:focus-within) .fo-side-foot .who,
  html:not(.nav-pinned):not(:has(#moduleMenu.is-open)) .fo-side:not(:hover):not(:focus-within) .fo-navpin {
    opacity: 0;
    transform: translateX(8px);
    transition-delay: 0s;
    transition-duration: 0.12s;
  }

  /* the closed column waits a beat before retracting (hover intent) */
  html:not(.nav-pinned) .fo-side-panel {
    transition-delay: 0.22s;
  }

  /* hover, keyboard focus, or an open hub/account menu: spring open OVER the page */
  html:not(.nav-pinned) .fo-side:hover .fo-side-panel,
  html:not(.nav-pinned) .fo-side:focus-within .fo-side-panel,
  html:not(.nav-pinned):has(#moduleMenu.is-open) .fo-side-panel {
    width: calc(var(--fo-side-w) - 10px);
    transition-delay: 0.07s;
    box-shadow: var(--fo-glass-shadow), var(--fo-glass-rim),
      0 30px 90px -18px rgba(11, 63, 158, 0.32);
  }
}

/* brand lockup — the platform comes first, the module second */
.fo-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  margin: 0 0 10px;
  padding: 5px 6px 5px 2px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background var(--fo-fast) var(--fo-ease);
}

.fo-brand:hover {
  background: rgba(255, 255, 255, 0.55);
}

.fo-brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  flex: none;
  object-fit: contain;
}

.fo-brand-sub {
  display: block;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--fo-grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.fo-brand-name {
  display: block;
  font-family: var(--fo-font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 1px;
}

.fo-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fo-nav-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fo-ink-3);
  padding: 14px 8px 5px;
  max-height: 34px;
  overflow: hidden;
  transition: max-height 0.28s var(--fo-ease), padding 0.2s var(--fo-ease),
    opacity 0.2s var(--fo-ease) 0.16s, transform 0.3s var(--fo-ease) 0.16s;
}

.fo-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 550;
  color: var(--fo-ink-2);
  transition: background var(--fo-fast) var(--fo-ease),
    color var(--fo-fast) var(--fo-ease),
    transform 0.25s var(--fo-spring);
}

.fo-nav a svg.fo-i {
  width: 18px;
  height: 18px;
  opacity: 0.85;
}

.fo-nav a:hover {
  background: rgba(255, 255, 255, 0.5);
  color: var(--fo-ink);
}

.fo-nav a:active {
  transform: scale(0.96);
}

.fo-nav a.is-active {
  /* opaque glass pill + the JLCS gradient indicator */
  background: rgba(255, 255, 255, 0.85);
  color: var(--fo-accent-deep);
  font-weight: 650;
  box-shadow: 0 1px 3px rgba(15, 35, 70, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.fo-nav a.is-active::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 3px;
  background: var(--fo-grad);
}

.fo-nav a.is-active svg.fo-i {
  opacity: 1;
  color: var(--fo-accent);
}

/* nested module sub-nav — e.g. Inventory areas tucked under the Inventory tab.
   Indented column with a guide line; tucks away to nothing when the rail is in
   its icon-only resting state (children reappear on hover / when pinned). */
.fo-nav-sub {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 2px 0 4px 17px;
  padding-left: 9px;
  border-left: 1.5px solid var(--fo-line-strong);
  max-height: 360px;
  overflow: hidden;
  transition: max-height 0.28s var(--fo-ease), opacity 0.18s var(--fo-ease),
    margin 0.2s var(--fo-ease);
}

.fo-nav-sub a {
  font-size: 12.5px;
  font-weight: 500;
}

.fo-nav-sub a svg.fo-i {
  width: 16px;
  height: 16px;
}

/* the parent row stays lit (icon accent) while you're anywhere in its section */
.fo-nav a.is-parent.is-current {
  color: var(--fo-accent-deep);
  font-weight: 650;
}

.fo-nav a.is-parent.is-current svg.fo-i {
  opacity: 1;
  color: var(--fo-accent);
}

@media (min-width: 921px) {
  /* collapsed rail: hide the nested children, keep just the parent icon */
  html:not(.nav-pinned):not(:has(#moduleMenu.is-open)) .fo-side:not(:hover):not(:focus-within) .fo-nav-sub {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    margin-bottom: 0;
    pointer-events: none;
  }

  /* collapsed rail: group labels give up their BOX too (they only faded
     before, so modules whose nav opens with a label sat lower than ones
     that don't — the icon column now has identical rhythm everywhere;
     2026-07-01 consistency pass) */
  html:not(.nav-pinned):not(:has(#moduleMenu.is-open)) .fo-side:not(:hover):not(:focus-within) .fo-nav-label {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
}

.fo-side-foot {
  /* 2026-07-16: was a ~50px band (6+8 padding, strong rule, 24px pin on the
     panel's 12px bottom pad) — now a thin, quiet strip: tighter spacing, a
     fainter rule, and the foot absorbs half the panel's bottom padding. */
  margin: 2px 0 -6px;
  padding: 2px 2px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  gap: 10px;
}

.fo-side-foot .fo-ava {
  width: 30px;
  height: 30px;
  font-size: 11px;
}

/* the pin: a quiet 24px ghost control in the footer */
.fo-navpin {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--fo-ink-3);
  opacity: 0.55;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
}

.fo-navpin svg.fo-i {
  width: 11px;
  height: 11px;
}

.fo-navpin:hover {
  background: rgba(255, 255, 255, 0.6);
  color: var(--fo-ink);
  opacity: 1;
}

html.nav-pinned .fo-navpin { opacity: 1; }

html.nav-pinned .fo-navpin {
  color: var(--fo-accent);
  transform: rotate(45deg);
}

.fo-side-foot-name {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
}

.fo-side-foot-role {
  font-size: 11px;
  color: var(--fo-ink-3);
}

.fo-main {
  flex: 1;
  min-width: 0;
}

.fo-page {
  max-width: var(--fo-page-max);
  margin: 0 auto;
  padding: 58px 40px 72px;
  /* fill-mode must release after the run: a filled transform animation would
     turn .fo-page into the containing block for fixed modals/toasts */
  animation: fo-rise var(--fo-slow) var(--fo-ease) backwards;
}

/* roster/list surfaces opt into a wider measure: more columns breathe and the
   side gutters shrink to a frame instead of a void. max-width still "breathes
   then stops", so it only changes anything on screens wider than the base cap. */
.fo-page.is-wide {
  max-width: var(--fo-page-wide);
}

@keyframes fo-rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Page header ---------- */
.fo-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.fo-eyebrow {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--fo-grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 6px;
}

.fo-title {
  font-family: var(--fo-font-display);
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.fo-sub {
  margin-top: 6px;
  font-size: 14px;
  color: var(--fo-ink-2);
}

.fo-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.fo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 10px;            /* matches .fo-input/.fo-select beside it */
  border: 1px solid rgba(11, 63, 158, 0.12);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  /* the JLCS canonical CTA: a soft brand tint, never a dark slab (matches Save) */
  background: var(--fo-accent-soft);
  color: var(--fo-accent-deep);
  box-shadow: none;
  transition: background var(--fo-fast) var(--fo-ease),
    filter var(--fo-fast) var(--fo-ease),
    transform 0.26s var(--fo-spring),
    box-shadow var(--fo-fast) var(--fo-ease),
    border-color var(--fo-fast) var(--fo-ease);
  user-select: none;
  white-space: nowrap;
}

.fo-btn svg.fo-i {
  width: 16px;
  height: 16px;
}

.fo-btn:hover {
  background: #dce8f9;
  border-color: rgba(11, 63, 158, 0.22);
  filter: none;
}

.fo-btn:active {
  transform: scale(0.96);
}

.fo-btn.is-quiet {
  background: var(--fo-surface);
  color: var(--fo-ink);
  border-color: var(--fo-line-strong);
  box-shadow: var(--fo-shadow-1);
}

.fo-btn.is-quiet:hover {
  background: var(--fo-canvas);
  border-color: var(--fo-ink-3);
  filter: none;
}

/* compact toolbar: an icon-only utility button. The active count badge
   (filters / columns) rides the top-right corner instead of sitting inline. */
.fo-btn.is-icon {
  width: 38px;
  padding-left: 0;
  padding-right: 0;
  gap: 0;
  position: relative;
}

.fo-btn.is-icon .fo-fcount {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  font-size: 10px;
  box-shadow: 0 0 0 2px var(--fo-surface);   /* lift the badge off the button */
}

/* Tooltip — a light glass pill that fades in after a short hover beat, never a
   dark slab. The label rides just below its control. */
.fo-tip {
  position: relative;
}

.fo-tip::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%) translateY(-3px) scale(0.94);
  transform-origin: top center;
  padding: 5px 10px;
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.94));
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid var(--fo-glass-border);
  box-shadow: var(--fo-glass-shadow), var(--fo-glass-rim);
  color: var(--fo-ink);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.005em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 95;
  transition: opacity 0.16s var(--fo-ease), transform 0.16s var(--fo-ease);
  transition-delay: 0s;
}

.fo-tip:hover::after,
.fo-tip:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  transition-delay: 0.45s;   /* appears after a deliberate beat, not instantly */
}

/* an open menu owns the space directly below the button — suppress the tip so
   the two never stack on top of each other */
.fo-menu-wrap:has(.fo-menu.is-open) .fo-tip::after {
  opacity: 0 !important;
  transition-delay: 0s;
}

/* discreet primary — a soft brand tint, not a saturated slab. For commit
   actions (Save) on light surfaces where a solid CTA reads too heavy. */
.fo-btn.is-soft {
  background: var(--fo-accent-soft);
  color: var(--fo-accent-deep);
  border-color: rgba(11, 63, 158, 0.12);
  box-shadow: none;
}

.fo-btn.is-soft:hover {
  background: #dce8f9;
  border-color: rgba(11, 63, 158, 0.22);
  filter: none;
}

/* Shared dsConfirm dialog (ds-confirm.js injects its own <style> with a navy
   primary via the undefined --ds-brand-navy var). This file loads ONLY on v3
   pages, so reskin the primary button to match .fo-btn.is-soft (royal). The
   descendant selector (.ds-confirm-backdrop …) outranks the injected
   single-class rule regardless of cascade order. -danger stays red. */
.ds-confirm-backdrop .ds-confirm-btn-primary {
  background: var(--fo-accent-soft);
  border-color: rgba(11, 63, 158, 0.14);
  color: var(--fo-accent-deep);
}
.ds-confirm-backdrop .ds-confirm-btn-primary:hover {
  background: #dce8f9;
  border-color: rgba(11, 63, 158, 0.26);
}

.fo-btn.is-soft:disabled {
  opacity: 1;
  color: var(--fo-ink-3);
  background: var(--fo-canvas);
  border-color: var(--fo-line);
}

.fo-btn.is-ghost {
  background: transparent;
  color: var(--fo-ink-2);
  border-color: transparent;
  box-shadow: none;
}

.fo-btn.is-ghost:hover {
  background: rgba(255, 255, 255, 0.6);
  color: var(--fo-ink);
  filter: none;
}

.fo-btn.is-danger {
  background: var(--fo-danger);
  color: var(--fo-accent-ink);              /* own its white text — no longer inherits it */
  border-color: rgba(255, 255, 255, 0.22);
}

.fo-btn.is-danger:hover {
  background: #96201a;
  border-color: rgba(255, 255, 255, 0.22);
  filter: none;
}

.fo-btn.is-danger-quiet {
  background: var(--fo-surface);
  color: var(--fo-danger);
  border-color: var(--fo-line-strong);
}

.fo-btn.is-danger-quiet:hover {
  background: var(--fo-danger-soft);
  border-color: var(--fo-danger);
}

.fo-btn.is-sm {
  padding: 6px 11px;
  font-size: 12.5px;
  border-radius: 8px;
  gap: 6px;
}

.fo-btn.is-sm svg.fo-i {
  width: 14px;
  height: 14px;
}

.fo-btn.is-lg {
  padding: 13px 24px;
  font-size: 15px;
  border-radius: 12px;
}

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

/* disabled = a readable grey chip, not a 45%-faded tint (the old opacity was
   tuned for the saturated slab; on the soft default it vanished). Carries the
   paint HERE so it wins on source order over the per-variant disabled rules. */
.fo-btn:disabled {
  opacity: 1;
  color: var(--fo-ink-3);
  background: var(--fo-canvas);
  border-color: var(--fo-line);
  pointer-events: none;
}

/* one focus language everywhere — the soft royal halo inputs already
   wear. The UA's dark ring never appears on a v3 surface. */
.fo-btn:focus-visible,
.fo-x:focus-visible,
button.fo-chip:focus-visible,
.fo-th-sort:focus-visible,
.fo-rowact:focus-visible,
.fo-seg a:focus-visible,
.fo-seg button:focus-visible {
  outline: 3px solid rgba(11, 63, 158, 0.25);
  outline-offset: 1px;
}

/* ---------- KPI strip ---------- */
.fo-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.fo-kpi {
  background: var(--fo-surface);
  border: 1px solid var(--fo-line);
  border-radius: var(--fo-r-lg);
  padding: 18px 20px 16px;
  box-shadow: var(--fo-shadow-1);
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: box-shadow var(--fo-base) var(--fo-ease),
    transform var(--fo-base) var(--fo-ease),
    border-color var(--fo-base) var(--fo-ease);
}

a.fo-kpi:hover {
  transform: translateY(-2px);
  box-shadow: var(--fo-shadow-2);
  border-color: var(--fo-line-strong);
}

.fo-kpi-label {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fo-ink-3);
}

.fo-kpi-value {
  font-family: var(--fo-font-display);
  font-size: 31px;
  font-weight: 750;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.fo-kpi-value .unit {
  font-size: 16px;
  font-weight: 600;
  color: var(--fo-ink-3);
  margin-left: 2px;
}

.fo-kpi.is-alert .fo-kpi-value {
  color: var(--fo-danger);
}

.fo-kpi-hint {
  font-size: 12px;
  color: var(--fo-ink-3);
}

a.fo-kpi .fo-kpi-hint {
  color: var(--fo-accent);
  font-weight: 550;
}

/* ---------- Cards ---------- */
.fo-card {
  background: var(--fo-surface);
  border: 1px solid var(--fo-line);
  border-radius: var(--fo-r-lg);
  box-shadow: var(--fo-shadow-1);
}

.fo-card.is-pad {
  padding: 22px 24px;
}

.fo-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--fo-line);
}

.fo-card-head h3 {
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 9px;
}

.fo-card-head h3 svg.fo-i {
  width: 16px;
  height: 16px;
  color: var(--fo-ink-3);
}

.fo-card-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fo-accent);
  transition: color var(--fo-fast) var(--fo-ease);
}

.fo-card-link:hover {
  color: var(--fo-accent-deep);
}

/* in-card section heading for padded cards — same anatomy as .fo-card-head h3 */
.fo-card-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.fo-card-title svg.fo-i {
  width: 16px;
  height: 16px;
  color: var(--fo-ink-3);
}

/* Some pages wrap icon+text in an inner .ttl span (contracts rail, inspections
   workspace). The span is ONE flex child, so the title's gap/centering never
   reaches the icon inside it — make the wrapper itself a flex row so both
   idioms align identically. (Generalizes the page-scoped .fo-iv-main fix.) */
.fo-card-title .ttl {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

a.fo-card.is-link {
  display: block;
  transition: transform var(--fo-base) var(--fo-ease),
    box-shadow var(--fo-base) var(--fo-ease),
    border-color var(--fo-base) var(--fo-ease);
}

a.fo-card.is-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--fo-shadow-2);
  border-color: var(--fo-line-strong);
}

/* ---------- Segmented control / tabs (glass-lite capsule) ---------- */
.fo-seg {
  display: inline-flex;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.28));
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 1px 3px rgba(15, 35, 70, 0.06);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  /* when a tab strip outgrows its space (e.g. a 6-tab drawer on a phone),
     scroll it horizontally rather than squashing or clipping the tabs — the
     cut-off tab at the edge is the affordance. Inner bar hidden for a clean pill.
     flex-shrink:0 keeps a flex parent (e.g. a space-between row) from
     compressing the strip below its content; it only scrolls when it genuinely
     exceeds its container, where max-width:100% then clamps and scrolls it. */
  flex-shrink: 0;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.fo-seg::-webkit-scrollbar { display: none; }

.fo-seg a,
.fo-seg button {
  border: 0;
  background: transparent;
  flex: 0 0 auto;            /* keep each tab its natural size — scroll, never squash */
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fo-ink-2);
  cursor: pointer;
  transition: background var(--fo-fast) var(--fo-ease),
    color var(--fo-fast) var(--fo-ease),
    box-shadow 0.26s var(--fo-ease),
    transform 0.26s var(--fo-spring);
  white-space: nowrap;
}

.fo-seg a:hover,
.fo-seg button:hover {
  color: var(--fo-ink);
}

/* the selected pill is a piece of liquid glass: milky gradient, specular
   top rim, a soft royal floor shadow lifting it off the capsule */
.fo-seg a.is-active,
.fo-seg button.is-active {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(244, 248, 254, 0.88) 100%);
  color: var(--fo-accent);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(11, 63, 158, 0.07),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5),
    0 1px 2px rgba(15, 35, 70, 0.1),
    0 3px 8px -2px rgba(11, 63, 158, 0.22),
    0 8px 18px -6px rgba(11, 63, 158, 0.18);
  transform: translateY(-0.5px);
}

.fo-seg a.is-active:active,
.fo-seg button.is-active:active {
  transform: scale(0.97);
}

/* sub-nav row under page header */
.fo-subnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

/* ---------- Chips & badges ---------- */
.fo-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.01em;
  background: var(--fo-canvas);
  color: var(--fo-ink-2);
  white-space: nowrap;
}

.fo-chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.fo-chip svg.fo-i {
  width: 12px;
  height: 12px;
}

/* chips are sometimes buttons (template pickers, removable filters) */
button.fo-chip {
  border: 0;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--fo-fast) var(--fo-ease), color var(--fo-fast) var(--fo-ease);
}

button.fo-chip:hover {
  background: var(--fo-line-strong);
  color: var(--fo-ink);
}

.fo-chip.is-ok { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-chip.is-warn { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-chip.is-danger { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-chip.is-info { background: var(--fo-info-soft); color: var(--fo-info); }
.fo-chip.is-accent { background: var(--fo-accent-soft); color: var(--fo-accent-deep); }

.fo-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
  color: var(--fo-ok);
}

/* inline-flex beats the UA [hidden] rule — same trap as .fo-field[hidden].
   The badge must stay dark until its surface proves it's live (audit W3). */
.fo-live[hidden] { display: none; }

.fo-live .pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fo-ok);
  animation: fo-pulse 2.2s var(--fo-ease) infinite;
}

@keyframes fo-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(24, 129, 80, 0.35); }
  50% { box-shadow: 0 0 0 5px rgba(24, 129, 80, 0); }
}

/* ---------- Tables ---------- */
.fo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.fo-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--fo-ink-3);
  padding: 12px 14px;
  border-bottom: 1px solid var(--fo-line);
  white-space: nowrap;
}

.fo-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--fo-line);
  vertical-align: middle;
}

/* tables share the card's 22px content edge */
.fo-table th:first-child,
.fo-table td:first-child {
  padding-left: 22px;
}

.fo-table th:last-child,
.fo-table td:last-child {
  padding-right: 22px;
}

.fo-table tbody tr {
  transition: background var(--fo-fast) var(--fo-ease);
}

.fo-table tbody tr:hover {
  background: var(--fo-surface-2);
}

.fo-table tbody tr:last-child td {
  border-bottom: 0;
}

.fo-table td.num,
.fo-table th.num {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.fo-table .mono {
  font-family: var(--fo-mono);
  font-size: 12px;
  color: var(--fo-ink-2);
}

/* ---------- Forms ---------- */
.fo-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fo-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--fo-ink-2);
}

.fo-input,
.fo-select,
textarea.fo-input {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--fo-line-strong);
  background: var(--fo-surface);
  font: inherit;
  font-size: 13.5px;
  color: var(--fo-ink);
  transition: border-color var(--fo-fast) var(--fo-ease),
    box-shadow var(--fo-fast) var(--fo-ease);
}

.fo-input:hover,
.fo-select:hover {
  border-color: var(--fo-ink-3);
}

.fo-input:focus,
.fo-select:focus,
textarea.fo-input:focus {
  outline: none;
  border-color: var(--fo-accent);
  box-shadow: 0 0 0 3px var(--fo-accent-soft);
}

.fo-input::placeholder {
  color: var(--fo-ink-3);
}

.fo-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23989fab' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 34px;
}

.fo-search {
  position: relative;
}

.fo-search svg.fo-i {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--fo-ink-3);
  pointer-events: none;
}

.fo-search .fo-input {
  padding-left: 34px;
}

.fo-color {
  width: 34px;
  height: 34px;
  padding: 3px;
  border: 1px solid var(--fo-line-strong);
  border-radius: 9px;
  background: var(--fo-surface);
  cursor: pointer;
}

.fo-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--fo-ink-2);
  cursor: pointer;
  user-select: none;
}

.fo-check:hover {
  color: var(--fo-ink);
}

/* hand-drawn check/radio — native input stays live, only the face is ours */
.fo-check input {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  margin: 0;
  flex: none;
  border: 1.5px solid rgba(24, 27, 33, 0.28); /* visible at rest (WCAG non-text) */
  border-radius: 5.5px;
  background: var(--fo-surface);
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  transition: background var(--fo-fast) var(--fo-ease),
    border-color var(--fo-fast) var(--fo-ease),
    box-shadow var(--fo-fast) var(--fo-ease),
    transform 0.3s var(--fo-spring);
}

.fo-check input::before {
  content: "";
  width: 9px;
  height: 9px;
  transform: scale(0);
  transition: transform 0.32s var(--fo-spring);
  background: #fff;
  clip-path: polygon(13% 52%, 5% 64%, 39% 92%, 95% 22%, 84% 12%, 37% 71%);
}

.fo-check input:hover {
  border-color: var(--fo-ink-3);
}

.fo-check input:checked {
  background: linear-gradient(180deg, #2059c6, var(--fo-accent));
  border-color: var(--fo-accent);
  box-shadow: 0 1px 3px rgba(11, 63, 158, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.fo-check input:checked::before {
  transform: scale(1);
}

.fo-check input:active {
  transform: scale(0.88);
}

.fo-check input:focus-visible {
  outline: none;
  border-color: var(--fo-accent);
  box-shadow: 0 0 0 3px rgba(11, 63, 158, 0.22); /* a ring you can actually see */
}

.fo-check input[type="radio"] {
  border-radius: 50%;
}

.fo-check input[type="radio"]::before {
  clip-path: none;
  border-radius: 50%;
  width: 7px;
  height: 7px;
}

/* ---------- Avatars ---------- */
.fo-ava {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--fo-accent-soft);
  color: var(--fo-accent-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  flex: none;
  overflow: hidden;
}
/* When a person has a photo, the avatar renders it instead of the initials. */
.fo-ava img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.fo-ava.is-lg {
  width: 48px;
  height: 48px;
  font-size: 16px;
}

/* ---------- Feed ---------- */
.fo-feed {
  display: flex;
  flex-direction: column;
}

.fo-feed.is-scroll {
  max-height: 528px;          /* ~11 rows visible; the rest scroll inside the card */
  overflow-y: auto;
  overscroll-behavior: contain;
}

.fo-feed-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 22px;
  border-bottom: 1px solid var(--fo-line);
  transition: background var(--fo-fast) var(--fo-ease);
}

.fo-feed-row:hover {
  background: var(--fo-surface-2);
}

.fo-feed-row:last-child {
  border-bottom: 0;
}

.fo-feed-body {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--fo-ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fo-feed-body strong {
  color: var(--fo-ink);
  font-weight: 600;
}

.fo-feed-time {
  font-size: 11.5px;
  color: var(--fo-ink-3);
  font-variant-numeric: tabular-nums;
  flex: none;
}

/* ---------- Empty / loading / error states ---------- */
.fo-empty {
  padding: 44px 24px;
  text-align: center;
  color: var(--fo-ink-3);
}

.fo-empty svg.fo-i {
  width: 26px;
  height: 26px;
  margin: 0 auto 10px;
  display: block;
  opacity: 0.55;
}

.fo-empty-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--fo-ink-2);
}

.fo-empty-hint {
  font-size: 12.5px;
  margin-top: 3px;
}

.fo-skel {
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(24,27,33,.05) 25%, rgba(24,27,33,.09) 50%, rgba(24,27,33,.05) 75%);
  background-size: 200% 100%;
  animation: fo-shimmer 1.4s linear infinite;
}

/* the one loading state every async panel shares */
.fo-loading {
  padding: 44px 24px;
  display: grid;
  place-items: center;
}

.fo-loading .fo-skel {
  height: 14px;
  width: min(220px, 60%);
}

/* terminal states on focused surfaces (404, expired, blocked, done) */
.fo-state {
  text-align: center;
}

.fo-state > svg.fo-i {
  width: 30px;
  height: 30px;
  color: var(--fo-ink-3);
  margin: 0 auto 10px;
  display: block;
}

.fo-state .fo-title {
  font-size: 21px;
}

.fo-state-badge {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--fo-ok-soft);
  color: var(--fo-ok);
  display: grid;
  place-items: center;
  margin: 6px auto 14px;
}

.fo-state-badge svg.fo-i {
  width: 28px;
  height: 28px;
}

@keyframes fo-shimmer {
  to { background-position: -200% 0; }
}

/* ---------- Modal ---------- */
.fo-modal-back {
  position: fixed;
  inset: 0;
  background: rgba(24, 27, 33, 0.32);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
  backdrop-filter: blur(6px) saturate(120%);
  display: grid;
  place-items: center;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--fo-base) var(--fo-ease);
  padding: 24px;
}

.fo-modal-back.is-open {
  opacity: 1;
  pointer-events: auto;
}

.fo-modal {
  width: 100%;
  max-width: 440px;
  /* solid "paper" surface — same as the drawers; forms need calm legibility
     and the old translucent glass let the page bleed through */
  background: #ffffff;
  border: 1px solid rgba(24, 27, 33, 0.08);
  border-radius: var(--fo-r-xl);
  box-shadow: 0 24px 60px -20px rgba(24, 27, 33, 0.28), var(--fo-glass-rim);
  transform: translateY(10px) scale(0.98);
  transition: transform var(--fo-base) var(--fo-ease);
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.fo-modal-back.is-open .fo-modal {
  transform: none;
}

/* imports and previews need room — still a centered floating box */
.fo-modal.is-wide {
  max-width: 680px;
}

.fo-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}

.fo-modal-head h3 {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.fo-modal-body {
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fo-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 4px 24px 22px;
}

.fo-x {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--fo-ink-3);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background var(--fo-fast) var(--fo-ease), color var(--fo-fast) var(--fo-ease);
}

.fo-x:hover {
  background: var(--fo-canvas);
  color: var(--fo-ink);
}

/* drawer expand/collapse toggle — same quiet icon-button as .fo-x (it only had
   a mobile `display:none` rule before, so on desktop it rendered as a raw
   native button). Hidden on phones below; styled here for every drawer. */
.fo-expand {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--fo-ink-3);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background var(--fo-fast) var(--fo-ease), color var(--fo-fast) var(--fo-ease);
}
.fo-expand:hover {
  background: var(--fo-canvas);
  color: var(--fo-ink);
}
.fo-expand svg.fo-i { width: 16px; height: 16px; }

/* ---------- Toast ---------- */
.fo-toasts {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 120;
  pointer-events: none;
}

.fo-toast {
  display: flex;
  align-items: center;
  gap: 9px;
  /* light liquid glass capsule — no dark chrome */
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(255, 255, 255, 0.9));
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--fo-glass-border);
  color: var(--fo-ink);
  font-size: 13px;
  font-weight: 550;
  padding: 11px 18px;
  border-radius: 999px;
  box-shadow: 0 18px 44px -14px rgba(11, 63, 158, 0.28), 0 2px 8px -2px rgba(15, 35, 70, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  animation: fo-toast-in var(--fo-slow) var(--fo-ease) both;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .fo-toast {
    background: var(--fo-surface);
  }
}

.fo-toast svg.fo-i {
  width: 15px;
  height: 15px;
}

.fo-toast.is-ok svg.fo-i { color: var(--fo-ok); }
.fo-toast.is-warn svg.fo-i { color: var(--fo-warn); }
.fo-toast.is-err svg.fo-i { color: var(--fo-danger); }

.fo-toast.is-out {
  animation: fo-toast-out var(--fo-base) var(--fo-ease) both;
}

@keyframes fo-toast-in {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

@keyframes fo-toast-out {
  to { opacity: 0; transform: translateY(8px) scale(0.97); }
}

/* ---------- Banner ---------- */
.fo-banner {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 16px;
  border-radius: var(--fo-r-md);
  font-size: 13px;
  margin-bottom: 20px;
}

.fo-banner svg.fo-i {
  width: 16px;
  height: 16px;
  margin-top: 1px;
}

.fo-banner.is-warn {
  background: var(--fo-warn-soft);
  color: var(--fo-warn);
}

.fo-banner.is-danger {
  background: var(--fo-danger-soft);
  color: var(--fo-danger);
}

.fo-banner.is-ok {
  background: var(--fo-ok-soft, #e8f6ee);
  color: var(--fo-ok, #15803d);
}

.fo-banner.is-info {
  background: var(--fo-info-soft);
  color: var(--fo-info);
}

.fo-banner a {
  font-weight: 650;
  text-decoration: underline;
}

/* ---------- Menus ---------- */
.fo-menu-wrap {
  position: relative;
}

.fo-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  /* near-opaque frosted glass: a menu floats over real content (rows,
     forms), so its background must cover what's behind it — the old
     0.5/0.22 glass let dense text read straight through. The heavy blur
     keeps the frosted character at the rim. */
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.92));
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--fo-glass-border);
  border-radius: 18px;
  box-shadow: var(--fo-glass-shadow), var(--fo-glass-rim);
  padding: 5px;
  z-index: 60;
  /* the entrance is a slide + visibility toggle, NOT an element-opacity fade:
     fading opacity made the (already translucent) menu doubly see-through
     mid-open, so dense content behind it bled through as sharp text. The
     glass translucency stays; only the opacity animation is gone. */
  transform: translateY(-6px) scale(0.96);
  transform-origin: top right;
  pointer-events: none;
  visibility: hidden; /* closed menus must leave the tab order and a11y tree */
  transition: transform 0.32s var(--fo-spring), visibility 0s 0.2s;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .fo-menu {
    background: rgba(252, 252, 251, 0.97);
  }
}

.fo-menu.is-open {
  transform: none;
  pointer-events: auto;
  visibility: visible;
  transition: transform 0.32s var(--fo-spring), visibility 0s;
}

/* menu ITEMS only — form controls, pickers and launcher tiles inside a
   popover keep their own skin, so the :not() chains exempt them */
.fo-menu a:not(.fo-tile):not(.fo-chip),
.fo-menu button:not(.fo-select):not(.fo-btn):not(.fo-dd-opt):not(.fo-cal-d):not(.fo-cal-nav):not(.fo-preset):not(.fo-datebtn):not(.fo-col-reset):not(.fo-col-grip) {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border: 0;
  background: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 550;
  color: var(--fo-ink-2);
  cursor: pointer;
  text-align: left;
  transition: background var(--fo-fast) var(--fo-ease), color var(--fo-fast) var(--fo-ease);
}

.fo-menu a:not(.fo-tile):not(.fo-chip):hover,
.fo-menu button:not(.fo-select):not(.fo-btn):not(.fo-dd-opt):not(.fo-cal-d):not(.fo-cal-nav):not(.fo-preset):not(.fo-datebtn):not(.fo-col-reset):not(.fo-col-grip):hover {
  background: rgba(255, 255, 255, 0.62);
  color: var(--fo-ink);
}

.fo-menu a:not(.fo-tile):not(.fo-chip):active,
.fo-menu button:not(.fo-select):not(.fo-btn):not(.fo-dd-opt):not(.fo-cal-d):not(.fo-cal-nav):not(.fo-preset):not(.fo-datebtn):not(.fo-col-reset):not(.fo-col-grip):active {
  transform: scale(0.985);
}

.fo-menu a:not(.fo-tile) svg.fo-i {
  width: 15px;
  height: 15px;
  color: var(--fo-ink-3);
}

/* module launcher — page-level fixed panel; searchable categorized grid
   that scales to the full 22-module catalog. Near-solid for legibility. */
.fo-menu.is-modules {
  position: fixed;
  left: 18px;
  top: 62px;
  width: 532px;
  min-width: 0;
  transform-origin: top left;
  z-index: 85;
  background: rgba(255, 255, 255, 0.97);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  padding: 0;
  display: flex;
  flex-direction: column;
  max-height: min(640px, calc(100vh - 90px));
}

.fo-menu.is-modules.is-open {
  display: flex;
}

.fo-launch-top {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--fo-line);
}

.fo-launch-body {
  padding: 8px 16px 16px;
  overflow-y: auto;
}

/* Zero-scroll fit — at 1366x768 (and up) the full catalog (5 groups / 29
   entries for a super-admin) must show with NO internal or page scroll. The
   levers are launcher-scoped ONLY (.fo-launcher …) so the portal-home grid,
   which shares this partial but restyles it under .ph-mods, is untouched:
   tighter tile rows + tighter group-head lead reclaim ~40px of column height,
   clearing the prior 14px overflow with comfortable margin. Same anatomy,
   same 3 columns, same colours — spacing only. */
.fo-launcher .fo-tile {
  padding: 5px 9px;
}
.fo-launcher .fo-menu-head {
  padding: 5px 2px 3px !important;   /* beats the partial's inline lead pad */
}

/* launcher items use the EXACT nav-link idiom: bare stroke icon + label,
   active = soft-blue pill with the gradient indicator. Three packed columns. */
.fo-launch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px 6px;
}

.fo-tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border-radius: 10px;
  transition: background var(--fo-fast) var(--fo-ease), color var(--fo-fast) var(--fo-ease), transform 0.25s var(--fo-spring);
  min-width: 0;
}

.fo-tile svg.fo-i {
  width: 16px;
  height: 16px;
  color: var(--fo-ink-2);
  opacity: 0.85;
  flex: none;
}

.fo-tile .tl {
  font-size: 12.5px;
  font-weight: 550;
  letter-spacing: -0.005em;
  color: var(--fo-ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fo-tile:hover {
  background: rgba(11, 63, 158, 0.06);
}

.fo-tile:hover .tl,
.fo-tile:hover svg.fo-i {
  color: var(--fo-ink);
}

.fo-tile:active {
  transform: scale(0.97);
}

.fo-tile.is-current {
  background: var(--fo-accent-soft);
}

.fo-tile.is-current::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 3px;
  background: var(--fo-grad);
}

.fo-tile.is-current svg.fo-i {
  color: var(--fo-accent);
  opacity: 1;
}

.fo-tile.is-current .tl {
  color: var(--fo-accent-deep);
  font-weight: 650;
}

.fo-tile.is-current .check {
  margin-left: auto;
  width: 13px;
  height: 13px;
  color: var(--fo-accent);
}

.fo-tile.is-soon {
  cursor: default;
  opacity: 0.55;
}

.fo-tile.is-soon:hover {
  background: rgba(24, 27, 33, 0.03);
}

.fo-launch-foot {
  padding: 9px 16px;
  border-top: 1px solid var(--fo-line);
  font-size: 11px;
  color: var(--fo-ink-3);
}

@media (max-width: 920px) {
  .fo-menu.is-modules {
    left: 10px;
    top: 58px;
    width: calc(100vw - 20px);
    max-width: 532px;
  }

  .fo-launch-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.fo-menu-head {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  background: var(--fo-grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding: 9px 11px 5px;
}

/* ---------- Account & company menu ---------- */

/* the footer identity row is now the menu trigger; the pin stays separate */
.fo-acct {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -4px -5px;          /* hover surface bleeds slightly past the content box */
  padding: 4px 5px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background var(--fo-fast) var(--fo-ease);
}

.fo-acct:hover {
  background: rgba(255, 255, 255, 0.6);
}

/* the popover drops from the top-right account button (2026-07-01 — it used
   to float up out of the rail footer). */
.fo-menu.is-account {
  position: fixed;
  top: 60px;
  right: 18px;
  left: auto;
  bottom: auto;
  width: 252px;
  min-width: 0;
  padding: 6px;
  z-index: 85;
  transform-origin: top right;
  transform: translateY(-8px) scale(0.97);
}

.fo-menu.is-account.is-open {
  transform: none;
}

.fo-menu.is-account .fo-menu-head {
  padding: 6px 10px 6px;
}

/* a hairline divider between menu sections */
.fo-menu .fo-menu-sep {
  height: 1px;
  margin: 5px 9px;
  background: var(--fo-line);
}

/* company rows: a status dot + name; the current org gets a soft tint */
.fo-acct-co {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border: 0;
  background: none;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 550;
  color: var(--fo-ink-2);
  cursor: pointer;
  text-align: left;
  transition: background var(--fo-fast) var(--fo-ease), color var(--fo-fast) var(--fo-ease);
}

.fo-acct-co:hover {
  background: rgba(255, 255, 255, 0.62);
  color: var(--fo-ink);
}

.fo-codot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
  background: var(--fo-ink-3);
  opacity: 0.45;
  transition: background var(--fo-fast) var(--fo-ease), box-shadow var(--fo-fast) var(--fo-ease);
}

.fo-acct-co.is-current {
  background: var(--fo-accent-soft);
  color: var(--fo-accent-deep);
  font-weight: 650;
}

.fo-acct-co.is-current .fo-codot {
  background: var(--fo-ok);
  opacity: 1;
  box-shadow: 0 0 0 3px var(--fo-ok-soft);
}

/* admin-mode row carries a real switch on the right */
.fo-acct-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 0;
  background: none;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 550;
  color: var(--fo-ink-2);
  cursor: pointer;
  text-align: left;
  transition: background var(--fo-fast) var(--fo-ease), color var(--fo-fast) var(--fo-ease);
}

.fo-acct-toggle:hover {
  background: rgba(255, 255, 255, 0.62);
  color: var(--fo-ink);
}

.fo-acct-toggle svg.fo-i {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--fo-ink-3);
}

/* the switch — same sanctioned accent as a checked checkbox, never a dark slab */
.fo-sw {
  flex: none;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: rgba(24, 27, 33, 0.18);
  position: relative;
  transition: background var(--fo-base) var(--fo-ease);
}

.fo-sw::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2.5px rgba(15, 35, 70, 0.28);
  transition: transform var(--fo-base) var(--fo-spring);
}

.fo-acct-toggle.is-on .fo-sw {
  background: linear-gradient(180deg, #2059c6, var(--fo-accent));
}

.fo-acct-toggle.is-on .fo-sw::after {
  transform: translateX(14px);
}

/* ───── Toggle switch — LIQUID GLASS (slim rail · glass puck) ───────────────
   A thin frosted rail under a big glossy glass knob that overhangs it and
   floats on a soft drop shadow — discreet, minimal, Apple-level. Royal-tinted
   glass when on (the brand); a green "success" variant. Pure CSS, no JS. */
.fo-toggle { display: inline-flex; align-items: center; gap: 13px; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.fo-toggle > input { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; pointer-events: none; }
.fo-toggle-track {
  position: relative; flex: none; width: 48px; height: 12px; border-radius: 999px;
  background: rgba(24, 27, 33, 0.07);
  -webkit-backdrop-filter: blur(12px) saturate(180%); backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 1px 1.5px rgba(24, 27, 33, 0.16), inset 0 -1px 1px rgba(255, 255, 255, 0.6);
  transition: background var(--fo-base) var(--fo-ease), box-shadow var(--fo-base) var(--fo-ease);
}
/* the knob is a CAPSULE (same pill shape as the rail), not a circle */
.fo-toggle-knob {
  position: absolute; top: -4px; left: -3px; width: 30px; height: 20px; border-radius: 999px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.5) 55%, rgba(255, 255, 255, 0.62));
  -webkit-backdrop-filter: blur(9px) saturate(180%) brightness(1.06); backdrop-filter: blur(9px) saturate(180%) brightness(1.06);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 7px 14px -4px rgba(24, 27, 33, 0.4), 0 2px 5px -1px rgba(24, 27, 33, 0.24), 0 0.5px 1px rgba(24, 27, 33, 0.18),
    inset 0 1.5px 1.5px rgba(255, 255, 255, 0.95), inset 0 -3px 7px rgba(24, 27, 33, 0.07), inset 0 0 0 0.5px rgba(255, 255, 255, 0.5);
  transition: left var(--fo-base) var(--fo-spring), width var(--fo-fast) var(--fo-ease);
}
/* specular highlight — a slim glass glint along the top */
.fo-toggle-knob::before {
  content: ""; position: absolute; top: 2.5px; left: 6px; right: 6px; height: 7px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0) 95%);
  pointer-events: none;
}
/* ON — royal glass */
.fo-toggle > input:checked ~ .fo-toggle-track {
  background: rgba(11, 63, 158, 0.32);
  box-shadow: inset 0 1px 1.5px rgba(8, 47, 120, 0.3), inset 0 -1px 1px rgba(255, 255, 255, 0.28), 0 1px 5px -1px rgba(11, 63, 158, 0.4);
}
.fo-toggle > input:checked ~ .fo-toggle-track .fo-toggle-knob { left: 21px; }
/* press — the knob elongates toward its travel */
.fo-toggle:active .fo-toggle-knob { width: 32px; }
.fo-toggle:active > input:checked ~ .fo-toggle-track .fo-toggle-knob { left: 17px; }
/* focus + disabled */
.fo-toggle > input:focus-visible ~ .fo-toggle-track { box-shadow: inset 0 1px 1.5px rgba(24, 27, 33, 0.16), 0 0 0 3px var(--fo-accent-soft); }
.fo-toggle > input:disabled ~ .fo-toggle-track { opacity: 0.45; }
.fo-toggle:has(> input:disabled) { cursor: not-allowed; }
.fo-toggle-label { font-size: 13.5px; font-weight: 550; color: var(--fo-ink); }
.fo-toggle-label .sub { display: block; font-size: 11.5px; font-weight: 450; color: var(--fo-ink-3); margin-top: 1px; }

/* success (green) glass variant */
.fo-toggle.is-ok > input:checked ~ .fo-toggle-track {
  background: rgba(24, 129, 80, 0.34);
  box-shadow: inset 0 1px 1.5px rgba(8, 70, 40, 0.3), inset 0 -1px 1px rgba(255, 255, 255, 0.28), 0 1px 5px -1px rgba(24, 129, 80, 0.4);
}
.fo-toggle.is-ok > input:checked:focus-visible ~ .fo-toggle-track { box-shadow: inset 0 1px 1.5px rgba(8, 70, 40, 0.3), 0 0 0 3px var(--fo-ok-soft); }

/* sizes — sm / md(default) / lg (capsule puck overhanging a slim rail) */
.fo-toggle.is-sm .fo-toggle-track { width: 40px; height: 10px; }
.fo-toggle.is-sm .fo-toggle-knob { width: 26px; height: 17px; top: -4px; }
.fo-toggle.is-sm > input:checked ~ .fo-toggle-track .fo-toggle-knob { left: 17px; }
.fo-toggle.is-sm:active .fo-toggle-knob { width: 30px; }
.fo-toggle.is-sm:active > input:checked ~ .fo-toggle-track .fo-toggle-knob { left: 13px; }
.fo-toggle.is-lg .fo-toggle-track { width: 60px; height: 15px; }
.fo-toggle.is-lg .fo-toggle-knob { width: 38px; height: 26px; top: -6px; }
.fo-toggle.is-lg > input:checked ~ .fo-toggle-track .fo-toggle-knob { left: 25px; }
.fo-toggle.is-lg:active .fo-toggle-knob { width: 42px; }
.fo-toggle.is-lg:active > input:checked ~ .fo-toggle-track .fo-toggle-knob { left: 21px; }
@media (prefers-reduced-motion: reduce) { .fo-toggle-knob, .fo-toggle-track { transition: none; } }

/* sign out: neutral until hovered, then the danger tint */
.fo-menu a.is-signout:hover {
  background: var(--fo-danger-soft);
  color: var(--fo-danger);
}

.fo-menu a.is-signout:hover svg.fo-i {
  color: var(--fo-danger);
}

.fo-mod {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 8px 9px;
  border-radius: 13px;
  transition: background var(--fo-fast) var(--fo-ease);
}

.fo-mod:hover {
  background: rgba(255, 255, 255, 0.62);
}

/* tiles speak the same icon language as the nav: ink strokes on quiet
   squares; only the current module carries the brand accent */
.fo-mod-tile {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--fo-ink-2);
  flex: none;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(24, 27, 33, 0.08);
  box-shadow: 0 1px 2px rgba(15, 35, 70, 0.06);
}

.fo-mod-tile svg.fo-i {
  width: 16px;
  height: 16px;
}

.fo-mod.is-current .fo-mod-tile {
  background: var(--fo-accent-soft);
  border-color: rgba(11, 63, 158, 0.18);
  color: var(--fo-accent);
}

.fo-mod-txt {
  flex: 1;
  min-width: 0;
}

.fo-mod-txt strong {
  display: block;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: -0.005em;
}

.fo-mod-txt em {
  display: block;
  font-style: normal;
  font-size: 10.5px;
  color: var(--fo-ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
}

.fo-mod.is-current strong {
  color: var(--fo-accent-deep);
}

.fo-mod.is-soon {
  cursor: default;
  pointer-events: none;
}

.fo-mod.is-soon .fo-mod-tile {
  color: var(--fo-ink-3);
  box-shadow: none;
}

.fo-mod.is-soon strong,
.fo-mod.is-soon em {
  color: var(--fo-ink-3);
}

.fo-mod .check {
  color: var(--fo-accent);
  width: 15px;
  height: 15px;
  flex: none;
}

.soon-chip {
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--fo-ink-3);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 2px 7px;
  flex: none;
}

/* ---------- Week board (schedule) ---------- */
.fo-board-wrap {
  border-radius: var(--fo-r-lg);
  min-width: 0;
}

.fo-board {
  display: grid;
  /* all 7 days fit the viewport — columns share space, cards truncate */
  grid-template-columns: 118px repeat(7, minmax(0, 1fr));
  background: var(--fo-surface);
  border: 1px solid var(--fo-line);
  border-radius: var(--fo-r-lg);
  overflow: hidden;
}

.fo-board-corner,
.fo-board-day {
  position: sticky;
  top: 0;
  background: var(--fo-surface-2);
  border-bottom: 1px solid var(--fo-line);
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fo-ink-3);
  z-index: 2;
}

.fo-board-day {
  text-align: center;
}

.fo-board-day .d {
  display: block;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--fo-ink);
  font-variant-numeric: tabular-nums;
}

.fo-board-day.is-today {
  background: var(--fo-accent-soft);
  color: var(--fo-accent-deep);
}

.fo-board-day.is-today .d {
  color: var(--fo-accent-deep);
}

.fo-board-proj {
  padding: 10px 11px;
  border-bottom: 1px solid var(--fo-line);
  border-right: 1px solid var(--fo-line);
  background: var(--fo-surface-2);
  min-height: 58px;
  min-width: 0;
}

.fo-board-proj .pn {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.25;
  white-space: normal;
}

.fo-board-proj .pj {
  font-size: 10.5px;
  color: var(--fo-ink-3);
  font-family: var(--fo-mono);
  margin-top: 2px;
}

.fo-cell {
  border-bottom: 1px solid var(--fo-line);
  border-right: 1px solid var(--fo-line);
  padding: 5px;
  min-height: 58px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background var(--fo-fast) var(--fo-ease), box-shadow var(--fo-fast) var(--fo-ease);
  position: relative;
}

.fo-cell:nth-child(8n) {
  border-right: 0; /* board = 1 label column + 7 day columns */
}

.fo-cell.is-today {
  background: rgba(14, 124, 102, 0.035);
}

.fo-cell.is-over {
  background: var(--fo-accent-soft);
  box-shadow: inset 0 0 0 2px var(--fo-accent);
  border-radius: 4px;
}

.fo-cell-wx {
  position: absolute;
  top: 4px;
  right: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  z-index: 1;
}

.fo-asg {
  background: var(--fo-surface);
  border: 1px solid var(--fo-line-strong);
  border-left: 3px solid var(--asg-color, var(--fo-ink-2));
  border-radius: 7px;
  padding: 4px 6px;
  font-size: 11.5px;
  cursor: grab;
  box-shadow: var(--fo-shadow-1);
  transition: box-shadow var(--fo-fast) var(--fo-ease), transform var(--fo-fast) var(--fo-ease), opacity var(--fo-fast) var(--fo-ease);
  user-select: none;
  min-width: 0;
}

.fo-asg:hover {
  box-shadow: var(--fo-shadow-2);
  transform: translateY(-1px);
}

.fo-asg.is-dragging {
  opacity: 0.45;
  cursor: grabbing;
}

/* split shift: the same person on more than one site that day */
.fo-asg.is-multi {
  border-color: var(--fo-warn);
  box-shadow: 0 0 0 1px var(--fo-warn), var(--fo-shadow-1);
  background: linear-gradient(180deg, #fffdf6, #fff);
}

.fo-asg .nm {
  font-weight: 650;
  letter-spacing: -0.005em;
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1.3;
  overflow: hidden;
}

.fo-asg .nm > span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.fo-asg .nm svg.fo-i {
  width: 11px;
  height: 11px;
  flex: none;
}

.fo-asg .nm .lead {
  color: var(--fo-warn);
}

.fo-asg .nm .conf {
  color: var(--fo-danger);
}

.fo-asg .nm .multi {
  color: var(--fo-warn);
}

.fo-asg .rl {
  font-size: 10.5px;
  color: var(--fo-ink-3);
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fo-asg .rl .at {
  color: var(--fo-warn);
  font-weight: 650;
}

/* employee pool */
.fo-pool {
  position: sticky;
  top: 16px;
}

.fo-pool-chips {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 520px;
  overflow: auto;
  padding: 2px;
}

/* exactly two lines per person: name, then trade · days */
.fo-chip-emp {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  background: var(--fo-surface);
  border: 1px solid var(--fo-line-strong);
  border-radius: 10px;
  cursor: grab;
  transition: box-shadow var(--fo-fast) var(--fo-ease), transform var(--fo-fast) var(--fo-ease), opacity var(--fo-fast) var(--fo-ease);
  user-select: none;
}

.fo-chip-emp .who {
  flex: 1;
  min-width: 0;
}

.fo-chip-emp .nm {
  display: block;
  font-size: 12.5px;
  font-weight: 620;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fo-chip-emp .meta {
  display: block;
  font-size: 10.5px;
  color: var(--fo-ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fo-chip-emp:hover {
  box-shadow: var(--fo-shadow-2);
  transform: translateY(-1px);
}

.fo-chip-emp.is-dragging {
  opacity: 0.45;
}

.fo-chip-emp.is-pto {
  opacity: 0.55;
  cursor: not-allowed;
  background: var(--fo-surface-2);
}

/* ---------- Scan console ---------- */
.fo-scan-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  align-items: start;
}

.fo-person-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--fo-line);
  border-radius: var(--fo-r-md);
  background: var(--fo-surface);
  cursor: pointer;
  transition: border-color var(--fo-fast) var(--fo-ease), box-shadow var(--fo-fast) var(--fo-ease), transform var(--fo-fast) var(--fo-ease);
  text-align: left;
  width: 100%;
}

.fo-person-card:hover {
  border-color: var(--fo-accent);
  box-shadow: var(--fo-shadow-2);
  transform: translateY(-1px);
}

.fo-person-card:disabled {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

.fo-person-card .nm {
  font-size: 13.5px;
  font-weight: 650;
}

.fo-person-card .meta {
  font-size: 11.5px;
  color: var(--fo-ink-3);
}

.fo-person-card .tail {
  margin-left: auto;
  flex: none;
}

/* signature pad */
.fo-sig {
  border: 1.5px dashed var(--fo-line-strong);
  border-radius: var(--fo-r-md);
  background: var(--fo-surface-2);
  width: 100%;
  height: 130px;
  touch-action: none;
  cursor: crosshair;
  transition: border-color var(--fo-fast) var(--fo-ease);
}

.fo-sig.is-signed {
  border-style: solid;
  border-color: var(--fo-accent);
  background: var(--fo-surface);
}

/* ---------- Map ---------- */
.fo-map {
  height: 560px;
  border-radius: calc(var(--fo-r-lg) - 1px);
  isolation: isolate;
  z-index: 0;
  background: var(--fo-surface-2);
}

.fo-map-legend {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 22px;
  font-size: 12.5px;
  color: var(--fo-ink-2);
  border-top: 1px solid var(--fo-line);
}

.fo-map-legend .key {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.fo-map-legend .swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.fo-pin {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg);
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(24, 27, 33, 0.35);
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
}

.fo-pin > span {
  transform: rotate(45deg);
}

/* ---------- Chart kit (Chart.js, brand-framed) ----------
   One frame for every real chart: a quiet card with a title row,
   an optional headline value + delta, the canvas, and an HTML
   legend. Empty / loading / error are states of the same frame,
   so a chart never collapses the layout while it waits. */
.fo-chart {
  background: var(--fo-surface);
  border: 1px solid var(--fo-line);
  border-radius: var(--fo-r-lg);
  box-shadow: var(--fo-shadow-1);
  padding: 15px 17px 14px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.fo-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.fo-chart-title {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--fo-ink);
}

.fo-chart-sub {
  font-size: 11.5px;
  color: var(--fo-ink-3);
  margin-top: 1px;
}

.fo-chart-figure {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-top: 7px;
}

.fo-chart-val {
  font-family: var(--fo-font-display);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fo-ink);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.fo-chart-unit {
  font-size: 12px;
  font-weight: 600;
  color: var(--fo-ink-3);
}

/* up / down / flat delta pill — status colors as a soft tint, never a slab */
.fo-delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 7px 2px 6px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.fo-delta .fo-i { width: 13px; height: 13px; }
.fo-delta.is-up   { color: var(--fo-ok);     background: var(--fo-ok-soft); }
.fo-delta.is-down { color: var(--fo-danger); background: var(--fo-danger-soft); }
.fo-delta.is-flat { color: var(--fo-ink-2);  background: var(--fo-canvas); }

/* the canvas lives in a sized, positioned box (Chart.js responsive pattern) */
.fo-chart-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 180px;
  margin-top: 12px;
}
.fo-chart-body > canvas {
  position: absolute;
  inset: 0;
}

/* HTML legend — brand chips under the chart */
.fo-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 16px;
  margin-top: 13px;
}
.fo-leg {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--fo-ink-2);
}
.fo-leg-dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  flex: none;
}
.fo-leg-dot.is-line {
  height: 3px;
  width: 14px;
  border-radius: 2px;
}
.fo-leg b {
  margin-left: 3px;
  color: var(--fo-ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* custom HTML tooltip — a discreet one-line pill in the band reserved at the
   top of the plot (a soft guide marks the column), so it never sits over data */
.fo-charttip {
  position: absolute;
  z-index: 60;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 11px;
  white-space: nowrap;
  font-size: 11.5px;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(7px) saturate(135%);
          backdrop-filter: blur(7px) saturate(135%);
  border: 1px solid var(--fo-line);
  border-radius: 999px;
  box-shadow: 0 2px 9px -3px rgba(15, 35, 70, 0.16);
  transform: translate(-50%, 0);
  opacity: 0;
  transition: opacity 0.12s var(--fo-ease);
}
.fo-charttip.is-on { opacity: 1; }

.fo-charttip .h { font-weight: 700; color: var(--fo-ink); letter-spacing: 0.01em; }
.fo-charttip .r {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--fo-ink-2);
  font-weight: 600;
}
.fo-charttip .d { width: 8px; height: 8px; border-radius: 2.5px; flex: none; }
.fo-charttip .r b { color: var(--fo-ink); font-weight: 700; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  .fo-charttip { transition: none; }
}

/* --- states: overlay the body, hide the canvas, hold the height --- */
.fo-chart-state {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-align: center;
}
.fo-chart.is-loading .fo-chart-body > canvas,
.fo-chart.is-empty   .fo-chart-body > canvas,
.fo-chart.is-error   .fo-chart-body > canvas { visibility: hidden; }
.fo-chart.is-loading .fo-chart-state.is-load,
.fo-chart.is-empty   .fo-chart-state.is-empty,
.fo-chart.is-error   .fo-chart-state.is-err { display: flex; }

/* loading: faux bars sweeping with a shimmer */
.fo-chart-skel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  gap: 9px;
  padding-top: 12px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.fo-chart-skel i {
  flex: 1;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, rgba(11,63,158,0.10), rgba(11,63,158,0.05));
  position: relative;
  overflow: hidden;
}
.fo-chart-skel i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.65), transparent);
  transform: translateX(-100%);
  animation: fo-chart-shimmer 1.35s var(--fo-ease) infinite;
}
@keyframes fo-chart-shimmer { to { transform: translateX(100%); } }

/* empty / error message */
.fo-chart-glyph {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--fo-canvas);
  color: var(--fo-ink-3);
}
.fo-chart-glyph .fo-i { width: 20px; height: 20px; }
.fo-chart.is-error .fo-chart-glyph { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-chart-state .t { font-size: 13px; font-weight: 650; color: var(--fo-ink-2); }
.fo-chart-state .s { font-size: 11.5px; color: var(--fo-ink-3); max-width: 240px; }

/* spark — a tiny inline trend, no chrome (for KPI cards) */
.fo-chart.is-spark {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  border-radius: 0;
}
.fo-chart.is-spark .fo-chart-body { min-height: 34px; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .fo-chart-skel i::after { animation: none; }
}

/* palette swatch row (styleguide) */
.sg-sw { display: flex; flex-wrap: wrap; gap: 8px; }
.sg-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 8px;
  border-radius: 999px;
  background: var(--fo-surface-2);
  border: 1px solid var(--fo-line);
  font-size: 12px;
  font-weight: 600;
  color: var(--fo-ink-2);
}
.sg-dot { width: 13px; height: 13px; border-radius: 5px; flex: none; }

/* ---------- Charts (lightweight DOM mini-charts) ---------- */
.fo-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 120px;
}

.fo-bars .bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
}

.fo-bars .fill {
  width: 100%;
  max-width: 38px;
  border-radius: 6px 6px 3px 3px;
  background: var(--fo-accent-soft);
  position: relative;
  transition: height var(--fo-slow) var(--fo-ease), background var(--fo-fast) var(--fo-ease);
  min-height: 3px;
}

.fo-bars .bar:hover .fill {
  background: #d3e1f8;
}

.fo-bars .bar.is-today .fill {
  background: var(--fo-accent-sky);
}

.fo-bars .lbl {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fo-ink-3);
}

.fo-bars .val {
  font-size: 11px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--fo-ink-2);
}

/* proportional bar list */
.fo-ranks {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fo-rank .top {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  margin-bottom: 5px;
}

.fo-rank .top .n {
  font-weight: 600;
}

.fo-rank .top .v {
  font-variant-numeric: tabular-nums;
  color: var(--fo-ink-3);
  font-weight: 600;
}

.fo-rank .track {
  height: 6px;
  border-radius: 3px;
  background: rgba(24, 27, 33, 0.06);
  overflow: hidden;
}

.fo-rank .fill {
  height: 100%;
  border-radius: 3px;
  background: var(--fo-accent);
  transition: width var(--fo-slow) var(--fo-ease);
}

/* ---------- Layout grids ---------- */
.fo-grid {
  display: grid;
  gap: 20px;
}

.fo-grid.is-2 { grid-template-columns: 1fr 1fr; }
.fo-grid.is-3 { grid-template-columns: repeat(3, 1fr); }
.fo-grid.is-4 { grid-template-columns: repeat(4, 1fr); }
.fo-grid.is-main-side { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.fo-grid.is-side-main { grid-template-columns: 252px minmax(0, 1fr); align-items: start; }
.fo-grid .fo-span-2 { grid-column: span 2; }

@media (max-width: 1080px) {
  .fo-grid.is-2,
  .fo-grid.is-3,
  .fo-grid.is-main-side,
  .fo-grid.is-side-main {
    grid-template-columns: minmax(0, 1fr);
  }
  .fo-grid.is-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fo-grid .fo-span-2 { grid-column: auto; }
  .fo-scan-grid {
    grid-template-columns: 1fr;
  }
}

/* small screens: sidebar collapses into a sticky top bar */
@media (max-width: 920px) {
  .fo-shell {
    flex-direction: column;
  }

  .fo-side {
    width: 100%;
    height: auto;
    position: sticky;
    top: 0;
    z-index: 50;
  }

  .fo-side-panel {
    position: static;
    width: 100%;
    border: 0;
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    overflow: visible;
  }

  .fo-side-inner {
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
  }

  .fo-navpin {
    display: none;
  }

  .fo-brand {
    width: auto;
    margin: 0;
    padding: 4px 8px;
  }

  .fo-brand-text,
  .fo-brand .chev,
  .fo-nav-label,
  .fo-side-foot {
    display: none;
  }

  .fo-nav {
    flex-direction: row;
    overflow-x: auto;
    flex: 1;
    min-width: 0; /* flex children won't shrink below content without this */
    scrollbar-width: none;
    /* right-edge fade = "more destinations off-screen" affordance (audit W3).
       The padding keeps the last item clear of the fade when the bar fits. */
    padding-right: 20px;
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 24px), transparent);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 24px), transparent);
  }

  .fo-nav::-webkit-scrollbar {
    display: none;
  }

  .fo-nav a {
    white-space: nowrap;
    padding: 7px 11px;
  }

  /* Mobile top nav is a single compact row of the top-level destinations.
     The per-module sub-nav stacks vertically (column + indent rail) and was
     blowing the bar up to ~195px; hide it here, mirroring the desktop
     collapsed-rail behaviour where sub-items are also hidden until expanded. */
  .fo-nav-sub {
    display: none;
  }

  .fo-page {
    /* bottom clears the floating dock (16px inset + 48px pill + breathing
       room) so the last interactive row is never occluded (audit W3) */
    padding: 22px 18px 84px;
  }

  .fo-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}

/* ---------- Filter bar (report builders) ---------- */
.fo-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  padding: 16px 22px;
  border-bottom: 1px solid var(--fo-line);
}

.fo-filters .fo-field {
  min-width: 150px;
}

/* ---------- Toolbar filtering (list pages): quick controls inline,
     the rest behind a quiet Filters popover, state shown as chips ---------- */
.fo-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 14px;
  border-bottom: 1px solid var(--fo-line);
}

/* compact controls — one quiet line, shared by the card toolbar AND the
   page sub-nav row so tabs, search and Filters are always the same height */
:is(.fo-toolbar, .fo-subnav) .fo-seg {
  padding: 2px;
}

:is(.fo-toolbar, .fo-subnav) .fo-seg a,
:is(.fo-toolbar, .fo-subnav) .fo-seg button {
  padding: 5px 12px;
  font-size: 12.5px;
}

:is(.fo-toolbar, .fo-subnav) .fo-input {
  padding: 6px 11px;
  font-size: 12.5px;
}

:is(.fo-toolbar, .fo-subnav) .fo-select {
  padding: 6px 34px 6px 11px; /* keep clear of the chevron */
  font-size: 12.5px;
}

:is(.fo-toolbar, .fo-subnav) .fo-search .fo-input {
  padding-left: 30px;
}

:is(.fo-toolbar, .fo-subnav) .fo-search svg.fo-i {
  width: 13px;
  height: 13px;
  left: 10px;
}

:is(.fo-toolbar, .fo-subnav) .fo-btn {
  padding: 6px 11px;
  font-size: 12.5px;
  border-radius: 8px;
  gap: 6px;
}

:is(.fo-toolbar, .fo-subnav) .fo-btn svg.fo-i {
  width: 14px;
  height: 14px;
}

:is(.fo-toolbar, .fo-subnav) .fo-filter-pop .fo-input {
  padding: 8px 11px;
  font-size: 13px;
}

:is(.fo-toolbar, .fo-subnav) .fo-filter-pop .fo-select {
  padding: 8px 34px 8px 11px; /* keep clear of the chevron */
  font-size: 13px;
}

:is(.fo-toolbar, .fo-subnav) .fo-filter-pop .fo-datebtn {
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 10px;
  width: 100%;
}

.fo-fcount {
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--fo-accent-soft);
  color: var(--fo-accent-deep);
  border: 1px solid rgba(11, 63, 158, 0.22);   /* still reads as an active marker, not a dark pill */
  font-size: 10.5px;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
}

.fo-filter-pop {
  width: 408px;
  max-width: 90vw;
  padding: 6px;
  text-align: left;
  cursor: default;
  /* a form surface: near-solid for clarity, unlike ambient menus */
  background: rgba(255, 255, 255, 0.97);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--fo-line);
  box-shadow: var(--fo-glass-shadow);
}

.fo-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 8px 12px;
}
.fo-filter-head .ttl {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fo-ink-3);
}

/* two columns keep a long filter list compact and scan-able */
.fo-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 12px;
  padding: 4px 12px 12px;
}
@media (max-width: 560px) {
  .fo-filter-grid { grid-template-columns: 1fr; }
}
/* grid items must be allowed to shrink below their content width, or a
   select's min-content width pushes the two columns past the popover edge
   and the right column gets clipped. */
.fo-filter-grid > * { min-width: 0; }

.fo-chipbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 22px 0;
}

.fo-chipbar .fo-chip {
  padding: 4px 8px 4px 11px;
  transition: background var(--fo-fast) var(--fo-ease);
}

.fo-chipbar .fo-chip svg.fo-i {
  width: 11px;
  height: 11px;
  opacity: 0.7;
}

.fo-chipbar .fo-chip:hover {
  background: var(--fo-danger-soft);
  color: var(--fo-danger);
}

/* ---------- Conflict / list rows ---------- */
.fo-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--fo-line);
  transition: background var(--fo-fast) var(--fo-ease);
}

.fo-row:hover {
  background: var(--fo-surface-2);
}

.fo-row:last-child {
  border-bottom: 0;
}

.fo-sev {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
}

.fo-sev.is-high { background: var(--fo-danger); }
.fo-sev.is-med { background: var(--fo-warn); }
.fo-sev.is-low { background: var(--fo-info); }
.fo-sev.is-ok { background: var(--fo-ok); }

/* data-driven color swatch (roles, shifts, map legend) — geometry only,
   the color itself stays inline because it comes from the database */
.fo-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}

/* ---------- Pagination ---------- */
.fo-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  font-size: 12.5px;
  color: var(--fo-ink-3);
}

.fo-pager .pages {
  display: flex;
  gap: 5px;
}
@media (max-width: 560px) {
  .fo-pager { flex-wrap: wrap; justify-content: center; gap: 9px 14px; }
  .fo-pager .pages { flex-wrap: wrap; justify-content: center; }
}

.fo-pager a,
.fo-pager span.cur {
  min-width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: background var(--fo-fast) var(--fo-ease);
}

.fo-pager a:hover {
  background: var(--fo-canvas);
  color: var(--fo-ink);
}

.fo-pager span.cur {
  background: var(--fo-accent-soft);
  color: var(--fo-accent-deep);
}

/* left cluster: rows-per-page + the live count */
.fo-pager .fo-perpage {
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}
.fo-pager .fo-perpage .sep { opacity: 0.45; }
/* compact: the shared is-mini is 158px wide (for long labels); the per-page
   options are 2–3 digits, so size the control + its dropdown to fit them.
   The direct-child rule covers data-native selects, which the enhancer never
   wraps in .fo-ddwrap — without it they keep the global width:100% and crush
   the labels beside them. */
.fo-perpage .fo-ddwrap { flex: 0 0 auto; }
.fo-pager .fo-perpage > .fo-select { flex: 0 0 auto; }
.fo-perpage .fo-ddwrap > .fo-select,
.fo-pager .fo-perpage > .fo-select { min-width: 0; width: 70px; }
.fo-perpage .fo-pop { min-width: 70px; }

/* page-number buttons share the a/span.cur sizing, plus button reset */
.fo-pager .pages button {
  min-width: 30px;
  height: 30px;
  padding: 0 7px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fo-ink-2);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--fo-fast) var(--fo-ease), color var(--fo-fast) var(--fo-ease);
}
.fo-pager .pages button:hover { background: var(--fo-canvas); color: var(--fo-ink); }
.fo-pager .pages button.nav { color: var(--fo-ink-3); }
.fo-pager .pages button.nav svg.fo-i { width: 16px; height: 16px; }
.fo-pager .pages button:disabled { opacity: 0.35; pointer-events: none; }
.fo-pager .pages .gap {
  min-width: 22px;
  height: 30px;
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4px;
  color: var(--fo-ink-3);
}

/* ---------- Kiosk / phone (focused surfaces) ---------- */
.fo-focus {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--fo-canvas);
  padding: 32px 20px 60px;
}

.fo-focus-card {
  width: 100%;
  max-width: 430px;
  background: var(--fo-surface);
  border: 1px solid var(--fo-line);
  border-radius: var(--fo-r-xl);
  box-shadow: var(--fo-shadow-2);
  padding: 30px 28px;
  animation: fo-rise var(--fo-slow) var(--fo-ease) both;
}

.fo-qr-frame {
  background: #fff;
  border: 1px solid var(--fo-line);
  border-radius: var(--fo-r-lg);
  padding: 18px;
  display: grid;
  place-items: center;
  margin: 18px auto;
  width: fit-content;
}

/* ---------- Print ---------- */
.fo-print-only {
  display: none;
}

@media print {
  .fo-side,
  .fo-head-actions,
  .fo-subnav,
  .fo-no-print,
  .fo-toasts {
    display: none !important;
  }

  .fo-print-only {
    display: block;
  }

  body {
    background: #fff;
  }

  /* gradient-clipped text prints as a blank gap — go solid on paper */
  .fo-eyebrow {
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    color: var(--fo-accent);
  }

  .fo-page {
    padding: 0;
    max-width: none;
    animation: none;
  }

  .fo-card,
  .fo-kpi {
    box-shadow: none;
    border-color: #ddd;
    break-inside: avoid;
  }
}

/* ---------- Utilities ---------- */
.fo-muted { color: var(--fo-ink-3); }
.fo-strong { font-weight: 650; }
.fo-right { margin-left: auto; }
.fo-mt-8 { margin-top: 8px; }
.fo-mt-16 { margin-top: 16px; }
.fo-mt-24 { margin-top: 24px; }
.fo-mb-16 { margin-bottom: 16px; }
.fo-mb-24 { margin-bottom: 24px; }
.fo-flex { display: flex; align-items: center; gap: 10px; }
.fo-wrap { flex-wrap: wrap; }
.fo-grow { flex: 1; min-width: 0; }
.fo-center { text-align: center; }
.fo-divider { height: 1px; background: var(--fo-line); border: 0; margin: 16px 0; }
.fo-hidden { display: none !important; }

/* ============================================================
   Wizard — the platform's multi-step pattern (Phase 0.5 #1)
   One family, three pieces:
     .fo-wiz      full wizard: step rail · panel · optional live summary
     .fo-wizlite  compact card-stack for phone/public flows (dots)
     .fo-reveal   conditional section that unfolds inside any form
   Progress is brand (royal→sky); done/current/upcoming are structural,
   never semantic status colors. One step visible at a time, always.
   ============================================================ */
.fo-wiz {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.fo-wiz.has-summary {
  grid-template-columns: 216px minmax(0, 1fr) 248px;
}

/* ----- step rail ----- */
.fo-wiz-rail {
  position: sticky;
  top: 24px;
}

.fo-wiz-count {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fo-ink-3);
  margin: 2px 2px 8px;
}

.fo-wiz-track {
  height: 3px;
  border-radius: 2px;
  background: rgba(24, 27, 33, 0.08);
  overflow: hidden;
  margin: 0 2px 14px;
}

.fo-wiz-track .fill {
  height: 100%;
  border-radius: 2px;
  background: var(--fo-grad);
  transition: width var(--fo-slow) var(--fo-spring);
}

.fo-wiz-steps {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fo-wiz-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--fo-ink-2);
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: background var(--fo-fast) var(--fo-ease),
    color var(--fo-fast) var(--fo-ease);
}

.fo-wiz-step:hover {
  background: rgba(255, 255, 255, 0.65);
  color: var(--fo-ink);
}

.fo-wiz-step .idx {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--fo-ink-3);
  border: 1.5px solid var(--fo-line-strong);
  background: var(--fo-surface);
  transition: all var(--fo-base) var(--fo-ease);
}

.fo-wiz-step .idx svg.fo-i {
  width: 12px;
  height: 12px;
  stroke-width: 3;
}

/* upcoming steps are reachable only through Continue */
.fo-wiz-step.is-future {
  color: var(--fo-ink-3);
  cursor: default;
}

.fo-wiz-step.is-future:hover {
  background: transparent;
  color: var(--fo-ink-3);
}

.fo-wiz-step.is-done .idx {
  background: #dce8f9;                         /* deeper than is-current's white-ring, so done≠current */
  border-color: rgba(11, 63, 158, 0.22);
  color: var(--fo-accent-deep);
}

.fo-wiz-step.is-current {
  background: var(--fo-accent-soft);
  color: var(--fo-accent);
}

.fo-wiz-step.is-current::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 2px;
  background: var(--fo-grad);
}

.fo-wiz-step.is-current .idx {
  border-color: var(--fo-accent);
  color: var(--fo-accent);
  box-shadow: 0 0 0 3px var(--fo-accent-soft);
}

.fo-wiz-step.is-error .idx {
  border-color: var(--fo-danger);
  color: var(--fo-danger);
}

.fo-wiz-step.is-error::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fo-danger);
  margin-left: auto;
}

/* ----- panel (the step's card) ----- */
.fo-wiz-panel {
  background: var(--fo-surface);
  border: 1px solid var(--fo-line);
  border-radius: var(--fo-r-lg);
  box-shadow: var(--fo-shadow-1);
  padding: 26px 28px 20px;
  display: none;
}

.fo-wiz-panel.is-active {
  display: block;
  animation: fo-wiz-in 0.32s var(--fo-spring) backwards;
}

@keyframes fo-wiz-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.fo-wiz-panel-head {
  margin-bottom: 20px;
}

.fo-wiz-panel-head h2 {
  margin: 0 0 3px;
  font-family: var(--fo-font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.fo-wiz-panel-head .hint {
  font-size: 13px;
  color: var(--fo-ink-2);
}

.fo-wiz-panel-head .optional {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--fo-canvas);
  border: 1px solid var(--fo-line);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fo-ink-3);
  vertical-align: 3px;
}

.fo-wiz-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}

.fo-wiz-grid .span-2 {
  grid-column: 1 / -1;
}

/* ----- footer: Back · (draft) · Continue ----- */
.fo-wiz-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--fo-line);
}

.fo-wiz-foot .fo-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ----- inline validation ----- */
.fo-input.is-invalid,
.fo-select.is-invalid {
  border-color: var(--fo-danger);
  box-shadow: 0 0 0 3px var(--fo-danger-soft);
}

.fo-field .err {
  display: none;
  font-size: 12px;
  color: var(--fo-danger);
}

.fo-field.has-error .err {
  display: block;
}

.fo-wiz-alert {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  margin-bottom: 18px;
  border-radius: 10px;
  background: var(--fo-danger-soft);
  border: 1px solid rgba(179, 38, 30, 0.18);
  color: var(--fo-danger);
  font-size: 13px;
  font-weight: 600;
}

.fo-wiz-alert svg.fo-i {
  width: 15px;
  height: 15px;
  flex: none;
}

/* ----- live summary rail ----- */
.fo-wiz-summary {
  position: sticky;
  top: 24px;
  background: var(--fo-surface);
  border: 1px solid var(--fo-line);
  border-radius: var(--fo-r-lg);
  box-shadow: var(--fo-shadow-1);
  padding: 16px 18px;
}

.fo-wiz-summary h3 {
  margin: 0 0 10px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fo-ink-3);
}

.fo-wiz-kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  font-size: 12.5px;
  border-bottom: 1px solid var(--fo-line);
}

.fo-wiz-kv:last-child {
  border-bottom: 0;
}

.fo-wiz-kv dt {
  margin: 0;
  color: var(--fo-ink-3);
  flex: none;
}

.fo-wiz-kv dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fo-wiz-kv dd:empty::before,
.fo-wiz-kv dd.is-empty::before {
  content: "—";
  color: var(--fo-ink-3);
  font-weight: 500;
}

/* ----- sticky meta strip (daily-report idiom) ----- */
.fo-wiz-meta {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 9px 14px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid var(--fo-line);
  box-shadow: var(--fo-shadow-1);
}

.fo-wiz-meta .m {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fo-ink-2);
  white-space: nowrap;
}

.fo-wiz-meta .m b {
  color: var(--fo-ink);
  font-weight: 650;
}

.fo-wiz-meta .m + .m::before {
  content: "";
  width: 1px;
  height: 14px;
  background: var(--fo-line-strong);
  margin-right: 8px;
}

/* a picker opened inside a reveal or a modal must float above the mask —
   the unfold/scroll masks only matter while no popup is open */
.fo-reveal > .fo-reveal-body:has(.fo-pop.is-open) {
  overflow: visible;
}

.fo-modal:has(.fo-pop.is-open) {
  overflow: visible;
}

/* A searchable/select popup opened inside a clipping container (a drawer's
   scroll body, the worklist board's rounded clip, a settings panel, a framed
   table) must escape that container's overflow while open — otherwise the
   list is clipped at the container edge / hidden behind the footer. The clip
   only matters when no popup is open, so scope the override to :has(). */
.fo-inc-board:has(.fo-pop.is-open),
.fo-set-panel:has(.fo-pop.is-open),
.fo-tablewrap:has(.fo-pop.is-open),
/* The Filters / Columns popover is a `.fo-menu` (z-index:60), not a `.fo-pop`.
   It lives in the board toolbar, so the board's rounded-corner `overflow:hidden`
   clips it at the board's bottom edge — and on a short table that edge sits right
   under the toolbar, cutting the popover in half. Let `.fo-menu.is-open` escape
   the same clips. (Deliberately NOT `.fo-tablewrap` here: a row-kebab `.fo-menu`
   opening must not relax the wide-table horizontal scroll clip — those menus
   reposition to `fixed` instead.) */
.fo-drawer-body:has(.fo-menu.is-open),
.fo-inc-board:has(.fo-menu.is-open),
.fo-set-panel:has(.fo-menu.is-open) {
  overflow: visible;
}

/* A drawer's scroll BODY must NOT flip to overflow:visible when a select/date
   picker opens — flipping overflow:auto→visible zeroes scrollTop and yanks the
   whole drawer to the top (People new-session drawer dropdown bug, 2026-06-27).
   Keep it scrollable and open transient room below so the picker is revealed in
   place — the same approach already proven for the employee drawer inline-edit
   below. (Scoped to .fo-pop/.dsdp-popup, the select & date pickers.) */
.fo-drawer-body:has(.fo-pop.is-open),
.fo-drawer-body:has(.dsdp-popup.is-open),
.fo-drawer-body:has(.fo-mcombo-pop.is-open) {
  overflow: hidden auto;
  padding-bottom: 340px;
}

/* TOP drawers are content-height: the transient-room padding above would GROW
   the panel itself (org Set-level drawer stretched 270px→590px, 2026-07-06).
   Their short bodies don't scroll, so the overflow flip that padding exists to
   avoid can't bite here — let the picker float over the page instead. The
   people-combo list (.fo-mcombo-pop) gets the same treatment (Set manager). */
.fo-drawer.is-top .fo-drawer-body:has(.fo-pop.is-open),
.fo-drawer.is-top .fo-drawer-body:has(.dsdp-popup.is-open),
.fo-drawer.is-top .fo-drawer-body:has(.fo-mcombo-pop.is-open) {
  overflow: visible;
  padding-bottom: 0;
}
.fo-drawer.is-top:has(.fo-pop.is-open),
.fo-drawer.is-top:has(.dsdp-popup.is-open),
.fo-drawer.is-top:has(.fo-mcombo-pop.is-open) {
  overflow: visible;
}

/* fixed-float pickers (data-pop-fixed containers, 2026-07-12): the pop
   sits at viewport coords OVER everything — above the drawer's z 91. */
.fo-pop.is-fixed {
  z-index: 95;
}

/* ── Employee drawer · inline edit ───────────────────────────────────────
   Existing records edit in place on double-click; clicking outside autosaves.
   The editor sits in the value's spot at the SAME size — it never grows into a
   full input box (the "don't change the field size" ask). */
#dBody .fo-defrow.is-edit .ctl { margin-top: 0; }
#dBody .fo-defrow.is-edit .ctl .fo-input,
#dBody .fo-defrow.is-edit .ctl .fo-select,
#dBody .fo-defrow.is-edit .ctl .fo-datebtn {
  width: 100%;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  min-height: 20px;
  height: auto;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 550;
  line-height: 20px;
  color: var(--fo-ink);
}
#dBody .fo-defrow.is-edit .ctl .fo-input:focus { outline: none; }
/* The active field is marked by a discreet tint only — NO underline/border, so
   the field never changes size (user redline). */
#dBody .fo-defrow.is-edit { background: var(--fo-accent-soft); }

/* Footer "Saved" flash on autosave (mirrors the .fo-dirty slot). */
.dr-saved { display: none; align-items: center; gap: 6px; margin-right: auto;
  font-size: 12px; font-weight: 650; color: var(--fo-ok); }
.dr-saved.show { display: inline-flex; }
.dr-saved svg { width: 14px; height: 14px; }

/* When a date/select picker opens for an inline edit, do NOT flip the drawer
   body to overflow:visible — that resets scrollTop and yanks the row being
   edited off-screen (the "it moves and I lose the field" bug). Keep it
   scrollable and open transient room below so the picker is revealed in place.
   Higher specificity than the generic :has() escape above, so this wins. */
#dBody:has(.fo-defrow.is-edit .fo-pop.is-open),
#dBody:has(.fo-defrow.is-edit .dsdp-popup.is-open),
#dBody:has(.fo-defrow.is-edit .fo-menu.is-open) {
  overflow: hidden auto;
  padding-bottom: 320px;
}

/* coarse pointers (real phones/tablets): bigger calendar touch targets */
@media (pointer: coarse) {
  .fo-cal {
    width: 280px;
  }

  .fo-cal-d {
    height: 40px;
  }

  .fo-cal-nav {
    width: 36px;
    height: 36px;
  }
}

/* ----- conditional reveal ----- */
.fo-reveal {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows var(--fo-slow) var(--fo-ease),
    opacity var(--fo-base) var(--fo-ease),
    margin-top var(--fo-slow) var(--fo-ease);
}

.fo-reveal > .fo-reveal-body {
  overflow: hidden;
  min-height: 0;
}

.fo-reveal.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 14px;
}

.fo-reveal .fo-reveal-card {
  border-left: 3px solid var(--fo-accent-sky);
  background: var(--fo-surface-2);
  border-radius: 0 12px 12px 0;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ----- review step ----- */
.fo-wiz-review {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fo-wiz-review-grp {
  border: 1px solid var(--fo-line);
  border-radius: 12px;
  overflow: hidden;
}

.fo-wiz-review-grp .grp-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: var(--fo-surface-2);
  border-bottom: 1px solid var(--fo-line);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fo-ink-2);
}

.fo-wiz-review-grp .grp-head .fo-btn {
  margin-left: auto;
}

.fo-wiz-review-grp .grp-body {
  padding: 6px 14px;
}

.fo-wiz-review-grp .fo-wiz-kv {
  font-size: 13px;
}

/* ----- completion ----- */
.fo-wiz-done {
  text-align: center;
  padding: 44px 20px 36px;
}

.fo-wiz-done .ring {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--fo-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 12px 30px -10px rgba(11, 63, 158, 0.55);
  animation: fo-done-pop 0.5s var(--fo-spring) backwards;
}

.fo-wiz-done .ring svg.fo-i {
  width: 28px;
  height: 28px;
  stroke-width: 2.6;
}

@keyframes fo-done-pop {
  from { opacity: 0; transform: scale(0.55); }
  to { opacity: 1; transform: scale(1); }
}

.fo-wiz-done h2 {
  margin: 0 0 4px;
  font-family: var(--fo-font-display);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.fo-wiz-done p {
  margin: 0 0 22px;
  color: var(--fo-ink-2);
  font-size: 13.5px;
}

.fo-wiz-done .acts {
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* ----- compact wizard (phone / public flows) ----- */
.fo-wizlite {
  max-width: 430px;
  margin: 0 auto;
}

.fo-wizlite-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-bottom: 18px;
}

.fo-wizlite-dots .dot {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: rgba(24, 27, 33, 0.14);
  transition: all var(--fo-slow) var(--fo-spring);
}

.fo-wizlite-dots .dot.is-done {
  background: var(--fo-accent);
}

.fo-wizlite-dots .dot.is-active {
  width: 24px;
  background: var(--fo-grad);
}

.fo-wizlite-card {
  display: none;
  background: var(--fo-surface);
  border: 1px solid var(--fo-line);
  border-radius: var(--fo-r-xl);
  box-shadow: var(--fo-shadow-2);
  padding: 26px 24px 22px;
}

.fo-wizlite-card.is-active {
  display: block;
  animation: fo-wiz-in 0.32s var(--fo-spring) backwards;
}

.fo-wizlite-card h2 {
  margin: 0 0 4px;
  font-family: var(--fo-font-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.fo-wizlite-card .hint {
  font-size: 13px;
  color: var(--fo-ink-2);
  margin: 0 0 18px;
}

.fo-wizlite-card .fo-field {
  margin-bottom: 14px;
}

.fo-wizlite-card .fo-input,
.fo-wizlite-card .fo-select,
.fo-wizlite-card .fo-datebtn {
  padding: 12px 14px;
  font-size: 15px;
  border-radius: 12px;
}

.fo-wizlite-card .fo-timewrap .fo-input {
  padding-left: 36px;
}

.fo-wizlite-card .fo-check {
  min-height: 40px; /* phone flows: the whole row is a touch target */
}

.fo-wizlite-foot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

.fo-wizlite .who {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--fo-accent-soft);
  margin-bottom: 16px;
}

.fo-wizlite .who .fo-ava {
  width: 38px;
  height: 38px;
  font-size: 14px;
}

.fo-wizlite .who .nm {
  font-weight: 700;
  font-size: 14.5px;
}

.fo-wizlite .who .rl {
  font-size: 12px;
  color: var(--fo-ink-2);
}

/* ============================================================
   Inputs & pickers — dropdowns, combobox, calendars (Phase 0.5 #2)
   One floating surface (.fo-pop) carries the depth language for
   every picker: layered shadow, 14px corners, spring entrance.
   ============================================================ */
.fo-pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  /* fully opaque: the panel must never let the dense form rows behind it
     bleed through. We animate the slide + a visibility toggle, NOT element
     opacity — fading opacity made the whole panel (background included)
     translucent mid-entrance, which read as overlapping text. */
  background: var(--fo-surface);
  border: 1px solid var(--fo-line-strong);
  border-radius: 14px;
  box-shadow:
    0 1px 2px rgba(15, 35, 70, 0.06),
    0 8px 18px -6px rgba(15, 35, 70, 0.14),
    0 28px 60px -18px rgba(15, 35, 70, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  z-index: 70;
  transform: translateY(-6px) scale(0.985);
  transform-origin: top center;
  pointer-events: none;
  visibility: hidden; /* closed popups must leave the tab order */
  transition: transform 0.28s var(--fo-spring), visibility 0s 0.2s;
}

.fo-pop.is-open {
  transform: none;
  pointer-events: auto;
  visibility: visible;
  transition: transform 0.28s var(--fo-spring), visibility 0s;
}

@media (prefers-reduced-motion: reduce) {
  .fo-pop { transition: visibility 0s 0.2s; transform: none; }
  .fo-pop.is-open { transition: visibility 0s; }
}

.fo-pop.is-right {
  left: auto;
  right: 0;
}

/* ----- dropdown listbox ----- */
.fo-dd {
  padding: 5px 6px 5px 5px;
  max-height: 286px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* searchable variant — a filter box pinned above a scrolling option list,
   for long fixed lists (roles, trades, cost codes). Opt in with data-search. */
.fo-pop.fo-dd.is-search {
  padding: 0;
  max-height: 326px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
/* the search head reads as ONE integrated combobox: a flush, borderless
   filled field with a magnifier, divided from the option list by a hairline —
   not a bordered .fo-input nested inside the bordered popup (box-in-a-box). */
.fo-dd-head { padding: 7px 7px 8px; border-bottom: 1px solid var(--fo-line); }
.fo-dd-head .fo-search { width: 100%; }
.fo-dd-head .fo-search svg.fo-i { left: 10px; }
.fo-dd-head .fo-search .fo-input {
  height: 36px;
  padding: 8px 12px 8px 32px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--fo-canvas);
  font-size: 13px;
}
.fo-dd-head .fo-search .fo-input:hover { border-color: transparent; }
.fo-dd-head .fo-search .fo-input:focus {
  border-color: var(--fo-accent);
  box-shadow: none;
  background: var(--fo-surface);
}
.fo-dd-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1px 6px 6px;
}
.fo-dd-empty { padding: 16px 12px; text-align: center; font-size: 13px; color: var(--fo-ink-3); }

.fo-dd-opt {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  color: var(--fo-ink);
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}

.fo-dd-opt:hover,
.fo-dd-opt.is-hi {
  background: var(--fo-canvas);
}

.fo-dd-opt.is-sel {
  background: var(--fo-accent-soft);
  color: var(--fo-accent);
  font-weight: 650;
}

.fo-dd-opt .tick {
  margin-left: auto;
  width: 14px;
  height: 14px;
  color: var(--fo-accent);
  visibility: hidden;
  flex: none;
}

/* only reveal the selected-option tick while the popup is OPEN — a bare
   `visibility:visible` here overrides the closed popup's `visibility:hidden`
   (visibility is per-element), so the selected tick used to escape the hidden
   dropdown and float beside the field. Scoping to .is-open keeps it contained. */
.fo-pop.is-open .fo-dd-opt.is-sel .tick {
  visibility: visible;
}

.fo-dd-opt .meta {
  margin-left: auto;
  padding-left: 18px;
  font-family: var(--fo-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--fo-ink-3);
}

.fo-dd-opt.is-sel .meta {
  color: var(--fo-accent);
  opacity: 0.75;
}

.fo-dd-opt .hit {
  color: var(--fo-accent);
  font-weight: 800;
}

.fo-dd-empty {
  padding: 14px 12px;
  font-size: 12.5px;
  color: var(--fo-ink-3);
  text-align: center;
}

/* enhanced <select>: the trigger is a button wearing .fo-select */
.fo-ddwrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.fo-field .fo-ddwrap {
  width: 100%;
}

button.fo-select {
  text-align: left;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

button.fo-select:focus-visible {
  outline: none;
  border-color: var(--fo-accent);
  box-shadow: 0 0 0 3px var(--fo-accent-soft);
}

/* ----- combobox (search-select: type a name OR a number) ----- */
.fo-combo {
  position: relative;
}

.fo-combo .fo-dd-opt .fo-ava {
  width: 26px;
  height: 26px;
  font-size: 10px;
  flex: none;
}

/* ----- calendar ----- */
.fo-cal {
  width: 252px;
  user-select: none;
}

.fo-cal-head {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 2px 8px;
}

.fo-cal-title {
  flex: 1;
  text-align: center;
  font-family: var(--fo-font-display);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.fo-cal-nav {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--fo-ink-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fo-cal-nav:hover {
  background: var(--fo-canvas);
  color: var(--fo-ink);
}

.fo-cal-nav svg.fo-i {
  width: 14px;
  height: 14px;
}

.fo-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px 0;
}

.fo-cal-dow {
  text-align: center;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--fo-ink-3);
  padding-bottom: 4px;
}

.fo-cal-d {
  height: 32px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--fo-ink);
  cursor: pointer;
  transition: background var(--fo-fast) var(--fo-ease),
    color var(--fo-fast) var(--fo-ease);
}

.fo-cal-d:hover {
  background: var(--fo-canvas);
}

.fo-cal-d.is-out {
  color: var(--fo-ink-3);
  font-weight: 500;
  opacity: 0.6;
}

.fo-cal-d.is-today {
  box-shadow: inset 0 0 0 1.5px var(--fo-accent-sky);
}

.fo-cal-d.is-sel,
.fo-cal-d.is-start,
.fo-cal-d.is-end {
  background: var(--fo-accent);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 10px -3px rgba(11, 63, 158, 0.5);
}

/* the range band runs edge-to-edge between the endpoints */
.fo-cal-d.is-in {
  background: var(--fo-accent-soft);
  border-radius: 0;
}

.fo-cal-d.is-start:not(.is-end) {
  border-radius: 9px 0 0 9px;
}

.fo-cal-d.is-end:not(.is-start) {
  border-radius: 0 9px 9px 0;
}

/* time: an editable field (type 8:15, 815, 4pm…) with the list as a guide */
.fo-timewrap {
  position: relative;
  display: inline-block;
}

.fo-field .fo-timewrap {
  display: block;
}

.fo-timewrap > svg.fo-i {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--fo-ink-3);
  pointer-events: none;
}

.fo-timewrap .fo-input {
  padding-left: 34px;
  padding-right: 30px;
  width: 100%;
  /* the release arrow — same affordance as every dropdown */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23989fab' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
}

/* time list: same option rows, same width as the field above it —
   the bar and its list always read as one control */
.fo-time-pop {
  min-width: 100%;
  max-height: 252px;
}

.fo-time-pop .fo-dd-opt {
  padding: 9px 12px; /* roomier rows — times are picked fast */
}

/* ----- single-date popup ----- */
.fo-cal-pop {
  padding: 12px;
  min-width: 0;
  width: max-content;
}

/* trigger that reads like an input, with the value as content */
.fo-datebtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--fo-line-strong);
  background: var(--fo-surface);
  font: inherit;
  font-size: 13.5px;
  color: var(--fo-ink);
  cursor: pointer;
  transition: border-color var(--fo-fast) var(--fo-ease),
    box-shadow var(--fo-fast) var(--fo-ease);
}

.fo-datebtn:hover {
  border-color: var(--fo-ink-3);
}

.fo-datebtn:focus-visible {
  outline: none;
  border-color: var(--fo-accent);
  box-shadow: 0 0 0 3px var(--fo-accent-soft);
}

.fo-datebtn svg.fo-i {
  width: 15px;
  height: 15px;
  color: var(--fo-ink-3);
  flex: none;
}

.fo-datebtn .ph {
  color: var(--fo-ink-3);
}

.fo-datebtn .rng-sep {
  color: var(--fo-ink-3);
  padding: 0 2px;
}

/* in a form field, date/time triggers fill the row like every input —
   one consistent bar width and height across the whole grid */
.fo-field .fo-datebtn,
.fo-field .fo-ddwrap:has(> .fo-datebtn) {
  width: 100%;
}

:is(.fo-toolbar, .fo-subnav) .fo-datebtn {
  padding: 6px 11px;
  font-size: 12.5px;
  border-radius: 8px;
}

/* ----- range popup: presets rail · two months · footer ----- */
.fo-range-pop {
  padding: 0;
  width: max-content;
}

.fo-range-body {
  display: flex;
  align-items: stretch;
}

.fo-range-presets {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 10px;
  border-right: 1px solid var(--fo-line);
  min-width: 132px;
}

.fo-range-presets button {
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 6px 10px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fo-ink-2);
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}

.fo-range-presets button:hover {
  background: var(--fo-canvas);
  color: var(--fo-ink);
}

.fo-range-presets button.is-active {
  background: var(--fo-accent-soft);
  color: var(--fo-accent);
}

.fo-range-cals {
  display: flex;
  gap: 18px;
  padding: 12px 14px;
}

.fo-range-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--fo-line);
}

.fo-range-foot .lbl {
  flex: 1;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--fo-ink-2);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 880px) {
  .fo-range-pop {
    max-width: calc(100vw - 40px); /* never clip Cancel/Apply off-screen */
  }

  .fo-range-cals .fo-cal + .fo-cal {
    display: none; /* one month is enough on a phone */
  }

  .fo-range-body {
    flex-direction: column;
  }

  .fo-range-presets {
    flex-direction: row;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--fo-line);
    scrollbar-width: none;
  }

  .fo-range-foot {
    flex-wrap: wrap;
  }
}

/* ----- wizard responsive ----- */
@media (max-width: 1180px) {
  .fo-wiz.has-summary {
    grid-template-columns: 216px minmax(0, 1fr);
  }
  .fo-wiz-summary {
    display: none;
  }
}

@media (max-width: 880px) {
  .fo-wiz,
  .fo-wiz.has-summary {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .fo-wiz > * {
    min-width: 0; /* the step strip's intrinsic width must not stretch the column */
  }

  /* the rail flattens into a swipeable step strip */
  .fo-wiz-rail {
    position: static;
  }

  .fo-wiz-steps {
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .fo-wiz-steps::-webkit-scrollbar {
    display: none;
  }

  .fo-wiz-step {
    flex: none;
    padding: 7px 12px 7px 8px;
    background: var(--fo-surface);
    border: 1px solid var(--fo-line);
  }

  .fo-wiz-step.is-current::before {
    display: none;
  }

  .fo-wiz-panel {
    padding: 20px 18px 16px;
  }

  .fo-wiz-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Drawers — the record-in-context surface (Phase 0.5 #2)
   Two directions, one anatomy: head · tabs · scrolling body ·
   sticky foot. Right drawer = record detail beside its list;
   top drawer = imports, broadcasts, pickers. Both float 10px
   off the edges, both have a regular and an expanded (.is-wide)
   size. One drawer at a time, never nested.
   ============================================================ */
.fo-drawer-back {
  position: fixed;
  inset: 0;
  background: rgba(24, 27, 33, 0.32);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
  backdrop-filter: blur(6px) saturate(120%);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  visibility: hidden; /* closed drawers must leave the tab order */
  transition: opacity var(--fo-base) var(--fo-ease), visibility 0s 0.3s;
}

.fo-drawer-back.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition: opacity var(--fo-base) var(--fo-ease), visibility 0s;
}

/* the page behind a drawer holds still */
body:has(.fo-drawer-back.is-open) {
  overflow: hidden;
}

.fo-drawer {
  position: fixed;
  display: flex;
  flex-direction: column;
  /* solid "paper" surface — a record reads first, and translucent glass over
     the darkened page bled the busy roster through and dropped contrast. Right
     and top drawers both sit on opaque white now; the royal hero seam still
     warms the top. */
  background: #ffffff;
  border: 1px solid rgba(24, 27, 33, 0.08);
  border-radius: var(--fo-r-xl);
  box-shadow: 0 24px 60px -20px rgba(24, 27, 33, 0.28), var(--fo-glass-rim);
  z-index: 91;
  outline: none; /* the drawer receives focus on open — never the UA ring */
  /* base state = the exit: a quick, decisive close */
  transition: transform 0.26s cubic-bezier(0.4, 0, 1, 1),
    width 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* open state = the entrance: a long settled glide */
.fo-drawer-back.is-open .fo-drawer {
  transition: transform 0.44s cubic-bezier(0.16, 1, 0.3, 1),
    width 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* the content lands a beat after the panel — head, pulses, tabs, body,
   foot rise in sequence as the drawer settles */
@keyframes fo-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.fo-drawer-back.is-open .fo-drawer > * {
  animation: fo-rise 0.4s var(--fo-ease) backwards;
}

.fo-drawer-back.is-open .fo-drawer > :nth-child(1) { animation-delay: 0.08s; }
.fo-drawer-back.is-open .fo-drawer > :nth-child(2) { animation-delay: 0.13s; }
.fo-drawer-back.is-open .fo-drawer > :nth-child(3) { animation-delay: 0.17s; }
.fo-drawer-back.is-open .fo-drawer > :nth-child(4) { animation-delay: 0.2s; }
.fo-drawer-back.is-open .fo-drawer > :nth-child(5) { animation-delay: 0.22s; }

/* motion is a courtesy, never a requirement */
@media (prefers-reduced-motion: reduce) {
  .fo-drawer,
  .fo-drawer-back,
  .fo-modal,
  .fo-modal-back,
  .fo-pop,
  .fo-menu {
    transition-duration: 0.01ms !important;
  }

  .fo-drawer-back.is-open .fo-drawer > *,
  .fo-table.is-anim tbody tr,
  .fo-dtab.is-active,
  .fo-defrow.is-edit .ctl,
  .fo-defrow.was-edit .vl {
    animation: none !important;
  }
}

.fo-drawer.is-right {
  top: 10px;
  right: 10px;
  bottom: 10px;
  width: min(600px, calc(100vw - 20px));
  transform: translateX(calc(100% + 40px));
}

.fo-drawer.is-right.is-wide {
  width: min(1000px, calc(100vw - 20px));
}

.fo-drawer-back.is-open .fo-drawer.is-right {
  transform: translateX(0);
}

.fo-drawer.is-top {
  top: 10px;
  left: 50%;
  width: min(720px, calc(100vw - 20px));
  max-height: min(720px, calc(100vh - 20px));
  transform: translate(-50%, calc(-100% - 40px));
}

.fo-drawer.is-top.is-wide {
  width: min(1080px, calc(100vw - 20px));
  max-height: calc(100vh - 20px);
}

.fo-drawer-back.is-open .fo-drawer.is-top {
  transform: translate(-50%, 0);
}

/* ----- head: identity · status · expand · close.
   Every floating surface (right drawer, top drawer, the centered box)
   shares the same bones and the same soft royal seam ----- */
.fo-drawer-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px 14px;
  flex: none;
  background: linear-gradient(180deg, rgba(233, 240, 251, 0.6), rgba(233, 240, 251, 0));
  border-radius: var(--fo-r-xl) var(--fo-r-xl) 0 0;
}

.fo-drawer-head .fo-ava {
  width: 46px;
  height: 46px;
  font-size: 15px;
}

.fo-drawer-id {
  min-width: 0;
}

.fo-drawer-id .fo-eyebrow {
  margin-bottom: 1px;
}

.fo-drawer-name {
  font-family: var(--fo-font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fo-drawer-meta {
  font-size: 12.5px;
  color: var(--fo-ink-3);
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fo-drawer-acts {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

/* ----- hero: a record's identity head — same seam, plus the
   gradient-ring avatar and the name in the display voice ----- */
.fo-drawer-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px 16px;
  background: linear-gradient(180deg, rgba(233, 240, 251, 0.6), rgba(233, 240, 251, 0));
  border-radius: var(--fo-r-xl) var(--fo-r-xl) 0 0;
  flex: none;
}

.fo-avaring {
  padding: 2.5px;
  background: var(--fo-grad);
  border-radius: 50%;
  flex: none;
  box-shadow: 0 6px 14px -6px rgba(11, 63, 158, 0.5);
}

.fo-avaring .fo-ava {
  width: 52px;
  height: 52px;
  font-size: 17px;
  border: 2.5px solid #fff;
  background: var(--fo-accent-soft);
}

/* status as a chip-select: the native select stays alive, the trigger is a
   pill with a state dot — never a form control parked in a header */
.fo-statuschip {
  position: relative;
  flex: none;
}

.fo-select.is-chip {
  position: relative;
  width: auto;
  padding: 6px 30px 6px 27px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 650;
  background-position: right 10px center;
}

.fo-select.is-chip::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fo-ink-3);
}

.fo-statuschip[data-status="enabled"] .fo-select.is-chip::before { background: var(--fo-ok); }
.fo-statuschip[data-status="vacation"] .fo-select.is-chip::before { background: var(--fo-warn); }
.fo-statuschip[data-status="terminated"] .fo-select.is-chip::before { background: var(--fo-danger); }

/* ----- pulse strip: the four numbers that brief you before any tab ----- */
.fo-pulses {
  display: flex;
  padding: 0 22px 13px;
  flex: none;
}

.fo-pulse {
  flex: 1;
  min-width: 0;
  padding: 0 14px;
  border-left: 1px solid var(--fo-line);
}

.fo-pulse:first-child {
  border-left: 0;
  padding-left: 0;
}

.fo-pulse .v {
  font-size: 15.5px;
  font-weight: 750;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.fo-pulse .v.is-warn { color: var(--fo-warn); }
.fo-pulse .v.is-danger { color: var(--fo-danger); }
.fo-pulse .v.is-ok { color: var(--fo-ok); }   /* healthy reads deliberate, not unstyled */

/* fo-pulse COLLISION GUARD (2026-07-08): the Celebrations page's container
   rule (.fo-pulse { max-width:1180px; padding:22px; flex:0 0 auto; border;
   radius; background }) leaks into the drawer KPI strip and turned it into
   content-sized boxes — with the old :first-child divider exception leaving
   card 1's text hugging the edge. Inside .fo-pulses the strip owns its
   cards: EQUAL width, CENTERED text, uniform padding (user spec). */
.fo-pulses { gap: 10px; }
.fo-pulses > .fo-pulse {
  flex: 1 1 0;
  max-width: none;
  margin: 0;
  padding: 13px 10px;
  text-align: center;
  background: var(--fo-canvas);
  border: 1px solid var(--fo-line);
  border-radius: var(--fo-r-lg);
}
.fo-pulses > .fo-pulse:first-child {
  border-left: 1px solid var(--fo-line);  /* undo the divider-era exception */
  padding-left: 10px;
}

.fo-pulse .k {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--fo-ink-3);
  margin-top: 1px;
  white-space: nowrap;
}

/* ----- definition cells: a compact two-column fact grid.
   The label whispers above the value; click a cell to edit it in
   place; commit returns it to words. Three columns when expanded ----- */
.fo-defs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 18px;
  margin: 0 -10px;
}

.fo-defrow {
  position: relative;
  min-width: 0;
  padding: 7px 30px 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background var(--fo-fast) var(--fo-ease);
}

.fo-defrow:hover {
  background: rgba(255, 255, 255, 0.6);
}

.fo-defrow:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--fo-accent-soft);
}

.fo-defrow.is-full {
  grid-column: 1 / -1;
}

.fo-defrow .lb {
  display: block;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--fo-ink-3);
  margin-bottom: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fo-defrow .vl {
  display: block;
  min-height: 20px;
  font-size: 13.5px;
  font-weight: 550;
  color: var(--fo-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fo-defrow .vl .add {
  color: var(--fo-accent);
  font-weight: 650;
  font-size: 12.5px;
}

.fo-defrow .pen {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--fo-ink-3);
  opacity: 0;
  transition: opacity var(--fo-fast) var(--fo-ease);
}

.fo-defrow:hover .pen,
.fo-defrow:focus-visible .pen {
  opacity: 1;
}

.fo-defrow.is-edit {
  background: rgba(255, 255, 255, 0.7);
  cursor: default;
  padding-right: 10px;
}

.fo-defrow.is-edit .ctl {
  margin-top: 3px;
  min-width: 0;
  /* NO entrance animation here: this wraps the open picker (.fo-pop), and an
     animating ancestor's opacity<1 renders the whole popup translucent — the
     rows behind bleed through during the fade ("wrong design before the real
     one"). The popup brings its own entrance; the control just appears. */
}

/* The inline editor builds the control, then opens its picker one frame later
   (records.html defers the open via requestAnimationFrame so the row's own
   click can't be read as an outside-click). Until the popup is actually open,
   hide the enhanced trigger so the closed, chevron-wearing select/date box can
   never paint for that one frame — the second "wrong design before the real
   one". visibility (not display) keeps the wrap's height, so the popup's
   top:calc(100% + 6px) anchor stays put; the trigger reappears the instant the
   list opens over it. Scoped to inline edit only, so normal closed selects keep
   their trigger. */
.fo-defrow.is-edit .ctl .fo-ddwrap:not(:has(.fo-pop.is-open)) > button {
  visibility: hidden;
}

/* the committed value settles back in just as softly */
.fo-defrow.was-edit .vl {
  animation: fo-dtab-in 0.18s var(--fo-ease);
}

@media (pointer: coarse) {
  .fo-defrow .pen {
    opacity: 1;
  }
}

/* expanded drawer: the fact grid flows into three columns */
.fo-drawer.is-wide .fo-dsec .fo-defs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ----- tab strip: the glass capsule, scrollable when crowded ----- */
.fo-drawer-tabs {
  padding: 0 22px 14px;
  border-bottom: 1px solid var(--fo-line);
  overflow-x: auto;
  flex: none;
  /* the seg is inline-flex, so it hugs its tabs; center it in the strip when
     the tabs don't fill the width (few tabs read as a balanced cluster, not a
     left-stranded row). When crowded it overflows and scrolls as before. */
  text-align: center;
}

/* The crowded tab strip needs a scrollbar, but it should stay out of the way:
   hidden at rest, appearing only while the cursor is on the strip. The element
   that actually scrolls is the inner .fo-seg capsule — it clamps to
   max-width:100% and scrolls INTERNALLY, so the .fo-drawer-tabs parent never
   overflows (styling its bar did nothing). The base .fo-seg hides its bar for a
   clean page-level pill, so we re-reveal it, scoped to the drawer, and let it
   inherit the app's global hairline geometry (6px track, ~2px thumb, transparent
   at rest, tinted on hover) — thin and consistent with every other scrollbar.
   Chrome path: scrollbar-width MUST be `auto` — `none` hides the bar and `thin`
   forces a thick native bar, both overriding ::-webkit-scrollbar (verified in
   Chrome 150). Firefox has no ::-webkit-scrollbar, so it gets `thin` below and
   inherits the global transparent-at-rest / show-on-hover scrollbar-color. */
.fo-drawer-tabs .fo-seg {
  scrollbar-width: auto;
}
.fo-drawer-tabs .fo-seg::-webkit-scrollbar {
  display: block;              /* undo the base .fo-seg hide; inherits global 6px geometry */
}
.fo-drawer-tabs .fo-seg:hover::-webkit-scrollbar-thumb {
  background-color: rgba(24, 27, 33, 0.30);   /* visible only while on the tab strip */
}
@supports not selector(::-webkit-scrollbar) {
  .fo-drawer-tabs .fo-seg {
    scrollbar-width: thin;
  }
}

.fo-dtab {
  display: none;
}

.fo-dtab.is-active {
  display: block;
  animation: fo-dtab-in 0.24s var(--fo-ease);
}

@keyframes fo-dtab-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
}

/* ----- body: the scrolling form, sectioned by hairlines ----- */
.fo-drawer-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 22px;
}

.fo-dsec {
  padding: 16px 0;
  border-top: 1px solid var(--fo-line);
}

.fo-dsec:first-child {
  padding-top: 0;
  border-top: 0;
}

.fo-dsec:last-child {
  padding-bottom: 0;
}

.fo-dsec-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--fo-ink-3);
  margin-bottom: 8px;
}

/* field grid: two columns regular, three when expanded */
.fo-fgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.fo-fgrid .is-full {
  grid-column: 1 / -1;
}

.fo-drawer.is-wide .fo-fgrid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ----- foot: dirty hint · Cancel · Save ----- */
.fo-drawer-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--fo-line);
  flex: none;
}

.fo-dirty {
  display: none;
  align-items: center;
  gap: 7px;
  margin-right: auto;
  font-size: 12px;
  font-weight: 650;
  color: var(--fo-warn);
}

.fo-dirty::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fo-warn);
}

.fo-drawer-foot.has-dirty .fo-dirty {
  display: inline-flex;
}

/* pickers opened inside the drawer get scrolled into view by
   fo-controls; the body never clips them sideways */
.fo-drawer-body {
  overflow-x: hidden;
}

@media (max-width: 880px) {
  .fo-expand {
    display: none; /* a phone drawer is already full width */
  }

  .fo-drawer-head {
    padding: 16px 16px 12px;
  }

  .fo-drawer-hero {
    padding: 18px 16px 14px;
    gap: 12px;
  }

  .fo-pulses {
    padding: 0 16px 14px;
  }

  .fo-pulse {
    padding: 2px 12px;
  }

  .fo-drawer-tabs {
    padding: 0 16px 12px;
  }

  .fo-drawer-body {
    padding: 16px;
  }

  .fo-drawer-foot {
    padding: 12px 16px;
  }
}

@media (max-width: 640px) {
  /* one column on a phone — beats the .is-wide 3-col rule (same selector
     depth, later in source + in a media query, so it wins) */
  .fo-defs,
  .fo-drawer.is-wide .fo-dsec .fo-defs,
  .fo-fgrid,
  .fo-drawer.is-wide .fo-fgrid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Roster list — the table that opens the drawer (Phase 0.5 #2)
   Checkbox column, identity cell, sortable headers, and the
   floating bulk bar that appears once rows are selected.
   ============================================================ */
.fo-table tr.is-click {
  cursor: pointer;
}

.fo-table tr.is-sel {
  background: var(--fo-accent-soft);
}

.fo-table tr.is-sel:hover {
  background: #e0eaf9;
}

/* the row whose record is open in the drawer */
.fo-table tr.is-open-row {
  box-shadow: inset 3px 0 0 var(--fo-accent);
}

/* a row's ⋮ menu lives inside that row's cell; without this the rows BELOW
   (later in the DOM, no z-index) paint on top of the open menu and their
   cells bleed through it. Lifting the owning row above its siblings lets the
   menu sit over them. This is a stacking fix, not a transparency one. */
.fo-table tbody tr:has(.fo-menu.is-open) {
  position: relative;
  z-index: 20;
}

.fo-table th.sel,
.fo-table td.sel {
  width: 1%;
  padding-right: 2px;
}

.fo-table td.act {
  width: 1%;
  text-align: right;
}

.fo-namecell {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.fo-namecell .nm {
  font-weight: 650;
  white-space: nowrap;
}

.fo-namecell .sub {
  font-size: 12px;
  color: var(--fo-ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* sortable header: the whole label is the control, arrow on the active one */
.fo-th-sort {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  cursor: pointer;
}

.fo-th-sort:hover {
  color: var(--fo-ink);
}

.fo-th-sort svg.fo-i {
  width: 11px;
  height: 11px;
  opacity: 0;
  transition: opacity var(--fo-fast) var(--fo-ease), transform 0.2s var(--fo-ease);
}

.fo-th-sort.is-asc svg.fo-i,
.fo-th-sort.is-desc svg.fo-i {
  opacity: 1;
  color: var(--fo-accent);
}

.fo-th-sort.is-desc svg.fo-i {
  transform: rotate(180deg);
}

/* rows arrive with a soft stagger (delays set inline by the renderer) */
@keyframes fo-row-in {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
}

.fo-table.is-anim tbody tr {
  /* `backwards`, not `both`: `both` keeps the end transform (an identity matrix)
     at rest, and ANY transform makes the row a containing block — which would
     trap the row's pinned ⋮ menu (position:fixed) inside the scroller again.
     `backwards` keeps the staggered entrance but leaves transform:none at rest. */
  animation: fo-row-in 0.24s var(--fo-ease) backwards;
}

/* compact roster variant — more facts per screen, quieter type.
   Rosters are scanned, not read; every size steps down one notch. */
.fo-table.is-compact {
  font-size: 12.5px;
}

.fo-table.is-compact th {
  font-size: 10.5px;
  padding: 10px 12px;
}

.fo-table.is-compact td {
  padding: 8px 12px;
}

.fo-table.is-compact th:first-child,
.fo-table.is-compact td:first-child {
  padding-left: 18px;
}

.fo-table.is-compact th:last-child,
.fo-table.is-compact td:last-child {
  padding-right: 18px;
}

.fo-table.is-compact .fo-ava {
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.fo-table.is-compact .fo-namecell {
  gap: 9px;
}

.fo-table.is-compact .fo-namecell .nm {
  font-size: 12.5px;
}

.fo-table.is-compact .fo-namecell .sub {
  font-size: 11px;
}

.fo-table.is-compact .fo-chip {
  padding: 2px 8px;
  font-size: 10.5px;
}

.fo-table.is-compact .fo-today,
.fo-table.is-compact .fo-stat {
  font-size: 12px;
}

.fo-table.is-compact .fo-rowact {
  width: 26px;
  height: 26px;
}

/* muted secondary facts (phone, tenure) — present, never loud */
.fo-table.is-compact td.dim {
  color: var(--fo-ink-3);
  font-size: 12px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* attribute tag: the calm, designed treatment for categorical roster columns
   (role, branch, salary type, union…). A soft rounded chip — present and
   intentional, but quiet enough that eight of them never shout. Reserved for
   enumerable values; live signals keep their dot (.fo-stat) or chip. */
.fo-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--fo-ink-2);
  background: var(--fo-canvas);
  border: 1px solid var(--fo-line);
  white-space: nowrap;
}
.fo-table.is-compact .fo-tag { padding: 2px 8px; font-size: 11px; }

/* ============================================================
   Wide roster — the card stays a fixed frame; the table scrolls sideways
   INSIDE it (instead of spilling past the rounded edge when many columns are
   added). Identity (checkbox + Person) is frozen so you never lose who's who.
   ============================================================ */
.fo-tablewrap {
  overflow-x: auto;
  /* the closed row ⋮ menus are absolute at top:100%+6px, so on the bottom rows
     they hang ~130px below the table — inside a scroll box that became empty
     vertical space. They reopen as position:fixed, so clipping that phantom
     vertical overflow is safe and removes the dead space under the list. */
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  border-top-left-radius: var(--fo-r-lg);
  border-top-right-radius: var(--fo-r-lg);
}

/* freeze identity: the checkbox column at 0, Person right after it */
.fo-tablewrap .fo-table th.sel,
.fo-tablewrap .fo-table td.sel {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--fo-surface);
}
.fo-tablewrap .fo-table thead th:nth-child(2),
.fo-tablewrap .fo-table tbody td:nth-child(2) {
  position: sticky;
  left: 47px;          /* width of the checkbox column */
  z-index: 2;
  background: var(--fo-surface);
}
/* frozen cells must carry the row's state colour, or scrolled cells show under */
.fo-tablewrap .fo-table tbody tr:hover td.sel,
.fo-tablewrap .fo-table tbody tr:hover td:nth-child(2) { background: var(--fo-surface-2); }
.fo-tablewrap .fo-table tbody tr.is-sel td.sel,
.fo-tablewrap .fo-table tbody tr.is-sel td:nth-child(2) { background: var(--fo-accent-soft); }
.fo-tablewrap .fo-table tbody tr.is-sel:hover td.sel,
.fo-tablewrap .fo-table tbody tr.is-sel:hover td:nth-child(2) { background: #e0eaf9; }
/* the frozen edge earns a soft shadow only once you actually scroll sideways */
.fo-tablewrap.is-scrolled .fo-table th:nth-child(2),
.fo-tablewrap.is-scrolled .fo-table td:nth-child(2) {
  box-shadow: 7px 0 8px -7px rgba(24, 27, 33, 0.18);
}

/* freeze the ⋮ actions to the RIGHT edge so it's always reachable, however far
   the roster is scrolled sideways — the mirror of the frozen identity at left.
   The cell stays empty; the ⋮ still reveals on row hover, just as before. */
.fo-tablewrap .fo-table th.act,
.fo-tablewrap .fo-table td.act {
  position: sticky;
  right: 0;
  z-index: 2;
  background: var(--fo-surface);
}
.fo-tablewrap .fo-table tbody tr:hover td.act { background: var(--fo-surface-2); }
.fo-tablewrap .fo-table tbody tr.is-sel td.act { background: var(--fo-accent-soft); }
.fo-tablewrap .fo-table tbody tr.is-sel:hover td.act { background: #e0eaf9; }
/* its shadow shows only while there's more table hidden to its left */
.fo-tablewrap.is-scrolled-r .fo-table th.act,
.fo-tablewrap.is-scrolled-r .fo-table td.act {
  box-shadow: -7px 0 8px -7px rgba(24, 27, 33, 0.18);
}

/* the "Today" cell — where someone is right now, not a stored attribute */
.fo-today {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--fo-ink-2);
  white-space: nowrap;
}

.fo-today .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fo-ok);
  animation: fo-pulse 2.2s var(--fo-ease) infinite;
  flex: none;
}

.fo-today .tm {
  color: var(--fo-ink-3);
  font-weight: 500;
}

.fo-today.is-off {
  color: var(--fo-ink-3);
  font-weight: 500;
}

/* quiet status text: dot + word, no pill — the chips are saved for signals */
.fo-stat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--fo-ink-2);
  white-space: nowrap;
}

.fo-stat .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fo-ink-3);
  flex: none;
}

.fo-stat.is-ok .dot { background: var(--fo-ok); }
.fo-stat.is-warn .dot { background: var(--fo-warn); }
.fo-stat.is-danger .dot { background: var(--fo-danger); }

/* row action trigger (⋮) — quiet until the row is hovered */
.fo-rowact {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--fo-ink-3);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease);
}

.fo-table tr:hover .fo-rowact,
.fo-rowact:focus-visible,
.fo-menu-wrap:has(.fo-menu.is-open) .fo-rowact {
  opacity: 1;
}

.fo-rowact:hover {
  background: var(--fo-canvas);
  color: var(--fo-ink);
}

@media (pointer: coarse) {
  .fo-rowact {
    opacity: 1; /* no hover on touch — the affordance stays visible */
  }
}

/* a phone never scrolls the page sideways — the table's card scrolls instead
   (the frozen-grid pattern will own the richer treatment), and the filter
   row stacks rather than stretching the page */
@media (max-width: 880px) {
  .fo-card:has(> .fo-table) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .fo-subnav,
  .fo-subnav .fo-flex {
    flex-wrap: wrap;
  }
}

/* ----- bulk bar: a dark glass capsule that surfaces on selection ----- */
.fo-bulkbar {
  position: fixed;
  bottom: 22px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 8px 6px 16px;
  max-width: calc(100vw - 24px);
  /* light glass capsule — no dark chrome */
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(255, 255, 255, 0.9));
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--fo-glass-border);
  border-radius: 999px;
  box-shadow: 0 18px 44px -14px rgba(11, 63, 158, 0.28), 0 2px 8px -2px rgba(15, 35, 70, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: var(--fo-ink);
  z-index: 80;
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.18s var(--fo-ease), transform 0.34s var(--fo-spring), visibility 0s 0.2s;
}

.fo-bulkbar.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
  visibility: visible;
  transition: opacity 0.18s var(--fo-ease), transform 0.34s var(--fo-spring), visibility 0s;
}

.fo-bulkbar .cnt {
  font-size: 12.5px;
  font-weight: 700;
  margin-right: 8px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--fo-accent);
}

.fo-bulkbar button {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 7px 12px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fo-ink-2);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--fo-fast) var(--fo-ease), color var(--fo-fast) var(--fo-ease);
}

.fo-bulkbar button:hover {
  background: var(--fo-accent-soft);
  color: var(--fo-accent-deep);
}

.fo-bulkbar .sep {
  width: 1px;
  height: 18px;
  background: var(--fo-line-strong);
  margin: 0 4px;
  flex: none;
}

/* ----- dropzone (top-drawer imports) ----- */
.fo-drop {
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 30px 20px;
  border: 1.5px dashed rgba(24, 27, 33, 0.18);
  border-radius: 14px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease);
}

.fo-drop:hover,
.fo-drop.is-over {
  border-color: var(--fo-accent);
  background: rgba(233, 240, 251, 0.5);
}

.fo-drop svg.fo-i {
  width: 22px;
  height: 22px;
  color: var(--fo-ink-3);
  margin-bottom: 4px;
}

.fo-drop .t1 {
  font-size: 13.5px;
  font-weight: 650;
}

.fo-drop .t2 {
  font-size: 12px;
  color: var(--fo-ink-3);
}

/* the "or grab the format" line under the drop zone */
.fo-drop-aux {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: -2px;
  font-size: 12.5px;
  color: var(--fo-ink-3);
}

/* ============================================================
   File dropzone — THE canonical upload component. Supersedes the
   per-module .fo-ex-drop / .fo-job-dropzone variants at migration.
   One zone, four modes (multi-image grid · multi-doc list · single
   CSV · single image replace) and the full state union: idle,
   drag-over, preview, uploading, done, too-big / blocked-type error,
   remove, retry. Phone-first (whole zone is the tap target; the
   image inputs carry capture= so a phone offers the camera).
   ============================================================ */
.fo-drop { position: relative; width: 100%; -webkit-tap-highlight-color: transparent; }
.fo-drop:focus-visible { outline: 3px solid rgba(11, 63, 158, 0.25); outline-offset: 2px; }
.fo-drop.is-sm { padding: 18px 16px; gap: 3px; }
.fo-drop.is-sm svg.fo-i { width: 18px; height: 18px; margin-bottom: 2px; }
.fo-drop.is-error { border-color: var(--fo-danger); background: var(--fo-danger-soft); animation: fo-drop-shake 0.3s var(--fo-ease); }
.fo-drop.is-disabled { opacity: 0.55; pointer-events: none; }
@keyframes fo-drop-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

/* selected files — vertical list (documents, csv) */
.fo-drop-files { display: flex; flex-direction: column; gap: 7px; margin-top: 11px; }
.fo-drop-file { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); background: var(--fo-surface); }
.fo-drop-file.is-error { border-color: rgba(179, 38, 30, 0.3); background: var(--fo-danger-soft); }
.fo-drop-thumb { width: 40px; height: 40px; border-radius: 9px; object-fit: cover; flex: none; background: var(--fo-surface-2); border: 1px solid var(--fo-line); }
.fo-drop-tile { width: 40px; height: 40px; border-radius: 9px; flex: none; display: grid; place-items: center; font-size: 10px; font-weight: 800; letter-spacing: 0.04em; }
.fo-drop-tile.t-pdf { color: var(--fo-danger); background: var(--fo-danger-soft); }
.fo-drop-tile.t-csv, .fo-drop-tile.t-xls { color: var(--fo-ok); background: var(--fo-ok-soft); }
.fo-drop-tile.t-doc, .fo-drop-tile.t-img { color: var(--fo-accent); background: var(--fo-accent-soft); }
.fo-drop-tile.t-file { color: var(--fo-ink-3); background: var(--fo-surface-2); }
.fo-drop-body { flex: 1; min-width: 0; }
.fo-drop-nm { font-size: 13px; font-weight: 600; color: var(--fo-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-drop-sub { font-size: 11.5px; color: var(--fo-ink-3); margin-top: 1px; }
.fo-drop-file.is-error .fo-drop-sub { color: var(--fo-danger); font-weight: 600; }
.fo-drop-bar { height: 4px; border-radius: 3px; background: var(--fo-line); overflow: hidden; margin-top: 6px; }
.fo-drop-bar .fill { height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--fo-accent), var(--fo-accent-sky)); transition: width 0.18s linear; }
.fo-drop-stat { flex: none; width: 20px; height: 20px; display: grid; place-items: center; }
.fo-drop-stat svg.fo-i { width: 16px; height: 16px; }
.fo-drop-stat.is-ok { color: var(--fo-ok); }
.fo-drop-stat.is-err { color: var(--fo-danger); }
.fo-drop-spin { width: 15px; height: 15px; border: 2px solid var(--fo-line-strong); border-top-color: var(--fo-accent); border-radius: 50%; animation: fo-drop-spin 0.6s linear infinite; }
@keyframes fo-drop-spin { to { transform: rotate(360deg); } }
.fo-drop-act { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 0; background: none; border-radius: 8px; color: var(--fo-ink-3); cursor: pointer; transition: background var(--fo-fast), color var(--fo-fast); }
.fo-drop-act:hover { background: var(--fo-surface-2); color: var(--fo-ink); }
.fo-drop-act.is-danger:hover { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-drop-act svg.fo-i { width: 15px; height: 15px; }

/* image grid variant (gallery uploads) */
.fo-drop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-top: 11px; }
.fo-drop-cell { position: relative; aspect-ratio: 1; border-radius: var(--fo-r-md); overflow: hidden; background: var(--fo-surface-2); border: 1px solid var(--fo-line); }
.fo-drop-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fo-drop-cell.is-error { border-color: var(--fo-danger); }
.fo-drop-cellx { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(17, 20, 24, 0.55); color: #fff; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity var(--fo-fast); }
.fo-drop-cell:hover .fo-drop-cellx, .fo-drop-cell:focus-within .fo-drop-cellx { opacity: 1; }
.fo-drop-cellx svg.fo-i { width: 13px; height: 13px; }
.fo-drop-cover { position: absolute; inset: 0; display: grid; place-items: center; gap: 7px; padding: 0 12px; background: rgba(255, 255, 255, 0.74); }
.fo-drop-cover .fo-drop-bar { width: 78%; margin-top: 0; }
.fo-drop-cover.is-error { background: rgba(179, 38, 30, 0.08); color: var(--fo-danger); font-size: 11px; font-weight: 650; text-align: center; }
.fo-drop-add { display: grid; place-items: center; gap: 3px; aspect-ratio: 1; border: 1.5px dashed var(--fo-line-strong); border-radius: var(--fo-r-md); background: none; color: var(--fo-ink-3); cursor: pointer; font-size: 11px; font-weight: 600; transition: border-color var(--fo-fast), color var(--fo-fast); }
.fo-drop-add:hover { border-color: var(--fo-accent); color: var(--fo-accent); }
.fo-drop-add svg.fo-i { width: 18px; height: 18px; }

/* single-image replace (hero / avatar) */
.fo-drop-single { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); background: var(--fo-surface); }
.fo-drop-single .pv { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; flex: none; border: 1px solid var(--fo-line); background: var(--fo-surface-2); }
.fo-drop-single .pv.is-round { border-radius: 50%; }
.fo-drop-single .meta { flex: 1; min-width: 0; }
.fo-drop-single .meta .nm { font-size: 13px; font-weight: 650; color: var(--fo-ink); }
.fo-drop-single .meta .s { font-size: 11.5px; color: var(--fo-ink-3); margin-top: 2px; }
.fo-drop-single .acts { display: flex; gap: 8px; margin-top: 9px; }

@media (max-width: 560px) {
  .fo-drop { padding: 24px 16px; }
  .fo-drop-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
}

/* ============================================================
   Export modal — only the dataset list scrolls; hero, format
   control and footer stay pinned. Selected option uses the soft
   accent tint (the checked-checkbox / is-soft language), never a
   dark slab.
   ============================================================ */
.fo-modal.is-stack {
  display: flex;
  flex-direction: column;
  overflow: hidden;            /* the body owns the scroll, not the card */
  max-width: 500px;            /* sized to the option text — no empty right gutter */
}
.fo-modal.is-stack .fo-modal-body {
  flex: 1 1 auto;
  min-height: 0;               /* let the flex child actually shrink + scroll */
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-top: 4px;
  padding-bottom: 14px;
}

.fo-export-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.fo-export-grp {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fo-export-grp-t {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--fo-ink-3);
  padding-left: 2px;
}

/* the option row — the whole label is the hit target, two-line voice. No
   border at rest: a quiet, discreet list, tint only on hover / when chosen. */
.fo-export-opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  transition: background var(--fo-fast) var(--fo-ease);
}
.fo-export-opt:hover {
  background: var(--fo-surface-2);
}

/* the native radio drives the row but doesn't show its own face — the card IS
   the control. Kept in the a11y tree, painted out of the visual layer. */
.fo-export-radio {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

/* one line per option: title at natural width, description fills the rest
   (smaller, muted) and ellipsis-truncates — so the row uses the full width */
.fo-export-opt-body {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
  flex: 1 1 auto;
}
.fo-export-opt-body .t1 {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.005em;
  color: var(--fo-ink);
  flex: none;
  white-space: nowrap;
}
.fo-export-opt-body .t2 {
  font-size: 11.5px;
  color: var(--fo-ink-3);
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* SELECTED — just the soft accent tint (the checked-checkbox vocabulary),
   no border, no shadow. Discreet. */
.fo-export-opt:has(.fo-export-radio:checked) {
  background: var(--fo-accent-soft);
}
.fo-export-opt:has(.fo-export-radio:checked) .t1 { color: var(--fo-accent-deep); }
.fo-export-opt:has(.fo-export-radio:checked) .t2 { color: var(--fo-accent); opacity: 0.78; }
.fo-export-opt:has(.fo-export-radio:focus-visible) {
  outline: 3px solid rgba(11, 63, 158, 0.25);
  outline-offset: 2px;
}

/* format strip — pinned between the scroll body and the footer */
.fo-export-fmt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: none;
  padding: 13px 24px 4px;
  border-top: 1px solid var(--fo-line);
}
.fo-export-fmt .fo-label { margin: 0; }

/* the format picker is a quieter, thinner segmented control than the broadcast
   one — flat canvas track, a simple white pill, no liquid-glass glow */
.fo-export-fmt .fo-seg {
  padding: 2px;
  background: var(--fo-canvas);
  border-color: var(--fo-line);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.fo-export-fmt .fo-seg button {
  padding: 4px 13px;
  font-size: 12px;
}
.fo-export-fmt .fo-seg button.is-active {
  background: var(--fo-surface);
  color: var(--fo-accent-deep);
  box-shadow: 0 1px 2px rgba(15, 35, 70, 0.08);
  transform: none;
}

/* ============================================================
   Roster — thinner hairlines (the list reads airier; the chrome
   recedes so the live data carries the eye). Compact variant only.
   ============================================================ */
.fo-table.is-compact td,
.fo-table.is-compact thead th {
  border-bottom-color: rgba(24, 27, 33, 0.05);
}

/* ============================================================
   Drawer identity zone — light & minimal, in the check-in design
   language: a white header, KPI-style stats, blue only as a small
   accent. No color slab, no seam, no gradient ring.
   ============================================================ */
.fo-drawer-hero,
.fo-drawer-head {
  background: none;   /* drop the soft royal wash — headers sit on white */
}

/* stats read like the check-in KPI row: display-voice numbers, quiet labels */
/* smaller, quieter KPI strip — the numbers brief you without shouting */
.fo-pulse .v { font-size: 14px; font-weight: 700; letter-spacing: -0.005em; }
.fo-pulse .v.is-warn { color: var(--fo-warn); }
.fo-pulse .v.is-danger { color: var(--fo-danger); }
.fo-pulse .v .u { font-size: 10.5px; font-weight: 600; color: var(--fo-ink-3); }

/* an icon can stand in for initials in the avatar (e.g. the broadcast hero) */
.fo-ava > svg.fo-i { width: 21px; height: 21px; }
.fo-ava.is-lg > svg.fo-i { width: 23px; height: 23px; }

/* the top (broadcast) drawer mirrors the profile drawer: a stat strip that
   closes with a hairline before the compose fields */
.fo-drawer.is-top .fo-pulses {
  margin: 0 22px;
  padding: 2px 0 16px;
  border-bottom: 1px solid var(--fo-line);
}
@media (max-width: 880px) {
  .fo-drawer.is-top .fo-pulses { margin: 0 16px; }
}

/* ============================================================
   Broadcast — recipient builder. A preset audience chip plus any
   hand-picked people, all living in one field that you add to from a
   roster typeahead. Reads like a "To:" line: chips wrap, a quiet input
   grows at the end, a search popover hangs beneath.
   ============================================================ */
/* header: the count on the left, the audience preset picker on the right */
.fo-recip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}
.fo-recip-head .fo-label { margin: 0; }
.fo-recip-head .n { color: var(--fo-ink-3); font-weight: 600; }
.fo-recip-aud { display: flex; align-items: center; gap: 8px; }
.fo-recip-aud .fo-label { margin: 0; }
.fo-select.is-mini { padding: 6px 30px 6px 11px; font-size: 12.5px; min-width: 158px; }

/* the box shows the actual send list as removable rows, with an add row
   beneath — you see exactly who's in and drop anyone in one click */
.fo-recipbox {
  border: 1px solid var(--fo-line);
  border-radius: 13px;
  background: var(--fo-surface);
  transition: border-color var(--fo-fast) var(--fo-ease), box-shadow var(--fo-fast) var(--fo-ease);
}
.fo-recipbox.is-focus { border-color: rgba(11, 63, 158, 0.35); box-shadow: 0 0 0 3px var(--fo-accent-soft); }

/* the send list reads as dense wrapping pills — recipients pack tight, no
   stranded gap per row, and a dozen of them fit in a few short lines */
.fo-reciplist {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 9px 10px;
  max-height: 132px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.fo-rpill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px 2px 3px;
  border-radius: 999px;
  background: var(--fo-canvas);
  border: 1px solid var(--fo-line);
  font-size: 12px;
  font-weight: 600;
  color: var(--fo-ink);
  max-width: 100%;
  animation: fo-rchip-in 0.18s var(--fo-spring) both;
}
@keyframes fo-rchip-in {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}
.fo-rpill .fo-ava { width: 20px; height: 20px; font-size: 8.5px; flex: none; }
.fo-rpill.is-manual .fo-ava { background: var(--fo-accent-soft); color: var(--fo-accent-deep); }
.fo-rpill .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-rpill .x {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--fo-ink-3);
  cursor: pointer;
  opacity: 0.7;
  transition: background var(--fo-fast) var(--fo-ease), color var(--fo-fast) var(--fo-ease), opacity var(--fo-fast) var(--fo-ease);
}
.fo-rpill .x:hover { opacity: 1; background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-rpill .x svg { width: 10px; height: 10px; display: block; }
.fo-recip-empty { width: 100%; padding: 12px; text-align: center; font-size: 12.5px; color: var(--fo-ink-3); }

/* the add row sits under the list, hairline-separated */
.fo-recip-add {
  position: relative;
  display: flex;
  align-items: center;
  padding: 2px 11px;
  border-top: 1px solid var(--fo-line);
}
.fo-recip-add > input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  font: inherit;
  font-size: 13px;
  color: var(--fo-ink);
  padding: 9px 2px;
}
.fo-recip-add > input::placeholder { color: var(--fo-ink-3); }

/* typeahead results — opaque surface, transform+visibility only (never an
   opacity fade), so no half-painted content bleeds through on open */
.fo-recip-pop {
  position: absolute;
  top: calc(100% + 7px);
  left: -6px;
  width: 320px;
  max-width: min(320px, 78vw);
  z-index: 60;
  padding: 6px;
  background: var(--fo-surface);
  border: 1px solid var(--fo-line);
  border-radius: 14px;
  box-shadow: var(--fo-glass-shadow);
  max-height: 270px;
  overflow: auto;
  overscroll-behavior: contain;
  transform: translateY(-6px) scale(0.985);
  transform-origin: top left;
  visibility: hidden;
  transition: transform 0.28s var(--fo-spring), visibility 0s 0.22s;
}
.fo-recip-pop.is-open {
  transform: none;
  visibility: visible;
  transition: transform 0.3s var(--fo-spring);
}
.fo-recip-pop .opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 9px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: background var(--fo-fast) var(--fo-ease);
}
.fo-recip-pop .opt:hover,
.fo-recip-pop .opt.is-active { background: var(--fo-canvas); }
.fo-recip-pop .opt .fo-ava { width: 28px; height: 28px; font-size: 11px; flex: none; }
.fo-recip-pop .opt .nm { font-size: 13px; font-weight: 600; color: var(--fo-ink); }
.fo-recip-pop .opt .mt {
  font-size: 11.5px;
  color: var(--fo-ink-3);
  margin-left: auto;
  white-space: nowrap;
}
.fo-recip-pop .opt.is-manual .fo-ava { background: var(--fo-accent-soft); color: var(--fo-accent-deep); }
.fo-recip-pop .empty {
  padding: 16px 12px;
  text-align: center;
  color: var(--fo-ink-3);
  font-size: 12.5px;
}

/* templates: a labelled row of reusable openers */
.fo-tpls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.fo-tpls .fo-label { margin: 0 2px 0 0; }

/* priority + the channels it lights up on one compact line: the segmented
   control fills the left, the channel chips sit tight on the right */
.fo-sevline { display: flex; align-items: center; gap: 14px; }
.fo-sevline .fo-seg { flex: 1; display: flex; }
.fo-sevline .fo-seg button { flex: 1; text-align: center; padding-left: 6px; padding-right: 6px; }
.fo-sevline .fo-chans { flex: none; min-height: 0; }
@media (max-width: 560px) {
  .fo-sevline { flex-wrap: wrap; }
  .fo-sevline .fo-seg { flex: 1 1 100%; }
  .fo-sevline .fo-chans { width: 100%; }
  .fo-sevline .fo-chans .fo-chan { flex: 1; justify-content: center; }
}

/* priority → channels. The severity sets which channels carry the message;
   the chips show what will fire, lit when active, quiet when not. */
.fo-chans {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 36px;
}
.fo-chan {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--fo-ink-3);
  background: var(--fo-surface);
  border: 1px solid var(--fo-line);
  transition: color var(--fo-fast) var(--fo-ease),
    background var(--fo-fast) var(--fo-ease),
    border-color var(--fo-fast) var(--fo-ease);
}
.fo-chan .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.45;
  transition: opacity var(--fo-fast) var(--fo-ease);
}
.fo-chan.is-on {
  color: var(--fo-accent-deep);
  background: var(--fo-accent-soft);
  border-color: rgba(11, 63, 158, 0.12);
}
.fo-chan.is-on .dot { opacity: 1; }

/* the segmented control needs a visible capsule on the drawer's WHITE surface,
   like the tab strip — the frosted base is tuned for the gray page canvas */
.fo-drawer-body .fo-seg {
  background: var(--fo-canvas);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-color: var(--fo-line);
  box-shadow: inset 0 1px 2px rgba(24, 27, 33, 0.04);
}
.fo-seg.is-sm a,
.fo-seg.is-sm button { padding: 5px 13px; font-size: 12.5px; }

/* A segmented control INSIDE a menu (the account-menu Language EN|ES pills)
   must not inherit the generic full-width `.fo-menu button` menu-item styling
   — that forced each pill to width:100% + 11px item padding, so with the
   seg's no-shrink flex the two pills overflowed and the ES pill was clipped
   off the 252px menu's right edge (only EN showed → "language toggle does not
   work", user report 2026-07-13). Restore compact, content-width pills that
   both fit. Id-scoped so it beats the menu-item rule via ID specificity (that
   rule's long :not() chain gives it high class specificity) without !important
   and lets the row's label yield instead of the control. */
#acctLangSeg a,
#acctLangSeg button { width: auto; padding: 5px 12px; justify-content: center; }
.fo-acct-toggle .fo-seg { flex: 0 0 auto; overflow: visible; max-width: none; }
.fo-acct-toggle .fo-grow { min-width: 0; }

/* the segmented tabs need a visible capsule on the drawer's WHITE surface —
   the frosted .fo-seg is tuned for the gray page canvas, where the capsule
   shows; on white it vanishes and the active pill looks like it floats.
   A canvas-gray capsule makes it read exactly like the list's tabs. */
.fo-drawer-tabs .fo-seg {
  background: var(--fo-canvas);   /* inline-flex from base — the pill hugs its tabs */
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-color: var(--fo-line);
  box-shadow: inset 0 1px 2px rgba(24, 27, 33, 0.04);
}

/* ============================================================
   Column manager — a "Columns" popover (the .fo-menu glass surface)
   that adds/removes/reorders roster columns. Lives next to Filters;
   it is a transient anchored menu, not a fourth surface.
   ============================================================ */
.fo-col-pop {
  width: 280px;
  padding: 6px;
  text-align: left;
  cursor: default;
  background: rgba(255, 255, 255, 0.97);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--fo-line);
  box-shadow: var(--fo-glass-shadow);
  max-height: min(70vh, 460px);
  overflow: auto;
  overscroll-behavior: contain;
}

.fo-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 9px;
  border-bottom: 1px solid var(--fo-line);
  margin-bottom: 4px;
}
.fo-col-head .ttl {
  font-family: var(--fo-font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--fo-ink);
}
.fo-col-reset {
  border: 0; background: none; padding: 4px 6px;
  font: inherit; font-size: 12px; font-weight: 600;
  color: var(--fo-accent); cursor: pointer; border-radius: var(--fo-r-sm);
  display: inline-flex; align-items: center; gap: 5px;
  transition: background var(--fo-fast) var(--fo-ease), color var(--fo-fast) var(--fo-ease);
}
.fo-col-reset svg.fo-i { width: 13px; height: 13px; }
.fo-col-reset:hover { background: var(--fo-accent-soft); }
.fo-col-reset:disabled { color: var(--fo-ink-3); cursor: default; background: none; }

.fo-col-grp { border: 0; margin: 0; padding: 0 0 4px; }
.fo-col-grp > legend {
  display: block; width: 100%;
  padding: 9px 10px 4px;
  font-size: 10.5px; font-weight: 650; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--fo-ink-3);
}

.fo-col-row {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 7px 10px; border-radius: var(--fo-r-sm);
  cursor: pointer;
  transition: background var(--fo-fast) var(--fo-ease);
}
.fo-col-row:hover { background: rgba(11, 63, 158, 0.05); }
.fo-col-row:focus-within { background: var(--fo-accent-soft); }
.fo-col-row .nm {
  flex: 1; min-width: 0;
  font-size: 13px; font-weight: 550; color: var(--fo-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.fo-col-row.is-locked { cursor: default; }
.fo-col-row.is-locked:hover { background: none; }
.fo-col-row .lock-tag {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--fo-ink-3); white-space: nowrap;
}

.fo-col-grip {
  flex: none; display: grid; place-items: center;
  width: 26px; height: 26px; border: 0; background: none;
  border-radius: var(--fo-r-sm); color: var(--fo-ink-3);
  cursor: grab; opacity: 0;
  transition: opacity var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease), color var(--fo-fast) var(--fo-ease);
}
.fo-col-row:hover .fo-col-grip,
.fo-col-row:focus-within .fo-col-grip { opacity: 1; }
.fo-col-grip:hover { background: rgba(11, 63, 158, 0.08); color: var(--fo-ink-2); }
.fo-col-grip:focus-visible {
  opacity: 1; outline: 2px solid var(--fo-accent); outline-offset: 1px;
}
.fo-col-grip svg.fo-i { width: 15px; height: 15px; }

@media (max-width: 520px) {
  .fo-col-pop { width: min(280px, calc(100vw - 24px)); }
}
@media (prefers-reduced-motion: reduce) {
  .fo-col-row, .fo-col-grip, .fo-col-reset { transition: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUILDER — three-pane form builder (Phase 0.5 #3)
   Library (field palette) · Canvas (the form) · Properties (selected field).
   The shared frame behind Forms, safety forms, insights, and workflow builders.
   Royal is rationed: a thin ring for the selected field, a hairline for the
   drop indicator and tile hover — never a dark slab.
   ══════════════════════════════════════════════════════════════════════════ */

.fo-build {
  border: 1px solid var(--fo-line);
  border-radius: var(--fo-r-lg);
  background: var(--fo-surface);
  box-shadow: var(--fo-shadow-1);
  overflow: hidden;
}

/* ── Top bar: form identity + commit actions, spanning all three panes ── */
.fo-build-bar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--fo-line);
  background: var(--fo-surface-2);
}
.fo-build-id {
  flex: none; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--fo-accent-soft); color: var(--fo-accent);
}
.fo-build-id svg.fo-i { width: 19px; height: 19px; }
.fo-build-meta { min-width: 0; flex: 1; }
.fo-build-name {
  display: block; width: 100%; max-width: 420px;
  border: 1px solid transparent; border-radius: 8px;
  background: transparent; padding: 4px 8px; margin: -4px -8px 0;
  font-family: var(--fo-font-display);
  font-size: 17px; font-weight: 700; letter-spacing: -0.01em; color: var(--fo-ink);
  transition: background var(--fo-fast) var(--fo-ease), border-color var(--fo-fast) var(--fo-ease);
}
.fo-build-name:hover { background: rgba(24, 27, 33, 0.035); }
.fo-build-name:focus {
  outline: none; background: var(--fo-surface);
  border-color: var(--fo-line-strong); box-shadow: var(--fo-shadow-1);
}
.fo-build-sub { font-size: 12px; color: var(--fo-ink-3); margin-top: 4px; padding-left: 0; }
.fo-build-bar-actions { display: flex; align-items: center; gap: 8px; flex: none; }

/* ── The three-column workspace ── */
.fo-build-grid {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr) 320px;
  height: clamp(540px, calc(100vh - 248px), 780px);
}
.fo-build-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.fo-build-pane.is-lib { border-right: 1px solid var(--fo-line); background: var(--fo-surface-2); }
.fo-build-pane.is-props { border-left: 1px solid var(--fo-line); background: var(--fo-surface-2); }
.fo-build-pane-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 16px; min-height: 30px;
  border-bottom: 1px solid var(--fo-line);
}
.fo-build-pane-title {
  font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--fo-ink-3);
  display: flex; align-items: center; gap: 8px;
}
.fo-build-pane-title .n {
  font-size: 11px; font-weight: 700; color: var(--fo-ink-3);
  letter-spacing: 0;
}
.fo-build-pane-body { flex: 1; overflow-y: auto; padding: 14px; }
.fo-build-pane.is-canvas .fo-build-pane-body {
  padding: 20px; background: var(--fo-canvas);
}

/* ── Library: grouped field-type tiles ── */
.fo-build-pane.is-lib .fo-search { margin: 0 0 12px; }
.fo-build-group + .fo-build-group { margin-top: 16px; }
.fo-build-group-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fo-ink-3); margin: 0 2px 8px;
}
.fo-build-tiles { display: flex; flex-direction: column; gap: 6px; }
.fo-build-tile {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border: 1px solid var(--fo-line); border-radius: 10px;
  background: var(--fo-surface); color: var(--fo-ink);
  font-size: 13px; font-weight: 550; text-align: left; cursor: grab;
  transition: border-color var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease),
              box-shadow var(--fo-fast) var(--fo-ease), transform var(--fo-fast) var(--fo-ease);
}
.fo-build-tile:hover {
  border-color: rgba(11, 63, 158, 0.28); background: var(--fo-accent-soft);
  box-shadow: var(--fo-shadow-1);
}
.fo-build-tile:focus-visible {
  outline: none; border-color: var(--fo-accent);
  box-shadow: 0 0 0 3px rgba(11, 63, 158, 0.18);
}
.fo-build-tile:active { cursor: grabbing; }
.fo-build-tile.is-dragging { opacity: 0.4; }
.fo-build-tile-ic {
  flex: none; display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--fo-accent-soft); color: var(--fo-accent);
}
.fo-build-tile-ic svg.fo-i { width: 16px; height: 16px; }
.fo-build-tile .tl { flex: 1; min-width: 0; }
.fo-build-tile .gr {
  flex: none; color: var(--fo-ink-3); opacity: 0;
  transition: opacity var(--fo-fast) var(--fo-ease);
}
.fo-build-tile:hover .gr { opacity: 0.7; }
.fo-build-tile .gr svg.fo-i { width: 16px; height: 16px; }
.fo-build-hint {
  margin-top: 16px; padding: 10px 12px;
  border: 1px dashed var(--fo-line-strong); border-radius: 10px;
  font-size: 11.5px; line-height: 1.5; color: var(--fo-ink-3); text-align: center;
}
.fo-build-nomatch { padding: 24px 8px; text-align: center; font-size: 12.5px; color: var(--fo-ink-3); }

/* ── Canvas: the form under construction ── */
.fo-build-list { display: flex; flex-direction: column; gap: 10px; min-height: 100%; }

.fo-build-node {
  position: relative;
  border: 1px solid var(--fo-line); border-radius: var(--fo-r-md);
  background: var(--fo-surface); box-shadow: var(--fo-shadow-1);
  padding: 14px 16px 14px 18px;
  cursor: pointer;
  transition: border-color var(--fo-fast) var(--fo-ease), box-shadow var(--fo-fast) var(--fo-ease);
}
.fo-build-node::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: transparent;
  transition: background var(--fo-fast) var(--fo-ease);
}
.fo-build-node:hover { border-color: var(--fo-line-strong); }
.fo-build-node.is-active {
  border-color: rgba(11, 63, 158, 0.45);
  box-shadow: 0 0 0 1px var(--fo-accent), var(--fo-shadow-2);
}
.fo-build-node.is-active::before { background: var(--fo-accent); }
.fo-build-node.is-dragging { opacity: 0.45; }

.fo-build-node-grip {
  position: absolute; left: -2px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 20px; height: 30px;
  border: 0; background: none; color: var(--fo-ink-3);
  cursor: grab; opacity: 0; transition: opacity var(--fo-fast) var(--fo-ease);
}
.fo-build-node:hover .fo-build-node-grip,
.fo-build-node.is-active .fo-build-node-grip { opacity: 0.6; }
.fo-build-node-grip:hover { opacity: 1; }
.fo-build-node-grip svg.fo-i { width: 15px; height: 15px; }
.fo-build-node-grip:active { cursor: grabbing; }

.fo-build-node-tools {
  position: absolute; top: 9px; right: 10px;
  display: flex; gap: 2px; opacity: 0;
  transition: opacity var(--fo-fast) var(--fo-ease);
}
.fo-build-node:hover .fo-build-node-tools,
.fo-build-node.is-active .fo-build-node-tools { opacity: 1; }
.fo-build-node-tools button {
  display: grid; place-items: center; width: 28px; height: 28px;
  border: 0; border-radius: 8px; background: none; color: var(--fo-ink-3);
  cursor: pointer; transition: background var(--fo-fast) var(--fo-ease), color var(--fo-fast) var(--fo-ease);
}
.fo-build-node-tools button:hover { background: rgba(24, 27, 33, 0.06); color: var(--fo-ink-2); }
.fo-build-node-tools button.is-del:hover { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-build-node-tools button svg.fo-i { width: 15px; height: 15px; }

/* field preview inside a node — visual only while building */
.fo-build-fhead { display: flex; align-items: baseline; gap: 8px; padding-right: 60px; }
.fo-build-flabel { font-size: 13px; font-weight: 600; color: var(--fo-ink); }
.fo-build-ftype { font-size: 10.5px; font-weight: 600; color: var(--fo-ink-3); letter-spacing: 0.02em; }
.fo-req { color: var(--fo-danger); font-weight: 700; }
.fo-build-fhelp { font-size: 11.5px; color: var(--fo-ink-3); margin-top: 3px; }
.fo-build-fctl { margin-top: 9px; pointer-events: none; }
.fo-build-fctl .fo-faux {
  width: 100%; min-height: 38px;
  display: flex; align-items: center;
  padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--fo-line-strong); background: var(--fo-surface);
  font-size: 13px; color: var(--fo-ink-3);
}
.fo-build-fctl .fo-faux.is-area { min-height: 64px; align-items: flex-start; }
.fo-build-fctl .fo-faux.is-select { justify-content: space-between; }
.fo-build-fctl .fo-faux.is-select svg.fo-i { width: 16px; height: 16px; color: var(--fo-ink-3); }
.fo-build-opts { display: flex; flex-direction: column; gap: 7px; margin-top: 9px; }
.fo-build-opts.is-inline { flex-direction: row; flex-wrap: wrap; gap: 10px; }
.fo-build-optline { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--fo-ink-2); }
.fo-build-optline .mk {
  flex: none; width: 16px; height: 16px; border: 1.5px solid var(--fo-line-strong);
  background: var(--fo-surface);
}
.fo-build-optline .mk.is-radio { border-radius: 50%; }
.fo-build-optline .mk.is-check { border-radius: 5px; }
.fo-build-fctl .fo-build-sig {
  height: 96px; border: 1.5px dashed var(--fo-line-strong); border-radius: 12px;
  display: grid; place-items: center; color: var(--fo-ink-3); font-size: 12px;
  background: repeating-linear-gradient(135deg, transparent 0 9px, rgba(24,27,33,0.018) 9px 18px);
}
.fo-build-fctl .fo-build-up {
  display: flex; align-items: center; gap: 10px;
  padding: 13px; border: 1.5px dashed var(--fo-line-strong); border-radius: 12px;
  color: var(--fo-ink-3); font-size: 12.5px;
}
.fo-build-fctl .fo-build-up svg.fo-i { width: 18px; height: 18px; }

/* structural nodes */
.fo-build-node.is-section { padding: 6px 16px 6px 18px; background: var(--fo-surface-2); }
/* short single-line nodes: center the hover tools on the row (the grip is already centered) */
.fo-build-node.is-section .fo-build-node-tools { top: 50%; transform: translateY(-50%); }
.fo-build-section { display: flex; align-items: baseline; gap: 10px; padding: 6px 60px 6px 0; }
.fo-build-section .t {
  font-family: var(--fo-font-display); font-size: 14.5px; font-weight: 700; color: var(--fo-ink);
}
.fo-build-section .ln { flex: 1; height: 1px; background: var(--fo-line-strong); }
.fo-build-note {
  display: flex; gap: 10px; padding-right: 60px;
  font-size: 12.5px; line-height: 1.55; color: var(--fo-ink-2);
}
.fo-build-note svg.fo-i { flex: none; width: 16px; height: 16px; color: var(--fo-info); margin-top: 1px; }

/* drop indicator */
.fo-build-drop {
  height: 3px; border-radius: 3px; background: var(--fo-accent);
  box-shadow: 0 0 0 4px rgba(11, 63, 158, 0.12);
  margin: 1px 0;
}

/* canvas empty state */
.fo-build-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 40px 24px; text-align: center;
  border: 1.5px dashed var(--fo-line-strong); border-radius: var(--fo-r-lg);
  color: var(--fo-ink-3); transition: border-color var(--fo-base) var(--fo-ease), background var(--fo-base) var(--fo-ease);
}
.fo-build-empty.is-drag-over {
  border-color: var(--fo-accent); background: var(--fo-accent-soft);
}
.fo-build-empty-ic {
  display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 8px;
  border-radius: 14px; background: var(--fo-accent-soft); color: var(--fo-accent);
}
.fo-build-empty-ic svg.fo-i { width: 24px; height: 24px; }
.fo-build-empty .t { font-size: 14px; font-weight: 650; color: var(--fo-ink-2); }
.fo-build-empty .s { font-size: 12.5px; max-width: 280px; line-height: 1.5; }

/* ── Canvas · preview mode (what the end-user fills in) ── */
.fo-build-preview {
  max-width: 560px; margin: 0 auto;
  background: var(--fo-surface); border: 1px solid var(--fo-line);
  border-radius: var(--fo-r-lg); box-shadow: var(--fo-shadow-2);
  padding: 26px 28px 24px;
}
.fo-build-preview-head { margin-bottom: 20px; }
.fo-build-preview-head .t {
  font-family: var(--fo-font-display); font-size: 21px; font-weight: 750;
  letter-spacing: -0.01em; color: var(--fo-ink);
}
.fo-build-preview-head .s { font-size: 13px; color: var(--fo-ink-2); margin-top: 5px; }
/* uniform vertical rhythm regardless of field vs. structural block */
.fo-build-preview > * + * { margin-top: 18px; }
.fo-build-preview > .fo-build-preview-section { margin-top: 26px; }
.fo-build-pfield > label.lb {
  display: block; font-size: 13px; font-weight: 600; color: var(--fo-ink); margin-bottom: 7px;
}
.fo-build-pfield .hp { font-size: 11.5px; color: var(--fo-ink-3); margin-top: 6px; }
.fo-build-pfield .fo-input, .fo-build-pfield select.fo-input { width: 100%; }
.fo-build-pfield textarea.fo-input { min-height: 84px; resize: vertical; }
.fo-build-popts { display: flex; flex-direction: column; gap: 8px; }
.fo-build-popts.is-inline { flex-direction: row; flex-wrap: wrap; gap: 16px; }
.fo-build-popt { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--fo-ink-2); cursor: pointer; }
.fo-build-preview-section {
  font-family: var(--fo-font-display); font-size: 15px; font-weight: 700; color: var(--fo-ink);
  padding-bottom: 8px; border-bottom: 1px solid var(--fo-line-strong); margin-top: 4px;
}
.fo-build-preview-note {
  display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px;
  background: var(--fo-info-soft); color: var(--fo-info); font-size: 12.5px; line-height: 1.55;
}
.fo-build-preview-note svg.fo-i { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.fo-build-preview-foot { margin-top: 24px; display: flex; justify-content: flex-end; }

/* ── Properties pane ── */
.fo-build-props-empty {
  height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 32px 24px; text-align: center; color: var(--fo-ink-3);
}
.fo-build-props-empty-ic {
  display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 6px;
  border-radius: 13px; background: var(--fo-accent-soft); color: var(--fo-accent);
}
.fo-build-props-empty-ic svg.fo-i { width: 22px; height: 22px; }
.fo-build-props-empty .t { font-size: 13.5px; font-weight: 600; color: var(--fo-ink-2); }
.fo-build-props-empty .s { font-size: 12px; max-width: 220px; line-height: 1.5; }

.fo-build-prop-type {
  display: flex; align-items: center; gap: 11px; margin-bottom: 18px;
  padding-bottom: 16px; border-bottom: 1px solid var(--fo-line);
}
.fo-build-prop-type-ic {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 10px; background: var(--fo-accent-soft); color: var(--fo-accent);
}
.fo-build-prop-type-ic svg.fo-i { width: 19px; height: 19px; }
.fo-build-prop-type .nm { font-size: 13.5px; font-weight: 650; color: var(--fo-ink); }
.fo-build-prop-type .id { font-size: 11px; color: var(--fo-ink-3); font-family: var(--fo-mono); margin-top: 2px; }

.fo-build-field { margin-bottom: 15px; }
.fo-build-field > label.lb {
  display: block; font-size: 12px; font-weight: 600; color: var(--fo-ink-2); margin-bottom: 6px;
}
.fo-build-field .fo-input, .fo-build-field textarea.fo-input { width: 100%; }
.fo-build-field textarea.fo-input { min-height: 70px; resize: vertical; }

.fo-build-reqrow {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 0; margin: 4px 0 8px; border-top: 1px solid var(--fo-line);
}
.fo-build-reqrow .lb { font-size: 13px; font-weight: 600; color: var(--fo-ink); }
.fo-build-reqrow .sub { font-size: 11.5px; color: var(--fo-ink-3); margin-top: 2px; }

.fo-build-opts-edit { display: flex; flex-direction: column; gap: 8px; }
.fo-build-optrow { display: flex; align-items: center; gap: 7px; }
.fo-build-optrow .grip { flex: none; color: var(--fo-ink-3); display: grid; place-items: center; width: 16px; }
.fo-build-optrow .grip svg.fo-i { width: 14px; height: 14px; }
.fo-build-optrow .fo-input { flex: 1; min-width: 0; }
.fo-build-optrow .rm {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px;
  border: 0; border-radius: 8px; background: none; color: var(--fo-ink-3); cursor: pointer;
  transition: background var(--fo-fast) var(--fo-ease), color var(--fo-fast) var(--fo-ease);
}
.fo-build-optrow .rm:hover { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-build-optrow .rm svg.fo-i { width: 15px; height: 15px; }
.fo-build-addopt {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 4px;
  border: 0; background: none; padding: 6px 2px; cursor: pointer;
  font-size: 12.5px; font-weight: 600; color: var(--fo-accent);
}
.fo-build-addopt svg.fo-i { width: 15px; height: 15px; }
.fo-build-addopt:hover { color: var(--fo-accent-deep); }

.fo-build-prop-foot {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--fo-line);
  display: flex; gap: 8px;
}

/* ── Responsive: stack the panes on narrow viewports ── */
@media (max-width: 1080px) {
  .fo-build-grid { grid-template-columns: 1fr; height: auto; }
  .fo-build-pane.is-lib { border-right: 0; border-bottom: 1px solid var(--fo-line); }
  .fo-build-pane.is-props { border-left: 0; border-top: 1px solid var(--fo-line); }
  .fo-build-pane-body { max-height: 460px; }
  .fo-build-pane.is-lib .fo-build-tiles { flex-direction: row; flex-wrap: wrap; }
  .fo-build-pane.is-lib .fo-build-tile { width: calc(50% - 3px); }
}
@media (prefers-reduced-motion: reduce) {
  .fo-build-tile, .fo-build-node, .fo-build-node-grip, .fo-build-node-tools,
  .fo-build-node-tools button, .fo-build-name, .fo-build-empty, .fo-build-optrow .rm { transition: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIGNATURE CEREMONY — the signing surface an outsider sees (Phase 0.5 #6)
   A token-gated, no-shell, phone-first page (v3-lite): document context →
   cryptographic seal → drawn/typed signature → consent → confirmation receipt.
   Reuses the existing `.fo-sig` pad. Royal stays rationed (soft seal strip,
   accent checkbox, soft primary button) — never a dark slab.
   ══════════════════════════════════════════════════════════════════════════ */

.fo-sign-page {
  min-height: 100vh; box-sizing: border-box;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(11, 63, 158, 0.05), transparent 60%),
    var(--fo-canvas);
  display: flex; justify-content: center;
  padding: 28px 18px 52px;
}
.fo-sign-wrap { width: 100%; max-width: 600px; display: flex; flex-direction: column; gap: 16px; }

.fo-sign-brand { display: flex; align-items: center; gap: 11px; padding: 2px 4px; }
.fo-sign-brand img { width: 32px; height: 32px; border-radius: 9px; flex: none; }
.fo-sign-brand .nm { font-weight: 750; font-size: 14px; color: var(--fo-ink); letter-spacing: -0.01em; }
.fo-sign-brand .sub { font-size: 12px; color: var(--fo-ink-3); }
.fo-sign-brand .sub::before { content: "·"; margin: 0 7px; color: var(--fo-line-strong); }

.fo-sign-card {
  background: var(--fo-surface); border: 1px solid var(--fo-line);
  border-radius: var(--fo-r-lg); box-shadow: var(--fo-shadow-2);
  padding: 26px 28px;
}
@media (max-width: 560px) { .fo-sign-card { padding: 20px 18px; } .fo-sign-page { padding: 18px 12px 36px; } }

/* document context */
.fo-sign-doc-head .fo-tag { margin-bottom: 11px; }
.fo-sign-doc-head h1 {
  font-family: var(--fo-font-display); font-size: 22px; font-weight: 750;
  letter-spacing: -0.015em; line-height: 1.2; color: var(--fo-ink); margin: 0;
}
.fo-sign-doc-head .req { font-size: 13px; color: var(--fo-ink-2); margin: 7px 0 0; }
.fo-sign-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px;
  margin: 18px 0; padding: 16px 0; border-top: 1px solid var(--fo-line); border-bottom: 1px solid var(--fo-line);
}
.fo-sign-meta .k { font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fo-ink-3); }
.fo-sign-meta .v { font-size: 13.5px; font-weight: 550; color: var(--fo-ink); margin-top: 3px; }

.fo-sign-body {
  max-height: 196px; overflow-y: auto;
  border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); background: var(--fo-surface-2);
  padding: 15px 17px; font-size: 12.5px; line-height: 1.62; color: var(--fo-ink-2);
}
.fo-sign-body :first-child { margin-top: 0; }
.fo-sign-body p { margin: 0 0 10px; }
.fo-sign-body h4 { font-size: 12.5px; font-weight: 700; color: var(--fo-ink); margin: 14px 0 6px; }
.fo-sign-download {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 13px;
  font-size: 12.5px; font-weight: 600; color: var(--fo-accent); text-decoration: none;
}
.fo-sign-download:hover { color: var(--fo-accent-deep); }
.fo-sign-download svg.fo-i { width: 15px; height: 15px; }

/* cryptographic seal strip */
.fo-sign-seal {
  display: flex; gap: 11px; align-items: flex-start; margin-top: 18px;
  padding: 12px 14px; border-radius: var(--fo-r-md);
  background: var(--fo-accent-soft); border: 1px solid rgba(11, 63, 158, 0.1);
}
.fo-sign-seal .ic { flex: none; color: var(--fo-accent); margin-top: 1px; }
.fo-sign-seal .ic svg.fo-i { width: 17px; height: 17px; }
.fo-sign-seal .tx { font-size: 11.5px; line-height: 1.5; color: var(--fo-accent-deep); min-width: 0; }
.fo-sign-seal .tx b { font-weight: 700; }
.fo-sign-seal .hash { display: block; font-family: var(--fo-mono); font-size: 10.5px; color: var(--fo-accent); word-break: break-all; margin-top: 3px; }

/* signature section */
.fo-sign-sec { margin-top: 22px; }
.fo-sign-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.fo-sign-sec-head .lb { font-size: 13px; font-weight: 650; color: var(--fo-ink); }
.fo-sign-sec-head .tools { display: flex; align-items: center; gap: 10px; }

.fo-sign-sec .fo-sig { height: 150px; }
.fo-sign-typed {
  width: 100%; height: 150px; box-sizing: border-box;
  border: 1.5px dashed var(--fo-line-strong); border-radius: var(--fo-r-md); background: var(--fo-surface-2);
  text-align: center; color: var(--fo-ink);
  font-family: "Segoe Script", "Bradley Hand", "Snell Roundhand", "Brush Script MT", cursive;
  font-size: 34px; line-height: 150px; padding: 0 16px;
  transition: border-color var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease);
}
.fo-sign-typed::placeholder { font-family: var(--fo-font); font-size: 14px; color: var(--fo-ink-3); }
.fo-sign-typed:focus { outline: none; border-style: solid; border-color: var(--fo-accent); background: var(--fo-surface); }
.fo-sign-typed.is-filled { border-style: solid; border-color: var(--fo-accent); background: var(--fo-surface); }

.fo-sign-consent {
  display: flex; gap: 11px; align-items: flex-start; margin-top: 15px;
  font-size: 12px; line-height: 1.5; color: var(--fo-ink-2); cursor: pointer;
}
.fo-sign-consent input { flex: none; width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--fo-accent); cursor: pointer; }

.fo-sign-submit { margin-top: 18px; }
.fo-sign-fineprint {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 13px 0 0; font-size: 11px; color: var(--fo-ink-3);
}
.fo-sign-fineprint svg.fo-i { width: 13px; height: 13px; }

/* confirmation + invalid states */
.fo-sign-done { text-align: center; padding: 28px 22px 24px; }
.fo-sign-done-ic {
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  margin: 0 auto 15px; background: var(--fo-ok-soft); color: var(--fo-ok);
}
.fo-sign-done-ic.is-warn { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-sign-done-ic svg.fo-i { width: 28px; height: 28px; }
.fo-sign-done h2 { font-family: var(--fo-font-display); font-size: 21px; font-weight: 750; color: var(--fo-ink); margin: 0 0 7px; }
.fo-sign-done > p { font-size: 13.5px; color: var(--fo-ink-2); line-height: 1.55; margin: 0 auto; max-width: 400px; }
.fo-sign-receipt {
  text-align: left; margin-top: 22px;
  border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); background: var(--fo-surface-2); overflow: hidden;
}
.fo-sign-receipt .r { display: flex; justify-content: space-between; gap: 16px; padding: 11px 15px; font-size: 12.5px; border-top: 1px solid var(--fo-line); }
.fo-sign-receipt .r:first-child { border-top: 0; }
.fo-sign-receipt .k { color: var(--fo-ink-3); flex: none; }
.fo-sign-receipt .v { color: var(--fo-ink); font-weight: 550; text-align: right; min-width: 0; }
.fo-sign-receipt .v.mono { font-family: var(--fo-mono); font-size: 10.5px; font-weight: 400; color: var(--fo-ink-2); word-break: break-all; }
.fo-sign-done-actions { margin-top: 20px; display: flex; justify-content: center; gap: 10px; }

/* styleguide-only demo controls (NOT part of the real ceremony) */
.fo-sign-demo {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 7px 14px;
  margin-top: 4px; padding: 11px 14px;
  border: 1px dashed var(--fo-line-strong); border-radius: var(--fo-r-md);
  font-size: 11.5px; color: var(--fo-ink-3);
}
.fo-sign-demo .lbl { font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 10px; }
.fo-sign-demo button, .fo-sign-demo a {
  border: 0; background: none; font: inherit; padding: 0; cursor: pointer;
  color: var(--fo-accent); font-weight: 600; text-decoration: none;
}
.fo-sign-demo button:hover, .fo-sign-demo a:hover { color: var(--fo-accent-deep); }
@media (prefers-reduced-motion: reduce) { .fo-sign-typed { transition: none; } }

/* ═══════════════════════════════════════════════════════════════════════════
   MATRIX HEAT GRID — one component for entities × attributes (Phase 0.5+ #1)
   Serves the skills matrix (ordinal royal heat 0–4 + cert markers) AND the
   compliance matrix (categorical status cells) from one design — a Skills/
   Compliance toggle swaps the cell encoding, legend, and summary. Frozen
   identity column + sticky header (both axes), reusing the records freeze
   technique. Heat cells are small data marks (sanctioned accent), never slabs.
   ══════════════════════════════════════════════════════════════════════════ */

.fo-matrix-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.fo-matrix-head .ttl { font-size: 15px; font-weight: 700; color: var(--fo-ink); font-family: var(--fo-font-display); }
.fo-matrix-head .sub { font-size: 12px; color: var(--fo-ink-3); margin-top: 2px; }
.fo-matrix-head .fo-search { width: 200px; margin-left: auto; }
.fo-matrix-head .fo-search .fo-input { height: 34px; }

/* legend */
.fo-matrix-legend {
  display: flex; align-items: center; flex-wrap: wrap; gap: 7px 16px;
  margin-bottom: 12px; font-size: 11.5px; color: var(--fo-ink-2);
}
.fo-matrix-legend .lg { display: inline-flex; align-items: center; gap: 7px; }
.fo-matrix-legend .sw {
  width: 16px; height: 16px; border-radius: 5px; flex: none;
  display: grid; place-items: center;
}
.fo-matrix-legend .sw svg.fo-i { width: 11px; height: 11px; }
.fo-matrix-legend .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }

/* the scroll viewport — frozen on both axes inside it */
.fo-matrix-wrap {
  position: relative;
  overflow: auto;
  max-height: 460px;
  border: 1px solid var(--fo-line);
  border-radius: var(--fo-r-lg);
  background: var(--fo-surface);
  overscroll-behavior: contain;
}
.fo-matrix { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; }

.fo-matrix th, .fo-matrix td {
  margin: 0; border-bottom: 1px solid var(--fo-line); border-right: 1px solid var(--fo-line);
  background: var(--fo-surface);
}
/* header row — sticky to the top */
.fo-matrix thead th {
  position: sticky; top: 0; z-index: 3;
  padding: 9px 8px; vertical-align: bottom;
  font-size: 11px; font-weight: 650; line-height: 1.25; color: var(--fo-ink-2);
  text-align: center; min-width: 86px; max-width: 96px;
}
.fo-matrix thead .fo-mx-grouph th {
  font-size: 10px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--fo-ink-3); background: var(--fo-surface-2); padding: 0 8px; height: 30px; vertical-align: middle;
}
/* when a group row is present (skills), the name row sticks just below it */
.fo-matrix.has-groups thead .fo-matrix-colh { top: 30px; }
/* …but a rowspan=2 trailing header (e.g. "Compliance") lives in the GROUP row
   and spans both header rows, so it must stick to the very top like the corner —
   not 30px down, which let the first body row tuck under it (clipped % pill). */
.fo-matrix.has-groups thead .fo-mx-grouph .fo-matrix-colh { top: 0; }
/* identity column — sticky to the left */
.fo-matrix .fo-matrix-id {
  position: sticky; left: 0; z-index: 2;
  text-align: left; min-width: 200px; max-width: 200px; padding: 8px 14px;
}
/* the top-left corner — sticky on both axes, above everything */
.fo-matrix .fo-matrix-corner {
  position: sticky; left: 0; top: 0; z-index: 5;
  text-align: left; padding: 9px 14px; vertical-align: bottom;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fo-ink-3);
}
/* the frozen identity earns a soft right-edge shadow once scrolled sideways */
.fo-matrix-wrap.is-scrolled .fo-matrix-id,
.fo-matrix-wrap.is-scrolled .fo-matrix-corner { box-shadow: 7px 0 8px -7px rgba(24, 27, 33, 0.16); }

/* identity content */
.fo-matrix-person { display: flex; align-items: center; gap: 10px; }
.fo-matrix-person .fo-ava { width: 30px; height: 30px; font-size: 11px; }
.fo-matrix-person > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.fo-matrix-person .nm { display: block; font-size: 13px; font-weight: 600; color: var(--fo-ink); line-height: 1.2; }
.fo-matrix-person .rl { display: block; font-size: 11px; color: var(--fo-ink-3); margin-top: 1px; }

/* body data cell */
.fo-matrix-cell { position: relative; height: 46px; padding: 0; text-align: center; cursor: pointer; }
.fo-matrix-cell:hover { background: var(--fo-surface-2); }
.fo-matrix tbody tr:hover .fo-matrix-id { background: var(--fo-surface-2); }

/* the mark inside a cell — one 30px rounded shape for both encodings */
.fo-mx {
  width: 30px; height: 30px; margin: 0 auto; border-radius: 9px;
  display: grid; place-items: center;
  transition: transform var(--fo-fast) var(--fo-ease), box-shadow var(--fo-fast) var(--fo-ease);
}
.fo-matrix-cell:hover .fo-mx { transform: scale(1.08); }
.fo-mx svg.fo-i { width: 16px; height: 16px; }

/* skills — ordinal royal heat ramp (0 = unassessed). The legend swatch
   (.fo-matrix-legend .sw.lvN) shares each colour so the two never drift. */
.fo-mx.lv0, .fo-matrix-legend .sw.lv0 { background: transparent; border: 1.5px dashed var(--fo-line-strong); }
.fo-mx.lv1, .fo-matrix-legend .sw.lv1 { background: #e9f0fb; }
.fo-mx.lv2, .fo-matrix-legend .sw.lv2 { background: #bcd6f4; }
.fo-mx.lv3, .fo-matrix-legend .sw.lv3 { background: #6f9fda; }
.fo-mx.lv4, .fo-matrix-legend .sw.lv4 { background: #2f6cc9; }
/* certified marker — small ringed dot, top-right of the cell */
.fo-mx-cert {
  position: absolute; top: 7px; right: 12px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--fo-accent-deep); box-shadow: 0 0 0 2px var(--fo-surface);
}
/* a cert that is expiring / expired rings the mark */
.fo-matrix-cell.is-expiring .fo-mx { box-shadow: 0 0 0 2px var(--fo-warn); }
.fo-matrix-cell.is-expired .fo-mx  { box-shadow: 0 0 0 2px var(--fo-danger); }
/* roles & permissions mode: a scoped grant (own region/crew) gets a warm inner ring */
.fo-matrix-cell.is-cond .fo-mx { box-shadow: inset 0 0 0 2px var(--fo-warn); }
.fo-ava.fo-mx-roleava { background: var(--fo-accent-soft); color: var(--fo-accent); }
.fo-ava.fo-mx-roleava svg.fo-i { width: 15px; height: 15px; }

/* compliance — categorical status (legend swatch shares each colour) */
.fo-mx.is-valid,    .fo-matrix-legend .sw.is-valid    { background: var(--fo-ok-soft);     color: var(--fo-ok); }
.fo-mx.is-expiring, .fo-matrix-legend .sw.is-expiring { background: var(--fo-warn-soft);   color: var(--fo-warn); }
.fo-mx.is-expired,  .fo-matrix-legend .sw.is-expired  { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-mx.is-missing  { background: transparent; border: 1.5px dashed var(--fo-danger); color: var(--fo-danger); opacity: .7; }
.fo-mx.is-na       { background: transparent; color: var(--fo-ink-3); }
.fo-mx.is-na::after { content: "—"; font-size: 13px; color: var(--fo-line-strong); }

/* summary footer */
.fo-matrix-foot {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px;
  margin-top: 13px; font-size: 12.5px; color: var(--fo-ink-2);
}
.fo-matrix-foot .big { font-size: 15px; font-weight: 700; color: var(--fo-ink); }
.fo-matrix-foot .fo-stat { font-size: 12.5px; }

/* floating cell readout (chart-tip language) */
.fo-matrix-tip {
  position: fixed; z-index: 80; pointer-events: none;
  max-width: 240px; padding: 8px 11px;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(8px) saturate(150%);
  backdrop-filter: blur(8px) saturate(150%);
  border: 1px solid var(--fo-line-strong); border-radius: 11px;
  box-shadow: var(--fo-shadow-2);
  transform: translate(-50%, calc(-100% - 10px));
  opacity: 0; transition: opacity 0.12s var(--fo-ease);
}
.fo-matrix-tip.is-on { opacity: 1; }
.fo-matrix-tip .h { font-size: 12px; font-weight: 700; color: var(--fo-ink); }
.fo-matrix-tip .s { font-size: 11.5px; color: var(--fo-ink-2); margin-top: 2px; line-height: 1.4; }
.fo-matrix-tip .s b { font-weight: 650; color: var(--fo-ink); }

.fo-matrix-hint { font-size: 11.5px; color: var(--fo-ink-3); margin-top: 10px; }

@media (max-width: 700px) {
  .fo-matrix-head .fo-search { width: 100%; margin-left: 0; order: 3; }
}
@media (prefers-reduced-motion: reduce) {
  .fo-mx, .fo-matrix-tip { transition: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PHOTO GALLERY + LIGHTBOX — one component (Phase 0.5+ #2)
   A responsive thumbnail grid (optional hero layout, section grouping, caption,
   status badge, overflow "+N") + a shared lightbox (arrows, counter, caption,
   keyboard, thumbnail filmstrip, download). Serves daily reports, lodging,
   incidents, fleet, inspections. The lightbox scrim is a focused media viewer —
   the one place a dim backdrop is correct, so photos read; its chrome is light
   glass, never a dark slab.
   ══════════════════════════════════════════════════════════════════════════ */

.fo-gallery-section + .fo-gallery-section { margin-top: 22px; }
.fo-gallery-section-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 11px; }
.fo-gallery-section-head .t { font-size: 13px; font-weight: 650; color: var(--fo-ink); }
.fo-gallery-section-head .n { font-size: 12px; color: var(--fo-ink-3); }

.fo-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(186px, 1fr)); gap: 12px; }
.fo-gallery-grid.is-hero { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 128px; }
.fo-gallery-grid.is-hero .fo-gallery-item:first-child { grid-column: span 2; grid-row: span 2; }

.fo-gallery-item {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: var(--fo-r-md); cursor: pointer; background: var(--fo-surface-2);
  box-shadow: var(--fo-shadow-1);
}
.fo-gallery-grid.is-hero .fo-gallery-item { aspect-ratio: auto; height: 100%; }
.fo-gallery-img {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  display: grid; place-items: center; color: rgba(255, 255, 255, 0.22);
  transition: transform 0.45s var(--fo-ease);
}
.fo-gallery-img svg.fo-i { width: 34px; height: 34px; }
.fo-gallery-item:hover .fo-gallery-img { transform: scale(1.055); }
.fo-gallery-item::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); pointer-events: none;
}
.fo-gallery-item:focus-visible { outline: 3px solid rgba(11, 63, 158, 0.4); outline-offset: 2px; }

.fo-gallery-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 9px;
  background: linear-gradient(to top, rgba(15, 18, 24, 0.78), rgba(15, 18, 24, 0));
  color: #fff; font-size: 12px; font-weight: 600; line-height: 1.3;
  opacity: 0; transform: translateY(5px);
  transition: opacity var(--fo-fast) var(--fo-ease), transform var(--fo-fast) var(--fo-ease);
}
.fo-gallery-item:hover .fo-gallery-cap,
.fo-gallery-item:focus-visible .fo-gallery-cap { opacity: 1; transform: none; }

.fo-gallery-badge {
  position: absolute; top: 9px; left: 9px; z-index: 2;
  padding: 3px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700;
  background: var(--fo-danger); color: #fff; box-shadow: 0 2px 6px -1px rgba(0, 0, 0, 0.3);
}
.fo-gallery-more {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center;
  background: rgba(15, 18, 24, 0.52); color: #fff; font-size: 20px; font-weight: 700; letter-spacing: 0.01em;
}

/* the "add photos" affordance (light, dashed) */
.fo-gallery-add {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  aspect-ratio: 4 / 3; border-radius: var(--fo-r-md);
  border: 1.5px dashed var(--fo-line-strong); background: var(--fo-surface-2);
  color: var(--fo-ink-3); font-size: 12px; font-weight: 600; cursor: pointer;
  transition: border-color var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease), color var(--fo-fast) var(--fo-ease);
}
.fo-gallery-add:hover { border-color: var(--fo-accent); background: var(--fo-accent-soft); color: var(--fo-accent); }
.fo-gallery-add svg.fo-i { width: 22px; height: 22px; }

/* empty state */
.fo-gallery-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  padding: 46px 24px; text-align: center; color: var(--fo-ink-3);
  border: 1.5px dashed var(--fo-line-strong); border-radius: var(--fo-r-lg);
}
.fo-gallery-empty-ic { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 8px; border-radius: 14px; background: var(--fo-accent-soft); color: var(--fo-accent); }
.fo-gallery-empty-ic svg.fo-i { width: 24px; height: 24px; }
.fo-gallery-empty .t { font-size: 14px; font-weight: 650; color: var(--fo-ink-2); }
.fo-gallery-empty .s { font-size: 12.5px; max-width: 300px; line-height: 1.5; }

/* ── Lightbox ── */
.fo-lightbox {
  position: fixed; inset: 0; z-index: 120;
  display: flex; align-items: center; justify-content: center;
  padding: 56px 72px 104px;
  background: rgba(18, 20, 26, 0.9);
  -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.22s var(--fo-ease), visibility 0s 0.22s;
}
.fo-lightbox.is-open { opacity: 1; visibility: visible; transition: opacity 0.22s var(--fo-ease); }
.fo-lightbox-stage { position: relative; max-width: 100%; max-height: 100%; display: flex; }
.fo-lightbox-img {
  width: min(86vw, 1040px); max-height: 100%; aspect-ratio: 4 / 3;
  background-size: cover; background-position: center;
  border-radius: 14px; box-shadow: 0 36px 90px -24px rgba(0, 0, 0, 0.7);
  display: grid; place-items: center; color: rgba(255, 255, 255, 0.22);
  transform: scale(0.97); transition: transform 0.26s var(--fo-spring);
}
.fo-lightbox.is-open .fo-lightbox-img { transform: scale(1); }
.fo-lightbox-img svg.fo-i { width: 56px; height: 56px; }

.fo-lb-btn {
  position: absolute; display: grid; place-items: center;
  border: 0; cursor: pointer; color: #fff;
  background: rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: background var(--fo-fast) var(--fo-ease), transform var(--fo-fast) var(--fo-ease);
}
.fo-lb-btn:hover { background: rgba(255, 255, 255, 0.26); }
.fo-lb-btn:active { transform: scale(0.94); }
.fo-lb-btn svg.fo-i { width: 20px; height: 20px; }
.fo-lb-close { top: 18px; right: 20px; width: 40px; height: 40px; border-radius: 50%; }
.fo-lb-dl { top: 18px; right: 70px; width: 40px; height: 40px; border-radius: 50%; }
.fo-lb-nav { top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; }
.fo-lb-nav:hover { transform: translateY(-50%); background: rgba(255, 255, 255, 0.26); }
.fo-lb-nav.is-prev { left: 16px; }
.fo-lb-nav.is-next { right: 16px; }
.fo-lb-nav svg.fo-i { width: 24px; height: 24px; }

.fo-lb-counter {
  position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  padding: 5px 13px; border-radius: 999px; font-size: 12px; font-weight: 650; color: #fff;
  background: rgba(255, 255, 255, 0.14); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18); font-variant-numeric: tabular-nums;
}
.fo-lb-cap {
  position: absolute; left: 50%; bottom: 70px; transform: translateX(-50%);
  max-width: min(80vw, 640px); text-align: center;
  padding: 8px 16px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.12); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.16); color: #fff;
}
.fo-lb-cap .c { font-size: 13px; font-weight: 650; }
.fo-lb-cap .m { font-size: 11.5px; color: rgba(255, 255, 255, 0.72); margin-top: 2px; }
.fo-lb-film {
  position: absolute; left: 0; right: 0; bottom: 16px;
  display: flex; gap: 8px; justify-content: center; align-items: center;
  padding: 0 16px; overflow-x: auto; scrollbar-width: none;
}
.fo-lb-film::-webkit-scrollbar { display: none; }
.fo-lb-thumb {
  width: 54px; height: 40px; flex: none; border-radius: 7px; cursor: pointer;
  background-size: cover; background-position: center;
  opacity: 0.45; outline: 2px solid transparent; outline-offset: 1px;
  transition: opacity var(--fo-fast) var(--fo-ease), outline-color var(--fo-fast) var(--fo-ease);
}
.fo-lb-thumb:hover { opacity: 0.8; }
.fo-lb-thumb.is-active { opacity: 1; outline-color: #fff; }

@media (max-width: 640px) {
  .fo-gallery-grid.is-hero { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 110px; }
  .fo-gallery-grid.is-hero .fo-gallery-item:first-child { grid-column: span 2; grid-row: span 1; }
  .fo-lightbox { padding: 52px 14px 92px; }
  .fo-lb-nav { width: 40px; height: 40px; }
  .fo-lb-cap { bottom: 66px; }
}
@media (prefers-reduced-motion: reduce) {
  .fo-gallery-img, .fo-gallery-cap, .fo-lightbox, .fo-lightbox-img, .fo-lb-btn, .fo-lb-thumb { transition: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CALENDAR GRID — one component, two variants (Phase 0.5+ #3)
   Month view (7-col weeks, event chips, "+N more", today, holidays) AND a
   team-row view (people × days, status-fill cells, frozen identity). Shared
   nav, event colour tokens, legend, filters, click-to-detail. Serves workforce
   team calendar, procurement deliveries, pulse, lodging stays, field-ops weeks.
   ══════════════════════════════════════════════════════════════════════════ */

/* event colour tokens — calm, brand-adjacent (chip = soft bg + colour + edge) */
.ev-pto      { --ev: #a16207; --ev-bg: #faf3e3; }
.ev-sick     { --ev: #b3261e; --ev-bg: #fbecea; }
.ev-holiday  { --ev: #0e7490; --ev-bg: #e6f3f7; }
.ev-bday     { --ev: #7a5ea8; --ev-bg: #f1ecf8; }
.ev-anni     { --ev: #0b3f9e; --ev-bg: #e9f0fb; }
.ev-newhire  { --ev: #188150; --ev-bg: #e8f4ee; }
.ev-delivery { --ev: #4f7a9e; --ev-bg: #eaf1f6; }
.ev-onsite   { --ev: #0b3f9e; --ev-bg: #e9f0fb; }
.ev-off      { --ev: #989fab; --ev-bg: #f2f3f4; }

/* header bar: nav · variant toggle · search · filters */
.fo-cl-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.fo-cl-nav { display: flex; align-items: center; gap: 4px; }
.fo-cl-nav .lbl {
  font-family: var(--fo-font-display); font-size: 16px; font-weight: 700; color: var(--fo-ink);
  min-width: 156px; text-align: center;
}
.fo-cl-navbtn {
  display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px;
  background: none; color: var(--fo-ink-2); cursor: pointer;
  transition: background var(--fo-fast) var(--fo-ease);
}
.fo-cl-navbtn:hover { background: var(--fo-surface-2); color: var(--fo-ink); }
.fo-cl-navbtn svg.fo-i { width: 17px; height: 17px; }
.fo-cl-today {
  margin-left: 4px; padding: 6px 12px; border: 1px solid var(--fo-line-strong); border-radius: 8px;
  background: var(--fo-surface); color: var(--fo-ink-2); font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: background var(--fo-fast) var(--fo-ease), border-color var(--fo-fast) var(--fo-ease);
}
.fo-cl-today:hover { background: var(--fo-surface-2); border-color: var(--fo-accent); color: var(--fo-accent); }
.fo-cl-bar .fo-search { width: 178px; margin-left: auto; }
.fo-cl-bar .fo-search .fo-input { height: 34px; }
.fo-cl-filters { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fo-cl-fchip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--fo-line); background: var(--fo-surface); color: var(--fo-ink-2);
  font-size: 11.5px; font-weight: 600; cursor: pointer;
  transition: opacity var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease);
}
.fo-cl-fchip .dot { width: 9px; height: 9px; border-radius: 3px; background: var(--ev); flex: none; }
.fo-cl-fchip.is-off { opacity: 0.42; }
.fo-cl-fchip.is-off .dot { background: var(--fo-ink-3); }

/* legend */
.fo-cl-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 14px; margin-top: 12px; font-size: 11.5px; color: var(--fo-ink-2); }
.fo-cl-legend .lg { display: inline-flex; align-items: center; gap: 7px; }
.fo-cl-legend .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--ev); flex: none; }

/* ── month grid ── */
.fo-cl-dow { display: grid; grid-template-columns: repeat(7, 1fr); padding: 0 1px; }
.fo-cl-dow span { padding: 0 9px 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fo-ink-3); }
.fo-cl-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); overflow: hidden;
}
.fo-cl-day {
  min-height: 112px; padding: 7px 8px 8px; display: flex; flex-direction: column; gap: 3px;
  border-right: 1px solid var(--fo-line); border-bottom: 1px solid var(--fo-line);
  background: var(--fo-surface); cursor: pointer;
  transition: background var(--fo-fast) var(--fo-ease);
}
.fo-cl-day:nth-child(7n) { border-right: 0; }
.fo-cl-day:hover { background: var(--fo-surface-2); }
.fo-cl-day.is-other { background: var(--fo-surface-2); }
.fo-cl-day.is-other .fo-cl-daynum { color: var(--fo-ink-3); }
.fo-cl-day.is-weekend:not(.is-other) { background: #fbfbf9; }
.fo-cl-daynum {
  font-size: 12.5px; font-weight: 650; color: var(--fo-ink);
  width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; flex: none;
}
.fo-cl-day.is-today .fo-cl-daynum { background: var(--fo-accent); color: #fff; }
.fo-cl-hol { font-size: 10.5px; font-weight: 600; color: var(--fo-info); line-height: 1.2; margin-top: -1px; }
.fo-cl-event {
  display: flex; align-items: center; gap: 5px; padding: 2px 7px 2px 6px; border-radius: 5px;
  font-size: 11px; font-weight: 600; line-height: 1.35;
  background: var(--ev-bg); color: var(--ev); border-left: 3px solid var(--ev);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
  transition: filter var(--fo-fast) var(--fo-ease);
}
.fo-cl-event:hover { filter: brightness(0.97); }
.fo-cl-more { font-size: 10.5px; font-weight: 600; color: var(--fo-ink-3); cursor: pointer; padding: 1px 2px; }
.fo-cl-more:hover { color: var(--fo-accent); }

/* ── team-row grid ── */
.fo-cl-teamwrap {
  position: relative; overflow: auto; max-height: 470px;
  border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); background: var(--fo-surface);
}
.fo-cl-team { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; }
.fo-cl-team th, .fo-cl-team td { border-bottom: 1px solid var(--fo-line); border-right: 1px solid var(--fo-line); background: var(--fo-surface); }
.fo-cl-team thead th {
  position: sticky; top: 0; z-index: 3; padding: 7px 6px; min-width: 60px;
  font-size: 11px; color: var(--fo-ink-2); text-align: center; line-height: 1.2;
}
.fo-cl-team thead th .d { font-weight: 700; color: var(--fo-ink); }
.fo-cl-team thead th .dow { display: block; font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fo-ink-3); }
.fo-cl-team thead th.is-today .d { color: var(--fo-accent); }
.fo-cl-team thead th.is-today { box-shadow: inset 0 2px 0 var(--fo-accent); }
.fo-cl-team th.is-weekend, .fo-cl-team td.is-weekend { background: #fbfbf9; }
.fo-cl-team td.is-today { background: rgba(11, 63, 158, 0.035); }
.fo-cl-teamid { position: sticky; left: 0; z-index: 2; text-align: left; min-width: 192px; padding: 7px 12px; }
.fo-cl-teamcorner {
  position: sticky; left: 0; top: 0; z-index: 5; text-align: left; padding: 8px 12px; vertical-align: middle;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fo-ink-3);
}
.fo-cl-teamwrap.is-scrolled .fo-cl-teamid,
.fo-cl-teamwrap.is-scrolled .fo-cl-teamcorner { box-shadow: 7px 0 8px -7px rgba(24, 27, 33, 0.16); }
.fo-cl-tperson { display: flex; align-items: center; gap: 10px; }
.fo-cl-tperson .fo-ava { width: 30px; height: 30px; font-size: 11px; }
.fo-cl-tperson .nm { display: block; font-size: 13px; font-weight: 600; color: var(--fo-ink); line-height: 1.2; }
.fo-cl-tperson .rl { display: block; font-size: 11px; color: var(--fo-ink-3); margin-top: 1px; }
.fo-cl-tcell { height: 42px; padding: 3px 4px; text-align: center; }
.fo-cl-fill {
  height: 100%; min-height: 26px; border-radius: 6px; display: grid; place-items: center;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.02em;
  background: var(--ev-bg); color: var(--ev); border-left: 3px solid var(--ev);
}
.fo-cl-fill.is-bare { background: transparent; border-left: 0; }

/* day-detail popover */
.fo-cl-pop {
  position: fixed; z-index: 80; width: 248px; max-height: 320px; overflow-y: auto;
  background: var(--fo-surface); border: 1px solid var(--fo-line-strong); border-radius: 14px;
  box-shadow: var(--fo-shadow-3); padding: 14px 15px;
  opacity: 0; transform: translateY(-6px) scale(0.98); transform-origin: top center;
  pointer-events: none; visibility: hidden;
  transition: opacity 0.16s var(--fo-ease), transform 0.18s var(--fo-spring), visibility 0s 0.18s;
}
.fo-cl-pop.is-open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity 0.16s var(--fo-ease), transform 0.18s var(--fo-spring); }
.fo-cl-pop-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 11px; }
.fo-cl-pop-head .d { font-family: var(--fo-font-display); font-size: 15px; font-weight: 700; color: var(--fo-ink); }
.fo-cl-pop-head .n { font-size: 11.5px; color: var(--fo-ink-3); }
.fo-cl-pop-list { display: flex; flex-direction: column; gap: 6px; }
.fo-cl-pop-ev { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; color: var(--fo-ink); }
.fo-cl-pop-ev .dot { width: 9px; height: 9px; border-radius: 3px; background: var(--ev); flex: none; margin-top: 4px; }
.fo-cl-pop-ev .sub { display: block; font-size: 11px; color: var(--fo-ink-3); margin-top: 1px; }
.fo-cl-pop-empty { font-size: 12.5px; color: var(--fo-ink-3); padding: 4px 0 8px; }
.fo-cl-pop-add {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 11px; padding-top: 11px; width: 100%;
  border: 0; border-top: 1px solid var(--fo-line); background: none; cursor: pointer;
  font-size: 12.5px; font-weight: 600; color: var(--fo-accent);
}
.fo-cl-pop-add svg.fo-i { width: 15px; height: 15px; }

@media (max-width: 720px) {
  .fo-cl-bar .fo-search { width: 100%; margin-left: 0; order: 5; }
  .fo-cl-day { min-height: 88px; }
  .fo-cl-event { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .fo-cl-day, .fo-cl-navbtn, .fo-cl-today, .fo-cl-fchip, .fo-cl-event, .fo-cl-pop { transition: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   TIMELINE — one vertical, day-grouped event rail (Phase 0.5+ #4)
   Sticky day headers, a connector rail, event nodes (colour-coded dot + actor +
   action + time + optional detail). Audit extras: old→new change pill, a
   signature seal (IP + hash + sealed-to-chain), attachment chips. Serves the
   daily-reports timeline, adjustments & documents audit logs, admin audit feed.
   ══════════════════════════════════════════════════════════════════════════ */

.fo-tl-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.fo-tl-bar .fo-search { width: 210px; }
.fo-tl-bar .fo-search .fo-input { height: 34px; }
.fo-tl-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fo-tl-fchip {
  padding: 4px 11px; border-radius: 999px; border: 1px solid var(--fo-line);
  background: var(--fo-surface); color: var(--fo-ink-2); font-size: 11.5px; font-weight: 600; cursor: pointer;
  transition: opacity var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease), border-color var(--fo-fast) var(--fo-ease);
}
.fo-tl-fchip:hover { border-color: var(--fo-line-strong); }
.fo-tl-fchip.is-off { opacity: 0.42; }

/* the rail (a scroll area so the day headers can stick) */
.fo-tl { position: relative; max-height: 560px; overflow-y: auto; padding-right: 4px; }
.fo-tl-day + .fo-tl-day { margin-top: 4px; }
.fo-tl-day-h {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 9px;
  padding: 7px 0 9px; background: var(--fo-surface);
}
.fo-tl-day-h .lbl { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fo-ink-2); }
.fo-tl-day-h .n { font-size: 11.5px; color: var(--fo-ink-3); }
.fo-tl-day-h .ln { flex: 1; height: 1px; background: var(--fo-line); }

.fo-tl-entry { display: flex; gap: 13px; position: relative; padding-bottom: 16px; }
.fo-tl-rail { position: relative; flex: none; width: 30px; display: flex; justify-content: center; }
.fo-tl-rail::before {
  content: ""; position: absolute; left: 50%; top: 4px; bottom: -16px; width: 2px;
  transform: translateX(-50%); background: var(--fo-line); border-radius: 2px;
}
.fo-tl-entries .fo-tl-entry:last-child .fo-tl-rail::before { display: none; }
.fo-tl-dot {
  position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; border: 2px solid var(--fo-surface);
  background: var(--d-bg, var(--fo-accent-soft)); color: var(--d, var(--fo-accent));
}
.fo-tl-dot svg.fo-i { width: 15px; height: 15px; }
/* dot colours by action type */
.fo-tl-dot.is-create { --d: #188150; --d-bg: #e8f4ee; }
.fo-tl-dot.is-update { --d: #0b3f9e; --d-bg: #e9f0fb; }
.fo-tl-dot.is-submit { --d: #0e7490; --d-bg: #e6f3f7; }
.fo-tl-dot.is-approve { --d: #188150; --d-bg: #e8f4ee; }
.fo-tl-dot.is-reject { --d: #b3261e; --d-bg: #fbecea; }
.fo-tl-dot.is-sign { --d: #0b3f9e; --d-bg: #e9f0fb; }
.fo-tl-dot.is-send { --d: #7a5ea8; --d-bg: #f1ecf8; }
.fo-tl-dot.is-upload { --d: #4f7a9e; --d-bg: #eaf1f6; }

.fo-tl-body { flex: 1; min-width: 0; padding-top: 3px; }
.fo-tl-line1 { display: flex; align-items: baseline; gap: 5px 6px; flex-wrap: wrap; }
.fo-tl-actor { font-size: 13.5px; font-weight: 650; color: var(--fo-ink); }
.fo-tl-act { font-size: 13.5px; color: var(--fo-ink-2); }
.fo-tl-time { margin-left: auto; font-size: 11.5px; color: var(--fo-ink-3); white-space: nowrap; padding-left: 8px; }
.fo-tl-detail { font-size: 12.5px; color: var(--fo-ink-2); line-height: 1.5; margin-top: 4px; }
.fo-tl-change {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 7px;
  padding: 4px 11px; border-radius: 8px; background: var(--fo-surface-2); border: 1px solid var(--fo-line);
  font-size: 12px;
}
.fo-tl-change .k { color: var(--fo-ink-3); font-weight: 600; }
.fo-tl-change .old { color: var(--fo-ink-3); text-decoration: line-through; }
.fo-tl-change .arr { color: var(--fo-ink-3); }
.fo-tl-change .new { color: var(--fo-ink); font-weight: 650; }
.fo-tl-seal {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px;
  padding: 7px 11px; border-radius: 8px; background: var(--fo-accent-soft);
  font-size: 11px; color: var(--fo-accent-deep);
}
.fo-tl-seal .ok { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--fo-ok); }
.fo-tl-seal .ok svg.fo-i { width: 13px; height: 13px; }
.fo-tl-seal .hash { font-family: var(--fo-mono); color: var(--fo-accent); }
.fo-tl-attach { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 9px; }
.fo-tl-att {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 4px;
  border-radius: 8px; background: var(--fo-surface-2); border: 1px solid var(--fo-line);
  font-size: 11.5px; font-weight: 550; color: var(--fo-ink-2); cursor: pointer;
}
.fo-tl-att:hover { border-color: var(--fo-line-strong); }
.fo-tl-att .thumb { width: 20px; height: 20px; border-radius: 5px; background-size: cover; background-position: center; flex: none; }
.fo-tl-badge {
  display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; background: var(--fo-ok-soft); color: var(--fo-ok);
}

.fo-tl-more {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 2px; padding: 8px 15px;
  border: 1px solid var(--fo-line-strong); border-radius: 10px; background: var(--fo-surface);
  color: var(--fo-ink-2); font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: background var(--fo-fast) var(--fo-ease), border-color var(--fo-fast) var(--fo-ease);
}
.fo-tl-more:hover { background: var(--fo-surface-2); border-color: var(--fo-accent); color: var(--fo-accent); }
.fo-tl-more svg.fo-i { width: 15px; height: 15px; }

.fo-tl-empty { padding: 44px 24px; text-align: center; color: var(--fo-ink-3); }
.fo-tl-empty .t { font-size: 13.5px; font-weight: 600; color: var(--fo-ink-2); }
.fo-tl-empty .s { font-size: 12.5px; margin-top: 3px; }

@media (max-width: 700px) {
  .fo-tl-bar .fo-search { width: 100%; }
  .fo-tl-time { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .fo-tl-fchip, .fo-tl-att, .fo-tl-more { transition: none; } }

/* ═══════════════════════════════════════════════════════════════════════════
   INCIDENT TRACKER — Safety Hub (Safety patterns)
   Minimalist-but-complete: a rich identity cell carries severity · type ·
   summary · site · date · reporter, so the table needs only a few signal
   columns (Incident · Status · Flags · CAPAs). Reuses .fo-kpi, .fo-tablewrap,
   .fo-table, .fo-seg, .fo-filter-pop, .fo-bulkbar, .fo-rowact, .fo-empty.
   Colour loudness is ranked: severity = quiet cool→hot dot, status = royal
   accent only on the in-motion state, OSHA = the single red flag.
   ══════════════════════════════════════════════════════════════════════════ */

/* the rich identity cell (frozen column) */
.fo-inc-cell { display: flex; align-items: flex-start; gap: 11px; padding: 3px 0; }
.fo-inc-cell .fo-ava { width: 32px; height: 32px; font-size: 11.5px; margin-top: 1px; flex: none; }
.fo-inc-cell .bd { min-width: 0; }
.fo-inc-cell .l1 { display: flex; align-items: center; gap: 10px; }
.fo-inc-cell .num { font-family: var(--fo-mono); font-size: 11.5px; font-weight: 700; color: var(--fo-ink); }
.fo-inc-cell .ttl { font-size: 13px; color: var(--fo-ink-2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 360px; }
.fo-inc-cell .ttl b { color: var(--fo-ink); font-weight: 650; }
.fo-inc-cell .meta { font-size: 11px; color: var(--fo-ink-3); margin-top: 2px; }

/* severity — dot + label, cool→hot, Critical rings instead of going dark */
.fo-inc-sev { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.fo-inc-sev .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.fo-inc-sev.is-low { color: var(--fo-ink-2); } .fo-inc-sev.is-low .dot { background: var(--fo-info); }
.fo-inc-sev.is-mod { color: var(--fo-ink-2); } .fo-inc-sev.is-mod .dot { background: var(--fo-warn); }
.fo-inc-sev.is-high { color: var(--fo-ink); } .fo-inc-sev.is-high .dot { background: var(--fo-danger); }
.fo-inc-sev.is-crit { color: var(--fo-danger); font-weight: 700; }
.fo-inc-sev.is-crit .dot { background: var(--fo-danger); box-shadow: 0 0 0 3px var(--fo-danger-soft); }

/* status — a chip; royal accent reserved for "investigating" (in motion), green for closed only */
.fo-inc-status { display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.fo-inc-status.is-submitted { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-inc-status.is-review { background: var(--fo-info-soft); color: var(--fo-info); }
.fo-inc-status.is-investigating { background: var(--fo-accent-soft); color: var(--fo-accent-deep); }
.fo-inc-status.is-capa { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-inc-status.is-approved { background: var(--fo-accent-soft); color: var(--fo-accent); }
.fo-inc-status.is-closed { background: var(--fo-ok-soft); color: var(--fo-ok); }

/* flags — bordered metadata tags; OSHA is the only red */
.fo-inc-flags { display: flex; gap: 6px; flex-wrap: wrap; }
.fo-inc-flag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap;
  border: 1px solid var(--fo-line-strong); background: var(--fo-surface-2); color: var(--fo-ink-2); }
.fo-inc-flag svg.fo-i { width: 11px; height: 11px; }
.fo-inc-flag.is-osha { background: var(--fo-danger-soft); color: var(--fo-danger); border-color: rgba(179, 38, 30, 0.26); }
.fo-inc-flag.is-injury { background: var(--fo-warn-soft); color: var(--fo-warn); border-color: rgba(161, 98, 7, 0.24); }

/* CAPA cell */
.fo-inc-capa { font-size: 12px; font-weight: 600; color: var(--fo-ink-2); white-space: nowrap; }
.fo-inc-capa.is-overdue { color: var(--fo-danger); }
.fo-inc-capa.is-none { color: var(--fo-ink-3); font-weight: 500; }

/* compact KPI summary band — one cohesive frame, hairline-divided, value beside
   its label (replaces the airy 4-card strip; no wasted space) */
.fo-inc-kpis {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg);
  background: var(--fo-surface); box-shadow: var(--fo-shadow-1); overflow: hidden; margin-bottom: 18px;
}
.fo-inc-kpi { display: flex; align-items: center; gap: 13px; padding: 14px 20px; border-left: 1px solid var(--fo-line); min-width: 0; }
.fo-inc-kpi:first-child { border-left: 0; }
.fo-inc-kpi .v { font-family: var(--fo-font-display); font-size: 29px; font-weight: 750; letter-spacing: -0.03em; line-height: 1; color: var(--fo-ink); flex: none; font-variant-numeric: tabular-nums; }
.fo-inc-kpi.is-alert .v { color: var(--fo-danger); }
.fo-inc-kpi .tx { min-width: 0; }
.fo-inc-kpi .lb { font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fo-ink-3); line-height: 1.25; }
.fo-inc-kpi .hint { font-size: 11.5px; color: var(--fo-ink-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* clickable tiles read as clickable — static ones stay flat (audit W3) */
a.fo-inc-kpi { transition: background-color var(--fo-fast) var(--fo-ease); }
a.fo-inc-kpi:hover { background: var(--fo-surface-2); }
a.fo-inc-kpi:hover .hint { color: var(--fo-accent); }
@media (max-width: 780px) {
  .fo-inc-kpis { grid-template-columns: repeat(2, 1fr); }
  .fo-inc-kpi:nth-child(odd) { border-left: 0; }
  .fo-inc-kpi:nth-child(n+3) { border-top: 1px solid var(--fo-line); }
}

/* explicit-column cells (the original layout, elevated) */
.fo-inc-num { font-family: var(--fo-mono); font-size: 12px; font-weight: 700; color: var(--fo-ink); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.fo-inc-osha { display: inline-flex; color: var(--fo-danger); }
.fo-inc-osha svg.fo-i { width: 13px; height: 13px; }
.fo-inc-sum { font-size: 12.5px; color: var(--fo-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 250px; }
.fo-inc-sum b { color: var(--fo-ink); font-weight: 650; }
.fo-inc-dim { font-size: 12.5px; color: var(--fo-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-inc-dim.is-empty { color: var(--fo-ink-3); }

/* worklist board — tabs · toolbar · table · footer in ONE framed panel
   (matches the incident-view's single-panel feel; KPI band stays the summary above) */
.fo-inc-board { border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); background: var(--fo-surface); box-shadow: var(--fo-shadow-1); overflow: hidden; }
/* ONE LINE is the constant across every worklist: tabs on the left,
   search/sort/filters on the right, all on a single row. Active-filter
   chips wrap to their own row below. (`.is-oneline` is now redundant —
   kept as a harmless alias so existing markup still matches.) */
.fo-inc-board-bar { padding: 13px 16px; display: flex; align-items: center; flex-wrap: wrap; gap: 11px 14px; }
.fo-inc-board-bar .fo-inc-tabs { margin: 0 auto 0 0; }
.fo-inc-board-bar .fo-inc-toolbar { margin: 0; flex-wrap: nowrap; gap: 10px; }
.fo-inc-board-bar .fo-inc-toolbar .spacer { display: none; }
.fo-inc-board-bar .fo-inc-toolbar .fo-search { width: 220px; }
.fo-inc-board-bar .fo-inc-active { flex-basis: 100%; margin: 0; }
@media (max-width: 920px) {
  .fo-inc-board-bar .fo-inc-tabs { margin-right: 0; }
  .fo-inc-board-bar .fo-inc-toolbar { flex: 1 1 100%; flex-wrap: wrap; }
  .fo-inc-board-bar .fo-inc-toolbar .spacer { display: block; flex: 1; }
  .fo-inc-board-bar .fo-inc-toolbar .fo-search { width: 240px; max-width: 100%; }
}
.fo-inc-board .fo-tablewrap { border-top: 1px solid var(--fo-line); border-radius: 0; }
.fo-inc-board .fo-inc-foot { margin: 0; padding: 12px 16px; border-top: 1px solid var(--fo-line); }

/* tab counts inside the .fo-seg */
.fo-inc-tabs .n { color: var(--fo-ink-3); font-weight: 600; margin-left: 5px; }
.fo-inc-tabs button.is-active .n { color: var(--fo-accent); }

/* active-filter chips row */
.fo-inc-active { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.fo-inc-active .fo-chip { gap: 6px; cursor: pointer; }
.fo-inc-active .fo-chip svg.fo-i { width: 12px; height: 12px; }
.fo-inc-active .clr { border: 0; background: none; font: inherit; font-size: 12px; font-weight: 600; color: var(--fo-accent); cursor: pointer; padding: 0 2px; }

/* footer count */
.fo-inc-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 12.5px; color: var(--fo-ink-3); }

.fo-inc-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 0; }
.fo-inc-toolbar .fo-search { width: 280px; max-width: 100%; }
.fo-inc-toolbar .spacer { flex: 1; }
.fo-inc-sortwrap { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--fo-ink-3); }
.fo-inc-sortwrap select.fo-select { min-width: 150px; }

@media (max-width: 760px) {
  .fo-inc-toolbar .fo-search { width: 100%; }
  .fo-inc-cell .ttl { max-width: 200px; }
}

/* ============================================================================
   EXPENSES (.fo-ex-*) — a report-grain finance worklist built on the incident
   worklist frame (.fo-inc-kpis / .fo-inc-board / .fo-tablewrap) plus a report
   detail drawer and a new-expense create drawer. Royal is rationed: the active
   tab/CTA and the one 'reimbursed' status. Money is tabular display numerals.
   ============================================================================ */

/* 5-up KPI band (the incident band is 4-up) */
.fo-inc-kpis.fo-ex-5 { grid-template-columns: repeat(5, 1fr); }

/* 6-up KPI band (procurement hub) — collapses 6 → 3×2 → 2×3 */
.fo-inc-kpis.fo-ex-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1180px) {
  .fo-inc-kpis.fo-ex-6 { grid-template-columns: repeat(3, 1fr); }
  .fo-inc-kpis.fo-ex-6 .fo-inc-kpi { border-top: 1px solid var(--fo-line); }
  .fo-inc-kpis.fo-ex-6 .fo-inc-kpi:nth-child(-n+3) { border-top: 0; }
  .fo-inc-kpis.fo-ex-6 .fo-inc-kpi:nth-child(3n+1) { border-left: 0; }
}
@media (max-width: 620px) {
  .fo-inc-kpis.fo-ex-6 { grid-template-columns: repeat(2, 1fr); }
  .fo-inc-kpis.fo-ex-6 .fo-inc-kpi:nth-child(3) { border-top: 1px solid var(--fo-line); }
  .fo-inc-kpis.fo-ex-6 .fo-inc-kpi:nth-child(-n+2) { border-top: 0; }
  .fo-inc-kpis.fo-ex-6 .fo-inc-kpi:nth-child(3n+1) { border-left: 1px solid var(--fo-line); }
  .fo-inc-kpis.fo-ex-6 .fo-inc-kpi:nth-child(odd) { border-left: 0; }
}
@media (max-width: 1040px) {
  .fo-inc-kpis.fo-ex-5 { grid-template-columns: repeat(3, 1fr); }
  .fo-inc-kpis.fo-ex-5 .fo-inc-kpi { border-top: 1px solid var(--fo-line); }
  .fo-inc-kpis.fo-ex-5 .fo-inc-kpi:nth-child(-n+3) { border-top: 0; }
  .fo-inc-kpis.fo-ex-5 .fo-inc-kpi:nth-child(3n+1) { border-left: 0; }
}
@media (max-width: 620px) {
  .fo-inc-kpis.fo-ex-5 { grid-template-columns: repeat(2, 1fr); }
  .fo-inc-kpis.fo-ex-5 .fo-inc-kpi:nth-child(3) { border-top: 1px solid var(--fo-line); }
  .fo-inc-kpis.fo-ex-5 .fo-inc-kpi:nth-child(-n+2) { border-top: 0; }
  .fo-inc-kpis.fo-ex-5 .fo-inc-kpi:nth-child(3n+1) { border-left: 1px solid var(--fo-line); }
  .fo-inc-kpis.fo-ex-5 .fo-inc-kpi:nth-child(odd) { border-left: 0; }
}

/* employee identity cell */
.fo-ex-emp { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.fo-ex-emp .tx { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.fo-ex-emp .nm { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--fo-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-ex-emp .sub { font-size: 11px; color: var(--fo-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-ex-you { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fo-accent-deep); background: var(--fo-accent-soft); padding: 1px 6px; border-radius: 999px; }

/* title + count + amount cells */
.fo-ex-title b { display: block; font-size: 12.5px; font-weight: 650; color: var(--fo-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 230px; }
.fo-ex-title span { display: block; font-size: 11px; color: var(--fo-ink-3); margin-top: 1px; }
.fo-table td.fo-ex-ct { text-align: center; font-size: 12.5px; font-weight: 600; color: var(--fo-ink-2); font-variant-numeric: tabular-nums; }
.fo-table td.fo-ex-amt { text-align: right; font-size: 13px; font-weight: 650; color: var(--fo-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fo-ex-flag { display: inline-flex; color: var(--fo-warn); }
.fo-ex-flag svg.fo-i { width: 13px; height: 13px; }

/* status pills — soft token tints; only 'reimbursed' carries royal (money out) */
.fo-ex-status { display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.fo-ex-status.is-draft { background: var(--fo-surface-2); color: var(--fo-ink-2); border: 1px dashed var(--fo-line-strong); padding: 2px 10px; }
.fo-ex-status.is-sub { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-ex-status.is-review { background: var(--fo-info-soft); color: var(--fo-info); }
.fo-ex-status.is-appr { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-ex-status.is-return { background: var(--fo-surface-2); color: var(--fo-ink-2); border: 1px solid var(--fo-line-strong); padding: 2px 10px; }
.fo-ex-status.is-reject { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-ex-status.is-reimb { background: var(--fo-accent-soft); color: var(--fo-accent-deep); }
.fo-ex-status.is-closed { background: var(--fo-surface-2); color: var(--fo-ink-3); }

/* ── detail drawer · entries ── */
.fo-ex-entry { padding: 12px 0; border-top: 1px solid var(--fo-line); }
.fo-ex-entry:first-of-type { border-top: 0; padding-top: 4px; }
.fo-ex-entry-top { display: flex; align-items: baseline; gap: 10px; }
.fo-ex-ecat { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 650; color: var(--fo-ink); }
.fo-ex-ecat svg.fo-i { width: 15px; height: 15px; color: var(--fo-ink-3); }
.fo-ex-edate { font-size: 11.5px; color: var(--fo-ink-3); white-space: nowrap; }
.fo-ex-eamt { margin-left: auto; font-size: 14px; font-weight: 700; color: var(--fo-ink); font-variant-numeric: tabular-nums; }
.fo-ex-emeta { font-size: 12px; color: var(--fo-ink-2); margin: 4px 0 0; padding-left: 22px; line-height: 1.45; }
.fo-ex-eflags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; padding-left: 22px; }

/* receipts */
.fo-ex-receipts { display: flex; flex-wrap: wrap; gap: 10px; }
.fo-ex-rcpt { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); background: var(--fo-surface); cursor: pointer; font: inherit; text-align: left; transition: border-color var(--fo-fast) var(--fo-ease); }
.fo-ex-rcpt:hover { border-color: var(--fo-accent); }
.fo-ex-rcpt .thumb { width: 38px; height: 46px; border-radius: 7px; background: linear-gradient(150deg, var(--g1, #e9f0fb), var(--g2, #d7e3f6)); display: inline-flex; align-items: center; justify-content: center; color: rgba(8, 47, 120, 0.5); flex: none; }
.fo-ex-rcpt .thumb svg.fo-i { width: 17px; height: 17px; }
.fo-ex-rcpt .mt { display: flex; flex-direction: column; min-width: 0; }
.fo-ex-rcpt .mt b { font-size: 12px; font-weight: 600; color: var(--fo-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.fo-ex-rcpt .mt span { font-size: 11.5px; color: var(--fo-ink-3); font-variant-numeric: tabular-nums; }
.fo-ex-hist-empty { font-size: 12.5px; color: var(--fo-ink-3); padding: 4px 0; line-height: 1.5; }

/* returned / rejected reason callout */
.fo-ex-reasonbox { display: flex; gap: 11px; padding: 13px 15px; border-radius: var(--fo-r-md); }
.fo-ex-reasonbox svg.fo-i { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.fo-ex-reasonbox b { display: block; font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.fo-ex-reasonbox span { font-size: 12.5px; line-height: 1.5; color: var(--fo-ink-2); }
.fo-ex-reasonbox.is-reject { background: var(--fo-danger-soft); }
.fo-ex-reasonbox.is-reject svg.fo-i, .fo-ex-reasonbox.is-reject b { color: var(--fo-danger); }
.fo-ex-reasonbox.is-return { background: var(--fo-warn-soft); }
.fo-ex-reasonbox.is-return svg.fo-i, .fo-ex-reasonbox.is-return b { color: var(--fo-warn); }

/* foot — reject is the one danger action; self-approval note */
.fo-btn.is-quiet.fo-ex-reject { color: var(--fo-danger); }
.fo-btn.is-quiet.fo-ex-reject:hover { background: var(--fo-danger-soft); border-color: var(--fo-danger-soft); }
.fo-ex-foot-note { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; font-size: 11.5px; font-weight: 600; color: var(--fo-ink-3); }
.fo-ex-foot-note svg.fo-i { width: 13px; height: 13px; }
.fo-ex-reason { padding: 13px 22px; border-top: 1px solid var(--fo-line); background: var(--fo-surface-2); flex: none; }
.fo-ex-reason .fo-label { margin-bottom: 6px; }
.fo-ex-reason textarea { width: 100%; }
.fo-ex-reason-acts { display: flex; justify-content: flex-end; gap: 9px; margin-top: 10px; }

/* ── new-expense drawer ── */
.fo-ex-payee { display: flex; align-items: center; gap: 9px; padding: 8px 12px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); background: var(--fo-surface-2); }
.fo-ex-payee .nm { font-size: 13px; font-weight: 600; color: var(--fo-ink); }
.fo-ex-payee .you { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fo-accent-deep); background: var(--fo-accent-soft); padding: 1px 7px; border-radius: 999px; margin-left: auto; }
.fo-ex-payee .role { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--fo-ink-3); }
.fo-ex-payee-note { font-size: 12px; line-height: 1.5; color: var(--fo-ink-3); margin: 9px 0 0; }
.fo-ex-opt { font-size: 10.5px; font-weight: 600; color: var(--fo-ink-3); text-transform: none; letter-spacing: 0; }
.fo-ex-amtin { position: relative; display: flex; align-items: center; }
.fo-ex-amtin .cur { position: absolute; left: 12px; font-size: 14px; font-weight: 600; color: var(--fo-ink-3); pointer-events: none; }
.fo-ex-amtin .fo-input { padding-left: 26px; font-variant-numeric: tabular-nums; }
.fo-ex-card { margin-top: 14px; padding: 14px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); background: var(--fo-surface-2); }
.fo-ex-card[hidden] { display: none; }
.fo-ex-card-h { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--fo-ink); margin-bottom: 12px; }
.fo-ex-card-h svg.fo-i { width: 15px; height: 15px; color: var(--fo-accent); }
.fo-ex-card-out { margin-left: auto; font-size: 14px; font-weight: 750; color: var(--fo-accent-deep); font-variant-numeric: tabular-nums; }
.fo-ex-drop { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 22px 18px; border: 1.5px dashed var(--fo-line-strong); border-radius: var(--fo-r-md); background: var(--fo-surface-2); cursor: pointer; text-align: center; transition: border-color var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease); }
.fo-ex-drop:hover { border-color: var(--fo-accent); background: var(--fo-accent-soft); }
.fo-ex-drop svg.fo-i { width: 22px; height: 22px; color: var(--fo-accent); }
.fo-ex-drop .t { font-size: 13px; font-weight: 650; color: var(--fo-ink); }
.fo-ex-drop .s { font-size: 11.5px; color: var(--fo-ink-3); line-height: 1.45; max-width: 40ch; }
.fo-ex-drop-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.fo-ex-drop-item { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--fo-ink-2); }
.fo-ex-drop-item svg.fo-i { width: 14px; height: 14px; color: var(--fo-ink-3); }

/* ============================================================================
   ADJUSTMENTS (.fo-adj-*) — the payroll-ledger SIBLING of Expenses. Reuses the
   whole Expenses frame (.fo-inc-* worklist, .fo-ex-status pills, .fo-ex-amt,
   .fo-ex-emp, the drawer system) and adds only adjustment-specific cells:
   a +/- direction, a multi-employee cluster, an installment balance bar, a
   garnishment hard-flag, and the one new royal terminal status (processed).
   Royal stays rationed to: the CTA, the processed pill, and the balance fill.
   ============================================================================ */

/* the one new shared status — processed/paid/applied = money applied to payroll (royal terminal) */
.fo-ex-status.is-processed { background: var(--fo-accent-soft); color: var(--fo-accent-deep); }

/* direction badge — calm: deduction neutral, money-in soft green */
.fo-adj-dir { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.fo-adj-dir svg.fo-i { width: 12px; height: 12px; }
.fo-adj-dir.is-charge { background: var(--fo-surface-2); color: var(--fo-ink-2); border: 1px solid var(--fo-line-strong); }
.fo-adj-dir.is-credit { background: var(--fo-ok-soft); color: var(--fo-ok); }

/* signed amount — sign carries the meaning, tint stays restrained */
.fo-table td.fo-adj-amt.is-pos { color: var(--fo-ok); }
.fo-table td.fo-adj-amt.is-neg { color: var(--fo-ink); }
.fo-adj-pos { color: var(--fo-ok); }

/* garnishment inline flag in the entry # cell (subtle); hard flag in drawer */
.fo-adj-flagi { display: inline-flex; color: var(--fo-ink-3); }
.fo-adj-flagi svg.fo-i { width: 13px; height: 13px; }

/* multi-employee avatar cluster */
.fo-adj-cluster { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.fo-adj-cluster .avs { display: inline-flex; flex: none; }
.fo-adj-cluster .avs .fo-ava { margin-left: -7px; border: 2px solid var(--fo-surface); }
.fo-adj-cluster .avs .fo-ava:first-child { margin-left: 0; }
.fo-adj-more { display: inline-flex; align-items: center; justify-content: center; height: 22px; min-width: 22px; padding: 0 5px; margin-left: -7px; border: 2px solid var(--fo-surface); border-radius: 999px; background: var(--fo-canvas); color: var(--fo-ink-3); font-size: 10px; font-weight: 700; }
.fo-adj-cluster .tx { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.fo-adj-cluster .nm { font-size: 12.5px; font-weight: 600; color: var(--fo-ink); white-space: nowrap; }
.fo-adj-cluster .sub { font-size: 11px; color: var(--fo-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }

/* ── detail drawer · adjustment-specific ── */
.fo-adj-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.fo-adj-garnish { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 8px; font-size: 11.5px; font-weight: 700; color: var(--fo-ink); background: var(--fo-surface-2); border: 1.5px solid var(--fo-line-strong); }
.fo-adj-garnish svg.fo-i { width: 14px; height: 14px; color: var(--fo-accent-deep); }
.fo-adj-recur svg.fo-i { color: var(--fo-ink-3); }

.fo-adj-emps { display: flex; flex-wrap: wrap; gap: 8px; }
.fo-adj-emp { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 6px; border: 1px solid var(--fo-line); border-radius: 999px; background: var(--fo-surface); font-size: 12px; font-weight: 600; color: var(--fo-ink-2); }

.fo-adj-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.fo-adj-fact { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--fo-line); min-width: 0; }
.fo-adj-fact .k { font-size: 12px; color: var(--fo-ink-3); white-space: nowrap; }
.fo-adj-fact .v { font-size: 12.5px; font-weight: 600; color: var(--fo-ink); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-adj-notes { margin: 12px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--fo-ink-2); }
@media (max-width: 520px) { .fo-adj-facts { grid-template-columns: 1fr; } }

/* installment balance — the one place royal is allowed to fill (money applied) */
.fo-adj-paused { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fo-warn); background: var(--fo-warn-soft); vertical-align: middle; }
.fo-adj-bal { padding: 14px 15px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); background: var(--fo-surface-2); }
.fo-adj-bal-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.fo-adj-bal-top .rem { font-family: var(--fo-font-display); font-size: 21px; font-weight: 750; letter-spacing: -0.02em; color: var(--fo-ink); font-variant-numeric: tabular-nums; }
.fo-adj-bal-top .rem small { font-size: 11.5px; font-weight: 600; color: var(--fo-ink-3); letter-spacing: 0; }
.fo-adj-bal-top .of { font-size: 12px; color: var(--fo-ink-3); font-variant-numeric: tabular-nums; }
.fo-adj-bal-bar { height: 8px; border-radius: 99px; background: var(--fo-line); overflow: hidden; margin: 11px 0 12px; }
.fo-adj-bal-bar > span { display: block; height: 100%; border-radius: 99px; background: var(--fo-grad); }
.fo-adj-bal-stats { display: flex; gap: 20px; }
.fo-adj-bal-stats span { display: flex; flex-direction: column; font-size: 11px; color: var(--fo-ink-3); }
.fo-adj-bal-stats b { font-size: 13.5px; font-weight: 700; color: var(--fo-ink); font-variant-numeric: tabular-nums; }
.fo-adj-bal-acts { display: flex; gap: 8px; margin-top: 14px; }

/* ── create drawer · adjustment-specific ── */
.fo-adj-pick { display: flex; flex-direction: column; gap: 10px; }
.fo-adj-chips { display: flex; flex-wrap: wrap; gap: 7px; min-height: 30px; align-items: center; }
.fo-adj-pchip { padding-right: 5px; }
.fo-adj-pchip button { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-left: 2px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--fo-ink-3); cursor: pointer; }
.fo-adj-pchip button:hover { background: var(--fo-line-strong); color: var(--fo-ink); }
.fo-adj-pchip button svg.fo-i { width: 11px; height: 11px; }
.fo-adj-pick-empty { font-size: 12px; color: var(--fo-ink-3); }
.fo-adj-pick-note { font-size: 12px; line-height: 1.5; color: var(--fo-ink-3); margin: 0; }
.fo-adj-pick-note b { color: var(--fo-ink-2); font-weight: 650; }
.fo-adj-hint { font-size: 10.5px; font-weight: 600; color: var(--fo-ink-3); text-transform: none; letter-spacing: 0; }
.fo-adj-toggle { display: flex; align-items: flex-start; gap: 11px; padding: 12px 0; cursor: pointer; }
.fo-adj-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.fo-adj-toggle .bx { flex: none; width: 20px; height: 20px; margin-top: 1px; border: 1.5px solid var(--fo-line-strong); border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; transition: background var(--fo-fast) var(--fo-ease), border-color var(--fo-fast) var(--fo-ease); }
.fo-adj-toggle input:checked + .bx { background: var(--fo-accent); border-color: var(--fo-accent); }
.fo-adj-toggle input:checked + .bx::after { content: ''; width: 6px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-1px); }
.fo-adj-toggle input:focus-visible + .bx { box-shadow: 0 0 0 3px var(--fo-accent-soft); }
.fo-adj-toggle .tx { display: flex; flex-direction: column; gap: 1px; }
.fo-adj-toggle .tx b { font-size: 13px; font-weight: 650; color: var(--fo-ink); }
.fo-adj-toggle .tx span { font-size: 11.5px; color: var(--fo-ink-3); line-height: 1.4; }

/* ============================================================================
   PURCHASE ORDERS (.fo-po-*) — the THIRD finance worklist sibling. Reuses the
   whole frame + drawer + .fo-ex-status pills, and adds only PO-specific cells:
   a vendor cell, an editable + read-only line-items table, a money summary, a
   multi-step approval stepper, and a receiving progress bar. Royal is rationed
   to: the Submit CTA, the current approval node, the Ordered pill, the recv bar.
   ============================================================================ */

/* vendor cell — a rounded org tile (NOT person initials) */
.fo-po-vendor { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.fo-po-vlogo { flex: none; width: 26px; height: 26px; border-radius: 7px; background: var(--fo-surface-2); border: 1px solid var(--fo-line); display: inline-flex; align-items: center; justify-content: center; color: var(--fo-ink-3); }
.fo-po-vlogo svg.fo-i { width: 14px; height: 14px; }
.fo-po-vendor .tx { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.fo-po-vendor .nm { font-size: 12.5px; font-weight: 600; color: var(--fo-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-po-vendor .sub { font-size: 11px; color: var(--fo-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.fo-po-type { display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 5px; font-size: 9px; font-weight: 700; letter-spacing: 0.04em; color: var(--fo-ink-3); background: var(--fo-surface-2); border: 1px solid var(--fo-line); vertical-align: middle; }
.fo-po-flagi { display: inline-flex; }
.fo-po-flagi svg.fo-i { width: 13px; height: 13px; }
.fo-po-flagi.is-urgent { color: var(--fo-warn); }
.fo-po-flagi.is-budget { color: var(--fo-danger); }
.fo-po-statuscell { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fo-po-recv-pill { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.fo-po-recv-pill svg.fo-i { width: 11px; height: 11px; }
.fo-po-recv-pill.is-pending { background: var(--fo-surface-2); color: var(--fo-ink-3); }
.fo-po-recv-pill.is-partial { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-po-recv-pill.is-complete { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-po-late { padding: 2px 8px; font-size: 10px; }
.fo-po-late svg.fo-i { width: 11px; height: 11px; }

/* drawer head vendor tile — neutral org tile, not royal */
.fo-po-ava { border-radius: 13px; background: var(--fo-surface-2); color: var(--fo-ink-2); border: 1px solid var(--fo-line); }
.fo-po-ava svg.fo-i { width: 20px; height: 20px; }

/* read-only line items (detail) */
.fo-po-lineitems { border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); overflow: hidden; }
.fo-po-li-head { display: grid; grid-template-columns: minmax(0, 1fr) 54px 76px 86px; gap: 8px; padding: 8px 12px; background: var(--fo-surface-2); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fo-ink-3); }
.fo-po-li-head span:nth-child(n+2) { text-align: right; }
.fo-po-li-row { display: grid; grid-template-columns: minmax(0, 1fr) 54px 76px 86px; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--fo-line); align-items: start; }
.fo-po-li-desc { min-width: 0; }
.fo-po-li-desc b { display: block; font-size: 12.5px; font-weight: 600; color: var(--fo-ink); }
.fo-po-li-desc span { font-size: 11px; color: var(--fo-ink-3); font-family: var(--fo-mono); }
.fo-po-li-qty, .fo-po-li-price, .fo-po-li-total { text-align: right; font-size: 12.5px; color: var(--fo-ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fo-po-li-total { font-weight: 650; color: var(--fo-ink); }
.fo-po-li-total .rp { margin-top: 5px; }

/* money summary — readonly in detail, live in create */
.fo-po-summary { margin-top: 14px; border-top: 1px solid var(--fo-line); padding-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.fo-po-summary-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12.5px; }
.fo-po-summary-row .lb { color: var(--fo-ink-3); display: inline-flex; align-items: center; gap: 4px; }
.fo-po-summary-row .vl { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--fo-ink); }
.fo-po-summary-row.is-total { border-top: 1px solid var(--fo-line); padding-top: 9px; margin-top: 2px; }
.fo-po-summary-row.is-total .lb { color: var(--fo-ink); font-weight: 700; font-size: 13px; }
.fo-po-summary-row.is-total .vl { font-family: var(--fo-font-display); font-size: 18px; font-weight: 780; letter-spacing: -0.02em; }
.fo-po-taxrate { width: 38px; padding: 2px 5px; border: 1px solid var(--fo-line); border-radius: 6px; font: inherit; font-size: 11.5px; text-align: right; margin: 0 1px; font-variant-numeric: tabular-nums; }
.fo-po-shipin { position: relative; display: inline-flex; align-items: center; }
.fo-po-shipin .cur { position: absolute; left: 8px; font-size: 12px; color: var(--fo-ink-3); pointer-events: none; }
.fo-po-shipin input { width: 92px; padding: 4px 8px 4px 18px; border: 1px solid var(--fo-line); border-radius: 7px; font: inherit; font-size: 12.5px; text-align: right; font-variant-numeric: tabular-nums; }

/* approval chain stepper */
.fo-po-stepper { display: flex; align-items: flex-start; flex-wrap: wrap; }
.fo-po-step { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 5px; flex: 1; min-width: 80px; padding: 0 2px; }
.fo-po-step .ic { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-family: var(--fo-font-display); font-weight: 700; font-size: 12.5px; border: 1.5px solid var(--fo-line-strong); background: var(--fo-surface); color: var(--fo-ink-3); }
.fo-po-step .ic svg.fo-i { width: 15px; height: 15px; }
.fo-po-step .nm { font-size: 11.5px; font-weight: 650; color: var(--fo-ink); line-height: 1.2; }
.fo-po-step .dt { font-size: 10.5px; color: var(--fo-ink-3); }
.fo-po-step.is-done .ic { background: var(--fo-ok-soft); border-color: rgba(24, 129, 80, 0.3); color: var(--fo-ok); }
.fo-po-step.is-current .ic { background: var(--fo-accent); border-color: var(--fo-accent); color: #fff; box-shadow: 0 0 0 4px var(--fo-accent-soft); }
.fo-po-step.is-current .nm { color: var(--fo-accent-deep); }
.fo-po-step.is-pending .ic { background: var(--fo-surface-2); }
.fo-po-step.is-rejected .ic { background: var(--fo-danger-soft); border-color: rgba(179, 38, 30, 0.3); color: var(--fo-danger); }
.fo-po-step-divider { flex: 0 0 22px; height: 1.5px; background: var(--fo-line); margin-top: 15px; }
.fo-po-autoappr { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: var(--fo-r-md); background: var(--fo-ok-soft); color: var(--fo-ok); font-size: 12.5px; font-weight: 650; }
.fo-po-autoappr svg.fo-i { width: 15px; height: 15px; }

/* receiving — the gradient bar reuses the adjustments balance-bar geometry */
.fo-po-recv-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.fo-po-recv-top .lead { font-family: var(--fo-font-display); font-size: 19px; font-weight: 750; letter-spacing: -0.02em; color: var(--fo-ink); font-variant-numeric: tabular-nums; }
.fo-po-recv-top .lead small { font-size: 11.5px; font-weight: 600; color: var(--fo-ink-3); letter-spacing: 0; }
.fo-po-recv-top .lc { font-size: 12px; color: var(--fo-ink-3); font-variant-numeric: tabular-nums; }
.fo-po-recv-bar { height: 8px; border-radius: 99px; background: var(--fo-line); overflow: hidden; }
.fo-po-recv-bar > span { display: block; height: 100%; border-radius: 99px; background: var(--fo-grad); }
.fo-po-recv-ship { margin-top: 11px; display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--fo-ink-2); }
.fo-po-recv-ship svg.fo-i { width: 15px; height: 15px; color: var(--fo-ink-3); }
.fo-po-recv-ship .trk { font-family: var(--fo-mono); font-size: 11.5px; color: var(--fo-ink); }

/* create — requested-by chip + editable line-items grid */
.fo-po-payee { display: flex; align-items: center; gap: 9px; padding: 8px 12px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); background: var(--fo-surface-2); }
.fo-po-payee .nm { font-size: 13px; font-weight: 600; color: var(--fo-ink); }
.fo-po-payee .you { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fo-accent-deep); background: var(--fo-accent-soft); padding: 1px 7px; border-radius: 999px; margin-left: auto; }
.fo-po-editor { border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); overflow: hidden; }
.fo-po-ed-head, .fo-po-ed-row { display: grid; grid-template-columns: minmax(0, 1fr) 86px 60px 100px 84px 30px; gap: 8px; align-items: center; }
.fo-po-ed-head { padding: 9px 12px; background: var(--fo-surface-2); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fo-ink-3); }
.fo-po-ed-head span:nth-child(3), .fo-po-ed-head span:nth-child(4), .fo-po-ed-head span:nth-child(5) { text-align: right; }
.fo-po-ed-row { padding: 8px 12px; border-top: 1px solid var(--fo-line); }
.fo-po-ed-row .fo-input { height: 34px; font-size: 12.5px; }
.fo-po-ed-row input[data-k="qty"] { text-align: right; }
.fo-po-ed-price { position: relative; display: inline-flex; align-items: center; }
.fo-po-ed-price .cur { position: absolute; left: 9px; font-size: 12px; color: var(--fo-ink-3); pointer-events: none; }
.fo-po-ed-price input { padding-left: 20px; text-align: right; }
.fo-po-ed-total { text-align: right; font-size: 12.5px; font-weight: 650; color: var(--fo-ink); font-variant-numeric: tabular-nums; }
.fo-po-ed-rm { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: var(--fo-ink-3); cursor: pointer; }
.fo-po-ed-rm:hover { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-po-ed-rm svg.fo-i { width: 14px; height: 14px; }
.fo-po-additem { display: inline-flex; align-items: center; gap: 7px; margin-top: 11px; padding: 8px 14px; border: 1.5px dashed var(--fo-line-strong); border-radius: 9px; background: transparent; font: inherit; font-size: 12.5px; font-weight: 650; color: var(--fo-ink-2); cursor: pointer; transition: border-color var(--fo-fast) var(--fo-ease), color var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease); }
.fo-po-additem:hover { border-color: var(--fo-accent); color: var(--fo-accent); background: var(--fo-accent-soft); }
.fo-po-additem svg.fo-i { width: 14px; height: 14px; }
@media (max-width: 620px) {
  .fo-po-editor { overflow-x: auto; }
  .fo-po-ed-head, .fo-po-ed-row { min-width: 520px; }
}

/* ============================================================================
   SUPPLY REQUESTS (.fo-sr-*) — the FOURTH, lightest finance sibling: a field
   needs-queue with NO pricing. Reuses the frame + drawer + .fo-ex-status pills
   and adds only: an urgency pill, a no-price items table, a convert-to-PO
   banner, and a light items editor. Royal is rationed to the New-request CTA
   and the 'Converted' status / convert-banner (the SR→PO bridge).
   ============================================================================ */

/* urgency pill — calm: normal neutral, urgent amber, emergency red */
.fo-sr-urg { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.fo-sr-urg .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.fo-sr-urg.is-normal { background: var(--fo-surface-2); color: var(--fo-ink-2); }
.fo-sr-urg.is-urgent { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-sr-urg.is-emergency { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-sr-flagi { display: inline-flex; color: var(--fo-danger); }
.fo-sr-flagi svg.fo-i { width: 13px; height: 13px; }

/* read-only items table (detail) — no price columns */
.fo-sr-items { border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); overflow: hidden; }
.fo-sr-it-head, .fo-sr-it-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 54px 54px; gap: 8px; align-items: start; }
.fo-sr-it-head { padding: 8px 12px; background: var(--fo-surface-2); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fo-ink-3); }
.fo-sr-it-head span:nth-child(3), .fo-sr-it-head span:nth-child(4) { text-align: right; }
.fo-sr-it-row { padding: 10px 12px; border-top: 1px solid var(--fo-line); }
.fo-sr-it-row .no { font-size: 11.5px; color: var(--fo-ink-3); font-variant-numeric: tabular-nums; }
.fo-sr-it-row .nm { min-width: 0; }
.fo-sr-it-row .nm b { display: block; font-size: 12.5px; font-weight: 600; color: var(--fo-ink); }
.fo-sr-it-row .nm .nt { display: block; font-size: 11px; color: var(--fo-ink-3); margin-top: 1px; }
.fo-sr-it-row .qt, .fo-sr-it-row .un { text-align: right; font-size: 12.5px; color: var(--fo-ink-2); font-variant-numeric: tabular-nums; }

/* converted-to-PO banner — the SR→PO bridge (the one accent-soft moment) */
.fo-sr-convbanner { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: var(--fo-r-md); background: var(--fo-accent-soft); }
.fo-sr-convbanner svg.fo-i { width: 18px; height: 18px; flex: none; color: var(--fo-accent-deep); }
.fo-sr-convbanner b { display: block; font-size: 13px; font-weight: 700; color: var(--fo-accent-deep); }
.fo-sr-convbanner span { font-size: 12px; color: var(--fo-ink-2); }
.fo-sr-convbanner a { color: var(--fo-accent-deep); font-weight: 700; text-decoration: none; }
.fo-sr-convbanner a:hover { text-decoration: underline; }
.fo-sr-terminal { display: inline-flex; align-items: center; gap: 7px; margin: 0 auto; font-size: 12.5px; font-weight: 600; color: var(--fo-ink-3); }
.fo-sr-terminal svg.fo-i { width: 14px; height: 14px; color: var(--fo-ok); }

/* create — urgency picker + light items editor */
.fo-sr-urgpick { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.fo-sr-urgpick button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border: 1px solid var(--fo-line); border-radius: 999px; background: var(--fo-surface); font: inherit; font-size: 12.5px; font-weight: 600; color: var(--fo-ink-2); cursor: pointer; transition: border-color var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease), color var(--fo-fast) var(--fo-ease); }
.fo-sr-urgpick button .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--fo-ink-3); }
.fo-sr-urgpick button[data-u="urgent"] .dot { background: var(--fo-warn); }
.fo-sr-urgpick button[data-u="emergency"] .dot { background: var(--fo-danger); }
.fo-sr-urgpick button:hover { border-color: var(--fo-line-strong); }
.fo-sr-urgpick button.is-active { border-color: var(--fo-ink); color: var(--fo-ink); background: var(--fo-surface-2); }
.fo-sr-urgpick button[data-u="urgent"].is-active { border-color: rgba(161, 98, 7, 0.5); background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-sr-urgpick button[data-u="emergency"].is-active { border-color: rgba(179, 38, 30, 0.5); background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-sr-editor { border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); overflow: hidden; }
.fo-sr-ed-head, .fo-sr-ed-row { display: grid; grid-template-columns: minmax(0, 1.5fr) 56px 64px minmax(0, 1fr) 30px; gap: 8px; align-items: center; }
.fo-sr-ed-head { padding: 9px 12px; background: var(--fo-surface-2); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fo-ink-3); }
.fo-sr-ed-head span:nth-child(2), .fo-sr-ed-head span:nth-child(3) { text-align: right; }
.fo-sr-ed-row { padding: 8px 12px; border-top: 1px solid var(--fo-line); }
.fo-sr-ed-row .fo-input { height: 34px; font-size: 12.5px; }
.fo-sr-ed-row input[data-k="qty"] { text-align: right; }
.fo-sr-ed-rm { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: var(--fo-ink-3); cursor: pointer; }
.fo-sr-ed-rm:hover { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-sr-ed-rm svg.fo-i { width: 14px; height: 14px; }
.fo-sr-additem { display: inline-flex; align-items: center; gap: 7px; margin-top: 11px; padding: 8px 14px; border: 1.5px dashed var(--fo-line-strong); border-radius: 9px; background: transparent; font: inherit; font-size: 12.5px; font-weight: 650; color: var(--fo-ink-2); cursor: pointer; transition: border-color var(--fo-fast) var(--fo-ease), color var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease); }
.fo-sr-additem:hover { border-color: var(--fo-accent); color: var(--fo-accent); background: var(--fo-accent-soft); }
.fo-sr-additem svg.fo-i { width: 14px; height: 14px; }
@media (max-width: 620px) {
  .fo-sr-editor { overflow-x: auto; }
  .fo-sr-ed-head, .fo-sr-ed-row { min-width: 480px; }
}

/* ============================================================================
   INCIDENT VIEW (.fo-iv-*) — the investigation workspace behind a tracker row.
   Pinned case identity + a section rail + a persistent facts/tools rail.
   Reuses .fo-inc-sev / .fo-inc-status pills and the .fo-tl-* timeline so the
   detail reads as the same product as the tracker.
   ============================================================================ */

/* ── case identity bar ── */
.fo-iv-case { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; padding: 16px 20px; margin-bottom: 18px;
  border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); background: var(--fo-surface); box-shadow: var(--fo-shadow-1); }
/* record-title navigator — the canonical default for a detail page reached
   from a table (fleet asset · jobs · daily reports): the title doubles as a
   searchable jump-to-record list. Put `class="fo-select fo-iv-nav" data-search`
   on a <select> of sibling records that navigates on change. */
.fo-iv-nav.fo-select { font-family: var(--fo-font-display); font-size: 22px; font-weight: 750; letter-spacing: -0.02em;
  color: var(--fo-ink); line-height: 1.2; height: auto; border-color: transparent; background-color: transparent;
  padding: 4px 30px 4px 9px; max-width: min(52vw, 560px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-iv-nav.fo-select:hover { background-color: var(--fo-canvas); border-color: var(--fo-line); }
.fo-iv-back { display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 7px 12px 7px 9px; font-size: 12.5px; font-weight: 600;
  color: var(--fo-ink-3); text-decoration: none; border: 1px solid var(--fo-line); border-radius: 999px; background: var(--fo-surface);
  transition: color var(--fo-fast) var(--fo-ease), border-color var(--fo-fast) var(--fo-ease); }
.fo-iv-back:hover { color: var(--fo-accent); border-color: var(--fo-accent); }
.fo-iv-back svg.fo-i { width: 14px; height: 14px; }
.fo-iv-case-main { flex: 1; min-width: 240px; }
.fo-iv-case-id { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fo-iv-num { font-family: var(--fo-font-display); font-size: 21px; font-weight: 750; letter-spacing: -0.02em; color: var(--fo-ink); margin: 0; }
.fo-iv-case-sum { margin: 9px 0 0; font-size: 13px; color: var(--fo-ink-2); }
.fo-iv-case-sum b { color: var(--fo-ink); font-weight: 650; }
.fo-iv-case-actions { display: flex; gap: 8px; flex: none; }

/* flag chips — OSHA is the only red, injury amber, lost-time neutral */
.fo-iv-flag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 7px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.01em; white-space: nowrap; border: 1px solid var(--fo-line-strong); background: var(--fo-surface-2); color: var(--fo-ink-2); }
.fo-iv-flag svg.fo-i { width: 12px; height: 12px; }
.fo-iv-flag.is-osha { background: var(--fo-danger-soft); color: var(--fo-danger); border-color: rgba(179, 38, 30, 0.26); }
.fo-iv-flag.is-injury { background: var(--fo-warn-soft); color: var(--fo-warn); border-color: rgba(161, 98, 7, 0.24); }

/* ── 3-column grid ── */
.fo-iv-grid { display: grid; grid-template-columns: 212px minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.fo-iv-main { min-width: 0; }

/* section rail */
.fo-iv-rail { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 16px; }
.fo-iv-rail-h { font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fo-ink-3); margin: 0 0 5px 10px; }
.fo-iv-rail-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 11px; border: 0; background: none; border-radius: var(--fo-r-sm);
  font: inherit; font-size: 13px; font-weight: 550; color: var(--fo-ink-2); cursor: pointer; text-align: left; position: relative;
  transition: background var(--fo-fast) var(--fo-ease), color var(--fo-fast) var(--fo-ease); }
.fo-iv-rail-item svg.fo-i { width: 15px; height: 15px; color: var(--fo-ink-3); flex: none; }
.fo-iv-rail-item > span:not(.fo-iv-rail-pill) { flex: 1; min-width: 0; }
.fo-iv-rail-item:hover { background: var(--fo-surface-2); color: var(--fo-ink); }
.fo-iv-rail-item.is-active { background: var(--fo-accent-soft); color: var(--fo-accent-deep); font-weight: 650; }
.fo-iv-rail-item.is-active svg.fo-i { color: var(--fo-accent); }
.fo-iv-rail-item.is-active::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--fo-accent); }
.fo-iv-rail-pill { flex: none; min-width: 20px; text-align: center; padding: 1px 7px; border-radius: 999px; background: var(--fo-surface-2); color: var(--fo-ink-3); font-size: 11px; font-weight: 700; }
.fo-iv-rail-item.is-active .fo-iv-rail-pill { background: var(--fo-surface); color: var(--fo-accent-deep); }
.fo-iv-rail-pill.is-alert { background: var(--fo-danger-soft); color: var(--fo-danger); }

/* section card chrome */
.fo-iv-main .fo-card-title .ttl { display: inline-flex; align-items: center; gap: 9px; margin-right: auto; }
.fo-iv-chk-prog { font-size: 12px; font-weight: 650; color: var(--fo-accent-deep); background: var(--fo-accent-soft); padding: 3px 11px; border-radius: 999px; }

.fo-iv-field { }
.fo-iv-field + .fo-iv-field { margin-top: 20px; }
.fo-iv-field-label { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fo-ink-3); margin-bottom: 7px; }

/* ── Event ── */
.fo-iv-event { display: flex; gap: 24px; align-items: flex-start; }
.fo-iv-bodymap { flex: none; width: 152px; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 11px;
  padding: 16px 14px; background: var(--fo-surface-2); border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); }
.fo-iv-figure { width: 104px; height: auto; display: block; }
.fo-iv-figure .body path, .fo-iv-figure .body circle { fill: var(--fo-surface); stroke: var(--fo-line-strong); stroke-width: 1.5; stroke-linejoin: round; }
.fo-iv-figure .hit { fill: var(--fo-danger-soft); stroke: var(--fo-danger); stroke-width: 1.5; stroke-linejoin: round; }
.fo-iv-figure .pin .halo { fill: var(--fo-danger); opacity: 0.16; }
.fo-iv-figure .pin .dot { fill: var(--fo-danger); stroke: var(--fo-surface); stroke-width: 2; }
.fo-iv-bm-cap { font-size: 11.5px; font-weight: 650; color: var(--fo-ink-2); display: inline-flex; align-items: center; gap: 6px; text-align: center; }
.fo-iv-bm-cap .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fo-danger); flex: none; }
.fo-iv-narr { flex: 1; min-width: 0; }

/* body map — original front+back mapping, recolored to royal (readonly = marked regions) */
.fo-bm { flex: none; margin: 0; padding: 16px 16px 14px; display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: var(--fo-surface-2); border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); }
.fo-bm-views { display: flex; gap: 18px; justify-content: center; }
.fo-bm-view { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.fo-bm-h { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fo-ink-3); }
.fo-bm-fig { position: relative; width: 128px; height: 304px; user-select: none; }   /* 160:380 ratio = the original's container, so the mapped regions sit on the body */
.fo-bm-fig img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; opacity: 0.4; }
/* injury highlight: a royal fill masked to the body silhouette, then clipped to the
   injured region — so the colour follows the body's shape instead of a floating box */
.fo-bm-fill { position: absolute; inset: 0; pointer-events: none; background: var(--fo-accent); opacity: 0.6;
  -webkit-mask: url('../img/body-front.png') center / contain no-repeat; mask: url('../img/body-front.png') center / contain no-repeat; }
.fo-bm-cap { font-size: 11.5px; font-weight: 600; color: var(--fo-ink-2); display: inline-flex; align-items: center; gap: 6px; text-align: center; }
.fo-bm-cap .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fo-accent); flex: none; }
.fo-iv-lead { font-size: 14.5px; line-height: 1.55; color: var(--fo-ink); margin: 0; font-weight: 500; }
.fo-iv-body { font-size: 13.5px; line-height: 1.62; color: var(--fo-ink-2); margin: 0; }

/* ── Root cause ── */
.fo-iv-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.fo-chip.is-static { background: var(--fo-surface-2); border: 1px solid var(--fo-line); }
.fo-iv-quote { margin: 0; padding: 11px 15px; border-left: 3px solid var(--fo-accent-sky); background: var(--fo-accent-soft);
  border-radius: 0 var(--fo-r-sm) var(--fo-r-sm) 0; font-size: 13.5px; line-height: 1.55; color: var(--fo-ink); font-style: italic; }
.fo-iv-rcacls { display: flex; gap: 8px; flex-wrap: wrap; }
.fo-iv-cls { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border: 1px solid var(--fo-line); border-radius: 999px;
  background: var(--fo-surface); font: inherit; font-size: 12.5px; font-weight: 600; color: var(--fo-ink-2); cursor: pointer;
  transition: background var(--fo-fast) var(--fo-ease), border-color var(--fo-fast) var(--fo-ease), color var(--fo-fast) var(--fo-ease); }
.fo-iv-cls svg.fo-i { width: 14px; height: 14px; color: var(--fo-ink-3); }
.fo-iv-cls:hover { border-color: var(--fo-line-strong); }
.fo-iv-cls.is-active { background: var(--fo-accent-soft); border-color: transparent; color: var(--fo-accent-deep); }
.fo-iv-cls.is-active svg.fo-i { color: var(--fo-accent); }
.fo-iv-notes { display: flex; flex-direction: column; gap: 15px; }
.fo-iv-note { display: flex; gap: 11px; }
.fo-iv-note-body { flex: 1; min-width: 0; }
.fo-iv-note-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.fo-iv-note-meta b { color: var(--fo-ink); font-weight: 650; }
.fo-iv-note-cat { font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fo-accent-deep);
  background: var(--fo-accent-soft); padding: 1px 7px; border-radius: 999px; }
.fo-iv-note-ts { color: var(--fo-ink-3); font-size: 11.5px; margin-left: auto; }
.fo-iv-note-text { margin: 5px 0 0; font-size: 13px; line-height: 1.55; color: var(--fo-ink-2); }
.fo-iv-note-img { display: block; width: 132px; height: 86px; margin-top: 9px; border-radius: var(--fo-r-sm); border: 1px solid var(--fo-line);
  background: linear-gradient(135deg, #4f7a9e, #0b3f9e); background-size: cover; background-position: center; }

/* root-cause: categories toggle + collaborative threads (one block, compact) */
.fo-iv-rca-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 9px; }
.fo-iv-rca-hint { font-size: 11.5px; color: var(--fo-ink-3); }
.fo-iv-cats { display: flex; gap: 8px; flex-wrap: wrap; }
.fo-iv-threads { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.fo-iv-threads-empty { padding: 22px 16px; text-align: center; font-size: 12.5px; color: var(--fo-ink-3);
  border: 1px dashed var(--fo-line); border-radius: var(--fo-r-md); }
.fo-iv-thread { border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); overflow: hidden; }
.fo-iv-thread-h { display: flex; align-items: center; gap: 8px; padding: 9px 14px; background: var(--fo-surface-2); border-bottom: 1px solid var(--fo-line); }
.fo-iv-thread-h svg.fo-i { width: 14px; height: 14px; color: var(--fo-ink-2); }
.fo-iv-thread-h .lbl { font-size: 12.5px; font-weight: 650; color: var(--fo-ink); }
.fo-iv-thread-h .cnt { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--fo-ink-3); }
.fo-iv-thread-notes { display: flex; flex-direction: column; }
.fo-iv-thread-notes .fo-iv-note { padding: 12px 14px; }
.fo-iv-thread-notes .fo-iv-note + .fo-iv-note { border-top: 1px solid var(--fo-line); }
.fo-iv-thread-empty { padding: 14px; font-size: 12.5px; color: var(--fo-ink-3); }

/* inline composer — one tap to add a finding (+ optional photo) */
.fo-iv-composer { display: flex; align-items: flex-end; gap: 9px; padding: 9px 12px; border-top: 1px solid var(--fo-line); background: var(--fo-surface); }
.fo-iv-composer .fo-ava.is-xs { margin-bottom: 1px; }
.fo-iv-composer-thumb { flex: none; width: 36px; height: 28px; border-radius: 5px; margin-bottom: 1px; border: 1px solid var(--fo-line);
  background: linear-gradient(135deg, #4f7a9e, #0b3f9e); background-size: cover; }
.fo-iv-composer-in { flex: 1; min-width: 0; border: 0; background: none; resize: none; font: inherit; font-size: 13px; line-height: 1.5;
  color: var(--fo-ink); padding: 5px 0; max-height: 120px; overflow-y: auto; }
.fo-iv-composer-in::placeholder { color: var(--fo-ink-3); }
.fo-iv-composer-in:focus { outline: none; }
.fo-iv-composer-photo { flex: none; width: 30px; height: 30px; border-radius: 7px; border: 0; background: none; color: var(--fo-ink-3); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; transition: color var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease); }
.fo-iv-composer-photo:hover { color: var(--fo-accent); background: var(--fo-accent-soft); }
.fo-iv-composer-photo.is-on { color: var(--fo-accent); background: var(--fo-accent-soft); }
.fo-iv-composer-photo svg.fo-i { width: 16px; height: 16px; }
.fo-iv-composer-post { flex: none; padding: 7px 15px; border-radius: 8px; border: 0; background: var(--fo-accent-soft); color: var(--fo-accent-deep);
  font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer; transition: background var(--fo-fast) var(--fo-ease); }
.fo-iv-composer-post:hover { background: rgba(11, 63, 158, 0.16); }

/* ── Checklist ── */
.fo-iv-chk { display: flex; flex-direction: column; gap: 10px; }
.fo-iv-chk-sec { border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); overflow: hidden; }
.fo-iv-chk-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px; border: 0; background: var(--fo-surface-2); font: inherit; cursor: pointer; text-align: left; }
.fo-iv-chk-head .nm { flex: 1; font-size: 13px; font-weight: 650; color: var(--fo-ink); }
.fo-iv-chk-head .chev { width: 16px; height: 16px; color: var(--fo-ink-3); transition: transform var(--fo-base) var(--fo-ease); }
.fo-iv-chk-sec.is-open .fo-iv-chk-head .chev { transform: rotate(180deg); }
.fo-iv-chk-pill { flex: none; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.fo-iv-chk-pill.is-done { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-iv-chk-pill.is-partial { background: var(--fo-accent-soft); color: var(--fo-accent-deep); }
.fo-iv-chk-pill.is-empty { background: var(--fo-surface); color: var(--fo-ink-3); border: 1px solid var(--fo-line); }
.fo-iv-chk-body { display: none; flex-direction: column; padding: 2px 8px 6px; }
.fo-iv-chk-sec.is-open .fo-iv-chk-body { display: flex; }
.fo-iv-chk-row { display: flex; align-items: flex-start; gap: 11px; padding: 10px 4px; }
.fo-iv-chk-row + .fo-iv-chk-row { border-top: 1px solid var(--fo-line); }
.fo-iv-chk-row > div { flex: 1; min-width: 0; }
.fo-iv-chk-box { flex: none; width: 19px; height: 19px; border-radius: 6px; border: 1.5px solid var(--fo-line-strong); display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.fo-iv-chk-box.is-on { background: var(--fo-ok); border-color: var(--fo-ok); }
.fo-iv-chk-box svg.fo-i { width: 12px; height: 12px; color: #fff; }
.fo-iv-chk-label { font-size: 13px; color: var(--fo-ink); line-height: 1.4; }
.fo-iv-chk-row:not(.is-done) .fo-iv-chk-label { color: var(--fo-ink-2); }
.fo-iv-chk-meta { font-size: 11.5px; color: var(--fo-ink-3); margin-top: 3px; }
.fo-iv-chk-tag { flex: none; align-self: center; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--fo-ink-3);
  background: var(--fo-surface-2); padding: 2px 8px; border-radius: 999px; }
.fo-iv-chk-tag svg.fo-i { width: 12px; height: 12px; }
.fo-iv-chk-act { flex: none; align-self: center; font-size: 12px; font-weight: 600; color: var(--fo-accent); cursor: pointer; }
.fo-iv-chk-row { cursor: pointer; border-radius: var(--fo-r-sm); transition: background var(--fo-fast) var(--fo-ease); }
.fo-iv-chk-row:hover { background: var(--fo-surface-2); }
.fo-iv-chk-row:hover .fo-iv-chk-box:not(.is-on) { border-color: var(--fo-accent); }
.fo-iv-chk-row:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--fo-accent-soft); }

/* per-phase discussion — the category-level conversation (reuses note + composer) */
.fo-iv-disc { border-top: 1px solid var(--fo-line); margin-top: 2px; }
.fo-iv-disc-toggle { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 6px; border: 0; background: none; font: inherit; cursor: pointer; }
.fo-iv-disc-toggle > svg.fo-i { width: 14px; height: 14px; color: var(--fo-ink-3); flex: none; }
.fo-iv-disc-toggle .lbl { font-size: 12.5px; font-weight: 600; color: var(--fo-ink-2); }
.fo-iv-disc-toggle .cnt { font-size: 11px; font-weight: 700; color: var(--fo-ink-3); background: var(--fo-surface-2); padding: 1px 7px; border-radius: 999px; }
.fo-iv-disc-toggle .chev { margin-left: auto; width: 15px; height: 15px; transition: transform var(--fo-base) var(--fo-ease); }
.fo-iv-disc.is-open .fo-iv-disc-toggle .chev { transform: rotate(180deg); }
.fo-iv-disc-toggle:hover .lbl, .fo-iv-disc-toggle:hover > svg.fo-i { color: var(--fo-accent); }
.fo-iv-disc-body { display: none; padding-bottom: 4px; }
.fo-iv-disc.is-open .fo-iv-disc-body { display: block; }
.fo-iv-disc-body .fo-iv-note { padding: 10px 6px; }
.fo-iv-disc-body .fo-iv-note + .fo-iv-note { border-top: 1px solid var(--fo-line); }
.fo-iv-disc-body .fo-iv-composer { padding: 9px 6px; }

/* ── Corrective actions ── */
.fo-iv-capas { display: flex; flex-direction: column; gap: 12px; }
.fo-iv-capa { border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); padding: 14px 16px; }
.fo-iv-capa.is-done { background: var(--fo-surface-2); }
.fo-iv-capa-top { display: flex; align-items: flex-start; gap: 12px; }
.fo-iv-capa-title { flex: 1; font-size: 13.5px; font-weight: 650; color: var(--fo-ink); line-height: 1.4; }
.fo-iv-capa.is-done .fo-iv-capa-title { color: var(--fo-ink-2); }
.fo-iv-capa-badges { flex: none; display: flex; gap: 6px; align-items: center; }
.fo-iv-prio { font-size: 10px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; }
.fo-iv-prio.is-high { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-iv-prio.is-med { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-iv-prio.is-low { background: var(--fo-surface-2); color: var(--fo-ink-3); }
.fo-iv-capa-st { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 650; padding: 3px 10px; border-radius: 999px; }
.fo-iv-capa-st.is-open { background: var(--fo-surface-2); color: var(--fo-ink-2); border: 1px solid var(--fo-line); }
.fo-iv-capa-st.is-progress { background: var(--fo-accent-soft); color: var(--fo-accent-deep); }
.fo-iv-capa-st.is-complete { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-iv-capa-st svg.fo-i { width: 12px; height: 12px; }
.fo-iv-capa-desc { margin: 9px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--fo-ink-2); }
.fo-iv-capa-foot { display: flex; align-items: center; gap: 14px; margin-top: 11px; flex-wrap: wrap; }
.fo-iv-capa-who { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--fo-ink-2); }
.fo-iv-capa-due { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--fo-ink-3); }
.fo-iv-capa-due svg.fo-i { width: 13px; height: 13px; }
.fo-iv-capa-due.is-ok { color: var(--fo-ok); }
.fo-ava.is-xs { width: 24px; height: 24px; font-size: 9.5px; }

/* ── Attachments ── */
.fo-iv-atts { display: grid; grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); gap: 12px; }
.fo-iv-att { position: relative; display: flex; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); overflow: hidden; cursor: pointer;
  text-decoration: none; aspect-ratio: 4 / 3; transition: border-color var(--fo-fast) var(--fo-ease), box-shadow var(--fo-fast) var(--fo-ease); }
.fo-iv-att:hover { border-color: var(--fo-line-strong); box-shadow: var(--fo-shadow-1); }
.fo-iv-att.is-img { background-image: var(--bg, none); background-size: cover; background-position: center; flex-direction: column; justify-content: flex-end; } /* --bg is set inline per-thumbnail; fallback keeps the orphan checker honest now that the legacy CSS that once defined it is deleted */
.fo-iv-att.is-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 42%, rgba(20, 24, 33, 0.6)); }
.fo-iv-att-tag { position: absolute; top: 8px; left: 8px; z-index: 1; font-size: 10px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase;
  color: #fff; background: rgba(20, 24, 33, 0.42); padding: 2px 8px; border-radius: 999px; }
.fo-iv-att-cap { position: relative; z-index: 1; padding: 9px 11px; font-size: 12px; font-weight: 600; color: #fff; }
.fo-iv-att.is-file { flex-direction: column; gap: 9px; padding: 14px; background: var(--fo-surface); justify-content: center; }
.fo-iv-att-ico { width: 36px; height: 36px; border-radius: 9px; background: var(--fo-accent-soft); display: inline-flex; align-items: center; justify-content: center; }
.fo-iv-att-ico svg.fo-i { width: 18px; height: 18px; color: var(--fo-accent); }
.fo-iv-att-name { font-size: 12px; font-weight: 650; color: var(--fo-ink); line-height: 1.35; }
.fo-iv-att-sub { font-size: 11px; color: var(--fo-ink-3); }

/* ── People & witnesses ── */
.fo-iv-people { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.fo-iv-person { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); }
.fo-iv-person-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fo-iv-person-info b { font-size: 13px; font-weight: 650; color: var(--fo-ink); }
.fo-iv-person-info span { font-size: 11.5px; color: var(--fo-ink-3); }
.fo-ava.is-ext { background: var(--fo-surface-2); color: var(--fo-ink-2); }
.fo-iv-tag { flex: none; font-size: 11px; font-weight: 650; padding: 3px 10px; border-radius: 999px; background: var(--fo-surface-2); color: var(--fo-ink-2); }
.fo-iv-tag.is-injured { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-iv-tag.is-ext { background: var(--fo-surface-2); color: var(--fo-ink-3); }

/* ── Rows (equipment / references) ── */
.fo-iv-hint { font-size: 12.5px; color: var(--fo-ink-3); margin: 0 0 14px; }
.fo-iv-rows { display: flex; flex-direction: column; gap: 8px; }
.fo-iv-row { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); }
.fo-iv-row.is-link { cursor: pointer; transition: border-color var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease); }
.fo-iv-row.is-link:hover { border-color: var(--fo-accent); background: var(--fo-accent-soft); }
/* A restricted row: present, legible, not openable (WC confidential medical files). */
.fo-iv-row.is-locked { cursor: not-allowed; border-style: dashed; background: var(--fo-surface-2); }
.fo-iv-row.is-locked .fo-iv-row-main b { color: var(--fo-ink-2); }
.fo-iv-row-ico { flex: none; width: 34px; height: 34px; border-radius: 9px; background: var(--fo-surface-2); display: inline-flex; align-items: center; justify-content: center; }
.fo-iv-row-ico svg.fo-i { width: 16px; height: 16px; color: var(--fo-ink-2); }
.fo-iv-row-ico.is-alert { background: var(--fo-danger-soft); }
.fo-iv-row-ico.is-alert svg.fo-i { color: var(--fo-danger); }
.fo-iv-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fo-iv-row-main b { font-size: 13px; font-weight: 650; color: var(--fo-ink); }
.fo-iv-row-main span { font-size: 11.5px; color: var(--fo-ink-3); }
.fo-iv-row-go { flex: none; color: var(--fo-ink-3); display: inline-flex; }
.fo-iv-row-go svg.fo-i { width: 16px; height: 16px; }
.fo-iv-ref-pill { flex: none; min-width: 70px; text-align: center; font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--fo-accent-deep); background: var(--fo-accent-soft); padding: 4px 9px; border-radius: 6px; }

/* ── Activity (reuses .fo-tl-*) ── */
.fo-iv-log .fo-tl-entry:last-child { padding-bottom: 0; }

/* ── Right rail ── */
.fo-iv-aside { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 16px; }
.fo-iv-facts-h, .fo-iv-tools-h { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fo-ink-3); margin-bottom: 12px; }
.fo-iv-fact { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-top: 1px solid var(--fo-line); }
.fo-iv-fact:first-of-type { border-top: 0; padding-top: 0; }
.fo-iv-fact .k { flex: none; width: 92px; font-size: 12px; color: var(--fo-ink-3); }
.fo-iv-fact .v { flex: 1; font-size: 12.5px; font-weight: 600; color: var(--fo-ink); text-align: right; }

.fo-iv-prog { display: flex; align-items: center; gap: 16px; }
.fo-iv-prog-ring { position: relative; width: 60px; height: 60px; flex: none; }
.fo-iv-prog-ring svg { width: 60px; height: 60px; transform: rotate(-90deg); }
.fo-iv-prog-ring .track { fill: none; stroke: var(--fo-line); stroke-width: 6; }
.fo-iv-prog-ring .fill { fill: none; stroke: var(--fo-accent); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 0.6s var(--fo-ease); }
.fo-iv-prog-ring .pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--fo-font-display); font-size: 16px; font-weight: 750; color: var(--fo-ink); }
.fo-iv-prog-ring .pct i { font-style: normal; font-size: 10px; font-weight: 600; color: var(--fo-ink-3); margin-left: 1px; }
.fo-iv-prog-ttl { font-size: 13px; font-weight: 650; color: var(--fo-ink); }
.fo-iv-prog-sub { font-size: 12px; color: var(--fo-ink-3); margin-top: 3px; }
.fo-iv-prog-sub b.is-alert { color: var(--fo-danger); }

.fo-iv-pattern { background: var(--fo-warn-soft); border-color: rgba(161, 98, 7, 0.22); }
.fo-iv-pattern-h { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--fo-warn); margin-bottom: 7px; }
.fo-iv-pattern-h svg.fo-i { width: 15px; height: 15px; color: var(--fo-warn); }
.fo-iv-pattern p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--fo-ink-2); }
.fo-iv-pattern p b { color: var(--fo-ink); }

/* slim status block at the top of the inspector — discreet but visible progress + pattern */
.fo-iv-status { display: flex; flex-direction: column; gap: 12px; }
.fo-iv-aside > .fo-iv-status { padding-bottom: 14px; border-bottom: 1px solid var(--fo-line); margin-bottom: 2px; }
.fo-iv-prog2-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.fo-iv-prog2-row .lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fo-ink-3); }
.fo-iv-prog2-row .pct { font-family: var(--fo-font-display); font-size: 15px; font-weight: 750; color: var(--fo-ink); font-variant-numeric: tabular-nums; line-height: 1; }
.fo-iv-prog2-bar { height: 6px; border-radius: 99px; background: var(--fo-line); overflow: hidden; margin: 8px 0 7px; }
.fo-iv-prog2-bar > span { display: block; height: 100%; border-radius: 99px; background: var(--fo-accent); transition: width 0.5s var(--fo-ease); }
.fo-iv-prog2-sub { font-size: 11.5px; color: var(--fo-ink-3); }
.fo-iv-pat { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; background: var(--fo-warn-soft);
  border: 1px solid rgba(161, 98, 7, 0.2); border-radius: var(--fo-r-md); }
.fo-iv-pat svg.fo-i { width: 15px; height: 15px; color: var(--fo-warn); flex: none; margin-top: 1px; }
.fo-iv-pat span { font-size: 12px; line-height: 1.45; color: var(--fo-ink-2); }
.fo-iv-pat b { color: var(--fo-ink); font-weight: 650; }

/* ── GUIDED layout: stage spine + one next-step (shown only when .is-guided) ── */
.fo-iv-guide { display: none; }
.fo-iv-grid.is-guided .fo-iv-aside > .fo-iv-guide {
  display: flex; flex-direction: column; gap: 13px; padding-bottom: 14px; border-bottom: 1px solid var(--fo-line); margin-bottom: 2px;
}
.fo-iv-spine-rail { display: flex; align-items: center; }
.fo-iv-spine-node { width: 9px; height: 9px; border-radius: 50%; flex: none; box-sizing: border-box; background: var(--fo-surface); border: 1.5px solid var(--fo-line-strong); }
.fo-iv-spine-node.is-done { background: var(--fo-accent); border-color: var(--fo-accent); }
.fo-iv-spine-node.is-now { width: 11px; height: 11px; border-color: var(--fo-accent); background: var(--fo-surface); box-shadow: 0 0 0 3px var(--fo-accent-soft); }
.fo-iv-spine-line { flex: 1; height: 2px; background: var(--fo-line); }
.fo-iv-spine-line.is-done { background: var(--fo-accent); }
.fo-iv-spine-cap { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 9px; }
.fo-iv-spine-cap .now { font-size: 12.5px; font-weight: 700; color: var(--fo-accent-deep); }
.fo-iv-spine-cap .step { font-size: 11px; color: var(--fo-ink-3); }

.fo-iv-next { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer; font: inherit;
  background: var(--fo-accent-soft); border: 0; border-radius: var(--fo-r-md); padding: 11px 13px;
  transition: background var(--fo-fast) var(--fo-ease); }
.fo-iv-next:hover { background: rgba(11, 63, 158, 0.14); }
.fo-iv-next.is-ready { background: var(--fo-ok-soft); }
.fo-iv-next-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fo-iv-next .eyebrow { font-size: 9px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--fo-accent); }
.fo-iv-next.is-ready .eyebrow { color: var(--fo-ok); }
.fo-iv-next .verb { font-size: 13px; font-weight: 650; color: var(--fo-ink); line-height: 1.3; }
.fo-iv-next .sub { font-size: 11px; color: var(--fo-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-iv-next .go { width: 16px; height: 16px; color: var(--fo-accent); flex: none; }
.fo-iv-next.is-ready .go { color: var(--fo-ok); }

/* a single quiet rail marker on the item the next-step points to (guided only) */
.fo-iv-grid.is-guided .fo-iv-rail-item.is-now .fo-iv-rail-pill { box-shadow: 0 0 0 1.5px var(--fo-accent); color: var(--fo-accent-deep); }
.fo-iv-grid.is-guided .fo-iv-rail-item.is-now::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--fo-accent); flex: none; }

.fo-iv-tool { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-sm);
  background: var(--fo-surface); font: inherit; font-size: 12.5px; font-weight: 600; color: var(--fo-ink); cursor: pointer; text-align: left;
  transition: border-color var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease); }
.fo-iv-tool + .fo-iv-tool { margin-top: 8px; }
.fo-iv-tool svg.fo-i { width: 15px; height: 15px; color: var(--fo-ink-3); flex: none; }
.fo-iv-tool .go { margin-left: auto; width: 14px; height: 14px; }
.fo-iv-tool:hover { border-color: var(--fo-accent); background: var(--fo-accent-soft); }
.fo-iv-tool:hover svg.fo-i { color: var(--fo-accent); }
.fo-iv-tool.is-danger { color: var(--fo-danger); }
.fo-iv-tool.is-danger svg.fo-i { color: var(--fo-danger); }
.fo-iv-tool.is-danger:hover { border-color: var(--fo-danger); background: var(--fo-danger-soft); }

/* ── Responsive ── */
@media (max-width: 1080px) {
  .fo-iv-grid { grid-template-columns: minmax(0, 1fr); }
  .fo-iv-rail { position: static; flex-direction: row; gap: 6px; overflow-x: auto; margin: 0 -2px; padding: 0 2px 6px; scrollbar-width: none; }
  .fo-iv-rail::-webkit-scrollbar { display: none; }
  .fo-iv-rail-grp { display: flex; gap: 6px; flex: none; }
  .fo-iv-rail-h { display: none; }
  .fo-iv-rail-item { flex: 0 0 auto; white-space: nowrap; padding: 8px 14px; }
  .fo-iv-rail-item.is-active::before { display: none; }
  .fo-iv-rail-item > span:not(.fo-iv-rail-pill) { flex: none; }
  .fo-iv-aside { position: static; }
}
@media (max-width: 560px) {
  .fo-iv-event { flex-direction: column; align-items: stretch; }
  .fo-bm { align-self: center; }
  .fo-iv-case-actions { width: 100%; }
  .fo-iv-case-actions .fo-btn { flex: 1; justify-content: center; }
}

/* ── WORKSPACE PANEL (the Guided layout's shell) ───────────────────────────
   The 3 columns are one bordered frame, equal-height, scrolling internally —
   kills the ragged void under short sections. Desktop only; phones stack. */

@media (min-width: 1081px) {
  .fo-iv-grid.is-workspace {
    gap: 0;
    height: clamp(540px, calc(100vh - 288px), 920px);
    border: 1px solid var(--fo-line);
    border-radius: var(--fo-r-lg);
    background: var(--fo-surface);
    box-shadow: var(--fo-shadow-1);
    overflow: hidden;
  }
  .fo-iv-grid.is-workspace > .fo-iv-rail,
  .fo-iv-grid.is-workspace > .fo-iv-aside {
    position: static; top: auto; height: 100%; overflow-y: auto;
  }
  .fo-iv-grid.is-workspace > .fo-iv-rail { border-right: 1px solid var(--fo-line); padding: 18px 12px; }
  .fo-iv-grid.is-workspace > .fo-iv-aside { border-left: 1px solid var(--fo-line); padding: 6px 16px; gap: 0; }
  .fo-iv-grid.is-workspace > .fo-iv-main { height: 100%; overflow-y: auto; }
  /* reading pane: the active section fills the pane without its own frame */
  .fo-iv-grid.is-workspace > .fo-iv-main > .fo-iv-sec > .fo-card { border: 0; box-shadow: none; border-radius: 0; }
  /* inspector: flat hairline-divided sections (no card-in-column double frame) */
  .fo-iv-grid.is-workspace > .fo-iv-aside > .fo-card { border: 0; box-shadow: none; background: none; border-radius: 0; padding: 16px 0; }
  .fo-iv-grid.is-workspace > .fo-iv-aside > .fo-card + .fo-card { border-top: 1px solid var(--fo-line); }
  .fo-iv-grid.is-workspace > .fo-iv-aside > .fo-iv-pattern { background: var(--fo-warn-soft); border: 1px solid rgba(161, 98, 7, 0.22); border-radius: var(--fo-r-md); padding: 13px 14px; margin: 14px 0; }
  .fo-iv-grid.is-workspace > .fo-iv-aside > .fo-iv-pattern + .fo-card { border-top: 0; }
  /* thin, unobtrusive scrollbars inside the panes */
  .fo-iv-grid.is-workspace > .fo-iv-rail::-webkit-scrollbar,
  .fo-iv-grid.is-workspace > .fo-iv-main::-webkit-scrollbar,
  .fo-iv-grid.is-workspace > .fo-iv-aside::-webkit-scrollbar { width: 9px; }
  .fo-iv-grid.is-workspace > .fo-iv-rail::-webkit-scrollbar-thumb,
  .fo-iv-grid.is-workspace > .fo-iv-main::-webkit-scrollbar-thumb,
  .fo-iv-grid.is-workspace > .fo-iv-aside::-webkit-scrollbar-thumb { background: var(--fo-line-strong); border-radius: 99px; border: 3px solid var(--fo-surface); }
}

/* ════════════════════════════════════════════════════════════════════════
   JOB HAZARD ANALYSIS — the working sheet (Safety pattern)
   The approved plan (steps · hazards · controls) plus the daily crew sign-on
   ritual. Reuses the incident-view case bar; everything else is .fo-jha-*.
   ════════════════════════════════════════════════════════════════════════ */

.fo-jha-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.fo-jha-main, .fo-jha-aside { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 1081px) { .fo-jha-aside { position: sticky; top: 20px; } }
@media (max-width: 1080px) { .fo-jha-grid { grid-template-columns: 1fr; } }

/* status badge in the case bar */
.fo-jha-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.fo-jha-badge .dot { width: 7px; height: 7px; border-radius: 50%; }
.fo-jha-badge.is-active { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-jha-badge.is-active .dot { background: var(--fo-ok); }
.fo-jha-badge.is-draft { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-jha-badge.is-draft .dot { background: var(--fo-warn); }
.fo-jha-badge.is-archived { background: var(--fo-canvas); color: var(--fo-ink-3); }
.fo-jha-badge.is-archived .dot { background: var(--fo-ink-3); }

/* born-from-incident chip */
.fo-jha-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 7px; font-size: 11px; font-weight: 700;
  text-decoration: none; border: 1px solid rgba(179, 38, 30, 0.24); background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-jha-chip svg.fo-i { width: 12px; height: 12px; }
.fo-jha-chip:hover { border-color: var(--fo-danger); }

/* ── Daily sign-on ritual ────────────────────────────────────────────── */
.fo-jha-today { border: 1px solid var(--fo-line-strong); border-radius: var(--fo-r-lg); background: var(--fo-surface); padding: 16px 18px; box-shadow: 0 1px 2px rgba(24, 27, 33, 0.04); }
.fo-jha-today-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.fo-jha-today-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fo-accent); }
.fo-jha-today-eyebrow svg.fo-i { width: 13px; height: 13px; }
.fo-jha-today-date { font-family: var(--fo-font-display); font-size: 17px; font-weight: 700; color: var(--fo-ink); margin-top: 5px; letter-spacing: -0.01em; }
.fo-jha-today-sub { font-size: 12.5px; color: var(--fo-ink-2); margin-top: 2px; }
.fo-jha-today-sub b { color: var(--fo-ink); font-weight: 700; }

.fo-jha-roster { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.fo-jha-ava { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; flex: none; }
.fo-jha-ava.is-signed { background: var(--fo-accent); color: #fff; }
.fo-jha-ava.is-pending { background: var(--fo-surface); color: var(--fo-ink-3); border: 1.5px dashed var(--fo-line-strong); }

/* inline signature pad */
.fo-jha-pad { margin-top: 16px; border-top: 1px solid var(--fo-line); padding-top: 14px; }
.fo-jha-pad-who { font-size: 12.5px; color: var(--fo-ink-2); margin-bottom: 8px; }
.fo-jha-pad-who b { color: var(--fo-ink); font-weight: 650; }
.fo-jha-pad-wrap { position: relative; border: 1.5px dashed var(--fo-line-strong); border-radius: var(--fo-r-md); background: var(--fo-surface-2); overflow: hidden; }
.fo-jha-pad-wrap.is-signed { border-style: solid; border-color: var(--fo-accent); background: #fff; }
.fo-jha-pad-canvas { display: block; width: 100%; height: 120px; touch-action: none; cursor: crosshair; }
.fo-jha-pad-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 600; color: var(--fo-ink-3); pointer-events: none; }
.fo-jha-pad-wrap.is-signed .fo-jha-pad-hint { display: none; }
.fo-jha-pad-clear { position: absolute; top: 8px; right: 8px; padding: 3px 10px; border: 1px solid var(--fo-line-strong); border-radius: 7px; background: #fff; font-size: 11px; font-weight: 700; color: var(--fo-ink-2); cursor: pointer; }
.fo-jha-pad-clear:hover { border-color: var(--fo-ink-3); color: var(--fo-ink); }
.fo-jha-pad-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }

/* "Signed on" confirmed button state */
.fo-btn.is-done { background: var(--fo-ok-soft); color: var(--fo-ok); border-color: transparent; cursor: default; }
.fo-btn.is-done:hover { background: var(--fo-ok-soft); }

/* ── The plan ────────────────────────────────────────────────────────── */
.fo-jha-legend { margin-left: auto; display: inline-flex; gap: 14px; font-size: 11px; font-weight: 600; color: var(--fo-ink-3); }
.fo-jha-legend span { display: inline-flex; align-items: center; gap: 5px; }
.fo-jha-legend span::before { content: ''; width: 7px; height: 7px; border-radius: 50%; }
.fo-jha-legend .h::before { background: var(--fo-danger); }
.fo-jha-legend .c::before { background: var(--fo-ok); }
.fo-jha-task { font-size: 13px; line-height: 1.6; color: var(--fo-ink-2); margin: 11px 0 2px; max-width: 70ch; }

.fo-jha-steps { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.fo-jha-step { display: flex; gap: 14px; padding: 14px 16px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); background: var(--fo-surface-2); }
.fo-jha-step-n { width: 26px; height: 26px; flex: none; border-radius: 8px; background: var(--fo-accent-soft); color: var(--fo-accent-deep); font-family: var(--fo-font-display); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.fo-jha-step-body { flex: 1; min-width: 0; }
.fo-jha-step-task { font-size: 13.5px; font-weight: 650; color: var(--fo-ink); line-height: 1.4; padding-top: 3px; }
.fo-jha-step-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 11px; }
@media (max-width: 560px) { .fo-jha-step-cols { grid-template-columns: 1fr; gap: 12px; } }
.fo-jha-col-h { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fo-ink-3); margin-bottom: 8px; }
.fo-jha-col-h svg.fo-i { width: 12px; height: 12px; }
.fo-jha-hz .fo-jha-col-h { color: var(--fo-danger); }
.fo-jha-ct .fo-jha-col-h { color: var(--fo-ok); }
.fo-jha-step ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fo-jha-step li { position: relative; padding-left: 15px; font-size: 12.5px; line-height: 1.45; color: var(--fo-ink-2); }
.fo-jha-step li::before { content: ''; position: absolute; left: 0; top: 6px; width: 6px; height: 6px; border-radius: 50%; }
.fo-jha-hz li::before { background: var(--fo-danger); }
.fo-jha-ct li::before { background: var(--fo-ok); }

/* ── Aside ───────────────────────────────────────────────────────────── */
.fo-jha-aside-h { display: flex; align-items: center; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fo-ink-3); margin-bottom: 12px; }
.fo-jha-aside-h .cnt { margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--fo-accent); text-transform: none; letter-spacing: 0; font-variant-numeric: tabular-nums; }

/* today's crew — the named record */
.fo-jha-crewrow { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-top: 1px solid var(--fo-line); }
.fo-jha-crewrow:first-child { border-top: 0; padding-top: 0; }
.fo-jha-crewrow .nm { display: flex; align-items: center; gap: 5px; flex: 1; min-width: 0; }
.fo-jha-crewrow .nmt { font-size: 13px; font-weight: 600; color: var(--fo-ink); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-jha-crewrow.is-pending .nmt { color: var(--fo-ink-3); font-weight: 500; }
.fo-jha-crewrow .you { flex: none; font-size: 9.5px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--fo-accent); background: var(--fo-accent-soft); padding: 1px 6px; border-radius: 999px; }
.fo-jha-crewrow .tm { flex: none; font-size: 11.5px; color: var(--fo-ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fo-ava.is-ghost { background: var(--fo-surface-2); color: var(--fo-ink-3); border: 1px dashed var(--fo-line-strong); }
.fo-jha-tick { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-jha-tick svg.fo-i { width: 11px; height: 11px; }
.fo-jha-sig { flex: none; height: 20px; max-width: 42px; object-fit: contain; }

/* plan details */
.fo-jha-fact { display: flex; align-items: baseline; gap: 12px; padding: 7px 0; border-top: 1px solid var(--fo-line); font-size: 12.5px; }
.fo-jha-fact:first-of-type { border-top: 0; padding-top: 0; }
.fo-jha-fact .k { color: var(--fo-ink-3); flex: none; }
.fo-jha-fact .v { color: var(--fo-ink); font-weight: 600; text-align: right; margin-left: auto; }
.fo-jha-fact .v a { color: var(--fo-danger); text-decoration: none; font-weight: 700; }
.fo-jha-fact .v a:hover { text-decoration: underline; }

/* history + tools */
.fo-jha-tools { gap: 0; }
.fo-jha-tool { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 10px; border: 0; border-radius: 10px; background: transparent; font-size: 13px; font-weight: 600; color: var(--fo-ink); cursor: pointer; text-align: left; font-family: inherit; }
.fo-jha-tool + .fo-jha-tool { border-top: 1px solid var(--fo-line); border-radius: 0; }
.fo-jha-tool:hover { background: var(--fo-surface-2); }
.fo-jha-tool > svg.fo-i:first-child { width: 15px; height: 15px; color: var(--fo-ink-3); flex: none; }
.fo-jha-tool .sub { margin-left: auto; font-size: 11.5px; font-weight: 500; color: var(--fo-ink-3); }
.fo-jha-tool .go { width: 13px; height: 13px; color: var(--fo-ink-3); margin-left: 8px; }
.fo-jha-tool .sub + .go { margin-left: 8px; }
.fo-jha-tool:not(:has(.sub)) .go { margin-left: auto; }
.fo-jha-tool.is-danger { color: var(--fo-danger); }
.fo-jha-tool.is-danger > svg.fo-i:first-child { color: var(--fo-danger); }

/* ════════════════════════════════════════════════════════════════════════
   JHA BUILDER — steps + hazard-library rail (/jha/new)
   ════════════════════════════════════════════════════════════════════════ */

.fo-jhb-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
@media (max-width: 1080px) { .fo-jhb-grid { grid-template-columns: 1fr; } }
.fo-jhb-form { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* section number in the card title */
.fo-jhb-snum { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 7px; background: var(--fo-accent-soft); color: var(--fo-accent-deep); font-family: var(--fo-font-display); font-weight: 700; font-size: 12px; flex: none; }
.fo-jhb-hint { margin-left: auto; font-size: 11.5px; font-weight: 500; color: var(--fo-ink-3); }
.fo-jhb-req { color: var(--fo-danger); }

/* post-incident banner */
.fo-jhb-banner { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border: 1px solid rgba(179, 38, 30, 0.22); border-left: 3px solid var(--fo-danger); border-radius: var(--fo-r-md); background: var(--fo-danger-soft); }
.fo-jhb-banner > svg.fo-i { width: 17px; height: 17px; color: var(--fo-danger); flex: none; margin-top: 1px; }
.fo-jhb-banner .t { font-size: 13px; font-weight: 650; color: var(--fo-ink); }
.fo-jhb-banner .t a { color: var(--fo-danger); text-decoration: none; }
.fo-jhb-banner .t a:hover { text-decoration: underline; }
.fo-jhb-banner .d { font-size: 12.5px; color: var(--fo-ink-2); margin-top: 3px; line-height: 1.5; }

/* §1 task fields */
.fo-jhb-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.fo-jhb-span { grid-column: 1 / -1; }
@media (max-width: 560px) { .fo-jhb-fields { grid-template-columns: 1fr; } }

/* §2 step cards */
.fo-jhb-steps { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.fo-jhb-step { border: 1px solid var(--fo-line); border-left: 3px solid var(--fo-line-strong); border-radius: var(--fo-r-md); background: var(--fo-surface-2); padding: 14px 16px; transition: border-color var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease), box-shadow var(--fo-fast) var(--fo-ease); }
.fo-jhb-step.is-active { border-left-color: var(--fo-accent); background: var(--fo-surface); box-shadow: 0 1px 3px rgba(24, 27, 33, 0.06); }
.fo-jhb-step.is-flash { box-shadow: 0 0 0 3px var(--fo-accent-soft); }
.fo-jhb-step-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.fo-jhb-step-n { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fo-accent); }
.fo-jhb-step-rm { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border: 0; border-radius: 7px; background: transparent; color: var(--fo-ink-3); cursor: pointer; transition: background var(--fo-fast) var(--fo-ease), color var(--fo-fast) var(--fo-ease); }
.fo-jhb-step-rm:hover { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-jhb-step-rm svg.fo-i { width: 14px; height: 14px; }
.fo-jhb-task { font-weight: 600; }
.fo-jhb-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }
@media (max-width: 560px) { .fo-jhb-cols { grid-template-columns: 1fr; gap: 12px; } }
.fo-jhb-col-h { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fo-ink-3); margin-bottom: 8px; }
.fo-jhb-col-h svg.fo-i { width: 12px; height: 12px; }
.fo-jhb-col-h.is-hz { color: var(--fo-danger); }
.fo-jhb-col-h.is-ct { color: var(--fo-ok); }

/* hazard/control line lists */
.fo-jhb-lines { list-style: none; margin: 0 0 7px; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.fo-jhb-line { display: flex; align-items: flex-start; gap: 8px; padding: 6px 8px 6px 9px; border-radius: 8px; background: var(--fo-surface); border: 1px solid var(--fo-line); }
.fo-jhb-line .dot { width: 6px; height: 6px; border-radius: 50%; flex: none; margin-top: 6px; }
.fo-jhb-line .dot.is-hz { background: var(--fo-danger); }
.fo-jhb-line .dot.is-ct { background: var(--fo-ok); }
.fo-jhb-line .tx { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.4; color: var(--fo-ink); }
.fo-jhb-line .x { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border: 0; border-radius: 5px; background: transparent; color: var(--fo-ink-3); cursor: pointer; opacity: 0; transition: opacity var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease), color var(--fo-fast) var(--fo-ease); }
.fo-jhb-line:hover .x { opacity: 1; }
.fo-jhb-line .x:hover { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-jhb-line .x svg.fo-i { width: 11px; height: 11px; }
.fo-jhb-addline { width: 100%; padding: 6px 10px; border: 1px dashed var(--fo-line-strong); border-radius: 8px; background: transparent; font: inherit; font-size: 12px; color: var(--fo-ink); transition: border-color var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease); }
.fo-jhb-addline::placeholder { color: var(--fo-ink-3); }
.fo-jhb-addline:focus { outline: none; border-style: solid; border-color: var(--fo-accent); background: var(--fo-surface); box-shadow: 0 0 0 3px var(--fo-accent-soft); }

/* add step */
.fo-jhb-addstep { display: inline-flex; align-items: center; gap: 7px; align-self: flex-start; margin-top: 12px; padding: 9px 16px; border: 1.5px dashed var(--fo-line-strong); border-radius: 10px; background: transparent; font-family: inherit; font-size: 12.5px; font-weight: 650; color: var(--fo-ink-2); cursor: pointer; transition: border-color var(--fo-fast) var(--fo-ease), color var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease); }
.fo-jhb-addstep:hover { border-color: var(--fo-accent); color: var(--fo-accent); background: var(--fo-accent-soft); }
.fo-jhb-addstep svg.fo-i { width: 14px; height: 14px; }

/* actions */
.fo-jhb-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ── hazard library rail ── */
.fo-jhb-lib { border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); background: var(--fo-surface); padding: 16px; }
@media (min-width: 1081px) { .fo-jhb-lib { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow-y: auto; } }
.fo-jhb-lib-h { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--fo-ink); }
.fo-jhb-lib-h svg.fo-i { width: 15px; height: 15px; color: var(--fo-accent); }
.fo-jhb-lib-sub { font-size: 11.5px; line-height: 1.5; color: var(--fo-ink-2); margin: 7px 0 10px; }
.fo-jhb-lib-sub b { color: var(--fo-ink); font-weight: 650; }
.fo-jhb-lib-cat { border-top: 1px solid var(--fo-line); }
.fo-jhb-lib-cat summary { display: flex; align-items: center; gap: 7px; padding: 10px 2px; font-size: 12px; font-weight: 700; color: var(--fo-ink); cursor: pointer; list-style: none; user-select: none; }
.fo-jhb-lib-cat summary::-webkit-details-marker { display: none; }
.fo-jhb-lib-cat summary .chev { width: 13px; height: 13px; color: var(--fo-ink-3); transition: transform var(--fo-fast) var(--fo-ease); flex: none; }
.fo-jhb-lib-cat[open] summary .chev { transform: rotate(90deg); }
.fo-jhb-lib-cat summary .n { margin-left: auto; font-size: 10.5px; font-weight: 700; color: var(--fo-ink-3); background: var(--fo-surface-2); border: 1px solid var(--fo-line); border-radius: 999px; padding: 1px 8px; }
.fo-jhb-lib-items { padding-bottom: 6px; }
.fo-jhb-lib-item { border: 1px solid var(--fo-line); border-radius: 10px; padding: 10px 11px; margin-bottom: 8px; background: var(--fo-surface-2); }
.fo-jhb-lib-hz { font-size: 12px; font-weight: 650; color: var(--fo-ink); line-height: 1.4; }
.fo-jhb-lib-ct { margin: 6px 0 9px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; }
.fo-jhb-lib-ct li { position: relative; padding-left: 13px; font-size: 11px; line-height: 1.4; color: var(--fo-ink-2); }
.fo-jhb-lib-ct li::before { content: ''; position: absolute; left: 0; top: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--fo-ok); }
.fo-jhb-lib-ins { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border: 1px solid var(--fo-line-strong); border-radius: 8px; background: var(--fo-surface); font-family: inherit; font-size: 11px; font-weight: 700; color: var(--fo-accent-deep); cursor: pointer; transition: border-color var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease); }
.fo-jhb-lib-ins:hover { border-color: var(--fo-accent); background: var(--fo-accent-soft); }
.fo-jhb-lib-ins.is-done { border-color: transparent; background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-jhb-lib-ins svg.fo-i { width: 12px; height: 12px; }

/* ════════════════════════════════════════════════════════════════════════
   INSPECTIONS — the inspection run (Safety pattern)
   A working sheet: walk the checklist (pass / fail / N-A), capture the defect
   a fail opens (note · photos · corrective action), watch the result compute
   live, then sign off. Reuses the case bar and the signature-pad ritual.
   Result colour stays semantic: pass→ok green · fail→danger · pending→neutral.
   ════════════════════════════════════════════════════════════════════════ */

.fo-insp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.fo-insp-main, .fo-insp-aside { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 1081px) { .fo-insp-aside { position: sticky; top: 20px; } }
@media (max-width: 1080px) { .fo-insp-grid { grid-template-columns: 1fr; } }

/* status badge in the case bar — mirrors the live verdict */
.fo-insp-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 650; white-space: nowrap; background: var(--fo-canvas); color: var(--fo-ink-2); }
.fo-insp-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--fo-ink-3); }
.fo-insp-badge.is-progress { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-insp-badge.is-progress .dot { background: var(--fo-warn); }
.fo-insp-badge.is-pass { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-insp-badge.is-pass .dot { background: var(--fo-ok); }
.fo-insp-badge.is-fail { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-insp-badge.is-fail .dot { background: var(--fo-danger); }

/* frequency chip */
.fo-insp-freq { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 650; color: var(--fo-ink-2); background: var(--fo-surface-2); border: 1px solid var(--fo-line); }
.fo-insp-freq svg.fo-i { width: 12px; height: 12px; color: var(--fo-ink-3); }

/* ── Live run header ──────────────────────────────────────────────────── */
.fo-insp-run { border: 1px solid var(--fo-line-strong); border-radius: var(--fo-r-lg); background: var(--fo-surface); padding: 16px 18px; box-shadow: 0 1px 2px rgba(24, 27, 33, 0.04); }
.fo-insp-run-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.fo-insp-verdict .lbl { display: inline-flex; align-items: center; gap: 8px; font-family: var(--fo-font-display); font-size: 21px; font-weight: 750; letter-spacing: -0.01em; color: var(--fo-ink); }
.fo-insp-verdict .lbl .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--fo-ink-3); }
.fo-insp-verdict .sub { font-size: 12.5px; color: var(--fo-ink-2); margin-top: 4px; }
.fo-insp-verdict.is-progress .lbl .dot { background: var(--fo-warn); }
.fo-insp-verdict.is-progress .lbl { color: var(--fo-warn); }
.fo-insp-verdict.is-pass .lbl .dot { background: var(--fo-ok); }
.fo-insp-verdict.is-pass .lbl { color: var(--fo-ok); }
.fo-insp-verdict.is-fail .lbl .dot { background: var(--fo-danger); }
.fo-insp-verdict.is-fail .lbl { color: var(--fo-danger); }
.fo-insp-pct { font-family: var(--fo-font-display); font-size: 15px; font-weight: 700; color: var(--fo-ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fo-insp-pct b { font-size: 22px; color: var(--fo-ink); margin-right: 2px; }

.fo-insp-prog { height: 7px; border-radius: 999px; background: var(--fo-line); overflow: hidden; margin: 14px 0 13px; }
.fo-insp-prog span { display: block; height: 100%; border-radius: 999px; background: var(--fo-accent); transition: width var(--fo-base) var(--fo-spring); }

.fo-insp-tally { display: flex; flex-wrap: wrap; gap: 7px; }
.fo-insp-tchip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px 5px 7px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--fo-ink-2); background: var(--fo-surface-2); border: 1px solid var(--fo-line); }
.fo-insp-tchip i { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; flex: none; }
.fo-insp-tchip i svg.fo-i { width: 10px; height: 10px; }
.fo-insp-tchip b { font-weight: 700; color: var(--fo-ink); font-variant-numeric: tabular-nums; }
.fo-insp-tchip.is-pass i { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-insp-tchip.is-fail i { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-insp-tchip.is-na i { background: var(--fo-canvas); color: var(--fo-ink-3); }
.fo-insp-tchip.is-rem { border-style: dashed; }
.fo-insp-tchip.is-rem b { color: var(--fo-ink-2); }

/* ── Checklist sections ──────────────────────────────────────────────── */
.fo-insp-sec-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.fo-insp-sec-head .ttl { font-family: var(--fo-font-display); font-size: 14px; font-weight: 700; color: var(--fo-ink); letter-spacing: -0.01em; }
.fo-insp-sec-n { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; color: var(--fo-ink-3); font-variant-numeric: tabular-nums; }
.fo-insp-sec-n.is-done { color: var(--fo-ok); }
.fo-insp-sec-n svg.fo-i { width: 12px; height: 12px; }

.fo-insp-items { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.fo-insp-item { border: 1px solid var(--fo-line); border-left: 3px solid var(--fo-line-strong); border-radius: var(--fo-r-md); background: var(--fo-surface-2); transition: border-color var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease); }
.fo-insp-item[data-state="pass"] { border-left-color: var(--fo-ok); }
.fo-insp-item[data-state="fail"] { border-left-color: var(--fo-danger); background: rgba(179, 38, 30, 0.035); }
.fo-insp-item[data-state="na"] { border-left-color: var(--fo-ink-3); }
.fo-insp-item-row { display: flex; align-items: center; gap: 12px; padding: 11px 13px; }

.fo-insp-glyph { flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.fo-insp-glyph svg.fo-i { width: 12px; height: 12px; }
.fo-insp-glyph.is-unset { border: 1.5px dashed var(--fo-line-strong); }
.fo-insp-glyph.is-pass { background: var(--fo-ok); color: #fff; }
.fo-insp-glyph.is-fail { background: var(--fo-danger); color: #fff; }
.fo-insp-glyph.is-na { background: var(--fo-canvas); color: var(--fo-ink-3); }

.fo-insp-item-main { flex: 1; min-width: 0; }
.fo-insp-item-label { font-size: 13.5px; font-weight: 600; color: var(--fo-ink); line-height: 1.3; }
.fo-insp-item-std { font-size: 11.5px; color: var(--fo-ink-3); margin-top: 2px; line-height: 1.4; }

/* tri-state segmented control */
.fo-insp-seg { flex: none; display: inline-flex; gap: 2px; padding: 2px; border-radius: 9px; background: var(--fo-canvas); border: 1px solid var(--fo-line); }
.fo-insp-seg button { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border: 0; border-radius: 7px; background: transparent; font: inherit; font-size: 12px; font-weight: 650; color: var(--fo-ink-3); cursor: pointer; transition: background var(--fo-fast) var(--fo-ease), color var(--fo-fast) var(--fo-ease), box-shadow var(--fo-fast) var(--fo-ease); }
.fo-insp-seg button svg.fo-i { width: 12px; height: 12px; }
.fo-insp-seg button:hover { color: var(--fo-ink); }
.fo-insp-seg button.is-on { background: var(--fo-surface); box-shadow: 0 1px 2px rgba(24, 27, 33, 0.12); }
.fo-insp-seg button[data-v="pass"].is-on { color: var(--fo-ok); }
.fo-insp-seg button[data-v="fail"].is-on { color: var(--fo-danger); }
.fo-insp-seg button[data-v="na"].is-on { color: var(--fo-ink-2); }

/* defect panel revealed on a fail */
.fo-insp-defect { border-top: 1px dashed var(--fo-line-strong); margin: 0 13px; padding: 13px 0 14px; }

/* note fills the row; photos sit tidily beside it */
.fo-insp-defect-grid { display: grid; grid-template-columns: minmax(0, 1fr) 188px; gap: 18px; align-items: start; }
@media (max-width: 720px) { .fo-insp-defect-grid { grid-template-columns: 1fr; gap: 14px; } }
.fo-insp-dlabel { display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fo-ink-3); margin-bottom: 8px; }
.fo-insp-dlabel svg.fo-i { width: 12px; height: 12px; }
.fo-insp-dlabel.is-danger { color: var(--fo-danger); }
.fo-insp-dlabel .n { margin-left: auto; font-weight: 700; color: var(--fo-ink-3); font-variant-numeric: tabular-nums; }
.fo-insp-dnote { width: 100%; font-size: 12.5px; line-height: 1.5; resize: none; overflow: hidden; }

/* photo thumbnails — even square grid */
.fo-insp-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.fo-insp-photo { width: 52px; height: 52px; flex: none; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--fo-ink-3);
  background: linear-gradient(135deg, var(--fo-surface), var(--fo-canvas)); border: 1px solid var(--fo-line-strong); }
.fo-insp-photo svg.fo-i { width: 18px; height: 18px; }
.fo-insp-addphoto { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 52px; height: 52px; flex: none; border: 1.5px dashed var(--fo-line-strong); border-radius: 10px; background: transparent; font: inherit; font-size: 9px; font-weight: 700; color: var(--fo-ink-3); cursor: pointer; transition: border-color var(--fo-fast) var(--fo-ease), color var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease); }
.fo-insp-addphoto svg.fo-i { width: 16px; height: 16px; }
.fo-insp-addphoto:hover { border-color: var(--fo-accent); color: var(--fo-accent); background: var(--fo-accent-soft); }

/* corrective action — discreet single-line band */
.fo-insp-capa { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding: 7px 11px; border-radius: 9px; background: var(--fo-surface); border: 1px solid var(--fo-line); border-left: 2px solid var(--fo-danger); }
.fo-insp-capa > svg.fo-i { width: 14px; height: 14px; color: var(--fo-danger); flex: none; }
.fo-insp-capa-txt { font-size: 12px; color: var(--fo-ink-2); }
.fo-insp-capa-txt b { color: var(--fo-ink); font-weight: 650; }
.fo-insp-capa-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.fo-insp-capa-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 650; color: var(--fo-ink-2); background: var(--fo-surface-2); border: 1px solid var(--fo-line); white-space: nowrap; }
.fo-insp-capa-pill svg.fo-i { width: 10px; height: 10px; color: var(--fo-ink-3); }
.fo-insp-capa-pill.is-pri { color: var(--fo-danger); background: var(--fo-danger-soft); border-color: transparent; }
.fo-insp-capa-who { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 600; color: var(--fo-ink-2); white-space: nowrap; }
.fo-insp-capa-who .fo-ava { width: 17px; height: 17px; font-size: 8px; }
@media (max-width: 560px) { .fo-insp-capa-meta { margin: 0 0 0 22px; } }

/* ── Sign-off ────────────────────────────────────────────────────────── */
.fo-insp-notes-l { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fo-ink-3); margin: 12px 0 7px; }
.fo-insp-notes-l span { font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--fo-ink-3); margin-left: 4px; }
.fo-insp-notes { width: 100%; font-size: 12.5px; line-height: 1.5; resize: none; overflow: hidden; }

.fo-insp-lock { display: flex; align-items: center; gap: 11px; margin-top: 14px; padding: 14px 16px; border: 1.5px dashed var(--fo-line-strong); border-radius: var(--fo-r-md); background: var(--fo-surface-2); }
.fo-insp-lock > svg.fo-i { width: 18px; height: 18px; color: var(--fo-ink-3); flex: none; }
.fo-insp-lock b { display: block; font-size: 13px; color: var(--fo-ink); }
.fo-insp-lock span { display: block; font-size: 12px; color: var(--fo-ink-2); margin-top: 1px; }

.fo-insp-pad-wrap { margin-top: 14px; }
.fo-insp-result-line { display: flex; align-items: center; gap: 9px; padding: 10px 13px; border-radius: var(--fo-r-md); font-size: 12.5px; color: var(--fo-ink-2); margin-bottom: 13px; }
.fo-insp-result-line svg.fo-i { width: 15px; height: 15px; flex: none; }
.fo-insp-result-line b { color: var(--fo-ink); font-weight: 700; }
.fo-insp-result-line.is-pass { background: var(--fo-ok-soft); }
.fo-insp-result-line.is-pass svg.fo-i { color: var(--fo-ok); }
.fo-insp-result-line.is-pass b { color: var(--fo-ok); }
.fo-insp-result-line.is-fail { background: var(--fo-danger-soft); }
.fo-insp-result-line.is-fail svg.fo-i { color: var(--fo-danger); }
.fo-insp-result-line.is-fail b { color: var(--fo-danger); }

.fo-insp-signed { display: flex; align-items: center; gap: 11px; margin-top: 14px; padding: 13px 15px; border-radius: var(--fo-r-md); background: var(--fo-ok-soft); border: 1px solid rgba(24, 129, 80, 0.18); }
.fo-insp-signed .who { flex: 1; min-width: 0; font-size: 12.5px; color: var(--fo-ink-2); }
.fo-insp-signed .who b { display: block; font-size: 13.5px; font-weight: 650; color: var(--fo-ink); }
.fo-insp-signed .who span { font-size: 11.5px; color: var(--fo-ink-3); }
.fo-insp-signed .sig { flex: none; height: 34px; max-width: 110px; object-fit: contain; }
/* explicit display:flex would otherwise beat the [hidden] attribute */
.fo-insp-lock[hidden], .fo-insp-signed[hidden] { display: none; }

/* ── Aside ───────────────────────────────────────────────────────────── */
.fo-insp-aside-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fo-ink-3); margin-bottom: 12px; }
.fo-insp-fact { display: flex; align-items: baseline; gap: 12px; padding: 7px 0; border-top: 1px solid var(--fo-line); font-size: 12.5px; }
.fo-insp-fact:first-of-type { border-top: 0; padding-top: 0; }
.fo-insp-fact .k { color: var(--fo-ink-3); flex: none; }
.fo-insp-fact .v { color: var(--fo-ink); font-weight: 600; text-align: right; margin-left: auto; }
.fo-insp-pass-i { color: var(--fo-ok); font-weight: 700; }

/* phone — let the segmented control drop under the label */
@media (max-width: 560px) {
  .fo-insp-item-row { flex-wrap: wrap; }
  .fo-insp-item-main { flex: 1 1 60%; }
  .fo-insp-seg { width: 100%; }
  .fo-insp-seg button { flex: 1; justify-content: center; }
}

/* ════════════════════════════════════════════════════════════════════════
   TOOLBOX TALKS — the session surface (Safety pattern)
   Running one class: talking points to cover, the open discussion (the part
   that teaches), attendee sign-in, and a quick per-attendee read afterward.
   A standalone meeting AND the unit the Yearling program is built from.
   ════════════════════════════════════════════════════════════════════════ */

.fo-tb-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.fo-tb-main, .fo-tb-aside { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 1081px) { .fo-tb-aside { position: sticky; top: 20px; } }
@media (max-width: 1080px) { .fo-tb-grid { grid-template-columns: 1fr; } }

/* case-bar badge + yearling link chip */
.fo-tb-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 650; background: var(--fo-warn-soft); color: var(--fo-warn); white-space: nowrap; }
.fo-tb-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--fo-warn); }
.fo-tb-yl { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 7px; font-size: 11px; font-weight: 700; text-decoration: none; border: 1px solid rgba(11, 63, 158, 0.2); background: var(--fo-accent-soft); color: var(--fo-accent-deep); }
.fo-tb-yl svg.fo-i { width: 12px; height: 12px; }
.fo-tb-yl:hover { border-color: var(--fo-accent); }

.fo-tb-cov, .fo-tb-rcount { margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--fo-ink-3); font-variant-numeric: tabular-nums; }
.fo-tb-cov.is-all { color: var(--fo-ok); }
.fo-tb-lead { font-size: 12px; color: var(--fo-ink-3); margin: 6px 0 0; line-height: 1.5; }

/* talking points — checkable as covered */
.fo-tb-points { display: flex; flex-direction: column; gap: 8px; margin-top: 13px; }
.fo-tb-point { display: flex; align-items: flex-start; gap: 11px; width: 100%; text-align: left; padding: 11px 13px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); background: var(--fo-surface-2); cursor: pointer; font: inherit; transition: border-color var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease); }
.fo-tb-point:hover { border-color: var(--fo-line-strong); }
.fo-tb-point .bx { flex: none; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--fo-line-strong); display: inline-flex; align-items: center; justify-content: center; color: #fff; margin-top: 1px; transition: background var(--fo-fast) var(--fo-ease), border-color var(--fo-fast) var(--fo-ease); }
.fo-tb-point .bx svg.fo-i { width: 12px; height: 12px; }
.fo-tb-point.is-done .bx { background: var(--fo-ok); border-color: var(--fo-ok); }
.fo-tb-point .tx { min-width: 0; }
.fo-tb-point .tx b { display: block; font-size: 13px; font-weight: 650; color: var(--fo-ink); }
.fo-tb-point.is-done .tx b { color: var(--fo-ink-2); }
.fo-tb-point .tx span { display: block; font-size: 11.5px; color: var(--fo-ink-3); margin-top: 2px; line-height: 1.4; }

/* open-discussion notes */
.fo-tb-notes { display: flex; flex-direction: column; gap: 12px; margin-top: 13px; }
.fo-tb-note { display: flex; gap: 10px; }
.fo-tb-note .bd { flex: 1; min-width: 0; }
.fo-tb-note .h { display: flex; align-items: baseline; gap: 8px; }
.fo-tb-note .h b { font-size: 12.5px; font-weight: 650; color: var(--fo-ink); }
.fo-tb-note .h span { font-size: 11px; color: var(--fo-ink-3); }
.fo-tb-note p { margin: 3px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--fo-ink-2); }
.fo-tb-composer { display: flex; align-items: flex-start; gap: 9px; margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--fo-line); }
.fo-tb-composer .fo-ava { margin-top: 3px; }
.fo-tb-note-in { flex: 1; font-size: 12.5px; line-height: 1.5; resize: none; overflow: hidden; }
.fo-tb-composer .fo-btn { flex: none; }

/* roster — sign-in + per-attendee read */
.fo-tb-roster { display: flex; flex-direction: column; margin-top: 13px; }
.fo-tb-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--fo-line); flex-wrap: wrap; }
.fo-tb-row:first-child { border-top: 0; padding-top: 2px; }
.fo-tb-who { display: inline-flex; align-items: center; gap: 9px; flex: 1; min-width: 160px; }
.fo-tb-who .tx { min-width: 0; line-height: 1.25; }
.fo-tb-who .nm { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--fo-ink); }
.fo-tb-who .sub { display: block; font-size: 11px; color: var(--fo-ink-3); }
.fo-tb-row.is-out .fo-tb-who .nm { color: var(--fo-ink-2); }
.fo-tb-sigcell { flex: none; }
.fo-tb-signed { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--fo-ok); }
.fo-tb-signed svg.fo-i { width: 13px; height: 13px; }
.fo-tb-sign { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border: 1px solid var(--fo-line-strong); border-radius: 8px; background: var(--fo-surface); font: inherit; font-size: 11.5px; font-weight: 650; color: var(--fo-accent-deep); cursor: pointer; transition: border-color var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease); }
.fo-tb-sign svg.fo-i { width: 12px; height: 12px; }
.fo-tb-sign:hover { border-color: var(--fo-accent); background: var(--fo-accent-soft); }
.fo-tb-crew { font-size: 9px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--fo-ink-3); background: var(--fo-surface-2); border: 1px solid var(--fo-line); padding: 1px 6px; border-radius: 999px; }

/* the per-attendee read — Got it / Partial / Follow-up */
.fo-tb-eval { flex: none; display: inline-flex; gap: 2px; padding: 2px; border-radius: 9px; background: var(--fo-canvas); border: 1px solid var(--fo-line); }
.fo-tb-eval button { padding: 5px 11px; border: 0; border-radius: 7px; background: transparent; font: inherit; font-size: 11.5px; font-weight: 650; color: var(--fo-ink-3); cursor: pointer; transition: background var(--fo-fast) var(--fo-ease), color var(--fo-fast) var(--fo-ease), box-shadow var(--fo-fast) var(--fo-ease); }
.fo-tb-eval button:hover { color: var(--fo-ink); }
.fo-tb-eval button.is-on { background: var(--fo-surface); box-shadow: 0 1px 2px rgba(24, 27, 33, 0.12); }
.fo-tb-eval button[data-ev="got"].is-on { color: var(--fo-ok); }
.fo-tb-eval button[data-ev="partial"].is-on { color: var(--fo-warn); }
.fo-tb-eval button[data-ev="follow"].is-on { color: var(--fo-danger); }
@media (max-width: 560px) { .fo-tb-eval { width: 100%; } .fo-tb-eval button { flex: 1; text-align: center; } }

.fo-tb-add { display: inline-flex; align-items: center; gap: 7px; align-self: flex-start; margin-top: 13px; padding: 8px 15px; border: 1.5px dashed var(--fo-line-strong); border-radius: 10px; background: transparent; font: inherit; font-size: 12.5px; font-weight: 650; color: var(--fo-ink-2); cursor: pointer; transition: border-color var(--fo-fast) var(--fo-ease), color var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease); }
.fo-tb-add:hover { border-color: var(--fo-accent); color: var(--fo-accent); background: var(--fo-accent-soft); }
.fo-tb-add svg.fo-i { width: 14px; height: 14px; }

/* aside */
.fo-tb-aside-h { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fo-ink-3); margin-bottom: 12px; }
.fo-tb-aside-h svg.fo-i { width: 13px; height: 13px; color: var(--fo-accent); }
.fo-tb-fact { display: flex; align-items: baseline; gap: 12px; padding: 7px 0; border-top: 1px solid var(--fo-line); font-size: 12.5px; }
.fo-tb-fact:first-of-type { border-top: 0; padding-top: 0; }
.fo-tb-fact .k { color: var(--fo-ink-3); flex: none; }
.fo-tb-fact .v { color: var(--fo-ink); font-weight: 600; text-align: right; margin-left: auto; }
.fo-tb-fact .v a { color: var(--fo-accent); text-decoration: none; font-weight: 700; }
.fo-tb-fact .v a:hover { text-decoration: underline; }
.fo-tb-stat { margin-top: 13px; }
.fo-tb-stat:first-of-type { margin-top: 0; }
.fo-tb-stat-top { display: flex; align-items: baseline; justify-content: space-between; font-size: 12px; color: var(--fo-ink-2); margin-bottom: 6px; }
.fo-tb-stat-top b { font-size: 13px; font-weight: 700; color: var(--fo-ink); font-variant-numeric: tabular-nums; }
.fo-tb-stat-bar { display: block; height: 7px; border-radius: 999px; background: var(--fo-line); overflow: hidden; }
.fo-tb-stat-bar i { display: block; height: 100%; border-radius: 999px; background: var(--fo-accent); transition: width var(--fo-base) var(--fo-spring); }
.fo-tb-impact p { font-size: 12.5px; line-height: 1.55; color: var(--fo-ink-2); margin: 0; }
.fo-tb-impact p b { color: var(--fo-ink); font-weight: 650; }
.fo-tb-impact-go { display: inline-flex; align-items: center; gap: 5px; margin-top: 11px; font-size: 12px; font-weight: 700; color: var(--fo-accent); text-decoration: none; }
.fo-tb-impact-go svg.fo-i { width: 13px; height: 13px; }
.fo-tb-impact-go:hover { text-decoration: underline; }

/* ── conduct: sign-in method bar + per-attendee method chip ──────────── */
.fo-tb-signbar { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 11px 13px; border-radius: var(--fo-r-md); background: var(--fo-surface-2); border: 1px solid var(--fo-line); }
.fo-tb-signbar-tx { flex: 1; font-size: 12px; color: var(--fo-ink-2); line-height: 1.45; }
.fo-tb-signbar .fo-btn { flex: none; }
.fo-tb-method { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; font-size: 10.5px; font-weight: 650; color: var(--fo-ink-3); }
.fo-tb-method svg.fo-i { width: 11px; height: 11px; }

/* ── modal (tablet pad + QR session) ─────────────────────────────────── */
@keyframes fo-fade { from { opacity: 0; } to { opacity: 1; } }
.fo-tb-modal-back { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(24, 27, 33, 0.32); backdrop-filter: blur(2px); animation: fo-fade 0.18s var(--fo-ease) both; }
.fo-tb-modal-back[hidden] { display: none; }
.fo-tb-modal { width: 100%; max-width: 440px; background: var(--fo-surface); border-radius: var(--fo-r-lg); box-shadow: var(--fo-shadow-2); display: flex; flex-direction: column; max-height: 90vh; overflow: hidden; }
.fo-tb-modal.is-qr { max-width: 580px; }
.fo-tb-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--fo-line); }
.fo-tb-modal-title { font-family: var(--fo-font-display); font-size: 17px; font-weight: 700; color: var(--fo-ink); margin-top: 3px; letter-spacing: -0.01em; }
.fo-tb-modal-body { padding: 18px; overflow-y: auto; }
.fo-tb-modal-foot { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 18px; border-top: 1px solid var(--fo-line); }
.fo-tb-padwho { font-size: 12.5px; color: var(--fo-ink-2); line-height: 1.5; margin-bottom: 12px; }
.fo-tb-padwho b { color: var(--fo-ink); font-weight: 650; }

.fo-tb-qr-body { display: flex; gap: 22px; flex-wrap: wrap; }
.fo-tb-qr-code { flex: none; width: 200px; text-align: center; }
.fo-tb-qr-img { width: 200px; height: 200px; border-radius: 12px; background: #fff; border: 1px solid var(--fo-line-strong); padding: 14px; background-image: repeating-conic-gradient(#181b21 0 25%, #ffffff00 0 50%); background-size: 13px 13px; background-origin: content-box; background-clip: content-box; }
.fo-tb-qr-join { font-size: 12px; color: var(--fo-ink-3); margin-top: 11px; }
.fo-tb-qr-join b { color: var(--fo-ink); font-weight: 700; }
.fo-tb-qr-live { display: inline-flex; align-items: center; gap: 6px; margin-top: 9px; font-size: 11.5px; font-weight: 600; color: var(--fo-ok); }
.fo-tb-qr-live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--fo-ok); box-shadow: 0 0 0 3px var(--fo-ok-soft); }
.fo-tb-qr-how { flex: 1; min-width: 220px; }
.fo-tb-qr-steps { display: flex; flex-direction: column; gap: 12px; }
.fo-tb-qr-steps .st { display: flex; gap: 11px; }
.fo-tb-qr-steps .st .n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--fo-accent-soft); color: var(--fo-accent-deep); font-weight: 700; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.fo-tb-qr-steps .st b { display: block; font-size: 13px; font-weight: 650; color: var(--fo-ink); }
.fo-tb-qr-steps .st span { display: block; font-size: 11.5px; color: var(--fo-ink-3); margin-top: 1px; }
.fo-tb-qr-preview { width: 100%; justify-content: center; margin-top: 14px; }
.fo-tb-qr-feed { margin-top: 14px; border-top: 1px solid var(--fo-line); padding-top: 12px; }
.fo-tb-qr-feed-h { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fo-ink-3); margin-bottom: 9px; }
.fo-tb-qr-feedrow { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 12.5px; color: var(--fo-ink); }
.fo-tb-qr-feedrow .tm { margin-left: auto; font-size: 11px; color: var(--fo-ink-3); }
@media (max-width: 560px) { .fo-tb-qr-code { width: 100%; } .fo-tb-qr-img { margin: 0 auto; } }

/* ════════════════════════════════════════════════════════════════════════
   TOOLBOX HUB (tracker + library) + REGISTER (new talk + branded sheet)
   ════════════════════════════════════════════════════════════════════════ */
.fo-tbh-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.fo-tbh-toolbar .spacer { flex: 1; }
.fo-tbh-search { flex: none; width: 230px; }
@media (max-width: 560px) { .fo-tbh-search { width: 100%; } }
.fo-tbh-views button { display: inline-flex; align-items: center; gap: 6px; }
.fo-tbh-views button svg.fo-i { width: 13px; height: 13px; }
.fo-tbh-view { display: none; }
.fo-tbh-view.is-active { display: block; }
.fo-tbh-tablewrap { border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); overflow-x: auto; background: var(--fo-surface); box-shadow: var(--fo-shadow-1); }
.fo-tbh-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.fo-tbh-table th { text-align: left; padding: 11px 14px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fo-ink-3); border-bottom: 1px solid var(--fo-line); background: var(--fo-surface-2); white-space: nowrap; }
.fo-tbh-table td { padding: 11px 14px; border-bottom: 1px solid var(--fo-line); vertical-align: middle; }
.fo-tbh-table tbody tr:last-child td { border-bottom: 0; }
.fo-tbh-table tbody tr { cursor: pointer; transition: background var(--fo-fast) var(--fo-ease); }
.fo-tbh-table tbody tr:hover { background: var(--fo-surface-2); }
.fo-tbh-table tbody tr:focus-visible { outline: none; background: var(--fo-accent-soft); }
.fo-tbh-table .act { width: 30px; text-align: right; color: var(--fo-ink-3); }
.fo-tbh-table .act svg.fo-i { width: 15px; height: 15px; }
.fo-tbh-dim { color: var(--fo-ink-2); white-space: nowrap; }
.fo-tbh-topic { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--fo-ink); }
.fo-tbh-lead { display: inline-flex; align-items: center; gap: 7px; color: var(--fo-ink-2); }
.fo-tbh-sign { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--fo-ink-2); font-variant-numeric: tabular-nums; }
.fo-tbh-sign.is-full { color: var(--fo-ok); }
.fo-tbh-sign svg.fo-i { width: 12px; height: 12px; }
.fo-tbh-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--fo-accent-soft); color: var(--fo-accent-deep); white-space: nowrap; }
.fo-tbh-tag svg.fo-i { width: 10px; height: 10px; }
.fo-tbh-tag.is-adhoc { background: var(--fo-surface-2); color: var(--fo-ink-3); border: 1px solid var(--fo-line); }
.fo-tbh-st { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 650; }
.fo-tbh-st svg.fo-i { width: 12px; height: 12px; }
.fo-tbh-st .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--fo-warn); }
.fo-tbh-st.is-progress { color: var(--fo-warn); }
.fo-tbh-st.is-done { color: var(--fo-ok); }
.fo-tbh-filters { display: flex; align-items: center; gap: 12px; margin-bottom: 13px; flex-wrap: wrap; }
.fo-tbh-sitesel { width: 200px; }
@media (max-width: 560px) { .fo-tbh-sitesel { width: 100%; } }
.fo-tbh-count { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--fo-ink-3); font-variant-numeric: tabular-nums; }
.fo-tbh-sitecell { display: inline-flex; align-items: center; gap: 5px; }
.fo-tbh-sitecell svg.fo-i { width: 12px; height: 12px; color: var(--fo-ink-3); }
.fo-tbh-attended { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--fo-ink-2); white-space: nowrap; }
.fo-tbh-attended b { font-weight: 700; color: var(--fo-ink); }
.fo-tbh-atts { display: inline-flex; align-items: center; }
.fo-tbh-atts .fo-ava { border: 1.5px solid var(--fo-surface); margin-left: -7px; }
.fo-tbh-atts .fo-ava:first-child { margin-left: 0; }
.fo-tbh-more { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 5px; margin-left: -7px; border-radius: 50%; background: var(--fo-canvas); border: 1.5px solid var(--fo-surface); font-size: 10px; font-weight: 700; color: var(--fo-ink-2); }
.fo-tbh-lib { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
@media (max-width: 1000px) { .fo-tbh-lib { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .fo-tbh-lib { grid-template-columns: 1fr; } }
.fo-tbh-card { display: flex; flex-direction: column; border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); background: var(--fo-surface); padding: 15px 16px; box-shadow: var(--fo-shadow-1); }
.fo-tbh-card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.fo-tbh-card-h .nm { font-family: var(--fo-font-display); font-size: 15px; font-weight: 700; color: var(--fo-ink); letter-spacing: -0.01em; }
.fo-tbh-card-h .sub { font-size: 11.5px; color: var(--fo-ink-3); margin-top: 2px; }
.fo-tbh-pts { list-style: none; margin: 13px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.fo-tbh-pts li { position: relative; padding-left: 15px; font-size: 12px; line-height: 1.4; color: var(--fo-ink-2); }
.fo-tbh-pts li::before { content: ''; position: absolute; left: 0; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--fo-accent); }
.fo-tbh-pts li.more { color: var(--fo-ink-3); font-weight: 600; }
.fo-tbh-pts li.more::before { background: var(--fo-ink-3); }
.fo-tbh-card-foot { display: flex; gap: 8px; margin-top: 14px; }
.fo-tbh-card-foot .fo-btn { flex: 1; justify-content: center; }

/* register form */
.fo-tbn-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
@media (max-width: 1080px) { .fo-tbn-grid { grid-template-columns: 1fr; } }
.fo-tbn-form { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 1081px) { .fo-tbn-side { position: sticky; top: 20px; } }
.fo-tbn-method button { display: inline-flex; align-items: center; gap: 6px; }
.fo-tbn-method button svg.fo-i { width: 13px; height: 13px; }
.fo-tbn-method-tx { font-size: 12px; color: var(--fo-ink-2); margin-top: 10px; line-height: 1.5; }
.fo-tbn-sheet-card { border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); background: var(--fo-canvas); padding: 14px; box-shadow: var(--fo-shadow-1); }
.fo-tbn-sheet-eyebrow { display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fo-ink-3); margin-bottom: 11px; }
.fo-tbn-sheet-eyebrow svg.fo-i { width: 12px; height: 12px; color: var(--fo-accent); }

/* the JLCS-branded talk sheet (preview + print) */
.fo-tbn-sheet { background: #fff; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); padding: 22px 22px 18px; color: var(--fo-ink); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.fo-tbn-sheet * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.fo-tbn-sheet-top { display: flex; align-items: center; gap: 11px; padding-bottom: 13px; border-bottom: 2px solid var(--fo-accent); }
.fo-tbn-sheet-top img { width: 34px; height: 34px; border-radius: 8px; object-fit: contain; }
.fo-tbn-sheet-top .br b { display: block; font-family: var(--fo-font-display); font-size: 14px; font-weight: 780; color: var(--fo-ink); }
.fo-tbn-sheet-top .br span { font-size: 10.5px; color: var(--fo-ink-3); }
.fo-tbn-sheet-top .kind { margin-left: auto; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--fo-accent); }
.fo-tbn-sheet-tag { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fo-accent-deep); margin-top: 13px; }
.fo-tbn-sheet-title { font-family: var(--fo-font-display); font-size: 22px; font-weight: 780; letter-spacing: -0.02em; margin: 3px 0 0; color: var(--fo-ink); }
.fo-tbn-sheet-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 11px; color: var(--fo-ink-2); }
.fo-tbn-sheet-h { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fo-ink-3); margin: 16px 0 9px; }
.fo-tbn-sheet-pts { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; }
.fo-tbn-sheet-pts li { display: flex; gap: 10px; font-size: 12.5px; line-height: 1.45; color: var(--fo-ink); }
.fo-tbn-sheet-pts .n { flex: none; width: 19px; height: 19px; border-radius: 5px; background: var(--fo-accent-soft); color: var(--fo-accent-deep); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.fo-tbn-sheet-note { font-size: 11.5px; font-style: italic; color: var(--fo-ink-2); margin-top: 13px; padding: 9px 12px; background: var(--fo-accent-soft); border-radius: 8px; }
.fo-tbn-sheet-sign { margin-top: 16px; }
.fo-tbn-sheet-sign .rows { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--fo-line-strong); border-radius: 8px; overflow: hidden; }
.fo-tbn-sheet-sign .rows span { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fo-ink-3); padding: 6px 10px; background: var(--fo-surface-2); border-bottom: 1px solid var(--fo-line); }
.fo-tbn-sheet-sign .rows i { height: 26px; border-bottom: 1px solid var(--fo-line); }
.fo-tbn-sheet-sign .rows i:nth-of-type(odd) { border-right: 1px solid var(--fo-line); }
.fo-tbn-print { display: none; }
@media print {
  body > *:not(.fo-tbn-print) { display: none !important; }
  .fo-tbn-print { display: block !important; }
  .fo-tbn-print .fo-tbn-sheet { border: 0; padding: 0; }
  @page { size: A4 portrait; margin: 16mm; }
}

/* ════════════════════════════════════════════════════════════════════════
   TOOLBOX PHONE SIGN-IN — DocuSign-style ceremony (v3-lite, no shell)
   ════════════════════════════════════════════════════════════════════════ */
.fo-tbs-body { margin: 0; background: var(--fo-canvas); font-family: var(--fo-font); color: var(--fo-ink); -webkit-font-smoothing: antialiased; min-height: 100vh; }
.fo-tbs-shell { max-width: 460px; margin: 0 auto; padding: 22px 18px 44px; }
.fo-tbs-brand { display: flex; align-items: center; gap: 11px; padding: 6px 2px 18px; }
.fo-tbs-brand img { width: 34px; height: 34px; border-radius: 8px; }
.fo-tbs-brand b { display: block; font-family: var(--fo-font-display); font-size: 15px; font-weight: 780; }
.fo-tbs-brand span { font-size: 11px; color: var(--fo-ink-3); }
.fo-tbs-steps { list-style: none; display: flex; gap: 6px; margin: 0 0 16px; padding: 0; }
.fo-tbs-steps li { flex: 1; display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 650; color: var(--fo-ink-3); padding: 8px 10px; border-radius: 999px; background: var(--fo-surface); border: 1px solid var(--fo-line); }
.fo-tbs-steps li span { width: 18px; height: 18px; border-radius: 50%; background: var(--fo-canvas); color: var(--fo-ink-3); font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.fo-tbs-steps li.is-now { color: var(--fo-accent-deep); border-color: var(--fo-accent); background: var(--fo-accent-soft); }
.fo-tbs-steps li.is-now span { background: var(--fo-accent); color: #fff; }
.fo-tbs-steps li.is-done { color: var(--fo-ok); }
.fo-tbs-steps li.is-done span { background: var(--fo-ok); color: #fff; }
.fo-tbs-card { display: none; background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); padding: 22px 20px; box-shadow: var(--fo-shadow-1); }
.fo-tbs-card.is-active { display: block; animation: fo-rise 0.3s var(--fo-ease) both; }
.fo-tbs-h1 { font-family: var(--fo-font-display); font-size: 21px; font-weight: 780; letter-spacing: -0.02em; margin: 0; }
.fo-tbs-sub { font-size: 13px; color: var(--fo-ink-2); margin: 7px 0 0; line-height: 1.5; }
.fo-tbs-sub b { color: var(--fo-ink); font-weight: 650; }
.fo-tbs-field { margin-top: 16px; }
.fo-tbs-field label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fo-ink-3); margin-bottom: 7px; }
.fo-tbs-field input { width: 100%; height: 48px; border: 1.5px solid var(--fo-line-strong); border-radius: var(--fo-r-md); padding: 0 14px; font: inherit; font-size: 16px; font-weight: 600; color: var(--fo-ink); background: var(--fo-surface); }
.fo-tbs-field input:focus { outline: none; border-color: var(--fo-accent); box-shadow: 0 0 0 3px var(--fo-accent-soft); }
.fo-tbs-go { width: 100%; justify-content: center; height: 48px; margin-top: 18px; font-size: 15px; }
.fo-tbs-fine { font-size: 11px; color: var(--fo-ink-3); text-align: center; margin: 12px 0 0; }
.fo-tbs-hello { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.fo-tbs-hello .nm { font-family: var(--fo-font-display); font-size: 17px; font-weight: 700; }
.fo-tbs-hello .sub { font-size: 12px; color: var(--fo-ink-3); }
.fo-tbs-doc { border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); background: var(--fo-surface-2); padding: 14px 15px; }
.fo-tbs-doc-h { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 700; color: var(--fo-ink); }
.fo-tbs-doc-h svg.fo-i { width: 15px; height: 15px; color: var(--fo-accent); }
.fo-tbs-doc-meta { font-size: 11.5px; color: var(--fo-ink-3); margin: 4px 0 11px; }
.fo-tbs-doc-pts { display: flex; flex-direction: column; gap: 7px; }
.fo-tbs-doc-pts .pt { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.4; color: var(--fo-ink-2); }
.fo-tbs-doc-pts .pt svg.fo-i { width: 13px; height: 13px; color: var(--fo-ok); flex: none; margin-top: 1px; }
.fo-tbs-consent { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; font-size: 12.5px; line-height: 1.5; color: var(--fo-ink-2); cursor: pointer; }
.fo-tbs-consent input { width: 20px; height: 20px; flex: none; margin-top: 1px; accent-color: var(--fo-accent); }
.fo-tbs-segwrap { margin-top: 16px; }
.fo-tbs-sign { margin-top: 14px; position: relative; }
.fo-tbs-tab { position: absolute; top: -9px; left: 14px; z-index: 2; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #fff; background: var(--fo-accent); padding: 3px 9px; border-radius: 6px; }
.fo-tbs-type input { width: 100%; height: 48px; border: 1.5px solid var(--fo-line-strong); border-radius: var(--fo-r-md); padding: 0 14px; font: inherit; font-size: 16px; }
.fo-tbs-type input:focus { outline: none; border-color: var(--fo-accent); box-shadow: 0 0 0 3px var(--fo-accent-soft); }
.fo-tbs-typed-prev { min-height: 60px; margin-top: 10px; border: 1.5px dashed var(--fo-line-strong); border-radius: var(--fo-r-md); display: flex; align-items: center; justify-content: center; font-family: 'Brush Script MT', 'Segoe Script', cursive; font-size: 30px; color: var(--fo-accent); }
.fo-tbs-done { text-align: center; padding: 8px 0; }
.fo-tbs-done-mark { width: 64px; height: 64px; border-radius: 50%; background: var(--fo-ok-soft); color: var(--fo-ok); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.fo-tbs-done-mark svg.fo-i { width: 30px; height: 30px; }
.fo-tbs-receipt { text-align: left; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); background: var(--fo-surface-2); padding: 6px 14px; margin: 16px 0 0; }
.fo-tbs-rrow { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--fo-line); font-size: 12.5px; }
.fo-tbs-rrow:last-child { border-bottom: 0; }
.fo-tbs-rrow span { color: var(--fo-ink-3); }
.fo-tbs-rrow b { color: var(--fo-ink); font-weight: 650; }
.fo-tbs-seal { display: flex; align-items: center; gap: 7px; margin-top: 4px; padding: 9px 0 4px; font-size: 11.5px; font-weight: 600; color: var(--fo-ok); font-variant-numeric: tabular-nums; }
.fo-tbs-seal svg.fo-i { width: 13px; height: 13px; }

/* ════════════════════════════════════════════════════════════════════════
   YEARLING TRAINING PROGRAM — 12-month cohort tracker (Safety pattern)
   The toolbox-talk curriculum as a hub: this month's class, a 12-month rhythm
   ribbon, a bridge to Mentorship, and FOUR views over the cohort
   (Roster · Kanban · Timeline · Calendar). Royal = brand/progress; green =
   completed; amber = behind. Tied to the Bowman Steel 12-topic curriculum.
   ════════════════════════════════════════════════════════════════════════ */

/* shared progress bar + this-month chip + mentorship badge */
.fo-yl-prog { display: block; flex: 1; height: 7px; border-radius: 999px; background: var(--fo-line); overflow: hidden; }
.fo-yl-prog i { display: block; height: 100%; border-radius: 999px; background: var(--fo-accent); transition: width var(--fo-base) var(--fo-spring); }
.fo-yl-prog.is-done i { background: var(--fo-ok); }
.fo-yl-prog.is-behind i { background: var(--fo-warn); }
.fo-yl-this { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 650; white-space: nowrap; }
.fo-yl-this svg.fo-i { width: 11px; height: 11px; }
.fo-yl-this.is-done { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-yl-this.is-pending { background: var(--fo-surface-2); color: var(--fo-ink-2); border: 1px solid var(--fo-line); }
.fo-yl-this.is-behind { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-yl-this.is-na { background: var(--fo-canvas); color: var(--fo-ink-3); }
.fo-yl-this.is-first { background: var(--fo-accent-soft); color: var(--fo-accent-deep); }
.fo-yl-new { font-size: 9px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--fo-accent); background: var(--fo-accent-soft); padding: 1px 6px; border-radius: 999px; margin-left: 6px; vertical-align: 1px; }
.fo-yl-window { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--fo-ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fo-yl-window svg.fo-i { width: 12px; height: 12px; color: var(--fo-ink-3); }
.fo-yl-window b { color: var(--fo-ink); font-weight: 650; }
.fo-yl-sitefilter { display: inline-flex; align-items: center; gap: 7px; flex: none; }
.fo-yl-sitefilter > svg.fo-i { width: 14px; height: 14px; color: var(--fo-ink-3); }
.fo-yl-sitefilter .fo-select { width: 180px; }
@media (max-width: 560px) { .fo-yl-sitefilter { width: 100%; } .fo-yl-sitefilter .fo-select { flex: 1; width: auto; } }
.fo-yl-site { display: inline-flex; align-items: center; gap: 5px; color: var(--fo-ink-2); white-space: nowrap; }
.fo-yl-site svg.fo-i { width: 12px; height: 12px; color: var(--fo-ink-3); }
.fo-yl-tl-hc.is-now { color: var(--fo-accent); }

/* enroll drawer — the 12-month curriculum preview */
.fo-yl-en-ava svg.fo-i { width: 20px; height: 20px; }
.fo-yl-en-who { padding-bottom: 16px; border-bottom: 1px solid var(--fo-line); margin-bottom: 16px; }
.fo-yl-en-who .fo-select { margin-top: 7px; }
.fo-yl-en-note { font-size: 12px; line-height: 1.5; color: var(--fo-ink-2); margin: 11px 0 0; }
.fo-yl-en-note b { color: var(--fo-ink); font-weight: 650; }
.fo-yl-en-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fo-ink-3); margin-bottom: 12px; }
.fo-yl-en-list { display: flex; flex-direction: column; gap: 10px; }
.fo-yl-en-topic { border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); background: var(--fo-surface-2); padding: 12px 14px; }
.fo-yl-en-topic.is-now { border-color: var(--fo-accent); background: var(--fo-accent-soft); }
.fo-yl-en-topic-h { display: flex; gap: 11px; align-items: flex-start; }
.fo-yl-en-topic-h .no { flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--fo-surface); border: 1px solid var(--fo-line); color: var(--fo-ink-3); font-family: var(--fo-font-display); font-weight: 700; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.fo-yl-en-topic.is-now .no { background: var(--fo-accent); border-color: var(--fo-accent); color: #fff; }
.fo-yl-en-topic-h .nm { font-size: 13.5px; font-weight: 650; color: var(--fo-ink); display: flex; align-items: center; gap: 8px; }
.fo-yl-en-topic-h .nm .cur { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fo-accent); background: var(--fo-surface); padding: 1px 7px; border-radius: 999px; }
.fo-yl-en-topic-h .sub { font-size: 11.5px; color: var(--fo-ink-3); margin-top: 2px; }
.fo-yl-en-pts { list-style: none; margin: 10px 0 0; padding: 0 0 0 39px; display: flex; flex-direction: column; gap: 5px; }
.fo-yl-en-pts li { position: relative; padding-left: 14px; font-size: 11.5px; line-height: 1.4; color: var(--fo-ink-2); }
.fo-yl-en-pts li::before { content: ''; position: absolute; left: 0; top: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--fo-accent); }

/* ── Yearling record drawer (per person) ─────────────────────────────── */
.fo-ylr-snap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 22px; }
.fo-ylr-stat { display: flex; flex-direction: column; gap: 7px; padding: 13px 14px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); background: var(--fo-surface-2); min-width: 0; }
.fo-ylr-stat .k { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fo-ink-3); }
.fo-ylr-stat .v { font-family: var(--fo-font-display); font-size: 26px; font-weight: 780; letter-spacing: -0.02em; color: var(--fo-ink); line-height: 1; }
.fo-ylr-stat .v small { font-size: 14px; font-weight: 650; color: var(--fo-ink-3); margin-left: 1px; }
.fo-ylr-stat .v.sm { font-family: inherit; font-size: 13px; font-weight: 600; }
.fo-ylr-stat .fo-yl-prog { margin-top: auto; }
@media (max-width: 520px) { .fo-ylr-snap { grid-template-columns: 1fr; } }

.fo-ylr-sec { margin-top: 22px; }
.fo-ylr-sec-h { display: flex; align-items: center; gap: 9px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fo-ink-3); margin-bottom: 13px; }
.fo-ylr-sec-h .ct { margin-left: auto; text-transform: none; letter-spacing: 0; font-size: 11.5px; font-weight: 700; color: var(--fo-ink-2); font-variant-numeric: tabular-nums; }

.fo-ylr-map { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; }
.fo-ylr-cell { aspect-ratio: 1; min-width: 0; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--fo-font-display); font-size: 12px; font-weight: 700; border: 1px solid var(--fo-line); background: var(--fo-surface-2); color: var(--fo-ink-3); }
.fo-ylr-cell svg.fo-i { width: 14px; height: 14px; }
.fo-ylr-cell.is-done { background: var(--fo-ok-soft); border-color: rgba(24, 129, 80, 0.28); color: var(--fo-ok); }
.fo-ylr-cell.is-current { background: var(--fo-accent); border-color: var(--fo-accent); color: #fff; box-shadow: 0 2px 6px rgba(11, 63, 158, 0.28); }
.fo-ylr-cell.is-behind { background: var(--fo-danger-soft); border-color: rgba(179, 38, 30, 0.28); color: var(--fo-danger); }
.fo-ylr-cell.is-up { color: var(--fo-ink-3); }
.fo-ylr-legend { margin-top: 12px; }

.fo-ylr-ledger { display: flex; flex-direction: column; }
.fo-ylr-led { display: flex; gap: 13px; padding: 13px 0; border-top: 1px solid var(--fo-line); }
.fo-ylr-led:first-child { border-top: 0; padding-top: 2px; }
.fo-ylr-led-no { flex: none; width: 34px; height: 34px; border-radius: 9px; background: var(--fo-surface-2); border: 1px solid var(--fo-line); color: var(--fo-ink-3); font-family: var(--fo-font-display); font-weight: 700; font-size: 12.5px; display: inline-flex; align-items: center; justify-content: center; }
.fo-ylr-led.is-miss .fo-ylr-led-no { background: var(--fo-danger-soft); border-color: rgba(179, 38, 30, 0.22); color: var(--fo-danger); }
.fo-ylr-led-main { flex: 1; min-width: 0; }
.fo-ylr-led-top { display: flex; align-items: center; gap: 10px; }
.fo-ylr-led-top .mo { font-size: 11.5px; font-weight: 700; color: var(--fo-ink-3); font-variant-numeric: tabular-nums; }
.fo-ylr-led-topic { font-size: 13.5px; font-weight: 650; color: var(--fo-ink); margin-top: 3px; }
.fo-ylr-st { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.fo-ylr-st svg.fo-i { width: 11px; height: 11px; }
.fo-ylr-st.is-ok { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-ylr-st.is-miss { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-ylr-st.is-pend { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-ylr-led-detail { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 14px; margin-top: 9px; }
.fo-ylr-method { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 650; color: var(--fo-ink-2); }
.fo-ylr-method svg.fo-i { width: 12px; height: 12px; color: var(--fo-ink-3); }
.fo-ylr-lead { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--fo-ink-2); }
.fo-ylr-lead .fo-ava { width: 18px; height: 18px; font-size: 8px; }
.fo-ylr-ev { margin-left: auto; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 7px; }
.fo-ylr-ev.is-ok { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-ylr-ev.is-warn { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-ylr-ev.is-danger { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-ylr-miss-note { font-size: 11.5px; font-style: italic; color: var(--fo-ink-3); }
.fo-ylr-grad { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--fo-ok); }
.fo-ylr-grad svg.fo-i { width: 15px; height: 15px; }
@media (max-width: 520px) { .fo-ylr-ev { margin-left: 0; } }

/* ── This month's class hero ─────────────────────────────────────────── */
.fo-yl-now { display: flex; gap: 20px 28px; flex-wrap: wrap; border: 1px solid var(--fo-line-strong); border-radius: var(--fo-r-lg); background: var(--fo-surface); padding: 18px 20px; box-shadow: 0 1px 2px rgba(24, 27, 33, 0.04); margin-bottom: 14px; }
.fo-yl-now-main { flex: 1; min-width: 280px; }
.fo-yl-now-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fo-accent); }
.fo-yl-now-eyebrow svg.fo-i { width: 13px; height: 13px; }
.fo-yl-now-title { font-family: var(--fo-font-display); font-size: 24px; font-weight: 780; letter-spacing: -0.02em; color: var(--fo-ink); margin: 6px 0 0; }
.fo-yl-now-sum { font-size: 13px; line-height: 1.5; color: var(--fo-ink-2); margin: 6px 0 0; max-width: 62ch; }
.fo-yl-now-objs { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.fo-yl-now-objs span { font-size: 11.5px; font-weight: 600; color: var(--fo-ink-2); background: var(--fo-surface-2); border: 1px solid var(--fo-line); border-radius: 999px; padding: 4px 11px; }
.fo-yl-now-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 13px; font-size: 12px; color: var(--fo-ink-2); }
.fo-yl-now-meta b { color: var(--fo-ink); font-weight: 650; }
.fo-yl-now-meta .sep { color: var(--fo-ink-3); }
.fo-yl-now-side { flex: none; width: 240px; display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 640px) { .fo-yl-now-side { width: 100%; } }
.fo-yl-now-att { border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); background: var(--fo-surface-2); padding: 12px 14px; }
.fo-yl-now-att .t { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fo-ink-3); }
.fo-yl-now-att .v { font-size: 13px; color: var(--fo-ink-2); margin-top: 5px; }
.fo-yl-now-att .v b { font-family: var(--fo-font-display); font-size: 22px; font-weight: 780; color: var(--fo-ink); letter-spacing: -0.02em; }
.fo-yl-bar { height: 7px; border-radius: 999px; background: var(--fo-line); overflow: hidden; margin: 8px 0; }
.fo-yl-bar i { display: block; height: 100%; border-radius: 999px; background: var(--fo-accent); }
.fo-yl-now-att .rem { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--fo-warn); font-weight: 600; }
.fo-yl-now-att .rem svg.fo-i { width: 12px; height: 12px; }
.fo-yl-now-run { width: 100%; justify-content: center; }

/* 12-month rhythm ribbon */
.fo-yl-ribbon { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.fo-yl-rib { flex: 1; min-width: 26px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; background: var(--fo-canvas); border: 1px solid var(--fo-line); color: var(--fo-ink-3); }
.fo-yl-rib svg.fo-i { width: 12px; height: 12px; }
.fo-yl-rib.is-past { background: var(--fo-ok-soft); border-color: transparent; color: var(--fo-ok); }
.fo-yl-rib.is-now { background: var(--fo-accent); border-color: transparent; color: #fff; box-shadow: 0 2px 6px -1px rgba(11, 63, 158, 0.4); }

/* ── Toolbar + view container ────────────────────────────────────────── */
.fo-yl-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.fo-yl-toolbar .spacer { flex: 1; }
.fo-yl-toolbar .fo-yl-ribbon { flex: 1 1 260px; min-width: 0; flex-wrap: nowrap; margin-bottom: 0; }
@media (max-width: 480px) { .fo-yl-toolbar .fo-yl-ribbon { gap: 4px; } .fo-yl-toolbar .fo-yl-rib { min-width: 0; } }
.fo-yl-search { flex: none; width: 230px; }
@media (max-width: 560px) { .fo-yl-search { width: 100%; } }
.fo-yl-views button { display: inline-flex; align-items: center; gap: 6px; }
.fo-yl-views button svg.fo-i { width: 13px; height: 13px; }
.fo-yl-view { display: none; }
.fo-yl-view.is-active { display: block; }

/* ── Roster view ─────────────────────────────────────────────────────── */
.fo-yl-tablewrap { border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); overflow-x: auto; background: var(--fo-surface); box-shadow: var(--fo-shadow-1); }
.fo-yl-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.fo-yl-table th { text-align: left; padding: 11px 14px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fo-ink-3); border-bottom: 1px solid var(--fo-line); background: var(--fo-surface-2); white-space: nowrap; }
.fo-yl-table td { padding: 11px 14px; border-bottom: 1px solid var(--fo-line); vertical-align: middle; }
.fo-yl-table tbody tr:last-child td { border-bottom: 0; }
.fo-yl-table tbody tr { cursor: pointer; transition: background var(--fo-fast) var(--fo-ease); }
.fo-yl-table tbody tr:hover { background: var(--fo-surface-2); }
.fo-yl-table tbody tr:focus-visible { outline: none; background: var(--fo-accent-soft); }
.fo-yl-table .act { width: 30px; text-align: right; color: var(--fo-ink-3); }
.fo-yl-table .act svg.fo-i { width: 15px; height: 15px; }
.fo-yl-dim { color: var(--fo-ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fo-yl-dim .u { color: var(--fo-ink-3); }
.fo-yl-id { display: inline-flex; align-items: center; gap: 9px; }
.fo-yl-id .tx { line-height: 1.25; min-width: 0; }
.fo-yl-id .nm { display: block; font-size: 13px; font-weight: 600; color: var(--fo-ink); }
.fo-yl-id .sub { display: block; font-size: 11px; color: var(--fo-ink-3); }
.fo-yl-progcell { display: flex; align-items: center; gap: 10px; }
.fo-yl-progcell b { font-size: 12px; font-weight: 700; color: var(--fo-ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fo-yl-progcell b span { color: var(--fo-ink-3); font-weight: 600; }

/* ── Kanban view ─────────────────────────────────────────────────────── */
.fo-yl-kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: start; }
@media (max-width: 1000px) { .fo-yl-kanban { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .fo-yl-kanban { grid-template-columns: 1fr; } }
.fo-yl-kcol { background: var(--fo-canvas); border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); padding: 12px; }
.fo-yl-kcol.is-done { background: var(--fo-ok-soft); border-color: rgba(24, 129, 80, 0.18); }
.fo-yl-kcol-h { display: flex; align-items: center; justify-content: space-between; }
.fo-yl-kcol-h .l { font-size: 12.5px; font-weight: 700; color: var(--fo-ink); }
.fo-yl-kcol-h .n { font-size: 11px; font-weight: 700; color: var(--fo-ink-3); background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: 999px; padding: 1px 8px; }
.fo-yl-kcol-hint { font-size: 10.5px; color: var(--fo-ink-3); margin: 2px 0 11px; }
.fo-yl-kcol-body { display: flex; flex-direction: column; gap: 9px; }
.fo-yl-kcard { background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); padding: 11px 12px; cursor: pointer; box-shadow: var(--fo-shadow-1); transition: border-color var(--fo-fast) var(--fo-ease), box-shadow var(--fo-fast) var(--fo-ease); }
.fo-yl-kcard:hover { border-color: var(--fo-line-strong); box-shadow: var(--fo-shadow-2); }
.fo-yl-kcard:focus-visible { outline: none; border-color: var(--fo-accent); box-shadow: 0 0 0 3px var(--fo-accent-soft); }
.fo-yl-kcard-top { display: flex; align-items: center; gap: 8px; }
.fo-yl-kcard-top .nm { font-size: 13px; font-weight: 650; color: var(--fo-ink); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-yl-kcard-sub { font-size: 11px; color: var(--fo-ink-3); margin: 2px 0 9px; }
.fo-yl-kcard .fo-yl-prog { margin-bottom: 9px; }
.fo-yl-kcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--fo-ink-2); }
.fo-yl-kempty { font-size: 11.5px; color: var(--fo-ink-3); padding: 8px 2px; }

/* ── Timeline view ───────────────────────────────────────────────────── */
.fo-yl-tl { border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); background: var(--fo-surface); padding: 14px 16px; box-shadow: var(--fo-shadow-1); overflow-x: auto; }
.fo-yl-tl-head { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--fo-line); margin-bottom: 4px; }
.fo-yl-tl-id { flex: none; width: 170px; display: inline-flex; align-items: center; gap: 9px; }
.fo-yl-tl-id .tx { min-width: 0; line-height: 1.2; }
.fo-yl-tl-id .nm { display: block; font-size: 12.5px; font-weight: 600; color: var(--fo-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-yl-tl-id .sub { display: block; font-size: 10.5px; color: var(--fo-ink-3); }
.fo-yl-tl-cells { display: grid; grid-template-columns: repeat(12, 1fr); gap: 5px; flex: 1; min-width: 430px; }
.fo-yl-tl-hc { text-align: center; font-size: 10px; font-weight: 700; color: var(--fo-ink-3); }
.fo-yl-tl-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; cursor: pointer; border-radius: 8px; }
.fo-yl-tl-row:hover { background: var(--fo-surface-2); }
.fo-yl-tl-row:focus-visible { outline: none; background: var(--fo-accent-soft); }
.fo-yl-tl-cell { height: 26px; border-radius: 6px; display: flex; align-items: center; justify-content: center; background: var(--fo-canvas); border: 1px solid var(--fo-line); color: #fff; }
.fo-yl-tl-cell svg.fo-i { width: 12px; height: 12px; }
.fo-yl-tl-cell.is-done { background: var(--fo-ok); border-color: var(--fo-ok); }
.fo-yl-tl-cell.is-current { background: var(--fo-accent-soft); border: 2px solid var(--fo-accent); }
.fo-yl-tl-cell.is-behind { background: var(--fo-warn); border-color: var(--fo-warn); }
.fo-yl-tl-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--fo-line); font-size: 11.5px; color: var(--fo-ink-2); }
.fo-yl-tl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.fo-yl-tl-legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.fo-yl-tl-legend i.is-done { background: var(--fo-ok); }
.fo-yl-tl-legend i.is-current { background: var(--fo-accent-soft); border: 2px solid var(--fo-accent); }
.fo-yl-tl-legend i.is-behind { background: var(--fo-warn); }
.fo-yl-tl-legend i.is-up { background: var(--fo-canvas); border: 1px solid var(--fo-line); }

/* ── Calendar view ───────────────────────────────────────────────────── */
.fo-yl-cal { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 1000px) { .fo-yl-cal { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .fo-yl-cal { grid-template-columns: 1fr; } }
.fo-yl-cal-card { border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); background: var(--fo-surface); padding: 13px 14px; box-shadow: var(--fo-shadow-1); }
.fo-yl-cal-card.is-past { background: var(--fo-surface-2); }
.fo-yl-cal-card.is-now { border-color: var(--fo-accent); box-shadow: 0 0 0 3px var(--fo-accent-soft); }
.fo-yl-cal-top { display: flex; align-items: baseline; justify-content: space-between; }
.fo-yl-cal-mo { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fo-ink-3); }
.fo-yl-cal-no { font-family: var(--fo-font-display); font-size: 18px; font-weight: 780; color: var(--fo-ink-3); letter-spacing: -0.02em; }
.fo-yl-cal-card.is-now .fo-yl-cal-no { color: var(--fo-accent); }
.fo-yl-cal-title { font-family: var(--fo-font-display); font-size: 14px; font-weight: 700; color: var(--fo-ink); margin-top: 6px; letter-spacing: -0.01em; }
.fo-yl-cal-sum { font-size: 11.5px; line-height: 1.45; color: var(--fo-ink-3); margin-top: 4px; }
.fo-yl-cal-rem { display: flex; align-items: center; gap: 6px; margin-top: 9px; padding: 6px 9px; border-radius: 8px; background: var(--fo-warn-soft); color: var(--fo-warn); font-size: 11px; font-weight: 600; }
.fo-yl-cal-rem svg.fo-i { width: 12px; height: 12px; }
.fo-yl-cal-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 11px; flex-wrap: wrap; }
.fo-yl-cal-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 700; }
.fo-yl-cal-pill svg.fo-i { width: 11px; height: 11px; }
.fo-yl-cal-pill.is-now { background: var(--fo-accent-soft); color: var(--fo-accent-deep); }
.fo-yl-cal-pill.is-past { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-yl-cal-pill.is-up { background: var(--fo-surface-2); color: var(--fo-ink-3); border: 1px solid var(--fo-line); }
.fo-yl-cal-lead { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--fo-ink-2); }
.fo-yl-cal-lead.is-tbd { color: var(--fo-ink-3); }

/* ════════════════════════════════════════════════════════════════════════
   MENTORSHIP PROGRAM — the 90-day journey (Safety pattern)
   A cohort of new hires, each on a Red→Orange→Yellow→Graduated track with
   30/60/90-day evaluation gates. The day-progress bar stays ROYAL (brand);
   gate state carries the status colour (done green · due amber · overdue red);
   the four stages are the program's own belt names as small dot/chip accents.
   ════════════════════════════════════════════════════════════════════════ */

/* stage text-colour helpers (used on drawer pulse values) */
.fo-mp-red { color: var(--fo-danger); }
.fo-mp-orange { color: #b0620b; }
.fo-mp-yellow { color: #897006; }
.fo-mp-grad { color: var(--fo-ok); }

/* ── cohort summary ──────────────────────────────────────────────────── */
.fo-mp-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; margin-bottom: 16px; }
.fo-mp-hero-fig .n { font-family: var(--fo-font-display); font-size: 46px; font-weight: 780; letter-spacing: -0.03em; line-height: 1; color: var(--fo-ink); font-variant-numeric: tabular-nums; }
.fo-mp-hero-fig .l { font-size: 12.5px; color: var(--fo-ink-3); margin-top: 9px; }
.fo-mp-hero-pipe { flex: 1; min-width: 260px; max-width: 440px; }
.fo-mp-pipe { display: flex; height: 10px; border-radius: 999px; overflow: hidden; gap: 2px; background: var(--fo-line); }
.fo-mp-pipe span { display: block; height: 100%; border-radius: 2px; }
.fo-mp-pipe span.is-red { background: var(--fo-danger); }
.fo-mp-pipe span.is-orange { background: #d07d12; }
.fo-mp-pipe span.is-yellow { background: #c5a022; }
.fo-mp-pipe span.is-grad { background: var(--fo-ok); }
.fo-mp-pipe-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 11px; }
.fo-mp-leg { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--fo-ink-2); }
.fo-mp-leg b { color: var(--fo-ink); font-weight: 700; }
.fo-mp-leg .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.fo-mp-leg .dot.is-red { background: var(--fo-danger); }
.fo-mp-leg .dot.is-orange { background: #d07d12; }
.fo-mp-leg .dot.is-yellow { background: #c5a022; }
.fo-mp-leg .dot.is-grad { background: var(--fo-ok); }

.fo-mp-attn { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-radius: var(--fo-r-md); background: var(--fo-warn-soft); border: 1px solid rgba(161, 98, 7, 0.18); margin-bottom: 16px; font-size: 12.5px; color: var(--fo-ink-2); }
.fo-mp-attn > svg.fo-i { width: 16px; height: 16px; color: var(--fo-warn); flex: none; margin-top: 1px; }
.fo-mp-attn b { color: var(--fo-ink); font-weight: 650; }
.fo-mp-attn[hidden] { display: none; }

/* ── the cohort ──────────────────────────────────────────────────────── */
.fo-mp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 920px) { .fo-mp-grid { grid-template-columns: minmax(0, 1fr); } }

.fo-mp-card { border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); background: var(--fo-surface); padding: 15px 16px 14px; cursor: pointer; box-shadow: var(--fo-shadow-1); transition: border-color var(--fo-fast) var(--fo-ease), box-shadow var(--fo-fast) var(--fo-ease), transform var(--fo-fast) var(--fo-ease); }
.fo-mp-card:hover { border-color: var(--fo-line-strong); box-shadow: var(--fo-shadow-2); transform: translateY(-1px); }
.fo-mp-card:focus-visible { outline: none; border-color: var(--fo-accent); box-shadow: 0 0 0 3px var(--fo-accent-soft); }
.fo-mp-card-top { display: flex; align-items: center; gap: 11px; }
.fo-mp-who { flex: 1; min-width: 0; }
.fo-mp-who .nm { font-family: var(--fo-font-display); font-size: 14px; font-weight: 700; color: var(--fo-ink); letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-mp-who .sub { font-size: 11.5px; color: var(--fo-ink-3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.fo-mp-stage { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; flex: none; }
.fo-mp-stage .dot { width: 7px; height: 7px; border-radius: 50%; }
.fo-mp-stage.is-red { color: var(--fo-danger); background: var(--fo-danger-soft); }
.fo-mp-stage.is-red .dot { background: var(--fo-danger); }
.fo-mp-stage.is-orange { color: #b0620b; background: #fbf0e1; }
.fo-mp-stage.is-orange .dot { background: #d07d12; }
.fo-mp-stage.is-yellow { color: #897006; background: #f7f2da; }
.fo-mp-stage.is-yellow .dot { background: #c5a022; }
.fo-mp-stage.is-grad { color: var(--fo-ok); background: var(--fo-ok-soft); }
.fo-mp-stage.is-grad .dot { background: var(--fo-ok); }

/* ── the journey bar ─────────────────────────────────────────────────── */
.fo-mp-journey { position: relative; padding: 16px 10px 0; }
.fo-mp-track { position: relative; height: 8px; border-radius: 999px; background: var(--fo-line); }
.fo-mp-fill { position: absolute; left: 0; top: 0; height: 100%; border-radius: 999px; background: var(--fo-accent); transition: width var(--fo-base) var(--fo-spring); }
.fo-mp-track.is-grad .fo-mp-fill { background: var(--fo-ok); }
.fo-mp-now { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 12px; height: 12px; border-radius: 50%; background: var(--fo-accent); border: 2.5px solid var(--fo-surface); box-shadow: 0 0 0 1px var(--fo-accent); z-index: 3; }
.fo-mp-gate { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--fo-surface); border: 2px solid var(--fo-line-strong); color: var(--fo-ink-3); z-index: 2; }
.fo-mp-gate svg.fo-i { width: 10px; height: 10px; }
.fo-mp-gate.is-done { background: var(--fo-ok); border-color: var(--fo-ok); color: #fff; }
.fo-mp-gate.is-overdue { background: var(--fo-danger); border-color: var(--fo-danger); color: #fff; }
.fo-mp-gate.is-due { background: var(--fo-warn); border-color: var(--fo-warn); color: #fff; }
.fo-mp-scale { position: relative; height: 14px; margin-top: 7px; }
.fo-mp-scale span { position: absolute; transform: translateX(-50%); font-size: 10px; font-weight: 600; color: var(--fo-ink-3); font-variant-numeric: tabular-nums; }

.fo-mp-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.fo-mp-mentor { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.fo-mp-mentor .tx { min-width: 0; line-height: 1.25; }
.fo-mp-mentor .tx b { display: block; font-size: 12px; font-weight: 600; color: var(--fo-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-mp-mentor .tx i { font-style: normal; font-size: 10.5px; color: var(--fo-ink-3); }

.fo-mp-next { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 650; white-space: nowrap; flex: none; background: var(--fo-surface-2); border: 1px solid var(--fo-line); color: var(--fo-ink-2); }
.fo-mp-next svg.fo-i { width: 12px; height: 12px; }
.fo-mp-next.is-due { background: var(--fo-warn-soft); color: var(--fo-warn); border-color: transparent; }
.fo-mp-next.is-overdue { background: var(--fo-danger-soft); color: var(--fo-danger); border-color: transparent; }
.fo-mp-next.is-ready, .fo-mp-next.is-grad { background: var(--fo-ok-soft); color: var(--fo-ok); border-color: transparent; }

/* ── drawer: journey pane ────────────────────────────────────────────── */
.fo-mp-mentorcard { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--fo-r-md); background: var(--fo-surface-2); border: 1px solid var(--fo-line); }
.fo-mp-mentorcard .tx { flex: 1; min-width: 0; }
.fo-mp-mentorcard .nm { font-size: 14px; font-weight: 650; color: var(--fo-ink); }
.fo-mp-mentorcard .sub { font-size: 11.5px; color: var(--fo-ink-3); }
.fo-mp-mentorcard .fo-btn { flex: none; padding: 6px 13px; font-size: 12px; }

.fo-mp-sec-h { display: flex; align-items: center; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fo-ink-3); margin: 18px 0 13px; }
.fo-mp-sec-h:first-child { margin-top: 2px; }
.fo-mp-req { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border: 1px solid var(--fo-line-strong); border-radius: 8px; background: var(--fo-surface); font: inherit; font-size: 11px; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--fo-accent-deep); cursor: pointer; transition: border-color var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease); }
.fo-mp-req svg.fo-i { width: 12px; height: 12px; }
.fo-mp-req:hover { border-color: var(--fo-accent); background: var(--fo-accent-soft); }

.fo-mp-steps { display: flex; flex-direction: column; }
.fo-mp-step { display: flex; gap: 13px; padding-bottom: 18px; position: relative; }
.fo-mp-step::before { content: ''; position: absolute; left: 13px; top: 28px; bottom: -2px; width: 2px; background: var(--fo-line); }
.fo-mp-step:last-child::before { display: none; }
.fo-mp-step-dot { flex: none; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--fo-surface); border: 2px solid var(--fo-line-strong); color: var(--fo-ink-3); z-index: 1; }
.fo-mp-step-dot svg.fo-i { width: 14px; height: 14px; }
.fo-mp-step.is-done .fo-mp-step-dot { background: var(--fo-ok); border-color: var(--fo-ok); color: #fff; }
.fo-mp-step.is-overdue .fo-mp-step-dot { background: var(--fo-danger); border-color: var(--fo-danger); color: #fff; }
.fo-mp-step.is-due .fo-mp-step-dot { background: var(--fo-warn); border-color: var(--fo-warn); color: #fff; }
.fo-mp-step.is-ready .fo-mp-step-dot { background: var(--fo-ok-soft); border-color: var(--fo-ok); color: var(--fo-ok); }
.fo-mp-step-main { flex: 1; min-width: 0; padding-top: 3px; }
.fo-mp-step-h { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.fo-mp-step-h b { font-size: 13.5px; font-weight: 650; color: var(--fo-ink); }
.fo-mp-step.is-upcoming .fo-mp-step-h b { color: var(--fo-ink-2); }
.fo-mp-step-h .cap { font-size: 11.5px; color: var(--fo-ink-3); }
.fo-mp-step-h .cap.is-overdue { color: var(--fo-danger); font-weight: 600; }
.fo-mp-step-h .cap.is-due { color: var(--fo-warn); font-weight: 600; }
.fo-mp-step-h .cap.is-ready { color: var(--fo-ok); font-weight: 600; }
.fo-mp-step-cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 7px 13px; border: 1px solid var(--fo-line-strong); border-radius: 9px; background: var(--fo-surface); font: inherit; font-size: 12px; font-weight: 650; color: var(--fo-accent-deep); cursor: pointer; transition: border-color var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease); }
.fo-mp-step-cta svg.fo-i { width: 13px; height: 13px; }
.fo-mp-step-cta:hover { border-color: var(--fo-accent); background: var(--fo-accent-soft); }
.fo-mp-step-cta.is-go { background: var(--fo-ok-soft); border-color: transparent; color: var(--fo-ok); }

.fo-mp-eval-scores { margin-top: 11px; display: flex; flex-direction: column; gap: 6px; }
.fo-mp-fac { display: flex; align-items: center; gap: 10px; }
.fo-mp-fac .fl { flex: none; width: 90px; font-size: 11.5px; color: var(--fo-ink-2); }
.fo-mp-fac .fb { flex: 1; height: 6px; border-radius: 999px; background: var(--fo-line); overflow: hidden; }
.fo-mp-fac .fb span { display: block; height: 100%; border-radius: 999px; background: var(--fo-accent); }
.fo-mp-fac .fv { flex: none; width: 26px; text-align: right; font-size: 11.5px; font-weight: 700; color: var(--fo-ink); font-variant-numeric: tabular-nums; }
.fo-mp-eval-foot { display: flex; align-items: center; gap: 10px; margin-top: 11px; flex-wrap: wrap; }
.fo-mp-rating { display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.fo-mp-rating.is-ok { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-mp-rating.is-warn { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-mp-rating.is-danger { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-mp-signed { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--fo-ink-3); }
.fo-mp-signed svg.fo-i { width: 12px; height: 12px; color: var(--fo-ok); }

/* ── drawer: 360° feedback pane ──────────────────────────────────────── */
.fo-mp-fbs { display: flex; flex-direction: column; gap: 13px; }
.fo-mp-fb { display: flex; gap: 10px; }
.fo-mp-fb .bd { flex: 1; min-width: 0; }
.fo-mp-fb-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fo-mp-fb-h b { font-size: 13px; font-weight: 650; color: var(--fo-ink); }
.fo-mp-fb-role { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fo-accent); background: var(--fo-accent-soft); padding: 1px 7px; border-radius: 999px; }
.fo-mp-fb-period { margin-left: auto; font-size: 11px; color: var(--fo-ink-3); font-variant-numeric: tabular-nums; }
.fo-mp-fb p { margin: 4px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--fo-ink-2); }

/* ── views: toolbar + cohort/kanban/roster panes ─────────────────────── */
.fo-mp-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.fo-mp-view { display: none; }
.fo-mp-view.is-active { display: block; }

/* kanban — grouped by belt stage */
.fo-mp-kanban { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
@media (max-width: 1080px) { .fo-mp-kanban { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .fo-mp-kanban { grid-template-columns: 1fr; } }
.fo-mp-kcol { background: var(--fo-surface-2); border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); padding: 12px; }
.fo-mp-kcol-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fo-mp-kcol-h .n { font-size: 12.5px; font-weight: 700; color: var(--fo-ink-3); font-variant-numeric: tabular-nums; }
.fo-mp-kcol-band { font-size: 10.5px; color: var(--fo-ink-3); margin: 4px 0 11px; }
.fo-mp-kcol-body { display: flex; flex-direction: column; gap: 10px; }
.fo-mp-kempty { font-size: 12px; color: var(--fo-ink-3); text-align: center; padding: 14px 0; }
.fo-mp-kcard { background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); padding: 12px; cursor: pointer; box-shadow: var(--fo-shadow-1); transition: border-color var(--fo-fast) var(--fo-ease), box-shadow var(--fo-fast) var(--fo-ease); }
.fo-mp-kcard:hover { border-color: var(--fo-line-strong); box-shadow: var(--fo-shadow-2); }
.fo-mp-kcard:focus-visible { outline: none; border-color: var(--fo-accent); box-shadow: 0 0 0 3px var(--fo-accent-soft); }
.fo-mp-kcard-top { display: flex; align-items: center; gap: 9px; }
.fo-mp-kwho { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.fo-mp-kwho .nm { font-size: 13px; font-weight: 650; color: var(--fo-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-mp-kwho .sub { font-size: 11px; color: var(--fo-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-mp-kcard .fo-mp-journey { padding: 13px 4px 0; }
.fo-mp-kcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 13px; }
.fo-mp-kcard-foot .fo-mp-mentor { min-width: 0; }
.fo-mp-kcard-next { margin-top: 9px; }

/* roster — the cohort as a table */
.fo-mp-rostwrap { border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); overflow-x: auto; background: var(--fo-surface); box-shadow: var(--fo-shadow-1); }
.fo-mp-roster { width: 100%; border-collapse: collapse; }
.fo-mp-roster th { text-align: left; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fo-ink-3); padding: 11px 14px; border-bottom: 1px solid var(--fo-line); white-space: nowrap; background: var(--fo-surface-2); }
.fo-mp-roster td { padding: 11px 14px; border-bottom: 1px solid var(--fo-line); vertical-align: middle; }
.fo-mp-roster tbody tr:last-child td { border-bottom: 0; }
.fo-mp-roster tbody tr { cursor: pointer; transition: background var(--fo-fast) var(--fo-ease); }
.fo-mp-roster tbody tr:hover { background: var(--fo-surface-2); }
.fo-mp-roster tbody tr:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--fo-accent-soft); }
.fo-mp-rid { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.fo-mp-rid .tx { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.fo-mp-rid .nm { font-size: 13px; font-weight: 650; color: var(--fo-ink); }
.fo-mp-rid .sub { font-size: 11px; color: var(--fo-ink-3); }
.fo-mp-rdim { font-size: 12.5px; color: var(--fo-ink-2); white-space: nowrap; }
.fo-mp-rmentor { display: inline-flex; align-items: center; gap: 8px; }
.fo-mp-rmentor b { font-size: 12.5px; font-weight: 600; color: var(--fo-ink); white-space: nowrap; }
.fo-mp-rprog { display: inline-flex; align-items: center; gap: 9px; }
.fo-mp-rbar { width: 90px; height: 6px; border-radius: 99px; background: var(--fo-line); overflow: hidden; flex: none; }
.fo-mp-rbar > i { display: block; height: 100%; border-radius: 99px; background: var(--fo-accent); }
.fo-mp-rbar.is-grad > i { background: var(--fo-ok); }
.fo-mp-rprog b { font-size: 12.5px; font-weight: 700; color: var(--fo-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fo-mp-rprog b span { color: var(--fo-ink-3); font-weight: 500; }

/* inline change-mentor button + the reassign popover */
.fo-mp-mentor-change { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border: 1px solid var(--fo-line); border-radius: 999px; background: var(--fo-surface); font: inherit; font-size: 11px; font-weight: 600; color: var(--fo-ink-2); cursor: pointer; flex: none; transition: border-color var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease), color var(--fo-fast) var(--fo-ease); }
.fo-mp-mentor-change svg.fo-i { width: 12px; height: 12px; }
.fo-mp-mentor-change:hover { border-color: var(--fo-accent); background: var(--fo-accent-soft); color: var(--fo-accent-deep); }
.fo-mp-mentorpop { position: fixed; z-index: 1300; width: 252px; max-height: 326px; overflow-y: auto; background: var(--fo-surface); border: 1px solid var(--fo-line-strong); border-radius: var(--fo-r-md); box-shadow: var(--fo-shadow-2); padding: 8px; animation: fo-fade 0.14s var(--fo-ease) both; }
.fo-mp-mentorpop[hidden] { display: none; }
.fo-mp-mentorpop-h { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fo-ink-3); padding: 4px 8px 8px; }
.fo-mp-mentorpop-list { display: flex; flex-direction: column; gap: 2px; }
.fo-mp-mentoropt { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 7px 8px; border: 0; border-radius: 9px; background: transparent; font: inherit; cursor: pointer; transition: background var(--fo-fast) var(--fo-ease); }
.fo-mp-mentoropt:hover { background: var(--fo-surface-2); }
.fo-mp-mentoropt .tx { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.fo-mp-mentoropt .tx b { font-size: 12.5px; font-weight: 600; color: var(--fo-ink); }
.fo-mp-mentoropt .tx i { font-style: normal; font-size: 10.5px; color: var(--fo-ink-3); }
.fo-mp-mentoropt .ck { margin-left: auto; color: var(--fo-accent); display: inline-flex; }
.fo-mp-mentoropt .ck svg.fo-i { width: 15px; height: 15px; }
.fo-mp-mentoropt.is-current { background: var(--fo-accent-soft); }
.fo-mp-mentoropt.is-current .tx b { color: var(--fo-accent-deep); }

/* ════════════════════════════════════════════════════════════════════════
   SAFETY SCORE CARDS — minimal, number-led roster (Safety pattern)
   One strong score per row; tier = a small colored dot + label. No rings,
   grades, podium, or KPI slabs. Tiers → sanctioned palette as small accents:
   platinum→royal · gold→amber · silver→neutral · needs→red.
   ════════════════════════════════════════════════════════════════════════ */

/* tier color helpers — text colour + fill */
.fo-sc2-platinum { color: var(--fo-accent); }   .fo-sc2-fill-platinum { background: var(--fo-accent); }
.fo-sc2-gold { color: var(--fo-warn); }          .fo-sc2-fill-gold { background: var(--fo-warn); }
.fo-sc2-silver { color: var(--fo-ink-2); }        .fo-sc2-fill-silver { background: var(--fo-ink-3); }
.fo-sc2-needs { color: var(--fo-danger); }        .fo-sc2-fill-needs { background: var(--fo-danger); }
.fo-sc2-tdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex: none; }

/* hero — team average + tier distribution */
.fo-sc2-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px 40px; flex-wrap: wrap; margin-bottom: 22px; }
.fo-sc2-avg .n { font-family: var(--fo-font-display); font-size: 46px; font-weight: 780; letter-spacing: -0.03em; line-height: 1; color: var(--fo-ink); font-variant-numeric: tabular-nums; }
.fo-sc2-avg .n .u { font-size: 16px; font-weight: 600; color: var(--fo-ink-3); margin-left: 5px; letter-spacing: 0; }
.fo-sc2-avg .l { font-size: 12.5px; color: var(--fo-ink-3); margin-top: 9px; }
.fo-sc2-dist { flex: 1; min-width: 240px; max-width: 380px; }
.fo-sc2-distbar { display: flex; height: 9px; border-radius: 999px; overflow: hidden; gap: 2px; background: var(--fo-line); }
.fo-sc2-distbar span { display: block; height: 100%; border-radius: 2px; }
.fo-sc2-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; }
.fo-sc2-leg { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--fo-ink-2); }
.fo-sc2-leg b { color: var(--fo-ink); font-weight: 700; }

/* shared: trend delta + tier label (used by the card grid and the drawer) */
.fo-sc2-delta { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.fo-sc2-delta.is-up { color: var(--fo-ok); }
.fo-sc2-delta.is-down { color: var(--fo-danger); }
.fo-sc2-delta.is-flat { color: var(--fo-ink-3); font-weight: 600; }
.fo-sc2-tier { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.fo-sc2-tier.is-lg { font-size: 12px; }

/* ── profile detail drawer — content blocks inside the shared .fo-dsec sections ── */
.fo-sc2-d-flag, .fo-sc2-d-clear { display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px; border-radius: var(--fo-r-md); font-size: 12.5px; line-height: 1.5; color: var(--fo-ink-2); }
.fo-sc2-d-flag { background: var(--fo-danger-soft); }
.fo-sc2-d-clear { background: var(--fo-ok-soft); }
.fo-sc2-d-flag b, .fo-sc2-d-clear b { color: var(--fo-ink); font-weight: 700; }
.fo-sc2-d-flag > svg.fo-i { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--fo-danger); }
.fo-sc2-d-clear > svg.fo-i { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--fo-ok); }
.fo-sc2-d-acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.fo-sc2-act { border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); padding: 12px 8px; text-align: center; }
.fo-sc2-act .n { font-family: var(--fo-font-display); font-size: 20px; font-weight: 750; color: var(--fo-ink); }
.fo-sc2-act .l { font-size: 10.5px; color: var(--fo-ink-3); margin-top: 3px; }

/* drawer · Score breakdown tab — template KPI rows (like the safety module) */
.fo-sck-tplbar { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fo-ink-3); margin-bottom: 4px; }
.fo-sck-row { display: grid; grid-template-columns: minmax(0, 1fr) 78px 34px; align-items: center; gap: 13px; padding: 11px 0; border-top: 1px solid var(--fo-line); }
.fo-sck-row:first-of-type { border-top: 0; }
.fo-sck-row.is-na { opacity: 0.62; }
.fo-sck-main { min-width: 0; }
.fo-sck-name { font-size: 13px; font-weight: 650; color: var(--fo-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-sck-meta { display: flex; align-items: center; gap: 7px; margin-top: 2px; font-size: 11px; color: var(--fo-ink-3); min-width: 0; }
.fo-sck-meta .mt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-sck-src { flex: none; font-size: 8.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 1px 5px; border-radius: 5px; }
.fo-sck-src.is-auto { background: var(--fo-surface-2); color: var(--fo-ink-3); border: 1px solid var(--fo-line); }
.fo-sck-src.is-exception { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-sck-src.is-event { background: var(--fo-accent-soft); color: var(--fo-accent-deep); }
.fo-sck-bar { height: 6px; border-radius: 999px; background: var(--fo-line); overflow: hidden; }
.fo-sck-bar span { display: block; height: 100%; border-radius: 999px; }
.fo-sck-bar span.is-hi { background: var(--fo-ok); }
.fo-sck-bar span.is-mid { background: var(--fo-warn); }
.fo-sck-bar span.is-lo { background: var(--fo-danger); }
.fo-sck-raw { font-size: 13px; font-weight: 700; color: var(--fo-ink); text-align: right; font-variant-numeric: tabular-nums; }
.fo-sck-raw.is-na { color: var(--fo-ink-3); font-weight: 600; font-size: 11.5px; }

/* drawer · Safety activity tab — type chips on the feed rows */
.fo-sck-ty { flex: none; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 3px 8px; border-radius: 999px; }
.fo-sck-ty.is-insp { background: var(--fo-accent-soft); color: var(--fo-accent-deep); }
.fo-sck-ty.is-obs { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-sck-ty.is-spot { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-sck-ty.is-inc { background: var(--fo-danger-soft); color: var(--fo-danger); }

/* Export PDF — print-only score-card sheet (2 pages: breakdown · 30-day activity) */
.fo-scp { display: none; }
@media print {
  @page { size: A4 portrait; margin: 15mm; }
  html, body { background: #fff !important; }
  body > :not(#scdPrint) { display: none !important; }
  #scdPrint { display: block !important; color: #181b21; font-family: "Plus Jakarta Sans", Arial, sans-serif; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .fo-scp-page { page-break-after: always; break-after: page; }
  .fo-scp-page:last-child { page-break-after: auto; break-after: auto; }
  .fo-scp-head { border-bottom: 2px solid #0b3f9e; padding-bottom: 10px; margin-bottom: 18px; }
  .fo-scp-brand { font-size: 10.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: #0b3f9e; }
  .fo-scp-id { font-size: 18px; margin-top: 7px; } .fo-scp-id b { font-weight: 800; }
  .fo-scp-meta { font-size: 11px; color: #5d6470; margin-top: 4px; }
  #scdPrint h2 { font-size: 13px; font-weight: 800; margin: 0 0 9px; }
  .fo-scp-tbl { width: 100%; border-collapse: collapse; font-size: 11px; }
  .fo-scp-tbl th { text-align: left; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #5d6470; border-bottom: 1.5px solid #cbd0d8; padding: 7px 8px; }
  .fo-scp-tbl td { padding: 7px 8px; border-bottom: 1px solid #eceef1; vertical-align: top; }
  .fo-scp-tbl td.r, .fo-scp-tbl th.r { text-align: right; white-space: nowrap; }
  .fo-scp-tbl tr.na td { color: #989fab; }
  .fo-scp-totals { display: flex; gap: 10px; margin-bottom: 16px; }
  .fo-scp-tot { flex: 1; border: 1px solid #cbd0d8; border-radius: 8px; padding: 11px 8px; text-align: center; }
  .fo-scp-tot .n { font-size: 20px; font-weight: 800; }
  .fo-scp-tot .l { font-size: 9.5px; color: #5d6470; margin-top: 2px; }
  .fo-scp-foot { margin-top: 14px; font-size: 9px; color: #989fab; }
  /* trend block */
  .fo-scp-trend { margin: 18px 0 4px; padding: 14px 16px; border: 1px solid #cbd0d8; border-radius: 8px; }
  .fo-scp-trend svg { display: block; width: 100%; height: 46px; }
  .fo-scp-trend .vals { margin-top: 8px; font-size: 11px; color: #5d6470; }
  .fo-scp-trend .vals b { color: #181b21; font-weight: 800; }
}

/* Export-options popover (the floating box on Export PDF) */
.fo-scx-wrap { position: relative; }
.fo-scx { position: absolute; bottom: calc(100% + 10px); right: 0; width: 246px; background: var(--fo-surface); border: 1px solid var(--fo-line-strong); border-radius: var(--fo-r-md); box-shadow: 0 14px 36px -10px rgba(24, 27, 33, 0.3); padding: 12px; z-index: 95; }
.fo-scx[hidden] { display: none; }
.fo-scx-h { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fo-ink-3); margin: 2px 2px 8px; }
.fo-scx-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 4px; cursor: pointer; border-radius: 8px; }
.fo-scx-row:hover { background: var(--fo-surface-2); }
.fo-scx-row .lbl { font-size: 13px; font-weight: 550; color: var(--fo-ink); }
.fo-scx-row input { position: absolute; opacity: 0; width: 0; height: 0; }
.fo-scx-row input:checked ~ .fo-sw { background: var(--fo-accent); }
.fo-scx-row input:checked ~ .fo-sw::after { transform: translateX(14px); }
.fo-scx-row input:focus-visible ~ .fo-sw { box-shadow: 0 0 0 3px var(--fo-accent-soft); }
.fo-scx-go { width: 100%; margin-top: 9px; justify-content: center; }
.fo-scx-arrow { position: absolute; bottom: -6px; right: 24px; width: 12px; height: 12px; background: var(--fo-surface); border-right: 1px solid var(--fo-line-strong); border-bottom: 1px solid var(--fo-line-strong); transform: rotate(45deg); }

/* ════════════════════════════════════════════════════════════════════════
   SCORE CARDS — Apple-style widget tiles (the card grid)
   A soft white card: identity, a big count-up score + a trend pill, and a
   small interactive bar chart of the score trend (grows in, values on hover).
   Tier tints the chart bars; reuses the .fo-sc2 tier helpers in the drawer.
   ════════════════════════════════════════════════════════════════════════ */
.fo-sc3-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; align-items: start; }
@media (max-width: 1180px) { .fo-sc3-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px)  { .fo-sc3-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .fo-sc3-grid { grid-template-columns: 1fr; } }

.fo-sc3-card {
  display: flex; flex-direction: column; gap: 11px;
  width: 100%; padding: 15px; background: var(--fo-surface);
  border: 1px solid var(--fo-line); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(24, 27, 33, 0.04);
  font-family: inherit; text-align: left; cursor: pointer;
  transition: box-shadow var(--fo-fast) var(--fo-ease), border-color var(--fo-fast) var(--fo-ease), transform var(--fo-fast) var(--fo-ease);
}
.fo-sc3-card:hover { box-shadow: 0 1px 2px rgba(24, 27, 33, 0.05), 0 8px 18px -12px rgba(24, 27, 33, 0.18); border-color: var(--fo-line-strong); transform: translateY(-1px); }
.fo-sc3-card:focus-visible { outline: 2px solid var(--fo-accent); outline-offset: 2px; }

/* identity */
.fo-sc3-id { min-width: 0; }
.fo-sc3-name { display: block; font-size: 13px; font-weight: 650; color: var(--fo-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-sc3-sub { display: block; font-size: 11px; color: var(--fo-ink-3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* score + trend pill */
.fo-sc3-scorerow { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.fo-sc3-score { font-family: var(--fo-font-display); font-size: 29px; font-weight: 780; line-height: 0.9; letter-spacing: -0.03em; color: var(--fo-ink); font-variant-numeric: tabular-nums; }
.fo-sc3-unit { font-family: var(--fo-font); font-size: 11.5px; font-weight: 650; color: var(--fo-ink-3); margin-left: 2px; letter-spacing: 0; }
.fo-sc3-trend { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; white-space: nowrap; margin-bottom: 2px; }
.fo-sc3-trend .ic { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 6px; color: #fff; flex: none; }
.fo-sc3-trend .ic svg.fo-i { width: 10px; height: 10px; }
.fo-sc3-trend.is-up { color: var(--fo-ok); } .fo-sc3-trend.is-up .ic { background: var(--fo-ok); }
.fo-sc3-trend.is-down { color: var(--fo-danger); } .fo-sc3-trend.is-down .ic { background: var(--fo-danger); }
.fo-sc3-trend.is-flat { color: var(--fo-ink-3); } .fo-sc3-trend.is-flat .ic { background: var(--fo-ink-3); }

/* interactive mini bar chart */
.fo-sc3-chart { display: flex; align-items: flex-end; gap: 5px; height: 32px; }
.fo-sc3-bar { position: relative; flex: 1; height: 0; min-height: 4px; border-radius: 4px; background: var(--fo-line-strong); transition: height 0.6s var(--fo-ease), filter var(--fo-fast) var(--fo-ease); }
.fo-sc3-chart.t-platinum .fo-sc3-bar { background: rgba(11, 63, 158, 0.16); }
.fo-sc3-chart.t-gold .fo-sc3-bar { background: rgba(161, 98, 7, 0.18); }
.fo-sc3-chart.t-silver .fo-sc3-bar { background: rgba(93, 100, 112, 0.18); }
.fo-sc3-chart.t-needs .fo-sc3-bar { background: rgba(179, 38, 30, 0.16); }
.fo-sc3-chart.t-platinum .fo-sc3-bar.is-now { background: var(--fo-accent); }
.fo-sc3-chart.t-gold .fo-sc3-bar.is-now { background: var(--fo-warn); }
.fo-sc3-chart.t-silver .fo-sc3-bar.is-now { background: var(--fo-ink-2); }
.fo-sc3-chart.t-needs .fo-sc3-bar.is-now { background: var(--fo-danger); }
.fo-sc3-bar:hover { filter: brightness(1.08); }
.fo-sc3-bar::after {
  content: attr(data-v); position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%) translateY(3px); background: var(--fo-ink); color: #fff;
  font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px;
  opacity: 0; pointer-events: none; white-space: nowrap; z-index: 3;
  transition: opacity 0.12s var(--fo-ease), transform 0.12s var(--fo-ease);
}
.fo-sc3-bar:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .fo-sc3-card:hover { transform: none; }
  .fo-sc3-bar { transition: none; }
}

/* ============================================================
   JOB VIEW (/styleguide/job-view) — the project command center.
   Reuses the incident-view workspace shell (.fo-iv-*) + records
   drawer + .fo-inc-kpis; only the job-specific marks are new.
   ============================================================ */

/* identity bar: job_name beside the mono number, program flags */
.fo-job-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fo-ink);
}
.fo-job-flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  color: var(--fo-ink-2);
  background: var(--fo-canvas);
  border: 1px solid var(--fo-line);
}
.fo-job-flag .fo-i { width: 12px; height: 12px; color: var(--fo-ink-3); }

/* Overview roll-up grid */
.fo-job-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.fo-job-ov-card .fo-card-title { display: flex; align-items: center; justify-content: space-between; }
.fo-job-viewall {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 650;
  color: var(--fo-accent);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 2px 2px;
}
.fo-job-viewall .fo-i { width: 13px; height: 13px; }
.fo-job-viewall:hover { text-decoration: underline; }
.fo-job-ov-note { font-size: 12px; color: var(--fo-ink-3); margin: 10px 0 0; line-height: 1.5; }

/* avatar stack */
.fo-job-avastack { display: flex; align-items: center; padding-top: 4px; }
.fo-job-avastack .fo-ava { margin-left: -8px; border: 2px solid var(--fo-surface); }
.fo-job-avastack .fo-ava:first-child { margin-left: 0; }
.fo-job-avamore {
  margin-left: -8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  min-width: 30px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--fo-canvas);
  border: 2px solid var(--fo-surface);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--fo-ink-2);
}

/* contract roll-up mini-stats (aside + Overview) */
.fo-job-money { display: grid; gap: 7px; }
.fo-job-money .row { display: flex; align-items: baseline; justify-content: space-between; font-size: 12.5px; }
.fo-job-money .row .k { color: var(--fo-ink-3); }
.fo-job-money .row .v { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--fo-ink); }
.fo-job-money .row.is-pending { margin-top: 3px; padding-top: 8px; border-top: 1px solid var(--fo-line); }
.fo-job-money .row.is-pending .v { color: var(--fo-warn); }

/* Members — role rows + chips */
.fo-job-roles { display: grid; gap: 12px; }
.fo-job-role { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fo-job-role-lb { flex: 0 0 130px; font-size: 12.5px; font-weight: 650; color: var(--fo-ink-2); }
.fo-job-role-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fo-job-role-empty { font-size: 12.5px; color: var(--fo-ink-3); font-style: italic; }
.fo-job-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--fo-accent-deep, var(--fo-accent));
  background: var(--fo-accent-soft);
  border: 1px solid rgba(11, 63, 158, 0.12);
}
.fo-job-chip .x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 0;
  background: none;
  color: var(--fo-ink-3);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.fo-job-chip .x:hover { background: rgba(11, 63, 158, 0.1); color: var(--fo-accent); }
.fo-job-role-add { flex: 0 0 180px; min-width: 150px; }
.fo-job-count { margin-left: auto; font-size: 12px; color: var(--fo-ink-3); font-weight: 600; }

/* Budget — totals strip + per-row meter */
.fo-job-totals {
  display: flex;
  gap: 0;
  margin: 4px 0 14px;
  border: 1px solid var(--fo-line);
  border-radius: var(--fo-r-md, 10px);
  overflow: hidden;
}
.fo-job-totals .t { flex: 1; padding: 11px 14px; border-left: 1px solid var(--fo-line); }
.fo-job-totals .t:first-child { border-left: 0; }
.fo-job-totals .t .k { display: block; font-size: 11px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fo-ink-3); }
.fo-job-totals .t .v { display: block; margin-top: 2px; font-size: 16px; font-weight: 750; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.fo-job-totals .t .v.is-ok { color: var(--fo-ok); }
.fo-job-budget td.num.is-neg { color: var(--fo-danger); }
.fo-job-meter {
  display: inline-block;
  vertical-align: middle;
  width: 64px;
  height: 6px;
  border-radius: 999px;
  background: var(--fo-line);
  overflow: hidden;
}
.fo-job-meter > span { display: block; height: 100%; border-radius: 999px; background: var(--fo-accent); }
.fo-job-meter.is-warn > span { background: var(--fo-warn); }
.fo-job-meter.is-over > span { background: var(--fo-danger); }
.fo-job-meter-n { margin-left: 8px; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--fo-ink-2); }
.fo-job-meter-n.is-over { color: var(--fo-danger); }

/* Tasks — kind + priority pills */
.fo-job-kind {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 650;
  color: var(--fo-ink-2);
  background: var(--fo-canvas);
  border: 1px solid var(--fo-line);
}
.fo-job-kind.is-mile { color: var(--fo-accent); background: var(--fo-accent-soft); border-color: rgba(11, 63, 158, 0.12); }
.fo-job-kind.is-punch { color: var(--fo-warn); background: var(--fo-warn-soft, rgba(245, 158, 11, 0.1)); border-color: rgba(245, 158, 11, 0.2); }
.fo-job-prio { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--fo-ink-2); }
.fo-job-prio .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--fo-ink-3); }
.fo-job-prio.is-low .dot { background: var(--fo-ink-3); }
.fo-job-prio.is-med .dot { background: var(--fo-accent); }
.fo-job-prio.is-high .dot { background: var(--fo-warn); }
.fo-job-prio.is-urgent .dot { background: var(--fo-danger); }
.fo-job-prio.is-urgent { color: var(--fo-danger); }
#jobTasks .is-neg { color: var(--fo-danger); font-weight: 600; }

/* Documents — grid of doc cards + dropzone */
.fo-job-docgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.fo-job-doc {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 13px;
  border: 1px solid var(--fo-line);
  border-radius: var(--fo-r-md, 10px);
  background: var(--fo-surface);
}
.fo-job-doc-ico {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--fo-accent-soft);
  color: var(--fo-accent);
}
.fo-job-doc-ico.is-img { background: rgba(125, 184, 239, 0.18); color: #2f6cc9; }
.fo-job-doc-ico .fo-i { width: 17px; height: 17px; }
.fo-job-doc-main { min-width: 0; }
.fo-job-doc-name { font-size: 13px; font-weight: 650; color: var(--fo-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fo-job-doc-meta { display: flex; align-items: center; gap: 7px; margin-top: 5px; font-size: 11.5px; color: var(--fo-ink-3); flex-wrap: wrap; }
.fo-job-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 92px;
  padding: 14px;
  border: 1.5px dashed var(--fo-line-strong, rgba(24, 27, 33, 0.14));
  border-radius: var(--fo-r-md, 10px);
  background: var(--fo-canvas);
  color: var(--fo-ink-2);
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}
.fo-job-dropzone:hover { border-color: var(--fo-accent); color: var(--fo-accent); }
.fo-job-dropzone .fo-i { width: 18px; height: 18px; color: var(--fo-ink-3); }
.fo-job-dropzone:hover .fo-i { color: var(--fo-accent); }
.fo-job-dropzone .sub { font-size: 11px; font-weight: 500; color: var(--fo-ink-3); }

/* Financials — compensation subheadings + 4-up totals variant */
.fo-job-comp-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; font-size: 12.5px; font-weight: 700; color: var(--fo-ink); }
.fo-job-totals.is-4 .t { padding: 10px 13px; }

@media (max-width: 720px) {
  .fo-job-overview { grid-template-columns: 1fr; }
  .fo-job-totals { flex-wrap: wrap; }
  .fo-job-totals .t { flex: 1 0 50%; }
  .fo-job-role-lb { flex-basis: 100%; }
}
/* the shared mobile rail rule sets flex:0 0 auto but leaves the base
   width:100%, so items fill the strip one at a time — reset to content
   width here only (scoped, so the shipped incident-view is untouched) */
@media (max-width: 1080px) {
  #jobGrid .fo-iv-rail-item { width: auto; }
}

/* ============================================================
   JOB BOARD (/styleguide/job-board) — the worklist the job view
   opens from. Reuses the incident-tracker frame (.fo-inc-board /
   -board-bar / -toolbar / -foot, .fo-inc-kpis, .fo-seg tabs,
   .fo-table); only the card grid + view toggle are new.
   ============================================================ */

/* completed jobs use a calm neutral dot (not royal) */
.fo-stat.is-info .dot { background: var(--fo-ink-3); }

/* cards/table view toggle: icon + label segment — inline-flex so the
   icon is vertically centred with the label (the base .fo-seg button is
   not a flex container, so the icon would otherwise sit on the baseline) */
.fo-jb-viewtoggle button { display: inline-flex; align-items: center; gap: 5px; }
.fo-jb-viewtoggle .fo-i { width: 13px; height: 13px; flex: none; }

/* card grid */
.fo-jb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
  padding: 16px;
}
/* a CSS display value overrides the [hidden] attribute — restore it so the
   Cards/Table view toggle actually hides the inactive view */
.fo-jb-grid[hidden] { display: none; }
.fo-jb-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 15px 16px;
  border: 1px solid var(--fo-line);
  border-radius: var(--fo-r-md, 12px);
  background: var(--fo-surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.14s ease, box-shadow 0.14s ease, transform 0.05s ease;
}
.fo-jb-card:hover {
  border-color: var(--fo-line-strong, rgba(24, 27, 33, 0.14));
  box-shadow: 0 8px 22px -14px rgba(24, 27, 33, 0.28);
}
.fo-jb-card:active { transform: translateY(1px); }
.fo-jb-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
/* W1 (jobs close-out) — inline Assign affordance on empty foreman cells */
.fo-board-assign { font-size: 12.5px; font-weight: 650; color: var(--fo-accent); white-space: nowrap; }
.fo-board-assign:hover { color: var(--fo-accent-deep); text-decoration: underline; text-underline-offset: 3px; }

/* W2 (jobs close-out) — attention chips, sorting, selection, bulk bar */
.fo-jb-flags { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 8px; vertical-align: 1px; }
.fo-jb-flags .fo-chip { font-size: 10.5px; padding: 2px 8px; }
.fo-table th.sel, .fo-table td.sel { width: 34px; padding-right: 0; }
.fo-table th.is-sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.fo-table th.is-sortable:hover { color: var(--fo-ink); }
.fo-table th .sort-ind { display: inline-block; width: 10px; margin-left: 4px; color: var(--fo-accent); }
.fo-table th.is-sorted .sort-ind::after { content: "↑"; }
.fo-table th.is-sorted.is-desc .sort-ind::after { content: "↓"; }
.fo-jb-bulkbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 16px;
  border-top: 1px solid var(--fo-line);
  background: var(--fo-accent-soft);
}
.fo-jb-bulkbar[hidden] { display: none; }   /* display:flex would beat [hidden] */
.fo-jb-bulkbar .cnt { font-size: 12.5px; font-weight: 700; color: var(--fo-accent-deep); }
.fo-jb-bulkbar .spacer { flex: 1; }
.fo-jb-bulkbar .fo-select { min-width: 140px; }
.fo-jb-bulkforeman { position: relative; }
.fo-jb-bulkforeman .fo-input { width: 210px; }
.fo-jb-suggest {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 60;
  min-width: 240px; max-height: 260px; overflow-y: auto;
  background: var(--fo-surface); border: 1px solid var(--fo-line);
  border-radius: var(--fo-r-md); box-shadow: var(--fo-shadow-2);
  padding: 4px;
}
.fo-jb-suggest button {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  width: 100%; text-align: left;
  border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 13px; color: var(--fo-ink);
  padding: 7px 10px; border-radius: 8px;
}
.fo-jb-suggest button:hover { background: var(--fo-accent-soft); }
.fo-jb-suggest button span { font-size: 11px; color: var(--fo-ink-3); font-variant-numeric: tabular-nums; }
.fo-jb-suggest .none { padding: 8px 10px; font-size: 12.5px; color: var(--fo-ink-3); }
.fo-wiz-numhint { display: block; margin-top: 5px; font-size: 12px; color: var(--fo-ink-3); }
.fo-wiz-numhint.is-ok { color: var(--fo-ok); }
.fo-wiz-numhint.is-taken { color: var(--fo-danger); }
.fo-wiz-numhint button.use {
  border: 0; background: var(--fo-accent-soft); color: var(--fo-accent-deep);
  font: inherit; font-size: 12px; font-weight: 700;
  padding: 1px 8px; border-radius: 999px; cursor: pointer;
}
.fo-wiz-numhint button.use:hover { background: #dce8f9; }

/* ── Jobs detail (close-out W3) — the Status KPI as tap-to-change control ── */
.fo-inc-kpi.is-control { position: relative; }
.fo-inc-kpi.is-control button.v { border: 0; background: none; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; transition: color var(--fo-fast) var(--fo-ease); }
.fo-inc-kpi.is-control button.v svg.fo-i { width: 15px; height: 15px; color: var(--fo-ink-3); flex: none; transition: color var(--fo-fast) var(--fo-ease); }
.fo-inc-kpi.is-control button.v:hover { color: var(--fo-accent-deep); }
.fo-inc-kpi.is-control button.v:hover svg.fo-i { color: var(--fo-accent); }
.fo-jd-statmenu { position: absolute; top: calc(100% - 8px); left: 16px; z-index: 95; min-width: 170px; background: var(--fo-surface, #fff); border: 1px solid var(--fo-line); border-radius: 14px; box-shadow: 0 14px 34px rgba(8, 47, 120, 0.16); padding: 6px; display: flex; flex-direction: column; gap: 2px; }
/* The KPI band clips its children (overflow:hidden, for the rounded frame) —
   lift the clip ONLY while the status menu is open so the droplist can
   escape the band instead of being cut off behind it. */
.fo-inc-kpis:has(.fo-jd-statmenu:not([hidden])) { overflow: visible; }
.fo-jd-statmenu[hidden] { display: none; }
.fo-jd-statmenu button { display: flex; align-items: center; gap: 9px; border: 0; background: none; border-radius: 9px; padding: 9px 11px; font: inherit; font-size: 12.5px; font-weight: 560; color: var(--fo-ink); cursor: pointer; text-align: left; transition: background-color var(--fo-fast) var(--fo-ease); }
.fo-jd-statmenu button:hover { background: var(--fo-accent-soft); }
.fo-jd-statmenu button.is-now { background: var(--fo-accent-soft); color: var(--fo-accent-deep); cursor: default; }
.fo-jd-statmenu .dot { width: 7px; height: 7px; border-radius: 999px; background: var(--fo-ink-3); flex: none; }
.fo-jd-statmenu .dot.is-ok { background: var(--fo-ok); }
.fo-jd-statmenu .dot.is-warn { background: var(--fo-warn); }

/* ── Jobs board (close-out W6) — map view + foreman avatar chip ── */
.fo-jb-map { padding: 12px 14px 0; }
.fo-jb-map .fo-map { height: 520px; border: 1px solid var(--fo-line); }
.fo-jb-map .fo-map-legend { padding: 10px 2px 12px; }
.fo-jb-fava {
  display: inline-grid; place-items: center; width: 22px; height: 22px;
  margin-right: 7px; border-radius: 999px; vertical-align: middle;
  background: var(--fo-accent-soft); color: var(--fo-accent-deep);
  font-size: 9.5px; font-weight: 750; letter-spacing: 0.02em; flex: none;
}
.fo-jb-code { font-family: var(--fo-font-mono, ui-monospace, monospace); font-size: 12px; font-weight: 650; color: var(--fo-ink-3); letter-spacing: -0.01em; }
.fo-jb-title { font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em; color: var(--fo-ink); line-height: 1.25; }
.fo-jb-sub { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--fo-ink-3); }
.fo-jb-sub .fo-i { width: 13px; height: 13px; flex: none; }
.fo-jb-staff { display: flex; align-items: center; gap: 9px; margin-top: 1px; }
.fo-jb-staff .fo-job-meter { flex: 1; width: auto; }
.fo-jb-staff-n { font-size: 11.5px; font-weight: 650; color: var(--fo-ink-3); white-space: nowrap; }
.fo-jb-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 3px; padding-top: 10px; border-top: 1px solid var(--fo-line); }
.fo-jb-crew { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--fo-ink-2); }
.fo-jb-crew .fo-i { width: 13px; height: 13px; color: var(--fo-ink-3); }
.fo-jb-team { display: flex; align-items: center; }
.fo-jb-team .fo-ava { width: 26px; height: 26px; font-size: 10.5px; margin-left: -7px; border: 2px solid var(--fo-surface); }
.fo-jb-team .fo-ava:first-child { margin-left: 0; }
.fo-jb-amore {
  margin-left: -7px;
  display: inline-flex; align-items: center; justify-content: center;
  height: 26px; min-width: 26px; padding: 0 6px;
  border-radius: 999px; background: var(--fo-canvas); border: 2px solid var(--fo-surface);
  font-size: 10.5px; font-weight: 700; color: var(--fo-ink-2);
}
.fo-jb-noteam { font-size: 12px; color: var(--fo-ink-3); font-style: italic; }

/* table view: whole row is a link target */
#jbBody tr.is-click { cursor: pointer; }
#jbBody .act .fo-i { width: 15px; height: 15px; color: var(--fo-ink-3); }
#jbWrap { padding: 4px 6px 6px; }
#jbWrap .fo-job-meter { width: 84px; }
#jbWrap .fo-job-meter-n { font-weight: 600; color: var(--fo-ink-3); }

/* styleguide index — "Planned" (not-yet-built) cards read as placeholders */
.fo-sg-planned { border-style: dashed; background: var(--fo-canvas); }
.fo-sg-planned .fo-card-title { color: var(--fo-ink-2); }
.fo-sg-planned .fo-card-title .fo-i { color: var(--fo-ink-3); }

/* ============================================================
   DASHBOARD (/styleguide/dashboard) — the one consolidated board.
   Extends the Today-page vocabulary (.fo-kpis/.fo-card/.fo-feed/
   .fo-bars/.fo-banner/.fo-grid); 5 new marks keep it calm. Royal
   is rationed to links + the one live pulse + the streak milestone.
   ============================================================ */

/* conditional attention strip — the sole interrupt; collapses to one
   calm all-clear line when nothing is act-now */
.fo-dash-attention { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.fo-dash-allclear {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--fo-r-lg);
  background: var(--fo-surface-2); border: 1px solid var(--fo-line);
  font-size: 13px; font-weight: 550; color: var(--fo-ink-2);
}
.fo-dash-allclear .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fo-ok); flex: none; }

/* the one calm WIN value in the KPI band (Days without a recordable) */
.fo-kpi-value.fo-dash-win { color: var(--fo-ok); }

/* quiet cluster header — the structure that does the grouping */
.fo-dash-section {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin: 36px 0 14px; padding-bottom: 8px;
  border-bottom: 1px solid var(--fo-line);
}
.fo-dash-section .lb { font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--fo-ink-3); }
.fo-dash-section .go { font-size: 12.5px; font-weight: 600; color: var(--fo-accent); text-decoration: none; white-space: nowrap; }
.fo-dash-section .go:hover { text-decoration: underline; }

/* one-decision-per-card: a card lists 3-4 related counts as compact rows */
.fo-dash-lines { padding: 4px 20px 16px; }
.fo-dash-line {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 0; border-top: 1px solid var(--fo-line);
  font-size: 13px; text-decoration: none; color: inherit;
}
.fo-dash-line:first-child { border-top: 0; }
.fo-dash-line .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--fo-ink-3); flex: none; }
.fo-dash-line.is-ok .dot { background: var(--fo-ok); }
.fo-dash-line.is-warn .dot { background: var(--fo-warn); }
.fo-dash-line.is-danger .dot { background: var(--fo-danger); }
.fo-dash-line .lb { flex: 1; min-width: 0; color: var(--fo-ink-2); }
.fo-dash-line .lb .sub { color: var(--fo-ink-3); font-size: 11px; margin-left: 6px; }
.fo-dash-line .vl { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--fo-ink); white-space: nowrap; }
.fo-dash-line.is-danger .vl { color: var(--fo-danger); }
a.fo-dash-line:hover .lb { color: var(--fo-ink); }

/* the single celebratory element — the safety streak */
.fo-dash-streak {
  margin: 6px 20px 6px; padding: 18px 18px 16px;
  border-radius: var(--fo-r-lg); background: var(--fo-ok-soft);
  text-align: center; border: 1px solid transparent;
}
.fo-dash-streak.is-milestone { border-color: rgba(11, 63, 158, 0.22); }
.fo-dash-streak .n {
  display: block; font-family: var(--fo-font-display, inherit);
  font-size: 42px; font-weight: 800; letter-spacing: -0.02em; line-height: 1;
  color: var(--fo-ok); font-variant-numeric: tabular-nums;
}
.fo-dash-streak .cap { display: block; margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--fo-ink-2); }

/* twin mini-stats (Active sites) */
.fo-dash-twin { display: flex; padding: 8px 4px 14px; }
.fo-dash-stat { flex: 1; text-align: center; padding: 6px 8px; border-left: 1px solid var(--fo-line); }
.fo-dash-stat:first-child { border-left: 0; }
.fo-dash-stat .v { display: block; font-size: 24px; font-weight: 750; letter-spacing: -0.01em; color: var(--fo-ink); font-variant-numeric: tabular-nums; }
.fo-dash-stat .v .u { font-size: 13px; color: var(--fo-ink-3); font-weight: 600; }
.fo-dash-stat .k { display: block; margin-top: 2px; font-size: 11.5px; color: var(--fo-ink-3); }

.fo-dash-foot { margin: 30px 0 4px; font-size: 12px; color: var(--fo-ink-3); text-align: center; }

/* ============================================================
   DASHBOARD · BENTO (concept B) — rounded module cards, tabbed.
   Royal-led + the calm chart palette; reference colours (purple/
   orange) translated to brand. New classes all .fo-bento-*.
   ============================================================ */
.fo-bento-tabs { margin-bottom: 20px; }
.fo-bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: stretch;
}
.fo-bento-pane[hidden] { display: none; }

.fo-bento-card {
  background: var(--fo-surface);
  border: 1px solid var(--fo-line);
  border-radius: 20px;
  padding: 22px 24px;
  box-shadow: var(--fo-shadow-1);
  display: flex;
  flex-direction: column;
  min-height: 184px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.16s ease, transform 0.06s ease, border-color 0.16s ease;
}
a.fo-bento-card:hover { box-shadow: 0 14px 34px -18px rgba(24, 27, 33, 0.3); border-color: var(--fo-line-strong, rgba(24, 27, 33, 0.12)); }
a.fo-bento-card:active { transform: translateY(1px); }
.fo-bento-center { align-items: center; justify-content: center; }

.fo-bento-eyebrow { font-size: 14px; font-weight: 700; color: var(--fo-ink); }
.fo-bento-eyebrow span { display: block; font-size: 12.5px; font-weight: 500; color: var(--fo-ink-3); margin-top: 1px; }

.fo-bento-big {
  font-family: var(--fo-font-display, inherit);
  font-size: 52px; font-weight: 800; letter-spacing: -0.03em; line-height: 1;
  color: var(--fo-ink); margin-top: auto; font-variant-numeric: tabular-nums;
}
.fo-bento-big.is-sm { font-size: 34px; margin-top: 16px; }

.fo-bento-trend {
  display: inline-flex; align-items: center; gap: 5px; align-self: flex-start;
  margin-top: 11px; padding: 4px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 650; color: var(--fo-ink-2); background: var(--fo-surface-2);
}
.fo-bento-trend .fo-i { width: 12px; height: 12px; }
.fo-bento-trend.is-up { color: var(--fo-ok); background: var(--fo-ok-soft); }
.fo-bento-trend.is-warn { color: var(--fo-warn); background: var(--fo-warn-soft, rgba(245, 158, 11, 0.12)); }

.fo-bento-tag {
  align-self: flex-start; padding: 4px 11px; border-radius: 999px;
  font-size: 11.5px; font-weight: 650; color: var(--fo-accent); background: var(--fo-accent-soft);
}
.fo-bento-tag.is-danger { color: var(--fo-danger); background: var(--fo-danger-soft); }
.fo-bento-tag.is-warn { color: var(--fo-warn); background: var(--fo-warn-soft, rgba(245, 158, 11, 0.12)); }

.fo-bento-sub { font-size: 12px; color: var(--fo-ink-3); margin-top: 14px; }
.fo-bento-title { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; color: var(--fo-ink); margin-top: 8px; }
.fo-bento-title.is-sm { font-size: 14px; margin-top: 8px; }
.fo-bento-meta { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--fo-ink-3); margin-top: 8px; }
.fo-bento-meta .fo-i { width: 13px; height: 13px; }
.fo-bento-spacer { flex: 1; min-height: 12px; }

.fo-bento-badge {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  margin-top: auto; padding-top: 16px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--fo-warn);
}
.fo-bento-badge .fo-i { width: 14px; height: 14px; }
.fo-bento-badge.is-danger { color: var(--fo-danger); }
.fo-bento-badge.is-warn { color: var(--fo-warn); }

.fo-bento-avastack { display: flex; align-items: center; margin-top: auto; padding-top: 16px; }
.fo-bento-avastack .fo-ava { margin-left: -8px; border: 2px solid var(--fo-surface); }
.fo-bento-avastack .fo-ava:first-child { margin-left: 0; }
.fo-bento-amore {
  margin-left: -8px; display: inline-flex; align-items: center; justify-content: center;
  height: 30px; min-width: 30px; padding: 0 8px; border-radius: 999px;
  background: var(--fo-accent-soft); border: 2px solid var(--fo-surface);
  font-size: 11.5px; font-weight: 700; color: var(--fo-accent);
}

/* dual stat + ring */
.fo-bento-duo { display: flex; gap: 26px; }
.fo-bento-pct { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; color: var(--fo-ink); font-variant-numeric: tabular-nums; }
.fo-bento-pct.is-ok { color: var(--fo-ok); }
.fo-bento-pct.is-sky { color: #2f6cc9; }
.fo-bento-pctlb { font-size: 12px; color: var(--fo-ink-3); margin-top: 4px; }
.fo-bento-ringwrap { display: flex; justify-content: center; margin-top: auto; padding-top: 16px; }

.fo-bento-ring { position: relative; width: 116px; height: 116px; }
.fo-bento-ring.is-lg { width: 150px; height: 150px; margin-top: 6px; }
.fo-bento-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.fo-bento-ring .bg { fill: none; stroke: var(--fo-line); stroke-width: 3.4; }
.fo-bento-ring .fg { fill: none; stroke: var(--fo-accent); stroke-width: 3.4; transition: stroke-dasharray 0.6s var(--fo-ease); }
.fo-bento-ring .fg.is-ok { stroke: var(--fo-ok); }
.fo-bento-ring .fg.is-warn { stroke: var(--fo-warn); }
.fo-bento-ring .fg.is-danger { stroke: var(--fo-danger); }
.fo-bento-ring-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.fo-bento-ring-c b { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; color: var(--fo-ink); font-variant-numeric: tabular-nums; }
.fo-bento-ring.is-lg .fo-bento-ring-c b { font-size: 26px; }
.fo-bento-ring-c span { font-size: 11px; color: var(--fo-ink-3); margin-top: 2px; }

/* bars in a bento card — royal-tinted, last bar solid */
.fo-bento-bars { margin-top: auto; padding-top: 14px; }
.fo-bento-bars .fill { background: var(--fo-accent-soft); }
.fo-bento-bars .bar.is-today .fill { background: var(--fo-accent); }

/* team card */
.fo-bento-team { justify-content: space-between; }
.fo-bento-teamhero { position: relative; height: 116px; }
.fo-bento-teamhero .fo-ava.is-lg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 62px; height: 62px; font-size: 19px; box-shadow: 0 6px 16px -6px rgba(11, 63, 158, 0.4); z-index: 2; }
.fo-bento-teamhero .fo-ava { position: absolute; border: 2px solid var(--fo-surface); }
.fo-bento-teamhero .t1 { left: 12%; top: 14%; }
.fo-bento-teamhero .t2 { right: 16%; top: 8%; }
.fo-bento-teamhero .t3 { left: 18%; bottom: 8%; }
.fo-bento-teamhero .t4 { right: 12%; bottom: 14%; }
.fo-bento-teamfoot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* progress rows */
.fo-bento-prog { margin-top: 12px; }
.fo-bento-prog .r { display: flex; align-items: baseline; justify-content: space-between; font-size: 12.5px; margin-bottom: 6px; }
.fo-bento-prog .r .k { font-weight: 600; color: var(--fo-ink-2); }
.fo-bento-prog .r .v { font-weight: 700; color: var(--fo-accent); font-variant-numeric: tabular-nums; }
.fo-bento-prog .r .v.is-sky { color: #2f6cc9; }
.fo-bento-prog .r .v.is-danger { color: var(--fo-danger); }
.fo-bento-prog .r .v.is-warn { color: var(--fo-warn); }
.fo-bento-prog .bar { display: block; height: 8px; border-radius: 999px; background: var(--fo-line); overflow: hidden; }
.fo-bento-prog .bar > span { display: block; height: 100%; border-radius: 999px; background: var(--fo-accent); }
.fo-bento-prog .bar > span.is-sky { background: #2f6cc9; }
.fo-bento-prog .bar > span.is-danger { background: var(--fo-danger); }
.fo-bento-prog .bar > span.is-warn { background: var(--fo-warn); }

/* safety streak (bento) */
.fo-bento-streak { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; }
.fo-bento-streak .n { font-family: var(--fo-font-display, inherit); font-size: 64px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--fo-ok); font-variant-numeric: tabular-nums; }
.fo-bento-streak .cap { font-size: 12.5px; font-weight: 600; color: var(--fo-ink-2); margin-top: 8px; }

@media (max-width: 980px) { .fo-bento-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .fo-bento-grid { grid-template-columns: 1fr; } }

/* ============================================================
   DASHBOARD · INSIGHTS (concept C) — calm data-viz cards.
   Categorical palette (royal / sky / teal / amber) from the chart
   kit. New classes all .fo-ins-*.
   ============================================================ */
.fo-ins-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.fo-ins-card { display: flex; flex-direction: column; }
.fo-ins-center { align-items: center; }
.fo-ins-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.fo-ins-ttl { font-size: 14.5px; font-weight: 700; color: var(--fo-ink); }
.fo-ins-sub { font-size: 12px; color: var(--fo-ink-3); margin-top: 2px; }
.fo-ins-amt { font-family: var(--fo-font-display, inherit); font-size: 30px; font-weight: 800; letter-spacing: -0.02em; color: var(--fo-ink); font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 10px; }
.fo-ins-amt.is-sm { font-size: 24px; }
.fo-ins-of { font-size: 13px; font-weight: 600; color: var(--fo-ink-3); letter-spacing: 0; }
.fo-ins-delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 650; padding: 3px 8px; border-radius: 999px; letter-spacing: 0; }
.fo-ins-delta .fo-i { width: 12px; height: 12px; }
.fo-ins-delta.is-up { color: var(--fo-ok); background: var(--fo-ok-soft); }

/* grouped bars */
.fo-ins-bars { display: flex; align-items: flex-end; gap: 10px; height: 92px; margin-top: 16px; }
.fo-ins-bargroup { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 3px; height: 100%; position: relative; padding-bottom: 16px; }
.fo-ins-bargroup .b { width: 8px; border-radius: 4px 4px 0 0; }
.fo-ins-bargroup .b1 { background: var(--fo-accent); }
.fo-ins-bargroup .b2 { background: #2f6cc9; opacity: 0.55; }
.fo-ins-bargroup .lbl { position: absolute; bottom: 0; font-size: 10.5px; color: var(--fo-ink-3); }
.fo-ins-legend { display: flex; gap: 16px; margin-top: 12px; font-size: 12px; color: var(--fo-ink-2); }
.fo-ins-legend span { display: inline-flex; align-items: center; gap: 6px; }
.fo-ins-legend .d { width: 9px; height: 9px; border-radius: 3px; }

/* semicircle gauge */
.fo-ins-gauge { position: relative; width: 200px; max-width: 100%; margin: 6px auto 0; }
.fo-ins-gauge svg { width: 100%; height: auto; display: block; overflow: visible; }
.fo-ins-gauge .bg { fill: none; stroke: var(--fo-line); stroke-width: 9; stroke-linecap: round; }
.fo-ins-gauge .fg { fill: none; stroke: var(--fo-ok); stroke-width: 9; stroke-linecap: round; }
.fo-ins-gauge .dot { fill: #fff; stroke: var(--fo-ok); stroke-width: 3; }
.fo-ins-gauge-c { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; }
.fo-ins-gauge-c b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: var(--fo-ink); font-variant-numeric: tabular-nums; }
.fo-ins-gauge-c span { font-size: 12px; color: var(--fo-ink-3); }

/* spend bubbles */
.fo-ins-bubbles { position: relative; height: 192px; margin: 8px 0 4px; }
.fo-ins-bubbles .bub { position: absolute; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }
.bub.b-labor { background: rgba(11, 63, 158, 0.13); color: var(--fo-accent); }
.bub.b-mat { background: rgba(47, 108, 201, 0.15); color: #2f6cc9; }
.bub.b-equip { background: rgba(79, 161, 176, 0.18); color: #3f8d9c; font-size: 12px; }
.bub.b-lodge { background: rgba(226, 173, 90, 0.22); color: #b9892f; font-size: 11px; }
.fo-ins-catlegend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin-top: 10px; font-size: 12px; color: var(--fo-ink-2); }
.fo-ins-catlegend.is-row { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px; }
.fo-ins-catlegend span { display: inline-flex; align-items: center; gap: 6px; }
.fo-ins-catlegend b { font-weight: 700; color: var(--fo-ink); font-variant-numeric: tabular-nums; }
.fo-ins-catlegend .d { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.d.b-labor, .d.s-iron { background: var(--fo-accent); }
.d.b-mat, .d.s-weld { background: #2f6cc9; }
.d.b-equip, .d.s-conc { background: #4fa1b0; }
.d.b-lodge, .d.s-elec { background: #e2ad5a; }

/* recurring cost rows */
.fo-ins-rows { display: flex; flex-direction: column; gap: 4px; margin-top: 2px; }
.fo-ins-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--fo-line); }
.fo-ins-row:first-child { border-top: 0; }
.fo-ins-row .ic { flex: none; width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
.fo-ins-row .ic .fo-i { width: 17px; height: 17px; }
.fo-ins-row .m { flex: 1; min-width: 0; }
.fo-ins-row .m b { display: block; font-size: 13px; font-weight: 650; color: var(--fo-ink); }
.fo-ins-row .m span { font-size: 11.5px; color: var(--fo-ink-3); }
.fo-ins-row .amt { font-size: 14px; font-weight: 700; color: var(--fo-ink); font-variant-numeric: tabular-nums; }

/* segmented limit bar */
.fo-ins-seg { display: flex; gap: 5px; margin-top: 16px; }
.fo-ins-seg .s { flex: 1; height: 9px; border-radius: 3px; background: var(--fo-line); }
.fo-ins-seg .s.on { background: var(--fo-warn); }

/* stacked hours */
.fo-ins-stack { display: flex; align-items: flex-end; gap: 10px; height: 130px; margin-top: 14px; }
.fo-ins-stack .col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.fo-ins-stack .stk { display: flex; flex-direction: column-reverse; width: 16px; border-radius: 4px; overflow: hidden; }
.fo-ins-stack .seg { display: block; width: 100%; }
.seg.s-iron { background: var(--fo-accent); }
.seg.s-weld { background: #2f6cc9; }
.seg.s-conc { background: #4fa1b0; }
.seg.s-elec { background: #e2ad5a; }
.fo-ins-stack .lbl { font-size: 10.5px; color: var(--fo-ink-3); margin-top: 7px; }

/* job-progress goal cards */
.fo-ins-goals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.fo-ins-goal { display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: box-shadow 0.16s ease, transform 0.06s ease; }
a.fo-ins-goal:hover { box-shadow: 0 12px 30px -18px rgba(24, 27, 33, 0.3); }
a.fo-ins-goal:active { transform: translateY(1px); }
.fo-ins-goal-ic { width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.fo-ins-goal-ic .fo-i { width: 18px; height: 18px; }
.fo-ins-goal-nm { font-size: 13.5px; font-weight: 700; color: var(--fo-ink); }
.fo-ins-goal-val { font-size: 12.5px; color: var(--fo-ink); font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.fo-ins-goal-val span { color: var(--fo-ink-3); font-weight: 500; }
.fo-ins-goal-bar { display: block; height: 7px; border-radius: 999px; background: var(--fo-line); overflow: hidden; margin: 12px 0 7px; }
.fo-ins-goal-bar > span { display: block; height: 100%; border-radius: 999px; }
.fo-ins-goal-pct { font-size: 11.5px; color: var(--fo-ink-3); font-weight: 600; }

@media (max-width: 980px) { .fo-ins-grid { grid-template-columns: repeat(2, 1fr); } .fo-ins-goals { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .fo-ins-grid { grid-template-columns: 1fr; } .fo-ins-goals { grid-template-columns: 1fr; } }

/* ============================================================
   DASHBOARD · REFINED (concept D) — concept A, elevated: one
   attention box, period-scrubbable stats + sparklines, an
   interactive area chart, and chart-led clusters. .fo-d-*
   ============================================================ */

/* one consolidated attention box */
.fo-d-alert {
  border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg);
  background: var(--fo-surface); box-shadow: var(--fo-shadow-1);
  padding: 6px 6px 8px; margin-bottom: 22px; overflow: hidden;
}
.fo-d-alert.is-clear { display: flex; align-items: center; gap: 12px; padding: 16px 18px; }
.fo-d-clear-ic { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--fo-ok-soft); color: var(--fo-ok); flex: none; }
.fo-d-alert.is-clear b { font-size: 13.5px; } .fo-d-alert.is-clear span { display: block; font-size: 12px; color: var(--fo-ink-3); }
.fo-d-alert-head { display: flex; align-items: center; gap: 7px; padding: 5px 6px 8px; }
.fo-d-alert-head .fo-i { width: 14px; height: 14px; }
.fo-d-alert-head.is-danger .fo-i { color: var(--fo-danger); } .fo-d-alert-head.is-warn .fo-i { color: var(--fo-warn); }
.fo-d-alert-head .t { font-size: 12px; font-weight: 600; color: var(--fo-ink-2); }
.fo-d-alert-head .ct { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 5px; border-radius: 999px; font-size: 10.5px; font-weight: 700; background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-d-alert-head.is-warn .ct { background: var(--fo-warn-soft, rgba(245, 158, 11, 0.12)); color: var(--fo-warn); }
.fo-d-alert-clear { margin-left: auto; border: 0; background: none; cursor: pointer; font-size: 12px; font-weight: 550; color: var(--fo-ink-3); }
.fo-d-alert-clear:hover { color: var(--fo-ink); }
/* alerts in a row-filling grid (2-up on wide), compact cells */
.fo-d-alert-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 2px 8px; }
.fo-d-alert-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 10px; }
.fo-d-alert-item:hover { background: var(--fo-surface-2); }
.fo-d-alert-item .ic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 9px; }
.fo-d-alert-item .ic .fo-i { width: 14px; height: 14px; }
.fo-d-alert-item.is-danger .ic { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-d-alert-item.is-warn .ic { background: var(--fo-warn-soft, rgba(245, 158, 11, 0.12)); color: var(--fo-warn); }
.fo-d-alert-item .m { min-width: 0; text-decoration: none; color: inherit; }
.fo-d-alert-item .m b { display: block; font-size: 13px; font-weight: 650; color: var(--fo-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-d-alert-item .m > span { display: block; font-size: 11.5px; color: var(--fo-ink-3); line-height: 1.45; }
.fo-d-alert-item .m .fo-i { width: 11px; height: 11px; vertical-align: -1px; color: var(--fo-accent); }
.fo-d-alert-item:hover .m b { color: var(--fo-accent-deep, var(--fo-accent)); }
.fo-d-alert-item .x { flex: none; border: 0; background: none; cursor: pointer; color: var(--fo-ink-3); display: inline-flex; padding: 5px; border-radius: 7px; }
.fo-d-alert-item .x .fo-i { width: 13px; height: 13px; }
.fo-d-alert-item .x:hover { background: var(--fo-surface); color: var(--fo-ink); }

/* control + filter bar */
.fo-d-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.fo-d-controls-sp { flex: 1; }
.fo-d-sitefilter { display: inline-flex; align-items: center; gap: 6px; padding-left: 11px; border: 1px solid var(--fo-line); border-radius: 999px; background: var(--fo-surface); }
.fo-d-sitefilter > .fo-i { width: 14px; height: 14px; color: var(--fo-ink-3); flex: none; }
.fo-d-sitefilter .fo-select.is-mini { border: 0; background-color: transparent; box-shadow: none; }
.fo-d-activechips { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 22px; min-height: 4px; }
.fo-d-chip { display: inline-flex; align-items: center; gap: 3px; padding: 4px 5px 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--fo-accent-deep, var(--fo-accent)); background: var(--fo-accent-soft); border: 1px solid rgba(11, 63, 158, 0.12); }
.fo-d-chip button { border: 0; background: none; cursor: pointer; color: var(--fo-ink-3); font-size: 15px; line-height: 1; display: inline-flex; width: 16px; height: 16px; align-items: center; justify-content: center; border-radius: 50%; }
.fo-d-chip button:hover { background: rgba(11, 63, 158, 0.1); color: var(--fo-accent); }

/* crew-by-site ranking */
.fo-d-rank { display: flex; flex-direction: column; gap: 10px; margin-top: 2px; }
.fo-d-rank .row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.fo-d-rank .k { flex: 0 0 78px; color: var(--fo-ink-2); font-weight: 600; }
.fo-d-rank .bar { flex: 1; height: 8px; border-radius: 999px; background: var(--fo-line); overflow: hidden; }
.fo-d-rank .bar > span { display: block; height: 100%; border-radius: 999px; background: var(--fo-accent); }
.fo-d-rank .v { flex: none; font-weight: 700; color: var(--fo-ink); font-variant-numeric: tabular-nums; min-width: 18px; text-align: right; }

/* bars inside a cluster card — royal-tinted, last solid */
.fo-d-cbars { margin-bottom: 6px; }
.fo-d-cbars .fill { background: var(--fo-accent-soft); }
.fo-d-cbars .bar.is-today .fill { background: var(--fo-accent); }
.fo-d-row2 { margin-bottom: 8px; }
.fo-d-ringnote { min-width: 0; }

/* pulse strip: stat + delta + sparkline */
.fo-d-pulse { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 14px; margin-bottom: 22px; }
.fo-d-stat { background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); box-shadow: var(--fo-shadow-1); padding: 15px 16px 12px; }
.fo-d-stat .k { font-size: 12px; font-weight: 600; color: var(--fo-ink-3); }
.fo-d-stat .v { font-family: var(--fo-font-display, inherit); font-size: 28px; font-weight: 800; letter-spacing: -0.02em; color: var(--fo-ink); margin-top: 3px; font-variant-numeric: tabular-nums; }
.fo-d-stat .foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 8px; }
.fo-d-stat .dlt { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.fo-d-stat .dlt .fo-i { width: 11px; height: 11px; }
.fo-d-stat .dlt.is-up { color: var(--fo-ok); } .fo-d-stat .dlt.is-down { color: var(--fo-danger); } .fo-d-stat .dlt.is-warn { color: var(--fo-warn); }
.fo-d-spark { width: 96px; height: 30px; flex: none; }
.fo-d-spark .l { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.fo-d-spark .a { stroke: none; opacity: 0.14; }
.fo-d-spark.is-up .l { stroke: var(--fo-ok); } .fo-d-spark.is-up .a { fill: var(--fo-ok); }
.fo-d-spark.is-down .l { stroke: var(--fo-danger); } .fo-d-spark.is-down .a { fill: var(--fo-danger); }
.fo-d-spark.is-warn .l { stroke: var(--fo-warn); } .fo-d-spark.is-warn .a { fill: var(--fo-warn); }

/* card heads shared by D */
.fo-d-cardhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.fo-d-ttl { font-size: 14.5px; font-weight: 700; color: var(--fo-ink); display: flex; align-items: center; gap: 8px; }
.fo-d-sub { font-size: 12px; color: var(--fo-ink-3); margin-top: 2px; }

/* field activity area chart */
.fo-d-mainrow { margin-bottom: 22px; align-items: stretch; }
.fo-d-areastats { display: flex; gap: 22px; text-align: right; }
.fo-d-areastats b { font-size: 18px; font-weight: 750; color: var(--fo-ink); font-variant-numeric: tabular-nums; }
.fo-d-areastats b i { font-style: normal; font-size: 12px; color: var(--fo-ink-3); }
.fo-d-areastats span { display: block; font-size: 11px; color: var(--fo-ink-3); }
.fo-d-area { position: relative; }
.fo-d-areasvg { width: 100%; height: auto; display: block; overflow: visible; }
.fo-d-areasvg .a { fill: var(--fo-accent); opacity: 0.1; stroke: none; }
.fo-d-areasvg .l { fill: none; stroke: var(--fo-accent); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.fo-d-areasvg .guide { stroke: var(--fo-accent); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; transition: opacity 0.1s; }
.fo-d-areasvg .dot { fill: var(--fo-surface); stroke: var(--fo-accent); stroke-width: 2; opacity: 0; }
.fo-d-areasvg .dot.is-on { opacity: 1; r: 4.5; }
.fo-d-axis { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; color: var(--fo-ink-3); }
.fo-d-tip { position: absolute; transform: translate(-50%, -136%); background: var(--fo-ink, #181b21); color: #fff; font-size: 11.5px; padding: 5px 9px; border-radius: 8px; white-space: nowrap; pointer-events: none; box-shadow: 0 6px 16px -6px rgba(0,0,0,.4); z-index: 5; }
.fo-d-tip b { font-weight: 750; }
.fo-d-feedcard { display: flex; flex-direction: column; min-height: 0; }
.fo-d-feed { flex: 1; min-height: 120px; max-height: none; margin: 0 -16px; }
.fo-d-feed .fo-feed-row { padding-left: 16px; padding-right: 16px; }

/* clusters: a chart + a couple of decision rows */
.fo-d-clusters { align-items: stretch; }
.fo-d-cluster { display: flex; flex-direction: column; }
.fo-d-rows { margin-top: auto; padding-top: 6px; }
.fo-d-hbar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; margin-bottom: 12px; }
.fo-d-hbar .seg { display: block; height: 100%; }
.fo-d-hlegend { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin-bottom: 12px; font-size: 11.5px; color: var(--fo-ink-2); }
.fo-d-hlegend span { display: inline-flex; align-items: center; gap: 6px; }
.fo-d-hlegend i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.fo-d-ringrow { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.fo-d-ring { position: relative; width: 76px; height: 76px; flex: none; }
.fo-d-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.fo-d-ring .bg { fill: none; stroke: var(--fo-line); stroke-width: 3.6; }
.fo-d-ring .fg { fill: none; stroke: var(--fo-accent); stroke-width: 3.6; }
.fo-d-ring .fg.is-ok { stroke: var(--fo-ok); }
.fo-d-ring-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.fo-d-ring-c b { font-size: 18px; font-weight: 800; color: var(--fo-ink); font-variant-numeric: tabular-nums; }
.fo-d-ring-c span { font-size: 10px; color: var(--fo-ink-3); }
.fo-d-ringbig { font-size: 17px; font-weight: 750; letter-spacing: -0.01em; color: var(--fo-ink); }

@media (max-width: 1080px) { .fo-d-pulse { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .fo-d-pulse { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .fo-d-pulse { grid-template-columns: 1fr; } }

/* Operations row: stretch the live-feed card to the side column's height and
   let the feed scroll inside it — no ragged void under a short feed */
@media (min-width: 1081px) {
  .fo-dash-ops { align-items: stretch; }
  .fo-dash-ops > .fo-card { display: flex; flex-direction: column; min-height: 0; }
  .fo-dash-ops > .fo-card > .fo-feed { flex: 1; min-height: 0; max-height: none; }
}

/* ============================================================
   Approvals inbox  (.fo-ap-*)
   The cross-module decision queue — heterogeneous request types
   in one grouped, batch-approvable list with a polymorphic drawer.
   ============================================================ */

.fo-ap-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .fo-ap-kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .fo-ap-kpis { grid-template-columns: 1fr; } }

/* type glyph — calm categorical tints, light fills only */
.fo-ap-glyph { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.fo-ap-glyph svg { width: 18px; height: 18px; }
.fo-ap-glyph.is-sm { width: 26px; height: 26px; border-radius: 7px; }
.fo-ap-glyph.is-sm svg { width: 15px; height: 15px; }

.fo-ap-glyph.t-time, .fo-ap-dava.t-time { background: rgba(11, 63, 158, 0.09);  color: #0b3f9e; }
.fo-ap-glyph.t-po,   .fo-ap-dava.t-po   { background: rgba(47, 108, 201, 0.12); color: #2f6cc9; }
.fo-ap-glyph.t-exp,  .fo-ap-dava.t-exp  { background: rgba(79, 161, 176, 0.16); color: #357f8c; }
.fo-ap-glyph.t-adj,  .fo-ap-dava.t-adj  { background: rgba(226, 173, 90, 0.20); color: #936511; }
.fo-ap-glyph.t-bon,  .fo-ap-dava.t-bon  { background: rgba(24, 129, 80, 0.13);  color: #188150; }
.fo-ap-glyph.t-sup,  .fo-ap-dava.t-sup  { background: rgba(24, 27, 33, 0.06);   color: #5d6470; }
.fo-ap-glyph.t-pto,  .fo-ap-dava.t-pto  { background: rgba(91, 135, 148, 0.16); color: #4d7682; }
.fo-ap-glyph.u-over { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-ap-glyph.u-soon { background: var(--fo-warn-soft);   color: var(--fo-warn); }
.fo-ap-glyph.u-ok   { background: var(--fo-ok-soft);     color: var(--fo-ok); }

/* ── list + groups ── */
.fo-ap-listwrap { overflow: hidden; }
.fo-ap-row, .fo-ap-ghead { border-top: 1px solid var(--fo-line); }
.fo-ap-listwrap > .fo-ap-group:first-child > :first-child { border-top: 0; }

.fo-ap-ghead { display: flex; align-items: center; gap: 12px; padding: 9px 16px; background: var(--fo-surface-2); }
.fo-ap-ghead .lbl { font-size: 12.5px; font-weight: 750; color: var(--fo-ink); letter-spacing: -0.01em; }
.fo-ap-ghead .lbl .role { font-weight: 500; color: var(--fo-ink-3); }
.fo-ap-ghead .ct { font-size: 11px; font-weight: 700; color: var(--fo-ink-2); background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: 20px; padding: 1px 8px; font-variant-numeric: tabular-nums; }
.fo-ap-ghead .sum { margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--fo-ink-2); font-variant-numeric: tabular-nums; }
.fo-ap-gapprove { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 650; color: var(--fo-accent); background: transparent; border: 0; cursor: pointer; padding: 4px 9px; border-radius: 7px; transition: background var(--fo-fast); }
.fo-ap-gapprove svg { width: 13px; height: 13px; }
.fo-ap-gapprove:hover { background: var(--fo-accent-soft); }

/* ── row ── */
.fo-ap-row { display: grid; grid-template-columns: 26px 36px minmax(0, 1fr) auto auto auto; align-items: center; gap: 0 12px; padding: 11px 16px; cursor: pointer; transition: background var(--fo-fast); }
.fo-ap-row:hover { background: var(--fo-surface-2); }
.fo-ap-row.is-over { box-shadow: inset 3px 0 0 rgba(179, 38, 30, 0.55); }
.fo-ap-row.is-sel { background: var(--fo-accent-soft); box-shadow: inset 3px 0 0 var(--fo-accent); }
.fo-ap-chk { display: grid; place-items: center; width: 26px; }
.fo-ap-chk input { width: 16px; height: 16px; accent-color: var(--fo-accent); cursor: pointer; }

.fo-ap-main { min-width: 0; }
.fo-ap-main .ttl { font-size: 13.5px; font-weight: 650; color: var(--fo-ink); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; line-height: 1.3; }
.fo-ap-ref { font-size: 11px; font-weight: 600; color: var(--fo-ink-3); font-family: var(--fo-mono); letter-spacing: -0.02em; }
.fo-ap-main .sub { margin-top: 3px; font-size: 12px; color: var(--fo-ink-2); display: flex; align-items: center; gap: 6px; min-width: 0; }
.fo-ap-main .sub .fo-ava.is-xs { flex: none; }

.fo-ap-flag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 650; padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.fo-ap-flag svg { width: 11px; height: 11px; }
.fo-ap-flag.is-warn { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-ap-flag.is-danger { background: var(--fo-danger-soft); color: var(--fo-danger); }

.fo-ap-mag { text-align: right; min-width: 78px; }
.fo-ap-mag .v { display: block; font-size: 14px; font-weight: 750; color: var(--fo-ink); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.fo-ap-mag .k { display: block; font-size: 10.5px; color: var(--fo-ink-3); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 1px; }

.fo-ap-age { display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-size: 11.5px; font-weight: 650; padding: 3px 9px; border-radius: 20px; white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 58px; }
.fo-ap-age svg { width: 12px; height: 12px; }
.fo-ap-age.is-fresh { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-ap-age.is-aging { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-ap-age.is-over { background: var(--fo-danger-soft); color: var(--fo-danger); }

.fo-ap-rowacts { display: flex; align-items: center; gap: 6px; justify-content: flex-end; min-width: 92px; }
.fo-ap-mini { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--fo-line-strong); background: var(--fo-surface); display: grid; place-items: center; cursor: pointer; color: var(--fo-ink-3); transition: all var(--fo-fast); }
.fo-ap-mini svg { width: 15px; height: 15px; }
.fo-ap-mini.is-yes:hover { background: var(--fo-accent-soft); border-color: transparent; color: var(--fo-accent); }
.fo-ap-mini.is-no:hover { background: var(--fo-danger-soft); border-color: transparent; color: var(--fo-danger); }
.fo-ap-chev { width: 16px; height: 16px; color: var(--fo-ink-3); flex: none; }
.fo-ap-yours { font-size: 11px; font-weight: 650; color: var(--fo-ink-3); background: var(--fo-surface-2); border: 1px solid var(--fo-line); padding: 3px 9px; border-radius: 20px; white-space: nowrap; }

/* decided rows */
.fo-ap-decwrap { grid-column: 5 / -1; display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.fo-ap-decided { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; text-transform: capitalize; }
.fo-ap-decided svg { width: 12px; height: 12px; }
.fo-ap-decided.is-ok { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-ap-decided.is-no { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-ap-decwhen { font-size: 11.5px; color: var(--fo-ink-3); min-width: 44px; text-align: right; }
.fo-ap-undo { font-size: 11.5px; font-weight: 650; color: var(--fo-accent); background: transparent; border: 0; cursor: pointer; padding: 4px 9px; border-radius: 7px; transition: background var(--fo-fast); }
.fo-ap-undo:hover { background: var(--fo-accent-soft); }

/* ── drawer · identity ── */
.fo-ap-dava { border-radius: 11px; }
.fo-ap-dava svg { width: 20px; height: 20px; }
.fo-pulse .v.is-ok { color: var(--fo-ok); }
.fo-pulse .v.is-danger { color: var(--fo-danger); }

/* ── drawer · facts strip ── */
.fo-ap-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--fo-line); border: 1px solid var(--fo-line); border-radius: 11px; overflow: hidden; margin-top: 12px; }
.fo-ap-facts .f { background: var(--fo-surface); padding: 9px 12px; }
.fo-ap-facts .k { font-size: 11px; color: var(--fo-ink-3); margin-bottom: 2px; }
.fo-ap-facts .v { font-size: 13px; font-weight: 600; color: var(--fo-ink); font-variant-numeric: tabular-nums; }
.fo-ap-facts .pos { color: var(--fo-ok); font-weight: 700; }
.fo-ap-facts .neg { color: var(--fo-danger); font-weight: 700; }

/* ── drawer · line tables ── */
.fo-ap-lines { border: 1px solid var(--fo-line); border-radius: 11px; overflow: hidden; }
.fo-ap-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 9px 12px; border-top: 1px solid var(--fo-line); font-size: 13px; }
.fo-ap-line:first-child { border-top: 0; }
.fo-ap-line.is-head { background: var(--fo-surface-2); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fo-ink-3); font-weight: 700; padding: 7px 12px; }
.fo-ap-line .nm { color: var(--fo-ink); display: flex; align-items: center; gap: 8px; min-width: 0; }
.fo-ap-line .nm .mut { color: var(--fo-ink-3); }
.fo-ap-line .nm svg { width: 14px; height: 14px; color: var(--fo-ok); flex: none; }
.fo-ap-line .qt { color: var(--fo-ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.fo-ap-line .am { font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; color: var(--fo-ink); min-width: 60px; }
.fo-ap-line .am.pos { color: var(--fo-ok); }
.fo-ap-line .am.neg { color: var(--fo-danger); }
.fo-ap-norcpt { color: var(--fo-warn); font-size: 11.5px; }

/* ── drawer · hours bar ── */
.fo-ap-hourbar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--fo-line); margin-bottom: 9px; }
.fo-ap-hourbar .seg.is-reg { background: var(--fo-accent); }
.fo-ap-hourbar .seg.is-ot { background: var(--fo-warn); }
.fo-ap-hourleg { display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--fo-ink-2); margin-bottom: 2px; }
.fo-ap-hourleg i.d { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 6px; vertical-align: middle; }
.fo-ap-hourleg i.d.is-reg { background: var(--fo-accent); }
.fo-ap-hourleg i.d.is-ot { background: var(--fo-warn); }
.fo-ap-hourleg .tot { margin-left: auto; font-weight: 700; color: var(--fo-ink); }

/* ── drawer · approval chain ── */
.fo-ap-chain { display: flex; flex-direction: column; }
.fo-ap-step { display: flex; gap: 11px; align-items: flex-start; padding-bottom: 14px; position: relative; }
.fo-ap-step:last-child { padding-bottom: 0; }
.fo-ap-step::before { content: ''; position: absolute; left: 12.5px; top: 26px; bottom: 0; width: 1.5px; background: var(--fo-line); }
.fo-ap-step:last-child::before { display: none; }
.fo-ap-step .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; z-index: 1; }
.fo-ap-step .dot svg { width: 14px; height: 14px; }
.fo-ap-step.is-done .dot { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-ap-step.is-now .dot { background: var(--fo-accent-soft); color: var(--fo-accent); box-shadow: 0 0 0 3px var(--fo-accent-soft); }
.fo-ap-step.is-todo .dot { background: var(--fo-surface-2); color: var(--fo-ink-3); border: 1px solid var(--fo-line-strong); }
.fo-ap-step .tx b { font-size: 13px; color: var(--fo-ink); display: block; line-height: 1.3; }
.fo-ap-step .tx span { font-size: 12px; color: var(--fo-ink-3); }
.fo-ap-step.is-now .tx b { color: var(--fo-accent); }

/* ── drawer · notes, exceptions, flags ── */
.fo-ap-note { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 11px; font-size: 12.5px; line-height: 1.5; margin-top: 12px; }
.fo-ap-note svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.fo-ap-note b { font-weight: 700; }
.fo-ap-note.is-warn { background: var(--fo-warn-soft); color: #7a4d08; }
.fo-ap-note.is-danger { background: var(--fo-danger-soft); color: #8f1e18; }
.fo-ap-note.is-info { background: var(--fo-info-soft); color: #0b5a6b; }
.fo-ap-note.is-ok { background: var(--fo-ok-soft); color: #0f5d39; }
/* .fo-ap-note is display:flex, which beats the bare [hidden] attribute — restore
   it so a hidden inline error banner stays hidden without a per-page override. */
.fo-ap-note[hidden] { display: none !important; }
.fo-ap-exc { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--fo-ink-2); padding: 7px 0; border-top: 1px solid var(--fo-line); }
.fo-ap-exc:first-child { border-top: 0; }
.fo-ap-exc svg { width: 14px; height: 14px; color: var(--fo-warn); flex: none; }
.fo-ap-flagrow { display: flex; flex-wrap: wrap; gap: 7px; }

/* ── drawer · foot ── */
.fo-ap-openbtn { margin-right: auto; }
.fo-ap-foot-note { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--fo-ink-3); margin-right: auto; }
.fo-ap-foot-note svg { width: 14px; height: 14px; }
.fo-ap-foot-out { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; margin-right: auto; }
.fo-ap-foot-out svg { width: 15px; height: 15px; }
.fo-ap-foot-out.is-ok { color: var(--fo-ok); }
.fo-ap-foot-out.is-no { color: var(--fo-danger); }
.fo-ap-declbtn:hover { color: var(--fo-danger); }

.fo-ap-reason { padding: 12px 16px; border-top: 1px solid var(--fo-line); background: var(--fo-surface-2); }
.fo-ap-reason .fo-label .opt { color: var(--fo-ink-3); font-weight: 500; }
.fo-ap-reason textarea { margin-top: 6px; }
.fo-ap-reason-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 9px; }

/* ── mobile ── */
@media (max-width: 640px) {
  .fo-ap-row { grid-template-columns: 22px 30px minmax(0, 1fr) auto auto auto; gap: 0 8px; padding: 10px 12px; }
  .fo-ap-glyph { width: 30px; height: 30px; border-radius: 8px; }
  .fo-ap-glyph svg { width: 16px; height: 16px; }
  .fo-ap-rowacts { min-width: 0; }
  .fo-ap-rowacts .fo-ap-mini { display: none; }
  .fo-ap-mag .k { display: none; }
  .fo-ap-ref { display: none; }
  .fo-ap-age { min-width: 0; padding: 3px 7px; }
  .fo-ap-ghead { padding: 9px 12px; }
  .fo-ap-facts { grid-template-columns: 1fr; }
}

/* ============================================================
   Settings  (.fo-set-*)
   The reusable module-settings page: a sticky scroll-spy nav rail,
   titled panels of grounded rows, and one dirty-aware save bar.
   ============================================================ */

/* toolbar: find-a-setting + live/preview legend */
.fo-set-bar { display: flex; align-items: center; gap: 14px 18px; flex-wrap: wrap; margin: 4px 0 18px; }
.fo-set-bar .fo-search { width: 300px; max-width: 100%; }
.fo-set-legend { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: 11.5px; color: var(--fo-ink-3); flex-wrap: wrap; }
.fo-set-legend span { display: inline-flex; align-items: center; gap: 6px; }
.fo-set-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.fo-set-dot.is-live { background: var(--fo-accent); }
.fo-set-dot.is-preview { background: transparent; border: 1.5px solid var(--fo-ink-3); }

/* page grid: rail + panels */
.fo-set-grid { display: grid; grid-template-columns: 214px minmax(0, 1fr); gap: 30px; align-items: start; }
.fo-set-railwrap { position: sticky; top: 16px; align-self: start; }
.fo-set-rail { display: flex; flex-direction: column; gap: 2px; }
.fo-set-rail-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 11px; border: 0; background: none; border-radius: var(--fo-r-sm); cursor: pointer; text-align: left; font: inherit; font-size: 13px; font-weight: 550; color: var(--fo-ink-2); position: relative; transition: background var(--fo-fast), color var(--fo-fast); }
.fo-set-rail-item svg.fo-i { width: 15px; height: 15px; color: var(--fo-ink-3); flex: none; }
.fo-set-rail-item > span { flex: 1; min-width: 0; }
.fo-set-rail-item:hover { background: var(--fo-surface-2); color: var(--fo-ink); }
.fo-set-rail-item.is-active { background: var(--fo-accent-soft); color: var(--fo-accent-deep); font-weight: 650; }
.fo-set-rail-item.is-active svg.fo-i { color: var(--fo-accent); }
.fo-set-rail-item.is-active::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--fo-accent); }
.fo-set-rail-item.is-danger { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--fo-line); color: var(--fo-ink-3); }
.fo-set-rail-item.is-danger svg.fo-i { color: var(--fo-ink-3); }
.fo-set-rail-item.is-danger.is-active { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-set-rail-item.is-danger.is-active svg.fo-i { color: var(--fo-danger); }
.fo-set-rail-item.is-danger.is-active::before { background: var(--fo-danger); }

/* panels */
.fo-set-panels { display: flex; flex-direction: column; gap: 18px; padding-bottom: 30px; }
.fo-set-panel { background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); box-shadow: var(--fo-shadow-1); scroll-margin-top: 90px; transition: opacity var(--fo-base); }
.fo-set-panel.is-danger { border-color: rgba(179, 38, 30, 0.22); }
.fo-set-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px 14px; border-bottom: 1px solid var(--fo-line); }
.fo-set-head > svg.fo-i { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--fo-accent); }
.fo-set-panel.is-danger .fo-set-head > svg.fo-i { color: var(--fo-danger); }
.fo-set-head .tx { flex: 1; min-width: 0; }
.fo-set-head h2 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; color: var(--fo-ink); }
.fo-set-help { margin-top: 2px; font-size: 12.5px; color: var(--fo-ink-3); line-height: 1.45; }
.fo-set-saved { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 650; color: var(--fo-ok); background: var(--fo-ok-soft); padding: 3px 9px; border-radius: 20px; opacity: 0; transform: translateY(-2px); transition: opacity var(--fo-base), transform var(--fo-base); pointer-events: none; }
.fo-set-saved svg.fo-i { width: 12px; height: 12px; }
.fo-set-head.is-saved .fo-set-saved { opacity: 1; transform: none; }

/* rows */
.fo-set-rows { padding: 2px 18px 8px; }
.fo-set-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px 20px; padding: 13px 0; border-top: 1px solid var(--fo-line); position: relative; transition: opacity var(--fo-fast); }
.fo-set-rows > .fo-set-row:first-child { border-top: 0; }
.fo-set-row-main { min-width: 0; }
.fo-set-row-label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--fo-ink); line-height: 1.3; flex-wrap: wrap; }
.fo-set-row-label .fo-set-dot { margin-right: 1px; }
.fo-set-row-help { margin-top: 3px; font-size: 12px; color: var(--fo-ink-3); line-height: 1.5; }
.fo-set-row-ctl { justify-self: end; display: flex; align-items: center; }
.fo-set-row.is-changed::before { content: ''; position: absolute; left: -18px; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--fo-accent); }
.fo-set-row.is-changed .fo-set-row-label { color: var(--fo-accent-deep); }
.fo-set-row.is-dep { padding-left: 26px; }
.fo-set-row.is-dep::after { content: ''; position: absolute; left: 9px; top: 18px; bottom: 18px; width: 1.5px; border-radius: 2px; background: var(--fo-line-strong); }
.fo-set-row.is-dep.is-off { opacity: 0.5; }
.fo-set-row.fo-set-dim { opacity: 0.28; }
.fo-set-panel.fo-set-dim { display: none; }

/* Two-column settings rows — opt-in via .fo-set-rows.is-2col. Turns the single
   wide column into a tidy 2-up grid of bordered cards so a settings panel uses
   its horizontal space instead of stranding a control on the far right. Inline
   add-forms, empty states, and rows marked .is-span run the full width. Drops
   back to one column on narrow viewports. */
.fo-set-rows.is-2col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.fo-set-rows.is-2col > .fo-set-row { border: 1px solid var(--fo-line); border-radius: 12px; padding: 11px 13px; }
.fo-set-rows.is-2col > .fo-set-row:first-child { border-top: 1px solid var(--fo-line); }
.fo-set-rows.is-2col > .eng-set-add,
.fo-set-rows.is-2col > .fs-empty,
.fo-set-rows.is-2col > .fo-set-row.is-span { grid-column: 1 / -1; }
@media (max-width: 820px) { .fo-set-rows.is-2col { grid-template-columns: 1fr; } }

/* is-3col — the compact-item variant (crew roles: a dot, a name, two small
   buttons). Same card grammar as is-2col; a card whose inline editor is open
   takes the full row so the editor never squeezes. */
.fo-set-rows.is-3col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: start; }
.fo-set-rows.is-3col > .fo-set-row { border: 1px solid var(--fo-line); border-radius: 12px; padding: 11px 13px; }
.fo-set-rows.is-3col > .fo-set-row:first-child { border-top: 1px solid var(--fo-line); }
.fo-set-rows.is-3col > .fo-set-row.is-span { grid-column: 1 / -1; }
.fo-set-rows.is-3col > .fo-set-row:has([data-editor]:not(.fo-hidden)) { grid-column: 1 / -1; }
@media (max-width: 1280px) { .fo-set-rows.is-3col { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) { .fo-set-rows.is-3col { grid-template-columns: 1fr; } }

/* Settings "add" band — the full-width footer form at the bottom of a settings
   panel (e.g. "New category" / "Add a session type"). A soft canvas band flush
   to the panel's bottom edge. Shared by daily-reports + people settings. */
.fs-add { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; padding: 14px 18px 18px; border-top: 1px solid var(--fo-line); background: var(--fo-canvas); border-radius: 0 0 var(--fo-r-lg) var(--fo-r-lg); }
.fs-add .fo-field { margin: 0; }
.fs-add .grow { flex: 1; min-width: 150px; }
.fs-empty { padding: 18px; color: var(--fo-ink-3); font-size: 13px; }

.fo-set-tag { font-size: 10.5px; font-weight: 650; color: var(--fo-warn); background: var(--fo-warn-soft); padding: 1px 7px; border-radius: 20px; white-space: nowrap; }
.fo-set-lock { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; font-size: 11.5px; font-weight: 600; color: var(--fo-ink-3); }
.fo-set-lock svg.fo-i { width: 12px; height: 12px; }

/* control widths */
.fo-set-text { width: 230px; max-width: 46vw; }
.fo-set-select { min-width: 168px; }
.fo-set-seg { flex: none; }

/* number stepper */
.fo-set-stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--fo-line-strong); border-radius: var(--fo-r-sm); overflow: hidden; background: var(--fo-surface); height: 34px; }
.fo-set-stepper .step { width: 32px; border: 0; background: var(--fo-surface); color: var(--fo-ink-2); font-size: 17px; line-height: 1; cursor: pointer; display: grid; place-items: center; transition: background var(--fo-fast), color var(--fo-fast); }
.fo-set-stepper .step:hover { background: var(--fo-accent-soft); color: var(--fo-accent); }
.fo-set-stepper .val { display: inline-flex; align-items: center; gap: 4px; padding: 0 10px; border-left: 1px solid var(--fo-line); border-right: 1px solid var(--fo-line); min-width: 78px; justify-content: center; }
.fo-set-stepper .val input { width: 38px; border: 0; background: none; text-align: right; font: inherit; font-size: 13.5px; font-weight: 650; color: var(--fo-ink); font-variant-numeric: tabular-nums; padding: 0; outline: none; }
.fo-set-stepper .val .unit { font-size: 11.5px; font-style: normal; color: var(--fo-ink-3); }

/* masked reveal */
.fo-set-reveal { display: inline-flex; align-items: center; border: 1px solid var(--fo-line-strong); border-radius: var(--fo-r-sm); background: var(--fo-surface); overflow: hidden; height: 34px; }
.fo-set-reveal input { border: 0; background: none; outline: none; font: inherit; font-size: 13px; color: var(--fo-ink); padding: 0 11px; width: 188px; max-width: 42vw; letter-spacing: 0.02em; }
.fo-set-reveal .rev { border: 0; border-left: 1px solid var(--fo-line); background: var(--fo-surface-2); color: var(--fo-accent); font: inherit; font-size: 12px; font-weight: 650; padding: 0 12px; cursor: pointer; align-self: stretch; }
.fo-set-reveal .rev:hover { background: var(--fo-accent-soft); }

/* time range */
.fo-set-time { display: inline-flex; align-items: center; gap: 8px; }
.fo-set-time .sep { color: var(--fo-ink-3); }

/* danger rows */
.fo-set-danger-row .fo-set-row-label { color: var(--fo-danger); font-weight: 650; }
.fo-set-panel.is-danger .fo-set-row { border-color: rgba(179, 38, 30, 0.12); }
.fo-set-danger-row .fo-btn { background: transparent; color: var(--fo-danger); border: 1px solid rgba(179, 38, 30, 0.38); box-shadow: none; }
.fo-set-danger-row .fo-btn:hover { background: var(--fo-danger-soft); border-color: var(--fo-danger); }

/* sticky save tray */
.fo-set-savebar { position: fixed; left: 50%; bottom: 22px; z-index: 60; display: flex; align-items: center; gap: 18px; padding: 11px 12px 11px 20px; background: rgba(255, 255, 255, 0.86); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); border: 1px solid var(--fo-line-strong); border-radius: 999px; box-shadow: var(--fo-shadow-3); transform: translateX(-50%) translateY(160%); opacity: 0; pointer-events: none; transition: transform var(--fo-slow) var(--fo-spring), opacity var(--fo-base); }
.fo-set-savebar.has-dirty { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: auto; }
.fo-set-savebar .fo-dirty { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fo-ink-2); }
.fo-set-savebar .fo-dirty b { color: var(--fo-ink); font-weight: 650; }
.fo-set-savebar .fo-dirty .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fo-warn); box-shadow: 0 0 0 4px var(--fo-warn-soft); }
.fo-set-savebar .fo-dirty .cnt { color: var(--fo-ink-3); font-size: 12px; }
.fo-set-savebar .acts { display: flex; align-items: center; gap: 8px; }

/* empty search state */
.fo-set-none { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 44px 0; color: var(--fo-ink-3); font-size: 13.5px; }
.fo-set-none svg.fo-i { width: 26px; height: 26px; color: var(--fo-ink-3); opacity: 0.7; }

/* danger confirm dialog */
.fo-set-confirm-back { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 22px; background: rgba(24, 27, 33, 0.34); opacity: 0; pointer-events: none; transition: opacity var(--fo-base); }
.fo-set-confirm-back.is-open { opacity: 1; pointer-events: auto; }
.fo-set-confirm { width: min(420px, 100%); background: #fff; border: 1px solid rgba(24, 27, 33, 0.08); border-radius: var(--fo-r-lg); box-shadow: var(--fo-shadow-3); padding: 22px; text-align: center; transform: scale(0.96); transition: transform var(--fo-base) var(--fo-spring); }
.fo-set-confirm-back.is-open .fo-set-confirm { transform: none; }
.fo-set-confirm-ic { width: 46px; height: 46px; border-radius: 50%; background: var(--fo-danger-soft); color: var(--fo-danger); display: grid; place-items: center; margin: 0 auto 12px; }
.fo-set-confirm-ic svg.fo-i { width: 22px; height: 22px; }
.fo-set-confirm-ttl { font-size: 16px; font-weight: 700; color: var(--fo-ink); letter-spacing: -0.01em; }
.fo-set-confirm-msg { margin-top: 6px; font-size: 13px; color: var(--fo-ink-2); line-height: 1.5; }
.fo-set-confirm-type { margin-top: 14px; text-align: left; }
.fo-set-confirm-type .fo-label b { color: var(--fo-danger); font-family: var(--fo-mono); letter-spacing: 0.04em; }
.fo-set-confirm-type input { margin-top: 6px; }
.fo-set-confirm-acts { display: flex; gap: 9px; justify-content: center; margin-top: 18px; }
.fo-set-confirm-acts .fo-btn { flex: 1; justify-content: center; }

/* responsive — collapse to single column when the app chrome goes compact (920px) */
@media (max-width: 920px) {
  .fo-set-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .fo-set-railwrap { position: static; }
  .fo-set-rail { position: static; flex-direction: row; gap: 6px; overflow-x: auto; margin: 0 -2px 2px; padding: 0 2px 6px; scrollbar-width: none; }
  .fo-set-rail::-webkit-scrollbar { display: none; }
  .fo-set-rail-item { width: auto; flex: 0 0 auto; white-space: nowrap; padding: 8px 13px; }
  .fo-set-rail-item.is-danger { margin-top: 0; padding-top: 8px; border-top: 0; }
  .fo-set-rail-item.is-active::before, .fo-set-rail-item.is-danger.is-active::before { display: none; }
  .fo-set-legend { font-size: 11px; gap: 12px; }
}
@media (max-width: 560px) {
  .fo-set-row { grid-template-columns: 1fr; gap: 9px; }
  .fo-set-row-ctl { justify-self: start; }
  .fo-set-row.is-changed::before { left: -18px; }
  .fo-set-savebar { left: 12px; right: 12px; bottom: 12px; transform: translateY(160%); border-radius: var(--fo-r-lg); justify-content: space-between; padding: 11px 14px; }
  .fo-set-savebar.has-dirty { transform: translateY(0); }
  .fo-set-legend { display: none; }
  .fo-set-text, .fo-set-reveal input { max-width: 60vw; }
}

/* ============================================================
   Notes  (.fo-note-*)
   A quiet company-wide log: capture a note, pin it to a subject
   (employee · call · visitor · situation), attach a file.
   ============================================================ */

/* category tints — calm, light fills (shared by glyph, chip, drawer ava, active picker) */
.fo-note-glyph.c-hr,        .fo-note-cat.c-hr,        .fo-note-dava.c-hr,        .fo-note-catopt.is-active.c-hr        { background: rgba(11, 63, 158, 0.09);  color: #0b3f9e; }
.fo-note-glyph.c-mgmt,      .fo-note-cat.c-mgmt,      .fo-note-dava.c-mgmt,      .fo-note-catopt.is-active.c-mgmt      { background: rgba(79, 161, 176, 0.16); color: #357f8c; }
.fo-note-glyph.c-call,      .fo-note-cat.c-call,      .fo-note-dava.c-call,      .fo-note-catopt.is-active.c-call      { background: rgba(226, 173, 90, 0.20); color: #936511; }
.fo-note-glyph.c-visitor,   .fo-note-cat.c-visitor,   .fo-note-dava.c-visitor,   .fo-note-catopt.is-active.c-visitor   { background: rgba(47, 108, 201, 0.12); color: #2f6cc9; }
.fo-note-glyph.c-situation, .fo-note-cat.c-situation, .fo-note-dava.c-situation, .fo-note-catopt.is-active.c-situation { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-note-glyph.c-general,   .fo-note-cat.c-general,   .fo-note-dava.c-general,   .fo-note-catopt.is-active.c-general   { background: rgba(24, 27, 33, 0.06); color: var(--fo-ink-2); }
.fo-note-cdot.c-hr { background: #0b3f9e; } .fo-note-cdot.c-mgmt { background: #4fa1b0; } .fo-note-cdot.c-call { background: #e2ad5a; }
.fo-note-cdot.c-visitor { background: #2f6cc9; } .fo-note-cdot.c-situation { background: var(--fo-danger); } .fo-note-cdot.c-general { background: var(--fo-ink-3); }

/* filter bar */
.fo-note-bar { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; margin: 2px 0 18px; }
.fo-note-bar .fo-search { width: 290px; max-width: 100%; }
.fo-note-cats { display: flex; flex-wrap: wrap; gap: 7px; }
.fo-note-cat-f { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border: 1px solid var(--fo-line); border-radius: 20px; background: var(--fo-surface); font: inherit; font-size: 12.5px; font-weight: 600; color: var(--fo-ink-2); cursor: pointer; transition: all var(--fo-fast); }
.fo-note-cat-f:hover { background: var(--fo-surface-2); }
.fo-note-cat-f.is-active { background: var(--fo-accent-soft); border-color: transparent; color: var(--fo-accent-deep); }
.fo-note-cat-f .n { font-size: 11px; font-weight: 700; color: var(--fo-ink-3); }
.fo-note-cat-f.is-active .n { color: var(--fo-accent); }
.fo-note-cdot { width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* feed */
.fo-note-feed { display: flex; flex-direction: column; gap: 8px; }
.fo-note-day { display: flex; align-items: center; gap: 8px; margin: 18px 2px 2px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fo-ink-3); }
.fo-note-day:first-child { margin-top: 0; }
.fo-note-day .ct { font-weight: 700; color: var(--fo-ink-3); background: var(--fo-surface-2); border: 1px solid var(--fo-line); border-radius: 20px; padding: 0 7px; font-size: 10.5px; }
.fo-note-group { display: flex; flex-direction: column; gap: 8px; }

.fo-note-card { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: start; width: 100%; text-align: left; padding: 14px 16px; background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); cursor: pointer; font: inherit; transition: border-color var(--fo-fast), box-shadow var(--fo-fast), transform var(--fo-fast); }
.fo-note-card:hover { border-color: var(--fo-line-strong); box-shadow: var(--fo-shadow-1); }
.fo-note-glyph { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.fo-note-glyph svg.fo-i { width: 19px; height: 19px; }
.fo-note-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.fo-note-row1 { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.fo-note-cat { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.fo-note-subs { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fo-note-sub { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--fo-ink-2); background: var(--fo-surface-2); border: 1px solid var(--fo-line); padding: 2px 9px 2px 3px; border-radius: 20px; white-space: nowrap; }
.fo-note-sub .fo-ava.is-xs { flex: none; }
.fo-note-sub.is-other { padding: 3px 9px; color: var(--fo-ink-2); }
.fo-note-sub.is-other svg.fo-i { width: 12px; height: 12px; color: var(--fo-ink-3); }
.fo-note-sub.is-other.t-situation svg.fo-i { color: var(--fo-danger); }
.fo-note-sub.is-other.t-call svg.fo-i { color: #936511; }
.fo-note-sub-x { border: 0; background: none; padding: 0 0 0 2px; margin-left: 1px; color: var(--fo-ink-3); cursor: pointer; display: inline-flex; }
.fo-note-sub-x svg.fo-i { width: 12px; height: 12px; }
.fo-note-sub-x:hover { color: var(--fo-danger); }
.fo-note-title { font-size: 14px; font-weight: 650; color: var(--fo-ink); letter-spacing: -0.01em; line-height: 1.35; }
.fo-note-snip { font-size: 12.5px; color: var(--fo-ink-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fo-note-meta { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 11.5px; font-weight: 550; color: var(--fo-ink-3); }
.fo-note-aside { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
.fo-note-time { font-size: 11.5px; color: var(--fo-ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fo-note-inds { display: inline-flex; align-items: center; gap: 9px; }
.fo-note-ind { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 650; color: var(--fo-ink-3); }
.fo-note-ind svg.fo-i { width: 13px; height: 13px; }

/* drawer · identity + bodies */
.fo-ava.fo-note-dava { border-radius: 11px; background: var(--fo-accent-soft); color: var(--fo-accent); }
.fo-ava.fo-note-dava svg.fo-i { width: 19px; height: 19px; }
.fo-note-vis { display: inline-flex; align-items: center; gap: 4px; }
.fo-note-vis svg.fo-i { width: 12px; height: 12px; }
.fo-note-bodytext { font-size: 13.5px; color: var(--fo-ink); line-height: 1.6; white-space: pre-wrap; }
.fo-note-atts { display: flex; flex-direction: column; gap: 7px; }
.fo-note-att { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 11px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-sm); background: var(--fo-surface); cursor: pointer; font: inherit; transition: background var(--fo-fast); }
.fo-note-att:hover { background: var(--fo-surface-2); }
.fo-note-att .ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.fo-note-att .ic.is-pdf { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-note-att .ic.is-img { background: var(--fo-accent-soft); color: var(--fo-accent); }
.fo-note-att .ic svg.fo-i { width: 15px; height: 15px; }
.fo-note-att .nm { font-size: 13px; color: var(--fo-ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fo-note-fu-empty { font-size: 12.5px; color: var(--fo-ink-3); padding: 2px 0 10px; }
.fo-note-fu-text { font-size: 12.5px; color: var(--fo-ink-2); line-height: 1.5; margin-top: 2px; }
.fo-note-fu-add { display: flex; gap: 8px; align-items: flex-end; margin-top: 12px; }
.fo-note-fu-add textarea { flex: 1; }
.fo-btn.fo-note-del { color: var(--fo-danger); }
.fo-btn.fo-note-del:hover { background: var(--fo-danger-soft); }

/* compose drawer */
.fo-note-opt { font-size: 11px; font-weight: 500; color: var(--fo-ink-3); }
.fo-note-catpick { display: flex; flex-wrap: wrap; gap: 8px; }
.fo-note-catopt { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--fo-line-strong); border-radius: 20px; background: var(--fo-surface); font: inherit; font-size: 12.5px; font-weight: 600; color: var(--fo-ink-2); cursor: pointer; transition: all var(--fo-fast); }
.fo-note-catopt svg.fo-i { width: 14px; height: 14px; color: var(--fo-ink-3); }
.fo-note-catopt:hover { background: var(--fo-surface-2); }
.fo-note-catopt.is-active { border-color: transparent; font-weight: 700; }
.fo-note-catopt.is-active svg.fo-i { color: currentColor; }
.fo-note-subs-edit { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 9px; }
.fo-note-subs-edit .fo-note-sub { padding-right: 6px; }
.fo-note-addother { display: inline-flex; align-items: center; gap: 6px; margin-top: 9px; padding: 0; border: 0; background: none; color: var(--fo-accent); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.fo-note-addother svg.fo-i { width: 14px; height: 14px; }
.fo-note-addother:hover { color: var(--fo-accent-deep); }
.fo-note-other { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 8px; align-items: center; margin-top: 10px; padding: 11px; background: var(--fo-surface-2); border-radius: var(--fo-r-sm); }
.fo-note-vishint { margin: 8px 2px 0; font-size: 11.5px; color: var(--fo-ink-3); }

@media (max-width: 560px) {
  .fo-note-card { grid-template-columns: 36px minmax(0, 1fr); }
  .fo-note-aside { flex-direction: row; grid-column: 2; justify-content: flex-start; gap: 12px; margin-top: 2px; }
  .fo-note-glyph { width: 36px; height: 36px; }
  .fo-note-other { grid-template-columns: 1fr; }
}

/* ============================================================
   Foundation · spec frame + System states  (.fo-spec-* / .fo-state-* …)
   The shared example frame both Foundation pages use, plus the
   loading / error / blocked / first-run states.
   ============================================================ */

/* the one shared example frame (reused by the App shell page too) */
.fo-states-sec { margin-bottom: 34px; }
.fo-states-head { margin-bottom: 13px; }
.fo-states-head .fo-eyebrow { margin-bottom: 3px; }
.fo-spec { display: flex; flex-direction: column; min-width: 0; }
.fo-spec-demo { background: var(--fo-canvas); border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); padding: 22px; min-height: 132px; display: flex; flex-direction: column; justify-content: center; }
.fo-spec-cap { margin-top: 11px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: 12.5px; color: var(--fo-ink-2); }
.fo-spec-cap b { font-weight: 650; color: var(--fo-ink); }
.fo-spec-cap code, .fo-spec-when code { font-family: var(--fo-mono); font-size: 11px; color: var(--fo-ink-3); background: var(--fo-surface-2); border: 1px solid var(--fo-line); padding: 1px 6px; border-radius: 5px; }
.fo-spec-when { margin-top: 5px; font-size: 12px; color: var(--fo-ink-3); line-height: 1.55; }
.fo-spec-when .lbl { font-weight: 700; color: var(--fo-ink-2); margin-right: 7px; text-transform: uppercase; font-size: 10px; letter-spacing: 0.05em; }
.fo-spec-when a, .fo-spec a { color: var(--fo-accent); text-decoration: none; }
.fo-spec-when a:hover, .fo-spec a:hover { text-decoration: underline; }

/* empty · error variant */
.fo-empty.is-error svg.fo-i { color: var(--fo-warn); opacity: 0.9; }

/* skeleton compositions */
.fo-skel-list { border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); overflow: hidden; background: var(--fo-surface); width: 100%; }
.fo-skel-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-top: 1px solid var(--fo-line); }
.fo-skel-list .fo-skel-row:first-child { border-top: 0; }
.fo-skel-card { border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--fo-surface); }

/* spinner — the one motion primitive the kit was missing */
.fo-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--fo-line-strong); border-top-color: var(--fo-accent); animation: fo-spin 0.7s linear infinite; display: inline-block; flex: none; }
.fo-spinner.is-lg { width: 28px; height: 28px; border-width: 3px; }
.fo-spinner-label { display: block; margin-top: 10px; font-size: 12.5px; color: var(--fo-ink-3); }
@keyframes fo-spin { to { transform: rotate(360deg); } }
.fo-btn.is-loading { pointer-events: none; }
.fo-btn.is-loading > svg.fo-i { display: none; }
.fo-btn.is-loading::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; opacity: 0.55; animation: fo-spin 0.7s linear infinite; }

/* inline error card */
.fo-state-error { display: flex; align-items: center; gap: 13px; padding: 15px 16px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); background: var(--fo-surface); width: 100%; }
.fo-state-error .ic { width: 34px; height: 34px; border-radius: 9px; background: var(--fo-danger-soft); color: var(--fo-danger); display: grid; place-items: center; flex: none; }
.fo-state-error .ic svg.fo-i { width: 17px; height: 17px; }
.fo-state-error .tx { flex: 1; min-width: 0; }
.fo-state-error .tx b { display: block; font-size: 13.5px; color: var(--fo-ink); }
.fo-state-error .tx span { display: block; font-size: 12px; color: var(--fo-ink-3); margin-top: 1px; }

/* full-page terminal states (error / permission) */
.fo-state-page { padding: 36px 24px; }
.fo-state-page .fo-sub { max-width: 430px; margin: 0 auto; }
.fo-state-ref { margin-top: 12px; font-size: 11.5px; color: var(--fo-ink-3); }
.fo-state-ref code { font-family: var(--fo-mono); background: var(--fo-surface-2); border: 1px solid var(--fo-line); padding: 1px 6px; border-radius: 5px; }
.fo-state-acts { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.fo-state-badge.is-error { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-state-badge.is-locked { background: var(--fo-accent-soft); color: var(--fo-accent); }

/* offline / connection banner — informational, never red */
.fo-banner.is-offline { background: var(--fo-surface-2); color: var(--fo-ink-2); border: 1px solid var(--fo-line); align-items: center; }
.fo-banner.is-offline svg.fo-i { color: var(--fo-ink-3); }
.fo-banner.is-offline a { color: var(--fo-accent); text-decoration: none; font-weight: 650; }
.fo-banner.is-offline a:hover { text-decoration: underline; }
.fo-banner.is-sticky { position: sticky; top: 0; z-index: 30; margin: 0; border-radius: 0; }

/* first-run · get started */
.fo-getstarted { text-align: center; padding: 32px 24px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); background: var(--fo-surface); display: flex; flex-direction: column; align-items: center; }
.fo-getstarted .fo-sub { max-width: 380px; margin: 4px auto 0; }
.fo-getstarted-art { width: 56px; height: 56px; border-radius: 16px; background: var(--fo-accent-soft); color: var(--fo-accent); display: grid; place-items: center; margin-bottom: 14px; }
.fo-getstarted-art svg.fo-i { width: 26px; height: 26px; }
.fo-getstarted-title { font-size: 18px; font-weight: 700; color: var(--fo-ink); letter-spacing: -0.01em; }
.fo-getstarted-steps { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.fo-getstarted-step { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--fo-ink-2); background: var(--fo-surface-2); border: 1px solid var(--fo-line); padding: 7px 13px 7px 8px; border-radius: 20px; }
.fo-getstarted-step .n { width: 18px; height: 18px; border-radius: 50%; background: var(--fo-accent-soft); color: var(--fo-accent); font-size: 11px; font-weight: 700; display: grid; place-items: center; flex: none; }

@media (prefers-reduced-motion: reduce) { .fo-spinner, .fo-btn.is-loading::before { animation: none; } }
@media (max-width: 560px) {
  .fo-state-error { flex-direction: column; align-items: flex-start; }
  .fo-state-acts { flex-direction: column; }
  .fo-state-acts .fo-btn { width: 100%; justify-content: center; }
}

/* ============================================================
   Foundation · App shell reference  (.fo-shellref-*)
   Styleguide-only — documents the live base.html shell.
   ============================================================ */
.fo-states-head code { font-family: var(--fo-mono); font-size: 11px; color: var(--fo-ink-3); background: var(--fo-surface-2); border: 1px solid var(--fo-line); padding: 0 5px; border-radius: 5px; }

/* anatomy: a self-contained sidebar specimen + numbered legend */
.fo-shellref-anat { display: flex; gap: 30px; align-items: flex-start; flex-wrap: wrap; }
.fo-shellref-side { width: 210px; flex: none; background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); padding: 11px 9px; box-shadow: var(--fo-shadow-1); }
.fo-shellref-side .sr-brand { display: flex; align-items: center; gap: 9px; padding: 6px 7px 10px; }
.fo-shellref-side .sr-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--fo-grad); flex: none; }
.fo-shellref-side .sr-brand .tx { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.fo-shellref-side .sr-brand .sub { font-size: 9px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fo-ink-3); }
.fo-shellref-side .sr-brand .nm { font-size: 12.5px; font-weight: 700; color: var(--fo-ink); }
.fo-shellref-side .sr-nav { display: flex; flex-direction: column; gap: 1px; border-top: 1px solid var(--fo-line); padding-top: 7px; }
.fo-shellref-side .sr-lbl { display: flex; align-items: center; font-size: 9px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fo-ink-3); margin: 8px 0 2px; padding: 0 7px; }
.fo-shellref-side .sr-link { display: flex; align-items: center; gap: 9px; padding: 6px 7px; border-radius: 7px; font-size: 12px; color: var(--fo-ink-2); }
.fo-shellref-side .sr-link svg.fo-i { width: 14px; height: 14px; color: var(--fo-ink-3); flex: none; }
.fo-shellref-side .sr-link.is-active { background: var(--fo-accent-soft); color: var(--fo-accent-deep); font-weight: 600; }
.fo-shellref-side .sr-link.is-active svg.fo-i { color: var(--fo-accent); }
.fo-shellref-side .sr-foot { display: flex; align-items: center; gap: 7px; margin-top: 9px; padding: 8px 5px 2px; border-top: 1px solid var(--fo-line); }
.fo-shellref-side .sr-ava { width: 26px; height: 26px; border-radius: 50%; background: var(--fo-accent-soft); color: var(--fo-accent); display: grid; place-items: center; font-size: 10px; font-weight: 700; flex: none; }
.fo-shellref-side .sr-who { flex: 1; min-width: 0; line-height: 1.25; }
.fo-shellref-side .sr-who b { display: block; font-size: 11px; color: var(--fo-ink); }
.fo-shellref-side .sr-who span { display: block; font-size: 9.5px; color: var(--fo-ink-3); }
.fo-shellref-side .sr-pinbtn { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; color: var(--fo-ink-3); flex: none; }
.fo-shellref-side .sr-pinbtn svg.fo-i { width: 13px; height: 13px; }
.fo-shellref-pin { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--fo-accent); color: #fff; font-size: 10px; font-weight: 700; flex: none; }
.fo-shellref-side .sr-brand .fo-shellref-pin, .fo-shellref-side .sr-link .fo-shellref-pin, .fo-shellref-side .sr-lbl .fo-shellref-pin { margin-left: auto; }

.fo-shellref-legend { flex: 1; min-width: 250px; display: flex; flex-direction: column; gap: 12px; }
.fo-shellref-legend .lg { display: flex; gap: 11px; align-items: flex-start; }
.fo-shellref-legend .lg .tx { font-size: 12.5px; color: var(--fo-ink-2); line-height: 1.5; }
.fo-shellref-legend .lg .tx b { color: var(--fo-ink); font-weight: 650; }
.fo-shellref-legend .lg .tx span { display: block; color: var(--fo-ink-3); font-size: 12px; margin-top: 2px; }
.fo-shellref-legend code, .fo-shellref-chain code { font-family: var(--fo-mono); font-size: 11px; color: var(--fo-accent-deep); background: var(--fo-surface-2); border: 1px solid var(--fo-line); padding: 0 5px; border-radius: 5px; }
.fo-shellref-chain { font-size: 12px; color: var(--fo-ink-3); padding-top: 11px; border-top: 1px solid var(--fo-line); line-height: 1.7; }
.fo-shellref-tryit { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 2px; }

/* nav-state minis — self-scoped, independent of the live html.nav-pinned */
.fo-shellref-mini { height: 188px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); background: var(--fo-surface); overflow: hidden; display: flex; }
.fo-shellref-mini .sr-bar { background: var(--fo-canvas); border-right: 1px solid var(--fo-line); padding: 13px 0; display: flex; flex-direction: column; align-items: center; gap: 11px; flex: none; }
.fo-shellref-mini.is-rail .sr-bar { width: 46px; }
.fo-shellref-mini.is-pinned .sr-bar { width: 112px; align-items: stretch; padding: 13px 11px; gap: 6px; }
.fo-shellref-mini .sr-ico { width: 18px; height: 18px; border-radius: 6px; background: var(--fo-line-strong); flex: none; }
.fo-shellref-mini.is-pinned .sr-row { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 6px; }
.fo-shellref-mini.is-pinned .sr-row .ln { height: 7px; border-radius: 4px; background: var(--fo-line-strong); flex: 1; }
.fo-shellref-mini.is-pinned .sr-row.is-active { background: var(--fo-accent-soft); }
.fo-shellref-mini.is-pinned .sr-row.is-active .sr-ico { background: var(--fo-accent); }
.fo-shellref-mini.is-pinned .sr-row.is-active .ln { background: var(--fo-accent); opacity: 0.4; }
.fo-shellref-mini .sr-canvas { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 9px; }
.fo-shellref-mini .sr-canvas .ln { height: 8px; border-radius: 4px; background: var(--fo-line); }
.fo-shellref-mini.is-mobile { flex-direction: column; }
.fo-shellref-mini.is-mobile .sr-topbar { display: flex; gap: 13px; justify-content: center; padding: 11px; background: var(--fo-canvas); border-bottom: 1px solid var(--fo-line); }

/* JS contract list */
.fo-shellref-api { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--fo-line); border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); overflow: hidden; }
.fo-shellref-api .row { background: var(--fo-surface); padding: 11px 13px; }
.fo-shellref-api .row > code { font-family: var(--fo-mono); font-size: 12px; color: var(--fo-accent-deep); font-weight: 600; }
.fo-shellref-api .row span { display: block; font-size: 12px; color: var(--fo-ink-3); margin-top: 3px; line-height: 1.5; }
.fo-shellref-api .row span code { font-family: var(--fo-mono); font-size: 11px; color: var(--fo-ink-2); }
.fo-shellref-apifoot { display: flex; align-items: center; gap: 11px; margin-top: 14px; flex-wrap: wrap; }

/* page-skeleton code block */
.fo-shellref-code { font-family: var(--fo-mono); font-size: 12px; line-height: 1.7; color: var(--fo-ink-2); background: var(--fo-canvas); border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); padding: 16px 18px; margin: 0; white-space: pre; overflow-x: auto; }
.fo-shellref-code .k { color: var(--fo-accent-deep); font-weight: 600; }
.fo-shellref-code .t { color: var(--fo-info); }
.fo-shellref-code .c { color: var(--fo-ink-3); }

/* proposed-additions fence */
.fo-shellref-proposed { border: 1.5px dashed var(--fo-line-strong); border-radius: var(--fo-r-lg); background: var(--fo-surface-2); padding: 20px; }
.fo-shellref-proposed-banner { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; font-size: 13.5px; }
.fo-shellref-proposed-banner b { color: var(--fo-ink); font-weight: 650; }
.fo-shellref-proposed-banner svg.fo-i { width: 16px; height: 16px; }
.fo-shellref-pblk { margin-top: 18px; }
.fo-shellref-pblk:first-of-type { margin-top: 0; }
.fo-shellref-plabel { font-size: 11.5px; font-weight: 600; color: var(--fo-ink-3); margin-bottom: 9px; }
.fo-shellref-topbar { display: flex; align-items: center; gap: 16px; padding: 10px 14px; background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); }
.fo-shellref-crumbs { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--fo-ink-3); white-space: nowrap; }
.fo-shellref-crumbs b { color: var(--fo-ink); }
.fo-shellref-crumbs svg.fo-i { width: 12px; height: 12px; color: var(--fo-ink-3); }
.fo-shellref-search { flex: 1; max-width: 360px; margin: 0 auto; display: flex; align-items: center; gap: 9px; padding: 7px 12px; background: var(--fo-canvas); border: 1px solid var(--fo-line); border-radius: 20px; color: var(--fo-ink-3); font: inherit; font-size: 12.5px; cursor: pointer; }
.fo-shellref-search svg.fo-i { width: 14px; height: 14px; }
.fo-shellref-search .kbd { margin-left: auto; font-family: var(--fo-mono); font-size: 10.5px; background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: 5px; padding: 1px 6px; color: var(--fo-ink-3); }
.fo-shellref-bell { position: relative; width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; color: var(--fo-ink-2); background: var(--fo-canvas); border: 1px solid var(--fo-line); cursor: pointer; flex: none; }
.fo-shellref-bell svg.fo-i { width: 16px; height: 16px; }
.fo-shellref-bell-count { position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--fo-danger); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--fo-surface-2); }
.fo-shellref-mobnav { display: flex; max-width: 300px; height: 208px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); overflow: hidden; box-shadow: var(--fo-shadow-1); background: var(--fo-surface); }
.fo-shellref-mobnav .drawer { width: 172px; background: var(--fo-surface); border-right: 1px solid var(--fo-line); padding: 14px 12px; display: flex; flex-direction: column; gap: 3px; }
.fo-shellref-mobnav .d-brand { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--fo-ink); margin-bottom: 10px; }
.fo-shellref-mobnav .d-mark { width: 24px; height: 24px; border-radius: 7px; background: var(--fo-grad); flex: none; }
.fo-shellref-mobnav .d-link { display: flex; align-items: center; gap: 9px; padding: 8px 9px; border-radius: 7px; font-size: 12.5px; color: var(--fo-ink-2); }
.fo-shellref-mobnav .d-link svg.fo-i { width: 15px; height: 15px; color: var(--fo-ink-3); }
.fo-shellref-mobnav .d-link.is-active { background: var(--fo-accent-soft); color: var(--fo-accent-deep); font-weight: 600; }
.fo-shellref-mobnav .d-link.is-active svg.fo-i { color: var(--fo-accent); }
.fo-shellref-mobnav .scrim { flex: 1; background: rgba(24, 27, 33, 0.28); }

@media (max-width: 760px) {
  .fo-shellref-api { grid-template-columns: 1fr; }
  .fo-shellref-topbar { flex-wrap: wrap; }
  .fo-shellref-search { order: 3; max-width: none; margin: 0; width: 100%; }
}

/* ============================================================
   Global chrome — reveal-search · top actions · assistant FAB
   Liquid-glass material, consistent with the sidebar rail
   (liquidGlass.enhance() adds the same edge refraction).
   ============================================================ */
.fo-gsearch, .fo-acctfab, .fo-chatfab {
  background: linear-gradient(180deg, var(--fo-glass-top), var(--fo-glass-bottom));
  -webkit-backdrop-filter: blur(var(--fo-glass-blur)) saturate(var(--fo-glass-sat)) brightness(var(--fo-glass-bright));
  backdrop-filter: blur(var(--fo-glass-blur)) saturate(var(--fo-glass-sat)) brightness(var(--fo-glass-bright));
  border: 1px solid var(--fo-glass-border);
  box-shadow: var(--fo-glass-shadow), var(--fo-glass-rim);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .fo-gsearch, .fo-acctfab, .fo-chatfab { background: rgba(255, 255, 255, 0.96); }
}

.fo-gsearch { position: fixed; top: 13px; left: 50%; z-index: 35; display: flex; align-items: center; gap: 9px; width: min(360px, 54vw); padding: 7px 13px; border-radius: 999px; transform: translateX(-50%) translateY(-150%); opacity: 0; pointer-events: none; transition: transform 0.32s var(--fo-spring), opacity 0.22s var(--fo-ease); }
.fo-gsearch.is-shown { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: auto; }
.fo-gsearch > svg.fo-i { width: 15px; height: 15px; color: var(--fo-ink-2); flex: none; }
.fo-gsearch .fo-input { border: 0; background: none; padding: 0; height: auto; font-size: 13px; flex: 1; min-width: 0; box-shadow: none; color: var(--fo-ink); }
.fo-gsearch .fo-input:focus { outline: none; box-shadow: none; }
.fo-gsearch .fo-input::placeholder { color: var(--fo-ink-3); }
.fo-gsearch .kbd { font-family: var(--fo-mono); font-size: 10px; color: var(--fo-ink-3); background: rgba(255, 255, 255, 0.5); border: 1px solid var(--fo-glass-border); border-radius: 5px; padding: 1px 5px; flex: none; }

/* the account button — top-right corner (2026-07-01); notifications +
   broadcast live inside its menu, the unread badge rides the avatar */
.fo-acctfab { position: fixed; top: 12px; right: 18px; z-index: 36; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; transition: transform var(--fo-fast) var(--fo-ease), box-shadow var(--fo-fast); }
.fo-acctfab:hover { transform: translateY(-1px); }
.fo-acctfab .fo-ava { width: 30px; height: 30px; font-size: 11px; }
.fo-acct-id { display: flex; align-items: center; gap: 10px; padding: 8px 10px 6px; }
.fo-acct-id .fo-ava { width: 30px; height: 30px; font-size: 11px; flex: none; }
.fo-acct-id .who { min-width: 0; }
.fo-topbtn-badge { position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--fo-danger); color: #fff; font-size: 9.5px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; border: 1.5px solid rgba(255, 255, 255, 0.9); font-variant-numeric: tabular-nums; }

.fo-chatfab { position: fixed; bottom: 22px; right: 22px; z-index: 40; width: 46px; height: 46px; border-radius: 50%; color: var(--fo-accent); display: grid; place-items: center; cursor: pointer; transition: transform var(--fo-fast) var(--fo-ease), opacity 0.2s var(--fo-ease), box-shadow var(--fo-fast); }
.fo-chatfab:hover { transform: translateY(-2px); }
.fo-chatfab svg.fo-i { width: 20px; height: 20px; }
.fo-chatfab.is-hidden { opacity: 0; transform: scale(0.6) translateY(10px); pointer-events: none; }

@media (max-width: 920px) {
  .fo-gsearch { display: none; }
  /* the mobile rail's footer is hidden, so the top-right account button is
     the only account entry point — keep it, tucked clear of the topbar */
  .fo-acctfab { top: 8px; right: 10px; width: 38px; height: 38px; }
  .fo-menu.is-account { top: 52px; right: 10px; }
  .fo-chatfab { bottom: 16px; right: 16px; width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .fo-gsearch, .fo-chatfab, .fo-acctfab { transition: none; } }


/* ============================================================
   Org tree — the reporting hierarchy (top-down chart + indented
   directory, one component behind a toggle) and the approval
   routing chain. Serves Approvals (org chart + chain) and Admin.
   Color is rationed: royal only for "you" and the current step.
   ============================================================ */

/* shared node card (chart + directory) */
.fo-org-node { display: inline-flex; align-items: center; gap: 10px; padding: 8px 13px 8px 9px; background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); box-shadow: var(--fo-shadow-1); text-align: left; cursor: pointer; transition: border-color var(--fo-fast), box-shadow var(--fo-fast); }
.fo-org-node:hover { border-color: var(--fo-line-strong); }
.fo-org-node .nm { font-size: 13px; font-weight: 650; color: var(--fo-ink); white-space: nowrap; }
.fo-org-node .rl { font-size: 11px; color: var(--fo-ink-3); white-space: nowrap; margin-top: 1px; }
.fo-org-node.is-you { border-color: var(--fo-accent); box-shadow: 0 0 0 3px var(--fo-accent-soft); }
.fo-org-node.is-vacant { border-style: dashed; background: var(--fo-surface-2); box-shadow: none; cursor: default; }
.fo-org-node.is-vacant .nm { color: var(--fo-ink-2); }
.fo-org-cnt { display: inline-flex; align-items: center; gap: 3px; margin-left: 3px; font-size: 11px; font-weight: 650; color: var(--fo-ink-2); background: var(--fo-surface-2); border: 1px solid var(--fo-line); border-radius: 20px; padding: 1px 4px 1px 7px; }
.fo-org-cnt svg.fo-i { width: 11px; height: 11px; color: var(--fo-ink-3); transition: transform var(--fo-fast); }
.fo-org-node.is-collapsed .fo-org-cnt svg.fo-i { transform: rotate(-90deg); }

/* ---- top-down chart (nested ul connectors) ---- */
.fo-org-scroll { overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; }
.fo-org-scroll::-webkit-scrollbar { height: 8px; }
.fo-org-scroll::-webkit-scrollbar-thumb { background: var(--fo-line-strong); border-radius: 8px; }
.fo-org-chart { width: fit-content; margin: 0 auto; }
.fo-org-chart ul { list-style: none; margin: 0; padding: 22px 0 0; position: relative; display: flex; justify-content: center; }
.fo-org-chart > ul { padding-top: 0; }
.fo-org-chart li { list-style: none; position: relative; padding: 22px 9px 0; display: flex; flex-direction: column; align-items: center; }
.fo-org-chart li::before, .fo-org-chart li::after { content: ''; position: absolute; top: 0; right: 50%; width: 50%; height: 22px; border-top: 2px solid var(--fo-line); }
.fo-org-chart li::after { right: auto; left: 50%; border-left: 2px solid var(--fo-line); }
.fo-org-chart li:only-child::before, .fo-org-chart li:only-child::after { display: none; }
.fo-org-chart li:only-child { padding-top: 0; }
.fo-org-chart li:first-child::before, .fo-org-chart li:last-child::after { border: 0 none; }
.fo-org-chart li:last-child::before { border-right: 2px solid var(--fo-line); border-radius: 0 7px 0 0; }
.fo-org-chart li:first-child::after { border-radius: 7px 0 0 0; }
.fo-org-chart > ul > li { padding-top: 0; }
.fo-org-chart > ul > li::before, .fo-org-chart > ul > li::after { display: none; }
.fo-org-chart ul ul::before { content: ''; position: absolute; top: 0; left: 50%; border-left: 2px solid var(--fo-line); width: 0; height: 22px; }
.fo-org-chart li.is-collapsed > ul { display: none; }

/* ---- indented directory ---- */
.fo-org-tree { display: flex; flex-direction: column; gap: 1px; }
.fo-org-tree[hidden] { display: none; }
.fo-org-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: var(--fo-r-sm); position: relative; }
.fo-org-row:hover { background: var(--fo-surface-2); }
.fo-org-row.is-you { background: var(--fo-accent-soft); }
.fo-org-row.is-you::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: var(--fo-accent); }
.fo-org-row.is-hidden { display: none; }
.fo-org-twist { flex: none; width: 20px; height: 20px; display: grid; place-items: center; border: 0; background: none; color: var(--fo-ink-3); cursor: pointer; border-radius: 5px; }
.fo-org-twist:hover { background: var(--fo-line); color: var(--fo-ink); }
.fo-org-twist svg.fo-i { width: 12px; height: 12px; transition: transform var(--fo-fast); }
.fo-org-row.is-collapsed .fo-org-twist svg.fo-i { transform: rotate(-90deg); }
.fo-org-twist.is-leaf { visibility: hidden; }
.fo-org-rowmain { flex: 1; min-width: 0; line-height: 1.25; }
.fo-org-rowmain .nm { font-size: 13px; font-weight: 600; color: var(--fo-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-org-rowmain .rl { font-size: 11.5px; color: var(--fo-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-org-row.is-vacant .nm { color: var(--fo-ink-3); font-style: italic; font-weight: 550; }
.fo-org-dept { flex: none; font-size: 11px; color: var(--fo-ink-3); background: var(--fo-surface-2); border: 1px solid var(--fo-line); border-radius: 20px; padding: 1px 9px; }

/* ---- approval routing chain ---- */
.fo-org-instance { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; background: var(--fo-surface-2); border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); margin-bottom: 16px; }
.fo-org-instance .ttl { font-size: 14px; font-weight: 700; color: var(--fo-ink); }
.fo-org-instance .sub { font-size: 12px; color: var(--fo-ink-3); }
.fo-org-instance .sp { flex: 1; }
.fo-org-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; padding: 3px 11px; border-radius: 20px; }
.fo-org-status.is-pending { color: var(--fo-accent-deep); background: var(--fo-accent-soft); }
.fo-org-status.is-approved { color: var(--fo-ok); background: var(--fo-ok-soft); }
.fo-org-status.is-rejected { color: var(--fo-danger); background: var(--fo-danger-soft); }
.fo-org-status .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.fo-org-chain { display: flex; flex-direction: column; }
.fo-org-step { display: flex; gap: 13px; }
.fo-org-rail { flex: none; display: flex; flex-direction: column; align-items: center; }
.fo-org-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; border: 2px solid var(--fo-line-strong); background: var(--fo-surface); color: var(--fo-ink-3); font-variant-numeric: tabular-nums; }
.fo-org-dot svg.fo-i { width: 15px; height: 15px; }
.fo-org-line { flex: 1; width: 2px; background: var(--fo-line-strong); min-height: 16px; margin: 4px 0; }
.fo-org-step:last-child .fo-org-line { display: none; }
.fo-org-step.is-done .fo-org-dot { background: var(--fo-ok-soft); border-color: var(--fo-ok); color: var(--fo-ok); }
.fo-org-step.is-done .fo-org-line { background: var(--fo-ok); }
.fo-org-step.is-current .fo-org-dot { border-color: var(--fo-accent); color: var(--fo-accent); background: var(--fo-accent-soft); box-shadow: 0 0 0 4px var(--fo-accent-soft); }
.fo-org-step.is-rejected .fo-org-dot { background: var(--fo-danger-soft); border-color: var(--fo-danger); color: var(--fo-danger); }
.fo-org-stepmain { flex: 1; min-width: 0; padding-bottom: 20px; }
.fo-org-step:last-child .fo-org-stepmain { padding-bottom: 0; }
.fo-org-stephead { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.fo-org-stepname { font-size: 13.5px; font-weight: 650; color: var(--fo-ink); }
.fo-org-step.is-pending .fo-org-stepname { color: var(--fo-ink-2); }
.fo-org-sla { font-size: 10.5px; font-weight: 600; color: var(--fo-ink-3); background: var(--fo-surface-2); border: 1px solid var(--fo-line); border-radius: 20px; padding: 1px 8px; }
.fo-org-cond { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--fo-warn); background: var(--fo-warn-soft); border-radius: 20px; padding: 2px 9px; margin: 7px 0 0; }
.fo-org-approver { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; }
.fo-org-approver .who { font-size: 12.5px; font-weight: 600; color: var(--fo-ink); }
.fo-org-approver .who small { display: block; font-weight: 500; color: var(--fo-ink-3); font-size: 11px; }
.fo-org-meta { font-size: 11.5px; color: var(--fo-ink-3); margin-top: 6px; }
.fo-org-step.is-rejected .fo-org-meta { color: var(--fo-danger); }
.fo-org-par { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.fo-org-par .pll { font-size: 11px; font-weight: 650; color: var(--fo-accent-deep); background: var(--fo-accent-soft); border-radius: 20px; padding: 2px 9px; }
.fo-org-stepacts { display: flex; gap: 8px; margin-top: 11px; }

@media (max-width: 560px) {
  .fo-org-dept { display: none; }
  .fo-org-instance .sp { flex-basis: 100%; height: 0; }
}


/* ============================================================
   Chat stream kit — the assistant surface: message bubbles,
   record cards (icon · tone · fields · CTA), confirm-token
   actions, follow-up chips, typing / streaming / error states,
   and the composer. The v3 skin for the chatbot's .cb-* layer.
   Color is rationed: the user-bubble tint, the bot mark, the
   send button, and the live confirm.
   ============================================================ */
.fo-chat { display: flex; flex-direction: column; height: 640px; max-height: 80vh; background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); box-shadow: var(--fo-shadow-1); overflow: hidden; }

/* header */
.fo-chat-head { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-bottom: 1px solid var(--fo-line); flex: none; }
.fo-chat-mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--fo-accent-soft); color: var(--fo-accent); flex: none; }
.fo-chat-mark svg.fo-i { width: 17px; height: 17px; }
.fo-chat-id { flex: 1; min-width: 0; line-height: 1.25; }
.fo-chat-id .nm { font-size: 13.5px; font-weight: 700; color: var(--fo-ink); }
.fo-chat-id .st { font-size: 11px; color: var(--fo-ink-3); display: inline-flex; align-items: center; gap: 5px; }
.fo-chat-id .st::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--fo-ok); }
/* photo-aware drafting (Wave 3): staged-photo chip + confirm-card thumb */
.fo-chat-photochip { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 5px 6px 5px 5px; border: 1px solid var(--fo-line); border-radius: 10px; background: var(--fo-surface-2); max-width: 260px; }
.fo-chat-photochip img { width: 34px; height: 34px; border-radius: 7px; object-fit: cover; flex: none; background: var(--fo-surface); }
.fo-chat-photochip .nm { font-size: 12px; color: var(--fo-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.fo-chat-photochip .x { border: 0; background: none; color: var(--fo-ink-3); cursor: pointer; display: grid; place-items: center; padding: 2px; border-radius: 6px; flex: none; }
.fo-chat-photochip .x:hover { background: var(--fo-surface); color: var(--fo-ink); }
.fo-chat-photochip .x svg.fo-i { width: 13px; height: 13px; }
.fo-chat-cardphoto { display: block; width: 100%; max-width: 220px; max-height: 150px; object-fit: cover; border-radius: 9px; border: 1px solid var(--fo-line); margin: 8px 0 2px; }
.fo-chat-hbtn { width: 30px; height: 30px; border-radius: 8px; border: 0; background: none; color: var(--fo-ink-3); display: grid; place-items: center; cursor: pointer; flex: none; transition: background var(--fo-fast), color var(--fo-fast); }
.fo-chat-hbtn:hover { background: var(--fo-surface-2); color: var(--fo-ink); }
.fo-chat-hbtn svg.fo-i { width: 16px; height: 16px; }
.fo-chat-lang { font-size: 11px; font-weight: 700; letter-spacing: 0.03em; color: var(--fo-ink-2); background: var(--fo-surface-2); border: 1px solid var(--fo-line); border-radius: 20px; padding: 4px 10px; cursor: pointer; flex: none; }
.fo-chat-lang:hover { border-color: var(--fo-line-strong); }

/* budget banner */
.fo-chat-banner { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--fo-warn-soft); color: var(--fo-warn); font-size: 12px; font-weight: 600; flex: none; }
.fo-chat-banner svg.fo-i { width: 15px; height: 15px; flex: none; }

/* stream */
.fo-chat-stream { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 15px; scrollbar-width: thin; }
.fo-chat-stream::-webkit-scrollbar { width: 8px; }
.fo-chat-stream::-webkit-scrollbar-thumb { background: transparent; border-radius: 8px; }
.fo-chat-stream:hover::-webkit-scrollbar-thumb { background: var(--fo-line-strong); }

.fo-chat-msg { display: flex; gap: 9px; }
.fo-chat-msg.is-user { flex-direction: row-reverse; }
.fo-chat-ava { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--fo-accent-soft); color: var(--fo-accent); flex: none; align-self: flex-start; }
.fo-chat-ava svg.fo-i { width: 15px; height: 15px; }
.fo-chat-col { min-width: 0; max-width: 82%; display: flex; flex-direction: column; align-items: flex-start; }
.fo-chat-msg.is-user .fo-chat-col { align-items: flex-end; }
.fo-chat-bubble { padding: 10px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.55; color: var(--fo-ink); }
/* Markdown rendered inside assistant bubbles (fmt()) — single source of truth
   (was two same-specificity blocks that fought; ul/ol indent had drifted). */
.fo-chat-bubble p { margin: 0 0 7px; }
.fo-chat-bubble p:last-child { margin: 0; }
.fo-chat-bubble ul, .fo-chat-bubble ol { margin: 5px 0 3px; padding-left: 18px; }
.fo-chat-bubble li { margin: 2px 0; }
.fo-chat-bubble li::marker { color: var(--fo-ink-3); }
.fo-chat-bubble strong { font-weight: 700; }
.fo-chat-bubble code { background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: 5px; padding: 1px 5px; font-size: 12px; font-family: var(--fo-mono); }
.fo-chat-bubble .fo-chat-h { font-weight: 700; font-size: 13.5px; margin: 9px 0 3px; }
.fo-chat-bubble .fo-chat-h:first-child { margin-top: 0; }
.fo-chat-msg.is-bot .fo-chat-bubble { background: var(--fo-surface-2); border: 1px solid var(--fo-line); border-top-left-radius: 5px; }
.fo-chat-msg.is-user .fo-chat-bubble { background: var(--fo-accent-soft); color: var(--fo-accent-deep); border-top-right-radius: 5px; }
.fo-chat-bubble.is-error { background: var(--fo-danger-soft); border: 1px solid rgba(179, 38, 30, 0.22); }
.fo-chat-bubble.is-error .er { display: flex; gap: 8px; align-items: flex-start; color: var(--fo-danger); font-weight: 600; }
.fo-chat-bubble.is-error svg.fo-i { width: 16px; height: 16px; flex: none; margin-top: 1px; }

.fo-chat-cursor { display: inline-block; width: 7px; height: 15px; vertical-align: -2px; margin-left: 2px; background: var(--fo-accent); border-radius: 2px; animation: fo-chat-blink 1s steps(2, start) infinite; }
@keyframes fo-chat-blink { 50% { opacity: 0; } }

/* message actions (copy / regenerate / feedback) */
.fo-chat-acts { display: flex; gap: 2px; margin-top: 5px; opacity: 0; transition: opacity var(--fo-fast); }
.fo-chat-msg:hover .fo-chat-acts { opacity: 1; }
.fo-chat-act { width: 26px; height: 26px; border: 0; background: none; border-radius: 6px; color: var(--fo-ink-3); cursor: pointer; display: grid; place-items: center; }
.fo-chat-act:hover { background: var(--fo-surface-2); color: var(--fo-ink); }
.fo-chat-act.is-on { color: var(--fo-accent); }
.fo-chat-act svg.fo-i { width: 14px; height: 14px; }

/* typing */
.fo-chat-typing { display: inline-flex; align-items: center; gap: 9px; padding: 11px 13px; background: var(--fo-surface-2); border: 1px solid var(--fo-line); border-radius: 14px; border-top-left-radius: 5px; }
.fo-chat-typing .dots { display: inline-flex; gap: 4px; }
.fo-chat-typing .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--fo-ink-3); animation: fo-chat-bounce 1.2s infinite ease-in-out; }
.fo-chat-typing .dots i:nth-child(2) { animation-delay: 0.15s; }
.fo-chat-typing .dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes fo-chat-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.45; } 30% { transform: translateY(-4px); opacity: 1; } }
.fo-chat-typing .lbl { font-size: 12px; color: var(--fo-ink-3); }

/* record cards */
.fo-chat-cards { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; width: 100%; }
.fo-chat-card { display: flex; gap: 11px; padding: 11px 12px; background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); }
.fo-chat-card .ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.fo-chat-card .ico svg.fo-i { width: 17px; height: 17px; }
.fo-chat-card.t-danger .ico { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-chat-card.t-warn .ico { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-chat-card.t-info .ico { background: var(--fo-info-soft); color: var(--fo-info); }
.fo-chat-card.t-brand .ico { background: var(--fo-accent-soft); color: var(--fo-accent); }
.fo-chat-card.t-neutral .ico { background: var(--fo-surface-2); color: var(--fo-ink-2); }
.fo-chat-card.t-ok .ico { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-chat-card .bd { flex: 1; min-width: 0; }
.fo-chat-card .ttl { font-size: 13px; font-weight: 700; color: var(--fo-ink); }
.fo-chat-card .sub { font-size: 11.5px; color: var(--fo-ink-3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-chat-fields { display: flex; flex-wrap: wrap; gap: 2px 16px; margin-top: 8px; }
.fo-chat-fields div { font-size: 11.5px; color: var(--fo-ink); }
.fo-chat-fields div b { font-weight: 500; color: var(--fo-ink-3); margin-right: 5px; }
/* Mini bar chart for analytics/trend cards (card.series). */
.fo-chat-chart { display: flex; align-items: flex-end; gap: 4px; height: 64px; margin: 10px 0 4px; padding-top: 4px; }
.fo-chat-chart .b { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; min-width: 0; }
.fo-chat-chart .b > span { width: 100%; max-width: 22px; min-height: 2px; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, var(--fo-accent) 0%, var(--fo-accent-deep) 100%); transition: height var(--fo-fast) var(--fo-ease); }
.fo-chat-chart .b em { font-size: 9.5px; font-style: normal; color: var(--fo-ink-3); white-space: nowrap; }
.fo-chat-open { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; font-size: 12px; font-weight: 600; color: var(--fo-accent-deep); background: var(--fo-accent-soft); border: 0; border-radius: 8px; padding: 5px 11px; cursor: pointer; text-decoration: none; }
.fo-chat-open svg.fo-i { width: 13px; height: 13px; }
/* F7: card action row (Open + a short-lived Undo on "Done" cards) */
.fo-chat-cardacts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.fo-chat-cardacts .fo-chat-open { margin-top: 0; }
.fo-chat-undo { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--fo-ink-2); background: var(--fo-surface-2); border: 1px solid var(--fo-line); border-radius: 8px; padding: 5px 11px; cursor: pointer; transition: background var(--fo-fast), color var(--fo-fast); }
.fo-chat-undo:hover { color: var(--fo-ink); background: var(--fo-line); }
.fo-chat-undo:disabled { opacity: .6; cursor: default; }
.fo-chat-undo svg.fo-i { width: 13px; height: 13px; }

/* confirm card */
.fo-chat-card.is-confirm { border-color: var(--fo-accent); box-shadow: 0 0 0 3px var(--fo-accent-soft); }
.fo-chat-confirm-acts { display: flex; gap: 8px; margin-top: 11px; }
.fo-chat-card.is-expired { opacity: 0.55; }
.fo-chat-card.is-expired .ico { background: var(--fo-surface-2); color: var(--fo-ink-3); }

/* follow-up chips */
.fo-chat-followups { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.fo-chat-chip { font-size: 12px; font-weight: 550; color: var(--fo-accent-deep); background: none; border: 1px solid var(--fo-line-strong); border-radius: 20px; padding: 5px 12px; cursor: pointer; transition: background var(--fo-fast), border-color var(--fo-fast); }
.fo-chat-chip:hover { background: var(--fo-accent-soft); border-color: var(--fo-accent); }

/* composer */
.fo-chat-composer { border-top: 1px solid var(--fo-line); padding: 10px 12px 11px; flex: none; }
/* F2: pinned-focus chip above the composer */
.fo-chat-pinbar { display: flex; margin-bottom: 8px; }
.fo-chat-pin { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; font-size: 12px; font-weight: 600; color: var(--fo-accent-deep); background: var(--fo-accent-soft); border: 1px solid color-mix(in srgb, var(--fo-accent) 22%, transparent); border-radius: 999px; padding: 4px 6px 4px 11px; }
.fo-chat-pin > svg.fo-i { width: 13px; height: 13px; flex: none; }
.fo-chat-pin .lb { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fo-chat-pin .x { display: grid; place-items: center; width: 18px; height: 18px; border: 0; border-radius: 50%; background: transparent; color: var(--fo-accent-deep); cursor: pointer; flex: none; }
.fo-chat-pin .x:hover { background: color-mix(in srgb, var(--fo-accent) 18%, transparent); }
.fo-chat-pin .x svg.fo-i { width: 11px; height: 11px; }
.fo-chat-inwrap { display: flex; align-items: flex-end; gap: 8px; background: var(--fo-surface-2); border: 1px solid var(--fo-line); border-radius: 15px; padding: 6px 6px 6px 13px; transition: border-color var(--fo-fast), background var(--fo-fast); }
.fo-chat-inwrap:focus-within { border-color: var(--fo-accent); background: var(--fo-surface); }
.fo-chat-input { flex: 1; min-width: 0; border: 0; background: none; resize: none; font: inherit; font-size: 13.5px; line-height: 1.5; color: var(--fo-ink); max-height: 120px; padding: 6px 0; outline: none; }
.fo-chat-send { width: 33px; height: 33px; border-radius: 10px; border: 0; background: var(--fo-accent-soft); color: var(--fo-accent-deep); display: grid; place-items: center; cursor: pointer; flex: none; transition: background var(--fo-fast); }
.fo-chat-send:hover { background: #dce8f9; }
.fo-chat-send:disabled { opacity: 0.45; cursor: default; }
.fo-chat-send svg.fo-i { width: 16px; height: 16px; }
.fo-chat-send .sq { width: 11px; height: 11px; border-radius: 3px; background: currentColor; }
.fo-chat-cfoot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 7px 4px 0; }
.fo-chat-disc { font-size: 10.5px; color: var(--fo-ink-3); }
.fo-chat-count { font-size: 11px; color: var(--fo-ink-3); font-variant-numeric: tabular-nums; flex: none; }
.fo-chat-count.is-warn { color: var(--fo-warn); }
.fo-chat-count.is-over { color: var(--fo-danger); font-weight: 700; }

/* welcome hero */
.fo-chat-hero { margin: auto; text-align: center; max-width: 460px; padding: 18px; }
.fo-chat-hero .mk { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--fo-accent-soft); color: var(--fo-accent); margin: 0 auto 14px; }
.fo-chat-hero .mk svg.fo-i { width: 24px; height: 24px; }
.fo-chat-hero h3 { margin: 0; font-size: 18px; font-weight: 750; letter-spacing: -0.01em; color: var(--fo-ink); }
.fo-chat-hero p { margin: 6px 0 16px; font-size: 13px; color: var(--fo-ink-3); }
.fo-chat-suggest { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; text-align: left; }
.fo-chat-sug { display: flex; align-items: center; gap: 9px; padding: 10px 12px; background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); font-size: 12.5px; font-weight: 550; color: var(--fo-ink); cursor: pointer; transition: border-color var(--fo-fast), background var(--fo-fast); }
.fo-chat-sug:hover { border-color: var(--fo-accent); background: var(--fo-accent-soft); }
.fo-chat-sug svg.fo-i { width: 15px; height: 15px; color: var(--fo-accent); flex: none; }

/* history drawer (reference mini) */
.fo-chat-sgroup { font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fo-ink-3); margin: 12px 4px 5px; }
.fo-chat-sess { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: var(--fo-r-sm); cursor: pointer; }
.fo-chat-sess:hover { background: var(--fo-surface-2); }
.fo-chat-sess.is-active { background: var(--fo-accent-soft); }
.fo-chat-sess .ic { color: var(--fo-ink-3); flex: none; display: grid; }
.fo-chat-sess .ic svg.fo-i { width: 15px; height: 15px; }
.fo-chat-sess .tx { flex: 1; min-width: 0; }
.fo-chat-sess .tx .t { font-size: 12.5px; font-weight: 600; color: var(--fo-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-chat-sess .tx .d { font-size: 10.5px; color: var(--fo-ink-3); }

@media (max-width: 560px) {
  .fo-chat { height: 560px; }
  .fo-chat-col { max-width: 88%; }
  .fo-chat-suggest { grid-template-columns: 1fr; }
  .fo-chat-disc { display: none; }
}

/* ── fo-chat.js runtime: the engine injects .fo-chat-stream + .fo-chat-composer
   into a mount; this makes the mount a flex column that fills its container
   (the full-page .fo-chat card, or the floating panel body). ── */
.fo-chat-mountready { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.fo-chat-banner[hidden] { display: none; }
.fo-chat-bubble .fo-chat-typing { padding: 2px 0; background: none; border: 0; }
.fo-chat-act.is-active.fb-up { color: var(--fo-ok); }
.fo-chat-act.is-active.fb-down { color: var(--fo-danger); }
.fo-chat-time { font-size: 10.5px; color: var(--fo-ink-3); margin-left: 6px; align-self: center; }
.fo-chat-send.is-stop { background: var(--fo-danger-soft); color: var(--fo-danger); }
/* /chatbot/ page — the page column is a viewport-height flexbox and the chat
   fills whatever the header leaves, so the composer always ends at the
   viewport bottom: no page scroll, no magic offsets that break when the
   subtitle wraps. Vertical padding is tighter than the default reading page
   because this is an app surface, not a document. */
.fo-page.is-chatfit { height: 100vh; height: 100dvh; display: flex; flex-direction: column; padding-top: 34px; padding-bottom: 22px; }
.fo-page.is-chatfit .fo-head { flex: none; }
.fo-chat.is-page { flex: 1; min-height: 0; height: auto; max-height: none; }

/* ── floating AI Assistant panel (launched from .fo-chatfab) ── */
.fo-chatpanel {
  position: fixed; right: 22px; bottom: 80px; z-index: 41;
  width: min(400px, calc(100vw - 32px)); height: min(640px, calc(100vh - 122px));
  display: flex; flex-direction: column;
  background: var(--fo-surface); border: 1px solid var(--fo-line);
  border-radius: 18px; box-shadow: var(--fo-shadow-2); overflow: hidden;
  transform-origin: bottom right; opacity: 0; visibility: hidden;
  transform: translateY(18px) scale(0.94); pointer-events: none;
  transition: opacity 0.2s var(--fo-ease), transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.32s;
}
.fo-chatpanel.is-open { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
.fo-chatpanel-head { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-bottom: 1px solid var(--fo-line); flex: none; }
.fo-chatpanel-head .fo-chat-mark { width: 28px; height: 28px; border-radius: 8px; }
.fo-chatpanel-head .nm { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 700; color: var(--fo-ink); }
.fo-chatpanel-btn { width: 30px; height: 30px; border-radius: 8px; border: 0; background: none; color: var(--fo-ink-3); display: grid; place-items: center; cursor: pointer; flex: none; transition: background var(--fo-fast), color var(--fo-fast); }
.fo-chatpanel-btn:hover { background: var(--fo-surface-2); color: var(--fo-ink); }
.fo-chatpanel-btn svg.fo-i { width: 16px; height: 16px; }
@media (max-width: 560px) {
  .fo-chatpanel { inset: 0; width: 100%; height: 100%; max-height: none; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) { .fo-chatpanel { transition: opacity 0.12s; transform: none; } }


/* ============================================================
   v3-lite public surfaces — the unauthenticated / token-gated
   screens (login, 2FA, QR check-in, public request, vendor
   portal): tokens + a handful of components, no shell, phone-
   first. Shown here in light device frames for review; the real
   pages render the lite surface full-bleed. Reuses .fo-qr-frame,
   .fo-sig. Color rationed: soft accent buttons, never a dark slab.
   ============================================================ */
.fo-device-board { display: flex; flex-wrap: wrap; gap: 30px 28px; align-items: flex-start; }
.fo-device { width: 330px; max-width: 100%; flex: none; }
.fo-device-frame { border-radius: 42px; background: linear-gradient(160deg, #ffffff, #eef1f6); border: 1px solid var(--fo-line); padding: 10px; box-shadow: 0 26px 60px -28px rgba(15, 35, 70, 0.32); }
.fo-device-screen { position: relative; height: 620px; border-radius: 33px; overflow: hidden; background: var(--fo-canvas); display: flex; flex-direction: column; box-shadow: inset 0 0 0 1px rgba(15, 35, 70, 0.05); }
.fo-device-notch { position: absolute; top: 9px; left: 50%; transform: translateX(-50%); width: 80px; height: 19px; border-radius: 12px; background: rgba(20, 24, 30, 0.05); z-index: 6; }
.fo-device-cap { margin-top: 13px; text-align: center; font-size: 12.5px; font-weight: 650; color: var(--fo-ink); }
.fo-device-cap span { display: block; color: var(--fo-ink-3); font-weight: 500; font-size: 11.5px; margin-top: 2px; }

/* lite surface */
.fo-lite { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; padding: 38px 22px 22px; scrollbar-width: none; }
.fo-lite::-webkit-scrollbar { display: none; }
.fo-lite-lock { display: flex; align-items: center; gap: 9px; }
.fo-lite-lock img { width: 36px; height: 36px; border-radius: 11px; flex: none; }
.fo-lite-lock .nm { font-size: 14.5px; font-weight: 800; letter-spacing: -0.01em; color: var(--fo-ink); line-height: 1.15; }
.fo-lite-lock .nm small { display: block; font-size: 10.5px; font-weight: 600; color: var(--fo-ink-3); letter-spacing: 0; margin-top: 1px; }
.fo-lite-h { font-size: 21px; font-weight: 750; letter-spacing: -0.015em; color: var(--fo-ink); margin: 0; }
.fo-lite-sub { font-size: 13px; color: var(--fo-ink-3); line-height: 1.5; margin: 6px 0 0; }
.fo-lite-field { margin-top: 14px; }
.fo-lite-field > .lbl { display: block; font-size: 12px; font-weight: 600; color: var(--fo-ink-2); margin-bottom: 6px; }
.fo-lite-input { width: 100%; font: inherit; font-size: 14px; color: var(--fo-ink); background: var(--fo-surface); border: 1px solid var(--fo-line-strong); border-radius: 12px; padding: 12px 13px; outline: none; transition: border-color var(--fo-fast), box-shadow var(--fo-fast); }
.fo-lite-input:focus { border-color: var(--fo-accent); box-shadow: 0 0 0 3px var(--fo-accent-soft); }
.fo-lite-input::placeholder { color: var(--fo-ink-3); }
select.fo-lite-input { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7785' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.fo-lite-btn { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: inherit; font-size: 14px; font-weight: 650; color: var(--fo-accent-deep); background: var(--fo-accent-soft); border: 1px solid #d7e3f6; border-radius: 12px; padding: 13px; cursor: pointer; transition: background var(--fo-fast); }
.fo-lite-btn:hover { background: #dce8f9; }
.fo-lite-btn svg.fo-i { width: 16px; height: 16px; }
.fo-lite-btn.is-ghost { background: none; color: var(--fo-ink); border-color: var(--fo-line-strong); }
.fo-lite-btn.is-ghost:hover { background: var(--fo-surface-2); }
.fo-lite-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 13px; }
.fo-lite-link { font-size: 13px; font-weight: 600; color: var(--fo-accent-deep); text-decoration: none; cursor: pointer; background: none; border: 0; padding: 0; }
.fo-lite-link:hover { text-decoration: underline; }
.fo-lite-or { display: flex; align-items: center; gap: 12px; margin: 17px 0; color: var(--fo-ink-3); font-size: 11.5px; }
.fo-lite-or::before, .fo-lite-or::after { content: ''; flex: 1; height: 1px; background: var(--fo-line); }
.fo-lite-foot { margin-top: auto; padding-top: 20px; text-align: center; font-size: 11px; color: var(--fo-ink-3); display: flex; align-items: center; justify-content: center; gap: 6px; }
.fo-lite-foot svg.fo-i { width: 13px; height: 13px; }
.fo-lite-sp { flex: 1; }

/* OTP */
.fo-lite-otp { display: flex; gap: 8px; margin-top: 16px; }
.fo-lite-otp input { flex: 1; min-width: 0; text-align: center; font-size: 20px; font-weight: 700; color: var(--fo-ink); background: var(--fo-surface); border: 1px solid var(--fo-line-strong); border-radius: 11px; padding: 12px 0; outline: none; transition: border-color var(--fo-fast), box-shadow var(--fo-fast); }
.fo-lite-otp input:focus { border-color: var(--fo-accent); box-shadow: 0 0 0 3px var(--fo-accent-soft); }
.fo-lite-otp input.is-filled { border-color: var(--fo-accent); color: var(--fo-accent-deep); }

/* site context (check-in) */
.fo-lite-site { display: flex; align-items: center; gap: 10px; padding: 11px 13px; background: var(--fo-accent-soft); border-radius: 14px; margin-bottom: 16px; }
.fo-lite-site .ic { width: 34px; height: 34px; border-radius: 10px; background: #fff; color: var(--fo-accent); display: grid; place-items: center; flex: none; }
.fo-lite-site .ic svg.fo-i { width: 17px; height: 17px; }
.fo-lite-site .tx .t { font-size: 13.5px; font-weight: 700; color: var(--fo-accent-deep); }
.fo-lite-site .tx .d { font-size: 11.5px; color: var(--fo-accent); }

/* person pick rows */
.fo-lite-pick { display: flex; align-items: center; gap: 11px; padding: 10px 12px; background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: 12px; margin-top: 8px; cursor: pointer; transition: border-color var(--fo-fast), box-shadow var(--fo-fast); }
.fo-lite-pick:hover { border-color: var(--fo-line-strong); }
.fo-lite-pick.is-sel { border-color: var(--fo-accent); box-shadow: 0 0 0 3px var(--fo-accent-soft); }
.fo-lite-pick .nm { font-size: 13.5px; font-weight: 600; color: var(--fo-ink); }
.fo-lite-pick .rl { font-size: 11.5px; color: var(--fo-ink-3); }
.fo-lite-pick .chk { margin-left: auto; color: var(--fo-accent); display: grid; opacity: 0; }
.fo-lite-pick .chk svg.fo-i { width: 18px; height: 18px; }
.fo-lite-pick.is-sel .chk { opacity: 1; }

/* success */
.fo-lite-done { text-align: center; margin: auto 0; }
.fo-lite-done .ring { width: 74px; height: 74px; border-radius: 50%; background: var(--fo-ok-soft); color: var(--fo-ok); display: grid; place-items: center; margin: 0 auto 18px; }
.fo-lite-done .ring svg.fo-i { width: 36px; height: 36px; }
.fo-lite-done h2 { font-size: 22px; font-weight: 750; color: var(--fo-ink); margin: 0; letter-spacing: -0.01em; }
.fo-lite-done p { font-size: 13px; color: var(--fo-ink-3); margin: 8px 0 0; line-height: 1.5; }
.fo-lite-done .stat { margin-top: 18px; padding: 13px 14px; background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: 14px; text-align: left; display: flex; flex-direction: column; gap: 7px; }
.fo-lite-done .stat .r { display: flex; justify-content: space-between; font-size: 12.5px; }
.fo-lite-done .stat .r b { color: var(--fo-ink-3); font-weight: 500; }
.fo-lite-done .stat .r span { color: var(--fo-ink); font-weight: 650; }

/* vendor portal */
.fo-lite-vhead { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.fo-lite-vhead .av { width: 38px; height: 38px; border-radius: 10px; background: var(--fo-accent-soft); color: var(--fo-accent); display: grid; place-items: center; font-weight: 800; font-size: 15px; flex: none; }
.fo-lite-vreq { padding: 13px; background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: 14px; margin-top: 10px; }
.fo-lite-vreq .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fo-lite-vreq .nm { font-size: 13.5px; font-weight: 700; color: var(--fo-ink); }
.fo-lite-vreq .meta { font-size: 11.5px; color: var(--fo-ink-3); margin-top: 4px; }

@media (max-width: 560px) {
  .fo-device { width: 100%; max-width: 360px; margin: 0 auto; }
  .fo-device-board { gap: 24px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   REPORTING — the Center, Builder, Viewer, Delivery, distinctive layouts,
   the printable letterhead, and the lighter in-module report pattern.
   Styleguide: /styleguide/reporting.  (?v=172)
   System colors only — royal accent + the status soft tints. No invented hues.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── shared helpers used here ── */
.fo-states-sub { font-size: 12px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fo-ink-3); margin: 26px 0 12px; }
.fo-input.is-sm, .fo-select.is-sm { padding: 7px 10px; font-size: 12.5px; border-radius: 9px; }
.fo-select.is-sm { padding-right: 28px; }
/* JS-driven switch (button, no inner checkbox) reuses the glass track */
.fo-rep-toggle { border: none; background: transparent; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.fo-toggle.is-on .fo-toggle-track { background: rgba(11, 63, 158, 0.32); box-shadow: inset 0 1px 1.5px rgba(8, 47, 120, 0.3), inset 0 -1px 1px rgba(255, 255, 255, 0.28), 0 1px 5px -1px rgba(11, 63, 158, 0.4); }
.fo-toggle.is-on .fo-toggle-knob { left: 21px; }

/* tinted icon grounds (system colors only) */
.fo-rep-preset-ico.is-a, .fo-rep-card-ico.is-a { background: var(--fo-accent-soft); color: var(--fo-accent); }
.fo-rep-preset-ico.is-b, .fo-rep-card-ico.is-b { background: var(--fo-info-soft); color: var(--fo-info); }
.fo-rep-preset-ico.is-c, .fo-rep-card-ico.is-ok, .fo-rep-feat-ico.is-ok { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-rep-preset-ico.is-d, .fo-rep-card-ico.is-warn { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-rep-card-ico.is-danger, .fo-rep-feat-ico.is-danger { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-rep-card-ico.is-info { background: var(--fo-info-soft); color: var(--fo-info); }

/* ───────────────────────── 1 · The Center ───────────────────────── */
.fo-rep-surface { background: var(--fo-canvas); border: 1px solid var(--fo-line); border-radius: var(--fo-r-xl); padding: 22px; }
.fo-rep-screenhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.fo-rep-screentitle { font-family: var(--fo-font-display); font-size: 24px; font-weight: 750; letter-spacing: -0.03em; color: var(--fo-ink); margin-top: 2px; }
.fo-rep-kpis { margin-bottom: 20px; }

.fo-rep-block { margin-bottom: 18px; }
.fo-rep-block:last-child { margin-bottom: 0; }
.fo-rep-blockhead { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--fo-ink); margin-bottom: 11px; letter-spacing: -0.01em; }
.fo-rep-blockhead svg.fo-i { width: 16px; height: 16px; color: var(--fo-ink-3); }
.fo-rep-blockhead span { font-size: 12px; font-weight: 500; color: var(--fo-ink-3); letter-spacing: 0; }
.fo-rep-blockhead.is-inline { margin-bottom: 0; }

/* preset cards */
.fo-rep-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fo-rep-preset { display: flex; flex-direction: column; gap: 5px; text-align: left; padding: 16px; background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); cursor: pointer; transition: transform var(--fo-base) var(--fo-ease), box-shadow var(--fo-base) var(--fo-ease), border-color var(--fo-base) var(--fo-ease); }
.fo-rep-preset:hover { transform: translateY(-2px); box-shadow: var(--fo-shadow-2); border-color: var(--fo-line-strong); }
.fo-rep-preset-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 4px; }
.fo-rep-preset-ico svg.fo-i { width: 18px; height: 18px; }
.fo-rep-preset-name { font-size: 14px; font-weight: 700; color: var(--fo-ink); }
.fo-rep-preset-desc { font-size: 12px; color: var(--fo-ink-2); line-height: 1.45; }
.fo-rep-preset-meta { font-size: 11px; font-weight: 600; color: var(--fo-ink-3); margin-top: 2px; }

/* featured compliance */
.fo-rep-feat { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fo-rep-featcard { display: flex; align-items: center; gap: 13px; text-align: left; padding: 15px 16px; background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); cursor: pointer; transition: transform var(--fo-base) var(--fo-ease), box-shadow var(--fo-base) var(--fo-ease), border-color var(--fo-base) var(--fo-ease); }
.fo-rep-featcard:hover { transform: translateY(-2px); box-shadow: var(--fo-shadow-2); border-color: var(--fo-line-strong); }
.fo-rep-feat-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.fo-rep-feat-ico svg.fo-i { width: 20px; height: 20px; }
.fo-rep-feat-body { flex: 1; min-width: 0; }
.fo-rep-feat-title { display: block; font-size: 14px; font-weight: 700; color: var(--fo-ink); }
.fo-rep-feat-desc { display: block; font-size: 12px; color: var(--fo-ink-2); line-height: 1.45; margin-top: 2px; }
.fo-rep-feat-go { width: 16px; height: 16px; color: var(--fo-ink-3); flex: none; }

/* standard report groups */
.fo-rep-grp { margin-bottom: 16px; }
.fo-rep-grp:last-child { margin-bottom: 0; }
.fo-rep-grp-head { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--fo-ink-2); margin-bottom: 9px; }
.fo-rep-grp-head svg.fo-i { width: 14px; height: 14px; color: var(--fo-ink-3); }
.fo-rep-grp-count { margin-left: 2px; min-width: 19px; height: 19px; padding: 0 6px; border-radius: 999px; background: var(--fo-accent-soft); color: var(--fo-accent); font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.fo-rep-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fo-rep-card { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 11px; text-align: left; padding: 13px 14px; background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); cursor: pointer; transition: transform var(--fo-base) var(--fo-ease), box-shadow var(--fo-base) var(--fo-ease), border-color var(--fo-base) var(--fo-ease); }
.fo-rep-card:hover { transform: translateY(-2px); box-shadow: var(--fo-shadow-2); border-color: var(--fo-line-strong); }
.fo-rep-card-ico { grid-row: 1 / 3; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; }
.fo-rep-card-ico svg.fo-i { width: 17px; height: 17px; }
.fo-rep-card-t { font-size: 13px; font-weight: 700; color: var(--fo-ink); align-self: center; }
.fo-rep-card-d { grid-column: 2; font-size: 11.5px; color: var(--fo-ink-2); line-height: 1.4; margin-top: 3px; }

/* saved table */
.fo-rep-cardhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.fo-rep-filtwrap { position: relative; }
.fo-rep-filtbadge { margin-left: 6px; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px; background: var(--fo-accent); color: #fff; font-size: 10.5px; font-weight: 700; display: inline-grid; place-items: center; }
.fo-rep-filtbadge[hidden] { display: none; }
.fo-rep-pop { position: absolute; top: calc(100% + 7px); right: 0; width: 280px; z-index: 30; background: var(--fo-surface); border: 1px solid var(--fo-line-strong); border-radius: var(--fo-r-md); box-shadow: var(--fo-shadow-2); padding: 15px; }
.fo-rep-pop-head { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fo-ink-2); margin-bottom: 11px; }
.fo-rep-pop-lbl { display: block; font-size: 11.5px; font-weight: 600; color: var(--fo-ink-3); margin: 0 0 7px; }
.fo-rep-pop-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.fo-rep-pop-pills button { padding: 6px 11px; font-size: 12px; font-weight: 600; border-radius: 999px; border: 1px solid var(--fo-line); background: var(--fo-surface); color: var(--fo-ink-2); cursor: pointer; transition: all var(--fo-fast) var(--fo-ease); }
.fo-rep-pop-pills button:hover { border-color: var(--fo-line-strong); }
.fo-rep-pop-pills button.is-active { background: var(--fo-accent-soft); border-color: transparent; color: var(--fo-accent); }
.fo-rep-saved th, .fo-rep-saved td { vertical-align: middle; }
.fo-rep-favcol { width: 34px; }
.fo-rep-actcol { width: 1%; }
.fo-rep-nm { font-weight: 650; color: var(--fo-ink); }
.fo-rep-mt { color: var(--fo-ink-3); font-size: 12.5px; }
.fo-rep-fav { width: 26px; height: 26px; border: none; background: transparent; border-radius: 7px; display: grid; place-items: center; cursor: pointer; color: var(--fo-ink-3); transition: color var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease); }
.fo-rep-fav:hover { background: var(--fo-canvas); }
.fo-rep-fav svg.fo-i { width: 16px; height: 16px; }
.fo-rep-fav.is-on { color: var(--fo-warn); }
.fo-rep-fav.is-on svg.fo-i { fill: currentColor; }
.fo-rep-acts { display: flex; gap: 6px; justify-content: flex-end; }
.fo-rep-pill { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; font-size: 12px; font-weight: 600; border-radius: 8px; border: 1px solid var(--fo-line); background: var(--fo-surface); color: var(--fo-ink-2); cursor: pointer; white-space: nowrap; transition: all var(--fo-fast) var(--fo-ease); }
.fo-rep-pill:hover { border-color: var(--fo-line-strong); color: var(--fo-ink); background: var(--fo-canvas); }
.fo-rep-pill svg.fo-i { width: 14px; height: 14px; }
.fo-rep-pill.is-danger { color: var(--fo-danger); padding: 6px 9px; }
.fo-rep-pill.is-danger:hover { background: var(--fo-danger-soft); border-color: transparent; }

/* ───────────────────────── 2 · The Builder ───────────────────────── */
.fo-rep-build { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.fo-rep-buildmain { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.fo-rep-cfg { overflow: hidden; }
/* a config card clips its rounded corners with overflow:hidden — but an
   enhanced <select>/date popup lives inside it and must escape. The card is a
   static (non-scrolling) surface, so flipping to visible while a picker is open
   is safe (no scrollTop-reset like the drawer body). */
.fo-rep-cfg:has(.fo-pop.is-open),
.fo-rep-cfg:has(.dsdp-popup.is-open) { overflow: visible; }
.fo-rep-cfg-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--fo-line); }
.fo-rep-cfg-ico { width: 34px; height: 34px; border-radius: 9px; background: var(--fo-accent-soft); color: var(--fo-accent); display: grid; place-items: center; flex: none; }
.fo-rep-cfg-ico svg.fo-i { width: 17px; height: 17px; }
.fo-rep-cfg-head h3 { font-size: 14.5px; font-weight: 700; color: var(--fo-ink); }
.fo-rep-cfg-head p { font-size: 12px; color: var(--fo-ink-3); margin-top: 1px; }
.fo-rep-cfg-body { padding: 16px 18px; }
.fo-rep-lbl { display: block; font-size: 11.5px; font-weight: 600; color: var(--fo-ink-2); margin: 0 0 6px; }
.fo-rep-lbl + .fo-input, .fo-rep-lbl + .fo-select { margin-bottom: 2px; }

.fo-rep-presetrow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.fo-rep-preset.is-mini { flex-direction: row; align-items: center; gap: 9px; padding: 11px 12px; }
.fo-rep-preset.is-mini .fo-rep-preset-ico { width: 30px; height: 30px; margin: 0; border-radius: 8px; }
.fo-rep-preset.is-mini .fo-rep-preset-ico svg.fo-i { width: 15px; height: 15px; }
.fo-rep-preset.is-mini .fo-rep-preset-name { font-size: 12.5px; }

.fo-rep-period { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.fo-rep-period button { padding: 7px 13px; font-size: 12.5px; font-weight: 600; border-radius: 999px; border: 1px solid var(--fo-line); background: var(--fo-surface); color: var(--fo-ink-2); cursor: pointer; transition: all var(--fo-fast) var(--fo-ease); }
.fo-rep-period button:hover { border-color: var(--fo-line-strong); }
.fo-rep-period button.is-active { background: var(--fo-accent-soft); border-color: transparent; color: var(--fo-accent); }
.fo-rep-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.fo-rep-dates[hidden] { display: none; }

.fo-rep-bulk { display: flex; align-items: center; gap: 8px; padding-bottom: 13px; margin-bottom: 4px; border-bottom: 1px solid var(--fo-line); }
.fo-rep-bulk button { padding: 5px 10px; font-size: 12px; font-weight: 600; border-radius: 7px; border: 1px solid var(--fo-line); background: var(--fo-surface); color: var(--fo-ink-2); cursor: pointer; transition: all var(--fo-fast) var(--fo-ease); }
.fo-rep-bulk button:hover { border-color: var(--fo-line-strong); color: var(--fo-ink); }
.fo-rep-bulk-count { margin-left: auto; font-size: 11.5px; color: var(--fo-ink-3); }
.fo-rep-bulk-count strong { color: var(--fo-ink); font-weight: 700; }

.fo-rep-secgrp { padding-top: 14px; }
/* section catalog laid out in balanced columns so a wide builder doesn't leave
   a tall empty gutter beside a single stack; groups never split across columns */
.fo-rep-seccols { columns: 2; column-gap: 26px; }
.fo-rep-seccols .fo-rep-secgrp { break-inside: avoid; }
.fo-rep-seccols .fo-rep-secgrp:first-child { padding-top: 4px; }
@media (max-width: 860px) { .fo-rep-seccols { columns: 1; } }
.fo-rep-secgrp-lbl { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fo-ink-3); margin-bottom: 9px; }
.fo-rep-secgrp-lbl svg.fo-i { width: 13px; height: 13px; }
.fo-rep-sec { display: flex; align-items: flex-start; gap: 11px; padding: 11px 12px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); cursor: pointer; margin-bottom: 8px; transition: border-color var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease); }
.fo-rep-sec:hover { border-color: var(--fo-line-strong); }
.fo-rep-sec input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.fo-rep-sec-box { flex: none; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--fo-line-strong); background: var(--fo-surface); display: grid; place-items: center; color: #fff; margin-top: 1px; transition: all var(--fo-fast) var(--fo-ease); }
.fo-rep-sec-box svg.fo-i { width: 13px; height: 13px; opacity: 0; transition: opacity var(--fo-fast) var(--fo-ease); }
.fo-rep-sec input:checked ~ .fo-rep-sec-box { background: var(--fo-accent); border-color: var(--fo-accent); }
.fo-rep-sec input:checked ~ .fo-rep-sec-box svg.fo-i { opacity: 1; }
.fo-rep-sec:has(input:checked) { border-color: var(--fo-accent); background: var(--fo-accent-soft); }
.fo-rep-sec input:focus-visible ~ .fo-rep-sec-box { box-shadow: 0 0 0 3px var(--fo-accent-soft); }
.fo-rep-sec-name { font-size: 13px; font-weight: 650; color: var(--fo-ink); }
.fo-rep-sec-desc { display: block; font-size: 11.5px; color: var(--fo-ink-2); line-height: 1.4; margin-top: 2px; }

.fo-rep-subf { display: none; margin: -2px 0 10px; padding: 12px 13px; background: var(--fo-surface-2); border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); }
.fo-rep-subf.is-open { display: block; animation: fo-rep-subf-in var(--fo-base) var(--fo-ease) both; }
@keyframes fo-rep-subf-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.fo-rep-subf-head { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fo-accent); margin-bottom: 10px; }
.fo-rep-subf-head svg.fo-i { width: 13px; height: 13px; }
.fo-rep-subf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }

/* summary rail */
.fo-rep-railwrap { position: sticky; top: 16px; }
.fo-rep-rail { overflow: hidden; }
.fo-rep-rail-head { display: flex; align-items: center; gap: 8px; padding: 15px 18px; font-size: 13.5px; font-weight: 700; color: var(--fo-ink); border-bottom: 1px solid var(--fo-line); }
.fo-rep-rail-head svg.fo-i { width: 16px; height: 16px; color: var(--fo-accent); }
.fo-rep-rail-body { padding: 6px 18px 14px; }
.fo-rep-railrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--fo-line); font-size: 12.5px; color: var(--fo-ink-2); }
.fo-rep-railrow strong { color: var(--fo-ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.fo-rep-rail-lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fo-ink-3); margin: 14px 0 9px; }
.fo-rep-rail-list { display: flex; flex-wrap: wrap; gap: 6px; }
.fo-rep-rail-tag { font-size: 11.5px; font-weight: 600; color: var(--fo-accent); background: var(--fo-accent-soft); padding: 4px 9px; border-radius: 999px; }
.fo-rep-rail-empty { font-size: 12px; color: var(--fo-ink-3); font-style: italic; }
.fo-rep-rail-foot { padding: 14px 18px; border-top: 1px solid var(--fo-line); background: var(--fo-surface-2); }

.fo-rep-gen { position: relative; display: flex; margin-bottom: 9px; }
.fo-rep-gen-main { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 11px 14px; font-size: 13px; font-weight: 650; border: none; border-radius: 11px 0 0 11px; background: var(--fo-accent-soft); color: var(--fo-accent); cursor: pointer; transition: background var(--fo-fast) var(--fo-ease); }
.fo-rep-gen-main:hover { background: #dde8fa; }
.fo-rep-gen-main svg.fo-i { width: 16px; height: 16px; }
.fo-rep-gen-caret { width: 40px; border: none; border-left: 1px solid rgba(11, 63, 158, 0.16); border-radius: 0 11px 11px 0; background: var(--fo-accent-soft); color: var(--fo-accent); cursor: pointer; display: grid; place-items: center; transition: background var(--fo-fast) var(--fo-ease); }
.fo-rep-gen-caret:hover { background: #dde8fa; }
.fo-rep-gen-caret svg.fo-i { width: 15px; height: 15px; }
.fo-rep-genmenu { position: absolute; bottom: calc(100% + 6px); right: 0; min-width: 168px; z-index: 20; background: var(--fo-surface); border: 1px solid var(--fo-line-strong); border-radius: var(--fo-r-md); box-shadow: var(--fo-shadow-2); padding: 6px; }
.fo-rep-genmenu button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 10px; font-size: 12.5px; font-weight: 600; color: var(--fo-ink-2); background: transparent; border: none; border-radius: 8px; cursor: pointer; text-align: left; transition: background var(--fo-fast) var(--fo-ease); }
.fo-rep-genmenu button:hover { background: var(--fo-canvas); color: var(--fo-ink); }
.fo-rep-genmenu svg.fo-i { width: 15px; height: 15px; color: var(--fo-ink-3); }
.fo-rep-savebtn { width: 100%; justify-content: center; }

/* ───────────────────────── 3 · The Viewer ───────────────────────── */
.fo-rep-doc { border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); overflow: hidden; box-shadow: var(--fo-shadow-1); background: var(--fo-canvas); }
.fo-rep-tb { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 16px; background: rgba(251, 251, 250, 0.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--fo-line); }
.fo-rep-tb-title { font-size: 12.5px; font-weight: 650; color: var(--fo-ink-2); }
.fo-rep-tb-acts { display: flex; gap: 8px; }
.fo-rep-page { background: var(--fo-surface); margin: 22px auto; max-width: 760px; padding: 40px 44px; box-shadow: 0 1px 3px rgba(24, 27, 33, 0.08), 0 12px 32px -16px rgba(24, 27, 33, 0.18); }

.fo-rep-lh { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 2px solid var(--fo-accent); }
.fo-rep-lh-brand { display: flex; align-items: center; gap: 13px; }
.fo-rep-lh-brand img { height: 38px; width: auto; object-fit: contain; }
.fo-rep-lh-brand h1 { font-family: var(--fo-font-display); font-size: 21px; font-weight: 750; letter-spacing: -0.03em; color: var(--fo-ink); line-height: 1.15; }
.fo-rep-lh-brand p { font-size: 12.5px; color: var(--fo-ink-3); margin-top: 2px; }
.fo-rep-lh-eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fo-accent); margin-bottom: 3px; }
.fo-rep-lh-meta { display: flex; flex-direction: column; gap: 4px; text-align: right; }
.fo-rep-lh-meta div { font-size: 11.5px; }
.fo-rep-lh-meta span { color: var(--fo-ink-3); }
.fo-rep-lh-meta strong { color: var(--fo-ink-2); font-weight: 650; margin-left: 6px; }

.fo-rep-docband { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--fo-line); border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); overflow: hidden; margin: 22px 0; }
.fo-rep-docband-c { background: var(--fo-surface-2); padding: 14px 15px; }
.fo-rep-docband-l { font-size: 10.5px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fo-ink-3); }
.fo-rep-docband-v { font-family: var(--fo-font-display); font-size: 25px; font-weight: 750; letter-spacing: -0.03em; color: var(--fo-ink); margin: 3px 0 2px; font-variant-numeric: tabular-nums; }
.fo-rep-docband-s { font-size: 11px; color: var(--fo-ink-3); }

.fo-rep-docsec { margin: 24px 0; }
.fo-rep-docsec-head { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--fo-ink); padding-bottom: 8px; border-bottom: 1px solid var(--fo-line); margin-bottom: 14px; }
.fo-rep-docsec-head svg.fo-i { width: 16px; height: 16px; color: var(--fo-accent); }
.fo-rep-sum { display: grid; grid-template-columns: 160px 1fr 1fr; gap: 18px; margin-bottom: 16px; }
.fo-rep-sum-main { background: var(--fo-accent-soft); border-radius: var(--fo-r-md); padding: 16px; display: flex; flex-direction: column; justify-content: center; }
.fo-rep-sum-main-v { font-family: var(--fo-font-display); font-size: 32px; font-weight: 750; letter-spacing: -0.035em; color: var(--fo-accent); font-variant-numeric: tabular-nums; }
.fo-rep-sum-main-l { font-size: 12px; font-weight: 600; color: var(--fo-accent-deep); margin-top: 2px; }
.fo-rep-sum-title { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fo-ink-3); margin-bottom: 8px; }
.fo-rep-sum-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 12.5px; color: var(--fo-ink-2); border-bottom: 1px dotted var(--fo-line); }
.fo-rep-sum-row strong { color: var(--fo-ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.fo-rep-sum-row.is-warn strong { color: var(--fo-warn); }
.fo-rep-sum-row.is-total { border-bottom: none; border-top: 1.5px solid var(--fo-line-strong); margin-top: 3px; padding-top: 8px; }
.fo-rep-sum-row.is-total strong { color: var(--fo-accent); }
.fo-rep-doctable th { font-size: 11px; }
.fo-rep-doctable .r { text-align: right; }
.fo-rep-doctable tfoot td { font-weight: 700; color: var(--fo-ink); border-top: 1.5px solid var(--fo-line-strong); background: var(--fo-surface-2); }
.fo-rep-doctable.is-tight th, .fo-rep-doctable.is-tight td { padding-top: 8px; padding-bottom: 8px; }
.fo-rep-emp { font-weight: 600; color: var(--fo-ink); }
.fo-rep-docempty { display: flex; align-items: center; gap: 9px; padding: 18px; background: var(--fo-surface-2); border: 1px dashed var(--fo-line-strong); border-radius: var(--fo-r-md); font-size: 12.5px; color: var(--fo-ink-3); }
.fo-rep-docempty svg.fo-i { width: 16px; height: 16px; opacity: 0.6; }

/* ───────────────────── 4 · Distinctive layouts ───────────────────── */
.fo-rep-distgrid { align-items: start; }
.fo-rep-distcard { margin-bottom: 0; }
.fo-rep-disthead { display: flex; align-items: center; gap: 9px; font-size: 14.5px; font-weight: 700; color: var(--fo-ink); margin-bottom: 16px; }
.fo-rep-disthead svg.fo-i { width: 17px; height: 17px; color: var(--fo-accent); }

/* OSHA 300 */
.fo-rep-osha-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.fo-rep-osha-kpi { background: var(--fo-surface-2); border: 1px solid var(--fo-line); border-radius: var(--fo-r-sm); padding: 11px 12px; }
.fo-rep-osha-kpi .v { font-family: var(--fo-font-display); font-size: 21px; font-weight: 750; letter-spacing: -0.03em; color: var(--fo-ink); font-variant-numeric: tabular-nums; }
.fo-rep-osha-kpi .l { font-size: 10.5px; font-weight: 600; color: var(--fo-ink-3); margin-top: 1px; }
.fo-rep-osha-kpi .l small { font-weight: 500; }
.fo-rep-osha-kpi.is-warn { background: var(--fo-warn-soft); border-color: transparent; }
.fo-rep-osha-kpi.is-warn .v { color: var(--fo-warn); }
.fo-rep-osha-kpi.is-warn .l { color: var(--fo-warn); }
.fo-rep-osha-300a { margin-top: 16px; padding: 14px 15px; background: var(--fo-surface-2); border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); }
.fo-rep-osha-300a-head { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fo-ink-3); margin-bottom: 11px; }
.fo-rep-osha-300a-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.fo-rep-osha-300a-grid > div { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 9px; align-items: center; }
.fo-rep-osha-300a-grid .k { grid-row: 1 / 3; width: 24px; height: 24px; border-radius: 6px; background: var(--fo-accent-soft); color: var(--fo-accent); font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.fo-rep-osha-300a-grid .n { font-family: var(--fo-font-display); font-size: 18px; font-weight: 750; color: var(--fo-ink); font-variant-numeric: tabular-nums; }
.fo-rep-osha-300a-grid .t { grid-column: 2; font-size: 10.5px; color: var(--fo-ink-3); line-height: 1.25; }

/* compliance ring */
.fo-rep-cs { display: flex; align-items: center; gap: 20px; margin-bottom: 16px; }
.fo-rep-ring { position: relative; width: 116px; height: 116px; flex: none; }
.fo-rep-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.fo-rep-ring .track { fill: none; stroke: var(--fo-line); stroke-width: 9; }
.fo-rep-ring .meter { fill: none; stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset var(--fo-slow) var(--fo-ease); }
.fo-rep-ring.is-good .meter { stroke: var(--fo-ok); }
.fo-rep-ring.is-warn .meter { stroke: var(--fo-warn); }
.fo-rep-ring.is-bad .meter { stroke: var(--fo-danger); }
.fo-rep-ring-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.fo-rep-ring-v { font-family: var(--fo-font-display); font-size: 32px; font-weight: 750; letter-spacing: -0.035em; color: var(--fo-ink); line-height: 1; font-variant-numeric: tabular-nums; }
.fo-rep-ring-l { font-size: 11px; font-weight: 600; color: var(--fo-ink-3); margin-top: 2px; }
.fo-rep-cs-side { min-width: 0; }
.fo-rep-cs-note { font-size: 12px; color: var(--fo-ink-2); line-height: 1.5; margin-top: 9px; }
.fo-rep-cs-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.fo-rep-cs-metric { text-align: left; padding: 11px 12px; background: var(--fo-surface-2); border: 1px solid var(--fo-line); border-radius: var(--fo-r-sm); cursor: pointer; transition: all var(--fo-fast) var(--fo-ease); }
.fo-rep-cs-metric:hover { border-color: var(--fo-line-strong); transform: translateY(-1px); }
.fo-rep-cs-metric .v { font-family: var(--fo-font-display); font-size: 20px; font-weight: 750; color: var(--fo-ink); font-variant-numeric: tabular-nums; }
.fo-rep-cs-metric .l { display: block; font-size: 11px; color: var(--fo-ink-3); margin-top: 2px; line-height: 1.3; }
.fo-rep-cs-metric.is-warn { background: var(--fo-warn-soft); border-color: transparent; }
.fo-rep-cs-metric.is-warn .v, .fo-rep-cs-metric.is-warn .l { color: var(--fo-warn); }
.fo-rep-cs-metric.is-danger { background: var(--fo-danger-soft); border-color: transparent; }
.fo-rep-cs-metric.is-danger .v, .fo-rep-cs-metric.is-danger .l { color: var(--fo-danger); }

/* contracts & billing */
.fo-rep-cb { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 22px; margin-bottom: 18px; }
.fo-rep-cb-charttitle { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fo-ink-3); margin-bottom: 12px; }
.fo-rep-bars { display: flex; align-items: flex-end; gap: 12px; height: 150px; }
.fo-rep-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 7px; }
.fo-rep-bar span { width: 100%; max-width: 34px; height: var(--h, 0); border-radius: 6px 6px 0 0; background: var(--fo-accent-soft); cursor: pointer; transition: background var(--fo-fast) var(--fo-ease); }
.fo-rep-bar:hover span { background: #cfe0f6; }
.fo-rep-bar.is-peak span { background: var(--fo-accent); }
.fo-rep-bar em { font-size: 11px; font-weight: 600; color: var(--fo-ink-3); font-style: normal; }
.fo-rep-aging { display: flex; flex-direction: column; gap: 7px; }
.fo-rep-age { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 12px; background: var(--fo-surface-2); border: 1px solid var(--fo-line); border-radius: var(--fo-r-sm); font-size: 12px; color: var(--fo-ink-2); }
.fo-rep-age b { font-family: var(--fo-font-display); font-size: 15px; font-weight: 700; color: var(--fo-ink); font-variant-numeric: tabular-nums; }
.fo-rep-age.is-warn { background: var(--fo-warn-soft); border-color: transparent; color: var(--fo-warn); }
.fo-rep-age.is-warn b { color: var(--fo-warn); }
.fo-rep-age.is-danger { background: var(--fo-danger-soft); border-color: transparent; color: var(--fo-danger); }
.fo-rep-age.is-danger b { color: var(--fo-danger); }
.fo-rep-age.is-total { background: var(--fo-accent-soft); border-color: transparent; color: var(--fo-accent-deep); }
.fo-rep-age.is-total b { color: var(--fo-accent); }

/* ───────────────────── 5 · Scheduled delivery ───────────────────── */
.fo-rep-sched { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.fo-rep-schedcard { background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); padding: 16px 17px; box-shadow: var(--fo-shadow-1); transition: opacity var(--fo-base) var(--fo-ease); }
.fo-rep-schedcard[data-state="paused"] { opacity: 0.72; }
.fo-rep-schedcard-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.fo-rep-schedcard-id { display: flex; align-items: flex-start; gap: 11px; min-width: 0; }
.fo-rep-schedcard-id svg.fo-i { width: 18px; height: 18px; color: var(--fo-accent); flex: none; margin-top: 2px; }
.fo-rep-schedcard-name { font-size: 14px; font-weight: 700; color: var(--fo-ink); }
.fo-rep-schedcard-meta { font-size: 12px; color: var(--fo-ink-3); margin-top: 2px; }
.fo-rep-schedcard-rec { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--fo-ink-2); margin: 13px 0; padding: 9px 11px; background: var(--fo-surface-2); border-radius: var(--fo-r-sm); }
.fo-rep-schedcard-rec svg.fo-i { width: 14px; height: 14px; color: var(--fo-ink-3); flex: none; }
.fo-rep-schedcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fo-rep-schedcard-state { font-size: 11.5px; font-weight: 600; color: var(--fo-ok); }
.fo-rep-schedcard-state.is-paused { color: var(--fo-ink-3); }
.fo-rep-schedcard-acts { display: flex; gap: 6px; }
.fo-rep-ready { margin-top: 18px; padding: 16px 18px; background: var(--fo-accent-soft); border-radius: var(--fo-r-lg); }
.fo-rep-ready-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--fo-accent-deep); margin-bottom: 12px; }
.fo-rep-ready-head svg.fo-i { width: 15px; height: 15px; }
.fo-rep-ready-row { display: flex; flex-wrap: wrap; gap: 9px; }
.fo-rep-ready-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; font-size: 12.5px; font-weight: 600; color: var(--fo-accent); background: var(--fo-surface); border: 1px solid rgba(11, 63, 158, 0.18); border-radius: 999px; cursor: pointer; transition: all var(--fo-fast) var(--fo-ease); }
.fo-rep-ready-chip:hover { box-shadow: var(--fo-shadow-1); transform: translateY(-1px); }
.fo-rep-ready-chip svg.fo-i { width: 14px; height: 14px; }
.fo-rep-schedgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.fo-rep-dow { display: flex; flex-wrap: wrap; gap: 6px; }
.fo-rep-dow button { width: 42px; padding: 7px 0; font-size: 12px; font-weight: 600; border-radius: 8px; border: 1px solid var(--fo-line); background: var(--fo-surface); color: var(--fo-ink-2); cursor: pointer; transition: all var(--fo-fast) var(--fo-ease); }
.fo-rep-dow button:hover { border-color: var(--fo-line-strong); }
.fo-rep-dow button.is-active { background: var(--fo-accent-soft); border-color: transparent; color: var(--fo-accent); }

/* ──────────────── 6 · Printable document / letterhead ──────────────── */
.fo-rep-doc.is-letter { position: relative; }
.fo-rep-printbtn { position: absolute; top: 18px; right: 18px; z-index: 6; display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; font-size: 12.5px; font-weight: 650; color: #fff; background: var(--fo-accent); border: none; border-radius: 10px; cursor: pointer; box-shadow: var(--fo-shadow-2); transition: background var(--fo-fast) var(--fo-ease); }
.fo-rep-printbtn:hover { background: var(--fo-accent-deep); }
.fo-rep-printbtn svg.fo-i { width: 15px; height: 15px; }
.fo-rep-page.is-print { margin-top: 22px; }
.fo-rep-lh.is-status { border-bottom-color: var(--fo-ink-3); }
.fo-rep-lh.is-status[data-status="approved"] { border-bottom-color: var(--fo-ok); }
.fo-rep-lh.is-status[data-status="submitted"] { border-bottom-color: var(--fo-accent); }
.fo-rep-lh.is-status[data-status="rejected"] { border-bottom-color: var(--fo-danger); }
.fo-rep-lh.is-status[data-status="draft"] { border-bottom-color: var(--fo-ink-3); }
.fo-rep-lh-status { display: flex; align-items: flex-start; }
.fo-rep-lh-badge { font-size: 11px; font-weight: 700; letter-spacing: 0.03em; padding: 5px 12px; border-radius: 999px; background: var(--fo-ok-soft); color: var(--fo-ok); white-space: nowrap; }
.fo-rep-lh-badge.is-approved { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-rep-lh-badge.is-submitted { background: var(--fo-accent-soft); color: var(--fo-accent); }
.fo-rep-lh-badge.is-rejected { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-rep-lh-badge.is-draft { background: rgba(24, 27, 33, 0.06); color: var(--fo-ink-2); }
.fo-rep-lh-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 22px 0; padding: 16px 18px; background: var(--fo-surface-2); border-radius: var(--fo-r-md); }
.fo-rep-lh-summary span { display: block; font-size: 10.5px; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fo-ink-3); }
.fo-rep-lh-summary strong { font-size: 16px; font-weight: 700; color: var(--fo-ink); margin-top: 3px; display: block; font-variant-numeric: tabular-nums; }
.fo-rep-docsec-head.is-print { margin-top: 24px; }
.fo-rep-lh-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--fo-line); font-size: 10.5px; color: var(--fo-ink-3); }

/* ───────────────────── 7 · The module report ───────────────────── */
.fo-rep-mod { margin-bottom: 0; }
.fo-rep-modbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--fo-line); }
.fo-rep-modbar-dates { display: flex; gap: 12px; }
.fo-rep-modbar-dates input { width: 150px; }
.fo-rep-modbar-acts { display: flex; gap: 8px; }
.fo-rep-modsum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.fo-rep-modsum-c { background: var(--fo-surface-2); border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); padding: 15px 16px; }
.fo-rep-modsum-c .l { font-size: 11px; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fo-ink-3); }
.fo-rep-modsum-c .v { font-family: var(--fo-font-display); font-size: 27px; font-weight: 750; letter-spacing: -0.03em; color: var(--fo-ink); margin-top: 3px; font-variant-numeric: tabular-nums; }
.fo-rep-modsum-c .v.is-bad { color: var(--fo-danger); }
.fo-rep-modbd { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fo-rep-modbd-card { border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); padding: 14px 15px; }
.fo-rep-modbd-title { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fo-ink-3); margin-bottom: 10px; }
.fo-rep-modbd-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 12.5px; color: var(--fo-ink-2); border-bottom: 1px dotted var(--fo-line); }
.fo-rep-modbd-row:last-child { border-bottom: none; }
.fo-rep-modbd-row b { color: var(--fo-ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.fo-rep-tiers { margin-top: 0; }
.fo-rep-tier { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--fo-r-lg); border: 1px solid var(--fo-line); background: var(--fo-surface); }
.fo-rep-tier-n { font-family: var(--fo-font-display); font-size: 30px; font-weight: 750; letter-spacing: -0.035em; color: var(--fo-ink-3); font-variant-numeric: tabular-nums; flex: none; min-width: 34px; }
.fo-rep-tier-l { font-size: 13.5px; font-weight: 700; color: var(--fo-ink); }
.fo-rep-tier-l small { display: block; font-size: 11.5px; font-weight: 500; color: var(--fo-ink-3); margin-top: 2px; }
.fo-rep-tier.is-warn { background: var(--fo-warn-soft); border-color: transparent; }
.fo-rep-tier.is-warn .fo-rep-tier-n { color: var(--fo-warn); }
.fo-rep-tier.is-alert { background: var(--fo-danger-soft); border-color: transparent; }
.fo-rep-tier.is-alert .fo-rep-tier-n { color: var(--fo-danger); }

/* save-modal field helpers */
.fo-rep-req { font-size: 10.5px; font-weight: 600; color: var(--fo-danger); text-transform: uppercase; letter-spacing: 0.04em; }
.fo-rep-opt { font-size: 10.5px; font-weight: 600; color: var(--fo-ink-3); text-transform: uppercase; letter-spacing: 0.04em; }
.fo-rep-err { font-size: 12px; color: var(--fo-danger); margin-top: 7px; }
.fo-input.is-err { border-color: var(--fo-danger); box-shadow: 0 0 0 3px var(--fo-danger-soft); }

/* ═══════════════════ Reporting — mobile (additive only) ═══════════════════ */
@media (max-width: 920px) {
  .fo-rep-build { grid-template-columns: minmax(0, 1fr); }
  .fo-rep-railwrap { position: static; }
}
@media (max-width: 720px) {
  .fo-rep-presets { grid-template-columns: minmax(0, 1fr); }
  .fo-rep-feat { grid-template-columns: minmax(0, 1fr); }
  .fo-rep-cards { grid-template-columns: minmax(0, 1fr); }
  .fo-rep-presetrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fo-rep-sum { grid-template-columns: minmax(0, 1fr); }
  .fo-rep-cb { grid-template-columns: minmax(0, 1fr); }
  .fo-rep-cs-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fo-rep-modbd { grid-template-columns: minmax(0, 1fr); }
  .fo-rep-page { padding: 26px 22px; }
}
@media (max-width: 620px) {
  .fo-rep-screenhead { flex-direction: column; align-items: flex-start; }
  .fo-rep-surface { padding: 15px; }
  .fo-rep-lh { flex-direction: column; gap: 14px; }
  .fo-rep-lh-meta { text-align: left; }
  .fo-rep-docband { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fo-rep-lh-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fo-rep-osha-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fo-rep-osha-300a-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fo-rep-modbar { flex-direction: column; align-items: stretch; }
  .fo-rep-modbar-dates input { width: 100%; }
  .fo-rep-modsum { grid-template-columns: minmax(0, 1fr); }
  .fo-rep-cs { flex-direction: column; align-items: flex-start; }
  .fo-rep-pop { width: min(280px, calc(100vw - 48px)); }
  .fo-rep-lh-foot { flex-direction: column; align-items: flex-start; gap: 4px; }
}
@media (max-width: 460px) {
  .fo-rep-presetrow { grid-template-columns: minmax(0, 1fr); }
  .fo-rep-cs-metrics { grid-template-columns: minmax(0, 1fr); }
  .fo-rep-subf-grid { grid-template-columns: minmax(0, 1fr); }
  .fo-rep-schedgrid { grid-template-columns: minmax(0, 1fr); }
}

/* ═══════════════════════════════════════════════════════════════════════
   KNOWLEDGE & SOP — the guided walkthrough viewer, the scene kit, and the
   library/hub.  Styleguide: /styleguide/knowledge.  (?v=173)
   Re-skins the legacy navy .wt-* / .wt-sc-* onto the royal v3 palette.
   Backend content model unchanged (steps[]{n,tag,title,icon,chips,desc,scene}).
   ═══════════════════════════════════════════════════════════════════════ */

/* ── breadcrumb ── */
.fo-sop-crumb { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--fo-ink-3); margin-bottom: 16px; flex-wrap: wrap; }
.fo-sop-crumb a { color: var(--fo-ink-2); font-weight: 550; text-decoration: none; }
.fo-sop-crumb a:hover { color: var(--fo-accent); }
.fo-sop-crumb svg.fo-i { width: 13px; height: 13px; opacity: 0.55; }
.fo-sop-crumb span { color: var(--fo-ink); font-weight: 600; }

/* ── hero ── */
.fo-sop-hero { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 22px; }
.fo-sop-hero-ico { flex: none; width: 56px; height: 56px; border-radius: 15px; background: var(--fo-accent-soft); color: var(--fo-accent); display: grid; place-items: center; }
.fo-sop-hero-ico svg.fo-i { width: 26px; height: 26px; }
.fo-sop-hero-main { min-width: 0; flex: 1; }
.fo-sop-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
.fo-sop-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 650; padding: 3px 9px; border-radius: 999px; letter-spacing: 0.01em; }
.fo-sop-badge.is-type { background: var(--fo-accent); color: #fff; }
.fo-sop-badge.is-module { background: var(--fo-accent-soft); color: var(--fo-accent); }
.fo-sop-badge.is-active { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-sop-badge.is-active .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--fo-ok); }
.fo-sop-badge.is-warnstatus { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-sop-badge.is-ghost { background: rgba(24, 27, 33, 0.05); color: var(--fo-ink-2); }
.fo-sop-title { font-family: var(--fo-font-display); font-size: 25px; font-weight: 780; letter-spacing: -0.03em; color: var(--fo-ink); line-height: 1.2; }
.fo-sop-lede { font-size: 14.5px; line-height: 1.65; color: var(--fo-ink-2); margin: 8px 0 0; max-width: 70ch; }
.fo-sop-meta { display: flex; flex-wrap: wrap; gap: 16px; margin: 14px 0 0; font-size: 12.5px; color: var(--fo-ink-2); }
.fo-sop-metaitem { display: inline-flex; align-items: center; gap: 6px; }
.fo-sop-metaitem svg.fo-i { width: 13px; height: 13px; color: var(--fo-ink-3); }
.fo-sop-metaitem b { color: var(--fo-ink-3); font-weight: 600; }
.fo-sop-hero-acts { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 17px; }

/* ── three-zone shell ── */
.fo-sop-shell { display: grid; grid-template-columns: 224px minmax(0, 1fr) 260px; gap: 24px; align-items: start; }

/* plain (non-walkthrough) article: no step rail — body + side panel only.
   Without this, the 2 children auto-placed into the 3-col grid: the body
   squeezed into the 224px rail slot with the side panels floating wide. */
.fo-sop-shell.is-plain { grid-template-columns: minmax(0, 1fr) 260px; }

/* reader typography for the plain article's markdown body */
.fo-sop-prose { color: var(--fo-ink); font-size: 14px; line-height: 1.68; }
.fo-sop-prose h1 { font-size: 21px; font-weight: 750; letter-spacing: -0.01em; margin: 0 0 10px; }
.fo-sop-prose h2 { font-size: 16.5px; font-weight: 700; margin: 22px 0 8px; }
.fo-sop-prose h3 { font-size: 14.5px; font-weight: 700; margin: 18px 0 6px; }
.fo-sop-prose p { margin: 0 0 10px; color: var(--fo-ink-2); }
.fo-sop-prose ul, .fo-sop-prose ol { margin: 0 0 12px; padding-left: 22px; color: var(--fo-ink-2); }
.fo-sop-prose li { margin: 3px 0; }
.fo-sop-prose li::marker { color: var(--fo-ink-3); }
.fo-sop-prose b, .fo-sop-prose strong { color: var(--fo-ink); font-weight: 700; }
.fo-sop-prose code { font-family: var(--fo-mono, ui-monospace, monospace); font-size: 12.5px; background: var(--fo-canvas); border: 1px solid var(--fo-line); border-radius: 6px; padding: 1px 5px; }
.fo-sop-prose a { color: var(--fo-accent); text-decoration: none; }
.fo-sop-prose a:hover { text-decoration: underline; }
.fo-sop-prose hr { border: 0; border-top: 1px solid var(--fo-line); margin: 18px 0; }

/* LEFT · step rail */
.fo-sop-railwrap { position: sticky; top: 16px; }
.fo-sop-rail { background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); box-shadow: var(--fo-shadow-1); overflow: hidden; }
.fo-sop-rail-head { padding: 15px 16px 13px; border-bottom: 1px solid var(--fo-line); }
.fo-sop-rail-count { font-size: 12px; font-weight: 600; color: var(--fo-ink-2); margin-bottom: 9px; }
.fo-sop-rail-count strong { color: var(--fo-ink); font-weight: 750; font-variant-numeric: tabular-nums; }
.fo-sop-prog { height: 6px; border-radius: 999px; background: var(--fo-accent-soft); overflow: hidden; }
.fo-sop-prog > span { display: block; height: 100%; border-radius: 999px; background: var(--fo-accent); transition: width var(--fo-slow) var(--fo-ease); }
.fo-sop-rail-list { padding: 8px; display: flex; flex-direction: column; }
.fo-sop-rail-step { position: relative; display: flex; align-items: flex-start; gap: 11px; text-align: left; padding: 9px 10px; border: none; background: transparent; border-radius: 10px; cursor: pointer; transition: background var(--fo-fast) var(--fo-ease); }
.fo-sop-rail-step:hover { background: var(--fo-canvas); }
/* connector line down the numbers */
.fo-sop-rail-step:not(:last-child)::before { content: ""; position: absolute; left: 23px; top: 31px; bottom: -1px; width: 1.5px; background: var(--fo-line); }
.fo-sop-rail-num { position: relative; z-index: 1; flex: none; width: 26px; height: 26px; border-radius: 999px; background: var(--fo-canvas); border: 1.5px solid var(--fo-line-strong); color: var(--fo-ink-3); font-size: 12px; font-weight: 700; display: grid; place-items: center; font-variant-numeric: tabular-nums; transition: all var(--fo-fast) var(--fo-ease); }
.fo-sop-rail-body { min-width: 0; padding-top: 1px; }
.fo-sop-rail-tag { display: block; font-size: 10px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--fo-ink-3); }
.fo-sop-rail-t { display: block; font-size: 12.5px; font-weight: 600; color: var(--fo-ink-2); line-height: 1.35; margin-top: 1px; }
.fo-sop-rail-step.is-current { background: var(--fo-accent-soft); }
.fo-sop-rail-step.is-current .fo-sop-rail-num { background: var(--fo-accent); border-color: var(--fo-accent); color: #fff; }
.fo-sop-rail-step.is-current .fo-sop-rail-tag { color: var(--fo-accent); }
.fo-sop-rail-step.is-current .fo-sop-rail-t { color: var(--fo-accent-deep); font-weight: 700; }
.fo-sop-rail-step.is-done .fo-sop-rail-num { background: var(--fo-ok-soft); border-color: transparent; color: var(--fo-ok); }
.fo-sop-rail-foot { padding: 12px 14px; border-top: 1px solid var(--fo-line); }
.fo-sop-rail-foot .fo-btn { width: 100%; justify-content: center; }
.fo-sop-rail-foot .fo-btn.is-done { color: var(--fo-ok); }

/* CENTER · step stream */
.fo-sop-stream { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.fo-sop-step { background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); box-shadow: var(--fo-shadow-1); padding: 20px 22px; scroll-margin-top: 18px; }
.fo-sop-step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; flex-wrap: wrap; }
.fo-sop-step-num { flex: none; width: 28px; height: 28px; border-radius: 999px; background: var(--fo-accent); color: #fff; font-size: 13px; font-weight: 750; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.fo-sop-step-tag { font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--fo-accent); background: var(--fo-accent-soft); padding: 3px 9px; border-radius: 999px; }
.fo-sop-step-ico { width: 16px; height: 16px; color: var(--fo-ink-3); }
.fo-sop-step-title { font-size: 16.5px; font-weight: 700; letter-spacing: -0.015em; color: var(--fo-ink); }
.fo-sop-step-desc { font-size: 13.5px; line-height: 1.65; color: var(--fo-ink-2); margin: 0 0 12px; }
.fo-sop-step-desc strong { color: var(--fo-ink); font-weight: 650; }
.fo-sop-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.fo-sop-chip { font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.fo-sop-chip.is-info { background: var(--fo-info-soft); color: var(--fo-info); }
.fo-sop-chip.is-ok { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-sop-chip.is-warn { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-sop-chip.is-err { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-sop-chip.is-neutral { background: rgba(24, 27, 33, 0.05); color: var(--fo-ink-2); }

/* finish card */
.fo-sop-finish { display: flex; align-items: flex-start; gap: 15px; padding: 20px 22px; border-radius: var(--fo-r-lg); border: 1px solid var(--fo-line); background: var(--fo-surface-2); }
.fo-sop-finish.is-done { background: var(--fo-ok-soft); border-color: transparent; }
.fo-sop-finish-ico { flex: none; width: 42px; height: 42px; border-radius: 12px; background: var(--fo-accent-soft); color: var(--fo-accent); display: grid; place-items: center; transition: all var(--fo-base) var(--fo-ease); }
.fo-sop-finish-ico svg.fo-i { width: 21px; height: 21px; }
.fo-sop-finish.is-done .fo-sop-finish-ico { background: var(--fo-ok); color: #fff; }
.fo-sop-finish-main { min-width: 0; }
.fo-sop-finish-title { font-size: 15px; font-weight: 700; color: var(--fo-ink); }
.fo-sop-finish.is-done .fo-sop-finish-title::after { content: " · Completed"; color: var(--fo-ok); }
.fo-sop-finish-sub { font-size: 13px; color: var(--fo-ink-2); line-height: 1.55; margin-top: 3px; }
.fo-sop-finish-acts { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin-top: 13px; }
.fo-sop-helpful { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--fo-ink-3); }
.fo-sop-thumb { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; font-size: 12px; font-weight: 600; border-radius: 8px; border: 1px solid var(--fo-line); background: var(--fo-surface); color: var(--fo-ink-2); cursor: pointer; transition: all var(--fo-fast) var(--fo-ease); }
.fo-sop-thumb:hover { border-color: var(--fo-line-strong); color: var(--fo-ink); }
.fo-sop-thumb svg.fo-i { width: 13px; height: 13px; }

/* RIGHT · context */
.fo-sop-sidewrap { position: sticky; top: 16px; }
.fo-sop-side { display: flex; flex-direction: column; gap: 14px; }
.fo-sop-panel { background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); box-shadow: var(--fo-shadow-1); padding: 8px; }
.fo-sop-panel-head { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fo-ink-3); padding: 8px 10px 9px; }
.fo-sop-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; font-size: 12.5px; font-weight: 550; color: var(--fo-ink-2); text-decoration: none; transition: background var(--fo-fast) var(--fo-ease), color var(--fo-fast) var(--fo-ease); }
.fo-sop-link:hover { background: var(--fo-canvas); color: var(--fo-ink); }
.fo-sop-link svg.fo-i { width: 15px; height: 15px; color: var(--fo-ink-3); flex: none; }
.fo-sop-link span { min-width: 0; }

/* draft banner */
.fo-sop-draftbar { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 16px; border: 1px dashed var(--fo-warn); background: var(--fo-warn-soft); border-radius: var(--fo-r-md); font-size: 13px; color: var(--fo-warn); }
.fo-sop-draftbar svg.fo-i { width: 17px; height: 17px; flex: none; }
.fo-sop-draftbar div { flex: 1; }
.fo-sop-draftbar strong { font-weight: 700; }
.fo-sop-draftbar .fo-btn { flex: none; }

/* ───────────────────────── Scene kit (.fo-sc-*) ───────────────────────── */
.fo-sc-win { background: var(--fo-surface); border: 1px solid var(--fo-line-strong); border-radius: var(--fo-r-md); overflow: hidden; box-shadow: 0 6px 20px -12px rgba(24, 27, 33, 0.22); }
.fo-sc-win * { box-sizing: border-box; }
.fo-sc-win-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--fo-surface-2); border-bottom: 1px solid var(--fo-line); }
.fo-sc-dots { display: inline-flex; gap: 5px; flex: none; }
.fo-sc-dots i { width: 9px; height: 9px; border-radius: 999px; background: #d3d8e0; }
.fo-sc-dots i:nth-child(1) { background: #f0817a; }
.fo-sc-dots i:nth-child(2) { background: #f5c97a; }
.fo-sc-dots i:nth-child(3) { background: #8fcf9f; }
.fo-sc-url { font-size: 11px; font-weight: 600; color: var(--fo-ink-3); background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: 999px; padding: 3px 12px; }
.fo-sc-win-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.fo-sc-row { display: flex; gap: 10px; align-items: center; }
.fo-sc-col { display: flex; flex-direction: column; gap: 8px; }
.fo-sc-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fo-sc-spacer { flex: 1; }
.fo-sc-eyebrow { font-size: 9px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fo-ink-3); }
.fo-sc-title { font-size: 13px; font-weight: 700; color: var(--fo-ink); }
.fo-sc-text { font-size: 11.5px; font-weight: 500; color: var(--fo-ink-2); line-height: 1.5; }
.fo-sc-text strong { color: var(--fo-ink); font-weight: 700; }
.fo-sc-muted { font-size: 11px; font-weight: 500; color: var(--fo-ink-3); }
.fo-sc-card { background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: 10px; padding: 11px 13px; display: flex; flex-direction: column; gap: 4px; }
.fo-sc-card.is-accent { border-left: 3px solid var(--fo-accent); background: var(--fo-accent-soft); border-top-color: transparent; border-right-color: transparent; border-bottom-color: transparent; }
.fo-sc-card.is-tint { background: var(--fo-surface-2); }
.fo-sc-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; }
.fo-sc-kpi { background: var(--fo-surface-2); border: 1px solid var(--fo-line); border-radius: 9px; padding: 9px 11px; }
.fo-sc-kpi .v { font-family: var(--fo-font-display); font-size: 18px; font-weight: 780; color: var(--fo-ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.fo-sc-kpi .l { font-size: 8.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fo-ink-3); margin-top: 3px; }
.fo-sc-kpi .s { font-size: 10px; font-weight: 500; color: var(--fo-ink-3); margin-top: 1px; }
.fo-sc-list { display: flex; flex-direction: column; gap: 6px; }
.fo-sc-listrow { display: flex; align-items: center; gap: 10px; background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: 9px; padding: 8px 11px; }
.fo-sc-listrow.is-active { border-color: var(--fo-accent); box-shadow: 0 0 0 1px var(--fo-accent); background: var(--fo-accent-soft); }
.fo-sc-rowmain { flex: 1; min-width: 0; }
.fo-sc-rowname { display: block; font-size: 11.5px; font-weight: 650; color: var(--fo-ink); }
.fo-sc-rowmeta { display: block; font-size: 10.5px; font-weight: 500; color: var(--fo-ink-3); margin-top: 1px; }
.fo-sc-avatar { flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--fo-accent-soft); color: var(--fo-accent); font-size: 11px; font-weight: 750; display: grid; place-items: center; }
.fo-sc-avatar.is-ok { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-sc-avatar.is-ok svg.fo-i { width: 15px; height: 15px; }
.fo-sc-tbl { width: 100%; border-collapse: collapse; font-size: 11px; }
.fo-sc-tbl th { text-align: left; font-weight: 700; color: var(--fo-ink-3); padding: 7px 9px; border-bottom: 1px solid var(--fo-line); text-transform: uppercase; letter-spacing: 0.05em; font-size: 9.5px; }
.fo-sc-tbl td { padding: 8px 9px; color: var(--fo-ink-2); border-bottom: 1px solid var(--fo-line); }
.fo-sc-tbl tr:last-child td { border-bottom: 0; }
.fo-sc-field { display: flex; flex-direction: column; gap: 4px; }
.fo-sc-field-lbl { font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fo-ink-3); }
.fo-sc-field-box { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 500; color: var(--fo-ink-3); background: var(--fo-surface); border: 1px solid var(--fo-line-strong); border-radius: 8px; padding: 8px 10px; }
.fo-sc-field-box svg.fo-i { width: 13px; height: 13px; }
.fo-sc-field-box.is-filled { color: var(--fo-ink); }
.fo-sc-field-box.is-focus { border-color: var(--fo-accent); color: var(--fo-accent); box-shadow: 0 0 0 3px var(--fo-accent-soft); }
.fo-sc-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 650; color: var(--fo-ink-2); background: var(--fo-surface); border: 1px solid var(--fo-line-strong); border-radius: 8px; padding: 7px 13px; }
.fo-sc-btn svg.fo-i { width: 13px; height: 13px; }
.fo-sc-btn.is-primary { background: var(--fo-accent); border-color: var(--fo-accent); color: #fff; }
.fo-sc-pill { font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; background: rgba(24, 27, 33, 0.06); color: var(--fo-ink-2); }
.fo-sc-pill.is-ok { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-sc-pill.is-warn { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-sc-pill.is-err { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-sc-pill.is-info { background: var(--fo-info-soft); color: var(--fo-info); }
.fo-sc-tag { font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 6px; background: var(--fo-accent-soft); color: var(--fo-accent); }
.fo-sc-prog { height: 7px; border-radius: 999px; background: var(--fo-accent-soft); overflow: hidden; }
.fo-sc-prog > span { display: block; height: 100%; border-radius: 999px; background: var(--fo-accent); }
.fo-sc-empty { display: flex; align-items: center; gap: 9px; width: 100%; padding: 18px; border: 1px dashed var(--fo-line-strong); border-radius: var(--fo-r-md); background: var(--fo-surface-2); font-size: 12.5px; color: var(--fo-ink-3); }
.fo-sc-empty svg.fo-i { width: 16px; height: 16px; opacity: 0.6; }

/* ───────────────────────── Library & hub (.fo-kn-*) ───────────────────────── */
.fo-sop-surface { background: var(--fo-canvas); border: 1px solid var(--fo-line); border-radius: var(--fo-r-xl); padding: 22px; }
.fo-kn-search { display: flex; align-items: center; gap: 10px; background: var(--fo-surface); border: 1px solid var(--fo-line-strong); border-radius: var(--fo-r-md); padding: 0 14px; box-shadow: var(--fo-shadow-1); }
.fo-kn-search svg.fo-i { width: 17px; height: 17px; color: var(--fo-ink-3); flex: none; }
.fo-kn-search .fo-input { border: none; box-shadow: none; background: transparent; padding: 13px 0; font-size: 14px; }
.fo-kn-search .fo-input:focus { box-shadow: none; }
.fo-kn-suggest { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 11px 0 20px; font-size: 12px; color: var(--fo-ink-3); }
.fo-kn-sug { font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--fo-line); background: var(--fo-surface); color: var(--fo-ink-2); cursor: pointer; transition: all var(--fo-fast) var(--fo-ease); }
.fo-kn-sug:hover { border-color: var(--fo-accent); color: var(--fo-accent); }
.fo-sop-kpis { margin-bottom: 20px; }
.fo-kn-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.fo-kn-blockhead { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--fo-ink); margin: 4px 0 12px; }
.fo-kn-blockhead svg.fo-i { width: 16px; height: 16px; color: var(--fo-ink-3); }
.fo-kn-blockhead span { font-size: 12px; font-weight: 500; color: var(--fo-ink-3); }
.fo-kn-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.fo-kn-card { display: flex; flex-direction: column; text-align: left; padding: 16px; background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); cursor: pointer; transition: transform var(--fo-base) var(--fo-ease), box-shadow var(--fo-base) var(--fo-ease), border-color var(--fo-base) var(--fo-ease); }
.fo-kn-card:hover { transform: translateY(-2px); box-shadow: var(--fo-shadow-2); border-color: var(--fo-line-strong); }
.fo-kn-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 11px; }
.fo-kn-card-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; }
.fo-kn-card-ico svg.fo-i { width: 19px; height: 19px; }
.fo-kn-card-ico.is-a { background: var(--fo-accent-soft); color: var(--fo-accent); }
.fo-kn-card-ico.is-b { background: var(--fo-info-soft); color: var(--fo-info); }
.fo-kn-card-ico.is-c { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-kn-card-ico.is-d { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-kn-type { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; }
.fo-kn-type.is-sop { background: var(--fo-accent-soft); color: var(--fo-accent); }
.fo-kn-type.is-faq { background: var(--fo-info-soft); color: var(--fo-info); }
.fo-kn-type.is-training { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-kn-type.is-release { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-kn-card-title { font-size: 14px; font-weight: 700; color: var(--fo-ink); line-height: 1.3; }
.fo-kn-card-sum { font-size: 12px; color: var(--fo-ink-2); line-height: 1.5; margin: 6px 0 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fo-kn-card-meta { display: flex; align-items: center; gap: 8px; margin-top: auto; font-size: 11.5px; color: var(--fo-ink-3); }
.fo-kn-scope { font-size: 10px; font-weight: 700; letter-spacing: 0.04em; padding: 2px 7px; border-radius: 5px; }
.fo-kn-scope.is-platform { background: var(--fo-accent-soft); color: var(--fo-accent); }
.fo-kn-scope.is-internal { background: rgba(24, 27, 33, 0.06); color: var(--fo-ink-2); }
.fo-kn-mods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fo-kn-mod { display: flex; align-items: center; gap: 12px; text-align: left; padding: 13px 15px; background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); cursor: pointer; transition: all var(--fo-base) var(--fo-ease); }
.fo-kn-mod:hover { transform: translateY(-2px); box-shadow: var(--fo-shadow-2); border-color: var(--fo-line-strong); }
.fo-kn-mod-ico { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; }
.fo-kn-mod-ico svg.fo-i { width: 17px; height: 17px; }
.fo-kn-mod-ico.is-a { background: var(--fo-accent-soft); color: var(--fo-accent); }
.fo-kn-mod-ico.is-b { background: var(--fo-info-soft); color: var(--fo-info); }
.fo-kn-mod-ico.is-c { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-kn-mod-ico.is-ok { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-kn-mod-ico.is-danger { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-kn-mod-ico.is-ghost { background: rgba(24, 27, 33, 0.05); color: var(--fo-ink-3); }
.fo-kn-mod-name { font-size: 13px; font-weight: 650; color: var(--fo-ink); flex: 1; min-width: 0; }
.fo-kn-mod-n { font-size: 11.5px; font-weight: 600; color: var(--fo-ink-3); }
.fo-kn-mod.is-gap { border-style: dashed; }
.fo-kn-mod.is-gap .fo-kn-mod-name { color: var(--fo-ink-3); }

/* ═══════════════════ Knowledge — mobile (additive only) ═══════════════════ */
@media (max-width: 1080px) {
  /* .is-plain included: its 2-col rule is more specific than this collapse */
  .fo-sop-shell, .fo-sop-shell.is-plain { grid-template-columns: minmax(0, 1fr); }
  /* rail becomes a compact horizontal progress strip above the stream */
  .fo-sop-railwrap { position: static; order: -1; }
  .fo-sop-rail-list { flex-direction: row; overflow-x: auto; padding: 10px; gap: 6px; -webkit-overflow-scrolling: touch; }
  .fo-sop-rail-step { flex: none; width: 150px; }
  .fo-sop-rail-step:not(:last-child)::before { display: none; }
  .fo-sop-sidewrap { position: static; }
  .fo-sop-side { flex-direction: row; flex-wrap: wrap; }
  .fo-sop-panel { flex: 1; min-width: 240px; }
  .fo-kn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fo-kn-mods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .fo-sop-hero { gap: 13px; }
  .fo-sop-hero-ico { width: 46px; height: 46px; border-radius: 13px; }
  .fo-sop-title { font-size: 21px; }
  .fo-sop-side { flex-direction: column; }
  .fo-sop-panel { min-width: 0; }
  .fo-sop-surface { padding: 15px; }
  .fo-kn-grid { grid-template-columns: minmax(0, 1fr); }
  .fo-kn-mods { grid-template-columns: minmax(0, 1fr); }
  .fo-sop-finish { flex-direction: column; }
  /* a fixed-width mock scrolls inside its frame rather than breaking the page */
  .fo-sc-win { overflow-x: auto; }
  .fo-sc-split { grid-template-columns: minmax(0, 1fr); }
  .fo-sc-win-body .fo-sc-row { flex-wrap: wrap; }
}

/* ═══════════════════════════════════════════════════════════════════════
   ONBOARDING — pipeline board, e-sign package, progress hero, packet
   builder/detail, learner course/lesson/quiz, checklist builder, template
   library.  Styleguide: /styleguide/onboarding.  (?v=174)
   Royal palette + system soft tints; reuses .fo-sop-* shell, .fo-device-*,
   .fo-drop, .fo-d-pulse, .fo-table, .fo-seg, .fo-toggle, .fo-chip.
   ═══════════════════════════════════════════════════════════════════════ */

/* shared avatar used by pipeline + packet detail */
.fo-pipe-av { flex: none; width: 32px; height: 32px; border-radius: 9px; background: var(--fo-accent-soft); color: var(--fo-accent); font-size: 12px; font-weight: 750; display: grid; place-items: center; }
.fo-pipe-av.is-ok { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-pipe-av.is-lg { width: 44px; height: 44px; border-radius: 12px; font-size: 15px; }
.fo-pipe-card-name { font-size: 13px; font-weight: 700; color: var(--fo-ink); }
.fo-pipe-card-pos { font-size: 11.5px; color: var(--fo-ink-3); }
/* inside a pipeline card the name/position stack; in the attention row they stay inline */
.fo-pipe-card-id .fo-pipe-card-name, .fo-pipe-card-id .fo-pipe-card-pos { display: block; }

/* ───────────────────────── 1 · Pipeline board ───────────────────────── */
.fo-pipe-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.fo-pipe-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.fo-pipe-board.is-single { grid-template-columns: minmax(0, 1fr); }
.fo-pipe-board.is-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.fo-pipe-lane { background: var(--fo-canvas); border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); padding: 13px; }
.fo-pipe-lane-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--fo-ink); margin-bottom: 12px; flex-wrap: wrap; }
.fo-pipe-dot { width: 9px; height: 9px; border-radius: 999px; flex: none; }
.fo-pipe-dot.is-ink { background: var(--fo-ink-3); }
.fo-pipe-dot.is-info { background: var(--fo-info); }
.fo-pipe-dot.is-warn { background: var(--fo-warn); }
.fo-pipe-dot.is-ok { background: var(--fo-ok); }
.fo-pipe-dot.is-danger { background: var(--fo-danger); }
.fo-pipe-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--fo-surface); border: 1px solid var(--fo-line); color: var(--fo-ink-2); font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.fo-pipe-lane-sub { flex-basis: 100%; font-size: 11px; font-weight: 500; color: var(--fo-ink-3); }
.fo-pipe-cards { display: flex; flex-direction: column; gap: 9px; }
.fo-pipe-empty { padding: 14px 8px; text-align: center; color: var(--fo-ink-3); font-size: 12px; font-weight: 500; opacity: 0.7; }
.fo-pipe-card { display: flex; flex-direction: column; gap: 9px; text-align: left; padding: 12px; background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); box-shadow: var(--fo-shadow-1); cursor: pointer; transition: transform var(--fo-fast) var(--fo-ease), box-shadow var(--fo-fast) var(--fo-ease), border-color var(--fo-fast) var(--fo-ease); }
.fo-pipe-card:hover { transform: translateY(-2px); box-shadow: var(--fo-shadow-2); border-color: var(--fo-line-strong); }
.fo-pipe-card-top { display: flex; align-items: center; gap: 10px; }
.fo-pipe-card-id { min-width: 0; }
.fo-pipe-bar2 { height: 6px; border-radius: 999px; background: var(--fo-accent-soft); overflow: hidden; }
.fo-pipe-bar2 > span { display: block; height: 100%; border-radius: 999px; background: var(--fo-accent); }
.fo-pipe-bar2.is-ok { background: var(--fo-ok-soft); }
.fo-pipe-bar2.is-ok > span { background: var(--fo-ok); }
.fo-pipe-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fo-pipe-card-meta { font-size: 11.5px; font-weight: 600; color: var(--fo-ink-3); font-variant-numeric: tabular-nums; }
.fo-pipe-age { font-size: 11px; font-weight: 600; color: var(--fo-ink-3); }
.fo-pipe-age.is-warn { color: var(--fo-warn); }
.fo-pipe-age.is-danger { color: var(--fo-danger); }
.fo-pipe-attention { margin-top: 16px; background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); padding: 14px 16px; box-shadow: var(--fo-shadow-1); }
.fo-pipe-attention-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--fo-ink); margin-bottom: 11px; }
.fo-pipe-attention-head svg.fo-i { width: 15px; height: 15px; color: var(--fo-warn); }
.fo-pipe-attention-head span { font-size: 11.5px; font-weight: 500; color: var(--fo-ink-3); }
.fo-pipe-attention-row { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 9px 10px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); background: var(--fo-surface); cursor: pointer; transition: border-color var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease); }
.fo-pipe-attention-row:hover { border-color: var(--fo-line-strong); background: var(--fo-canvas); }
.fo-pipe-attention-row .fo-pipe-card-pos { flex: 1; min-width: 0; }
.fo-pipe-attention-act { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 650; color: var(--fo-accent); }
.fo-pipe-attention-act svg.fo-i { width: 13px; height: 13px; }

/* ───────────────────── 2 · E-sign document package ───────────────────── */
.fo-ob-phones { display: flex; flex-wrap: wrap; gap: 32px; justify-content: center; }
.fo-ob-portal { padding: 18px 15px; min-height: 100%; }
.fo-ob-portal-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.fo-ob-portal-brand img { width: 30px; height: 30px; border-radius: 8px; flex: none; }
.fo-ob-portal-brand .nm { font-size: 13px; font-weight: 750; color: var(--fo-ink); }
.fo-ob-portal-brand .sub { font-size: 10.5px; color: var(--fo-ink-3); }
.fo-ob-portal-title { font-size: 17px; font-weight: 750; letter-spacing: -0.02em; color: var(--fo-ink); }
.fo-ob-portal-sub { font-size: 12px; color: var(--fo-ink-3); margin-top: 2px; }
.fo-ob-portal-prog { display: flex; align-items: center; gap: 10px; margin: 14px 0; }
.fo-ob-portal-prog-bar { flex: 1; height: 7px; border-radius: 999px; background: var(--fo-accent-soft); overflow: hidden; }
.fo-ob-portal-prog-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--fo-accent); }
.fo-ob-portal-prog-n { font-size: 11.5px; font-weight: 700; color: var(--fo-ink-2); white-space: nowrap; }
.fo-ob-docs { display: flex; flex-direction: column; gap: 8px; }
.fo-ob-doc { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 11px 12px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); background: var(--fo-surface); }
.fo-ob-doc.is-current { border-color: var(--fo-accent); background: var(--fo-accent-soft); cursor: pointer; }
.fo-ob-doc-ic { flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--fo-canvas); color: var(--fo-ink-3); display: grid; place-items: center; }
.fo-ob-doc-ic svg.fo-i { width: 15px; height: 15px; }
.fo-ob-doc.is-signed .fo-ob-doc-ic { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-ob-doc.is-current .fo-ob-doc-ic { background: var(--fo-accent); color: #fff; }
.fo-ob-doc-main { flex: 1; min-width: 0; }
.fo-ob-doc-name { display: block; font-size: 12.5px; font-weight: 650; color: var(--fo-ink); }
.fo-ob-doc-meta { display: block; font-size: 11px; color: var(--fo-ink-3); margin-top: 1px; }
.fo-ob-done { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 24px 6px; }
.fo-ob-done-ring { width: 64px; height: 64px; border-radius: 999px; background: var(--fo-ok-soft); color: var(--fo-ok); display: grid; place-items: center; margin-bottom: 16px; }
.fo-ob-done-ring svg.fo-i { width: 30px; height: 30px; }
.fo-ob-done-title { font-size: 18px; font-weight: 780; letter-spacing: -0.02em; color: var(--fo-ink); }
.fo-ob-done-sub { font-size: 12.5px; color: var(--fo-ink-2); line-height: 1.55; margin: 8px 0 16px; }
.fo-ob-done-receipt { width: 100%; background: var(--fo-surface-2); border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); padding: 12px 14px; margin-bottom: 14px; }
.fo-ob-done-receipt .r { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; padding: 4px 0; }
.fo-ob-done-receipt .r span { color: var(--fo-ink-3); }
.fo-ob-done-receipt .r b { color: var(--fo-ink); font-weight: 650; }

/* ───────────────────────── 3 · Progress hero ───────────────────────── */
.fo-ob-hero { display: flex; gap: 26px; align-items: center; background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-xl); box-shadow: var(--fo-shadow-1); padding: 24px 26px; }
.fo-ob-hero-ring { display: flex; flex-direction: column; align-items: center; gap: 11px; flex: none; }
.fo-ob-ring { position: relative; width: 128px; height: 128px; }
.fo-ob-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.fo-ob-ring .track { fill: none; stroke: var(--fo-line); stroke-width: 9; }
.fo-ob-ring .meter { fill: none; stroke-width: 9; stroke-linecap: round; stroke: var(--fo-accent); transition: stroke-dashoffset var(--fo-slow) var(--fo-ease); }
.fo-ob-ring.is-start .meter { stroke: var(--fo-ink-3); }
.fo-ob-ring.is-keep .meter { stroke: var(--fo-accent); }
.fo-ob-ring.is-almost .meter { stroke: var(--fo-accent-deep); }
.fo-ob-ring.is-done .meter { stroke: var(--fo-ok); }
.fo-ob-ring-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.fo-ob-ring-v { font-family: var(--fo-font-display); font-size: 34px; font-weight: 780; letter-spacing: -0.04em; color: var(--fo-ink); line-height: 1; font-variant-numeric: tabular-nums; }
.fo-ob-ring-v span { font-size: 17px; font-weight: 650; color: var(--fo-ink-3); }
.fo-ob-ring-l { font-size: 11px; font-weight: 600; color: var(--fo-ink-3); margin-top: 3px; }
.fo-ob-band { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.fo-ob-band.is-start { background: rgba(24,27,33,0.06); color: var(--fo-ink-2); }
.fo-ob-band.is-keep { background: var(--fo-accent-soft); color: var(--fo-accent); }
.fo-ob-band.is-almost { background: var(--fo-accent-soft); color: var(--fo-accent-deep); }
.fo-ob-band.is-done { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-ob-hero-main { flex: 1; min-width: 0; }
.fo-ob-hero-greet { font-size: 16px; font-weight: 700; letter-spacing: -0.015em; color: var(--fo-ink); margin-bottom: 14px; }
.fo-ob-kpis { margin-bottom: 16px; }
.fo-ob-next { border-top: 1px solid var(--fo-line); padding-top: 14px; }
.fo-ob-next-head { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fo-ink-3); margin-bottom: 9px; }
.fo-ob-next-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 11px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); background: var(--fo-surface); cursor: pointer; margin-bottom: 8px; transition: border-color var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease); }
.fo-ob-next-row:hover { border-color: var(--fo-line-strong); background: var(--fo-canvas); }
.fo-ob-next-ic { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; }
.fo-ob-next-ic svg.fo-i { width: 17px; height: 17px; }
.fo-ob-next-ic.is-a { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-ob-next-ic.is-b { background: var(--fo-accent-soft); color: var(--fo-accent); }
.fo-ob-next-main { flex: 1; min-width: 0; }
.fo-ob-next-name { display: block; font-size: 13px; font-weight: 650; color: var(--fo-ink); }
.fo-ob-next-meta { display: block; font-size: 11.5px; color: var(--fo-ink-3); margin-top: 1px; }
.fo-ob-bands { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.fo-ob-bandcard { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 13px 15px; border-radius: var(--fo-r-md); border: 1px solid var(--fo-line); background: var(--fo-surface); }
.fo-ob-bandcard-r { font-size: 12px; font-weight: 700; color: var(--fo-ink-3); font-variant-numeric: tabular-nums; }

/* ───────────────── 4 · Packet builder (over .fo-sop-shell) ───────────────── */
.fo-pk-stream { display: flex; flex-direction: column; min-width: 0; }
.fo-pk-panel { background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); box-shadow: var(--fo-shadow-1); padding: 20px 22px; }
.fo-pk-panel-head { margin-bottom: 16px; }
.fo-pk-panel-head h3 { font-size: 16px; font-weight: 700; color: var(--fo-ink); }
.fo-pk-panel-head p { font-size: 12.5px; color: var(--fo-ink-3); margin-top: 2px; }
.fo-pk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fo-pk-lbl { display: block; font-size: 11.5px; font-weight: 600; color: var(--fo-ink-2); margin: 0 0 6px; }
.fo-pk-comp { width: fit-content; }
.fo-pk-preset { display: flex; align-items: center; gap: 9px; padding: 10px 13px; background: var(--fo-accent-soft); border-radius: var(--fo-r-md); font-size: 12.5px; font-weight: 600; color: var(--fo-accent-deep); margin-bottom: 14px; }
.fo-pk-preset svg.fo-i { width: 15px; height: 15px; color: var(--fo-accent); flex: none; }
.fo-pk-doclist { display: flex; flex-direction: column; gap: 8px; }
.fo-pk-doc { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); cursor: pointer; transition: border-color var(--fo-fast) var(--fo-ease); }
.fo-pk-doc:hover { border-color: var(--fo-line-strong); }
.fo-pk-doc input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fo-pk-doc-box { flex: none; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--fo-line-strong); background: var(--fo-surface); display: grid; place-items: center; color: #fff; transition: all var(--fo-fast) var(--fo-ease); }
.fo-pk-doc-box svg.fo-i { width: 13px; height: 13px; opacity: 0; }
.fo-pk-doc input:checked ~ .fo-pk-doc-box { background: var(--fo-accent); border-color: var(--fo-accent); }
.fo-pk-doc input:checked ~ .fo-pk-doc-box svg.fo-i { opacity: 1; }
.fo-pk-doc:has(input:checked) { border-color: var(--fo-accent); background: var(--fo-accent-soft); }
.fo-pk-doc-main { flex: 1; min-width: 0; }
.fo-pk-doc-name { display: block; font-size: 13px; font-weight: 650; color: var(--fo-ink); }
.fo-pk-doc-meta { display: block; font-size: 11px; color: var(--fo-ink-3); margin-top: 1px; }
.fo-pk-review { display: flex; flex-direction: column; gap: 1px; margin-bottom: 16px; }
.fo-pk-review .r { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--fo-line); font-size: 13px; }
.fo-pk-review .r span { color: var(--fo-ink-3); }
.fo-pk-review .r b { color: var(--fo-ink); font-weight: 650; }
.fo-pk-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }
.fo-pk-summary { position: sticky; top: 16px; background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); box-shadow: var(--fo-shadow-1); overflow: hidden; }
.fo-pk-summary-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--fo-line); font-size: 13px; font-weight: 700; color: var(--fo-ink); }
.fo-pk-summary-head svg.fo-i { width: 15px; height: 15px; color: var(--fo-accent); }
.fo-pk-summary-body { padding: 6px 16px 14px; }
.fo-pk-srow { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--fo-line); font-size: 12.5px; }
.fo-pk-srow:last-child { border-bottom: none; }
.fo-pk-srow span { color: var(--fo-ink-3); }
.fo-pk-srow b { color: var(--fo-ink); font-weight: 650; text-align: right; }
.fo-pk-srow b.is-pending { color: var(--fo-ink-3); font-weight: 500; font-style: italic; }

/* ───────────────── 5 · Packet detail ───────────────── */
.fo-pk-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.fo-pk-detail-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.fo-pk-detail-name { font-size: 16px; font-weight: 700; color: var(--fo-ink); }
.fo-pk-detail-pos { font-size: 12.5px; color: var(--fo-ink-3); }
.fo-pk-detail-prog { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; }
.fo-pk-detail-prog-bar { flex: 1; height: 7px; border-radius: 999px; background: var(--fo-accent-soft); overflow: hidden; }
.fo-pk-detail-prog-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--fo-accent); }
.fo-pk-detail-prog span:last-child { font-size: 11.5px; font-weight: 600; color: var(--fo-ink-2); white-space: nowrap; }
.fo-pk-docrows { display: flex; flex-direction: column; gap: 8px; }
.fo-pk-docrow { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); }
.fo-pk-docrow-ic { flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--fo-canvas); color: var(--fo-ink-3); display: grid; place-items: center; }
.fo-pk-docrow-ic svg.fo-i { width: 15px; height: 15px; }
.fo-pk-docrow.is-signed .fo-pk-docrow-ic { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-pk-docrow.is-viewed .fo-pk-docrow-ic { background: var(--fo-info-soft); color: var(--fo-info); }
.fo-pk-docrow-main { flex: 1; min-width: 0; }
.fo-pk-docrow-name { display: block; font-size: 13px; font-weight: 650; color: var(--fo-ink); }
.fo-pk-docrow-meta { display: block; font-size: 11px; color: var(--fo-ink-3); margin-top: 1px; }
.fo-pk-side { display: flex; flex-direction: column; gap: 14px; }
.fo-pk-side-head { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fo-ink-3); margin-bottom: 10px; }
.fo-pk-link { display: flex; gap: 7px; }
.fo-pk-link .fo-input { flex: 1; min-width: 0; }
.fo-pk-side-note { font-size: 11.5px; color: var(--fo-ink-3); margin-top: 9px; line-height: 1.5; }
.fo-pk-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.fo-btn.is-block { width: 100%; justify-content: center; }

/* ───────────────── 6 · Course / lesson / quiz ───────────────── */
.fo-crs { background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); box-shadow: var(--fo-shadow-1); padding: 20px 22px; margin-bottom: 16px; }
.fo-crs-head { display: flex; align-items: flex-start; gap: 14px; }
.fo-crs-ico { flex: none; width: 46px; height: 46px; border-radius: 13px; background: var(--fo-danger-soft); color: var(--fo-danger); display: grid; place-items: center; }
.fo-crs-ico svg.fo-i { width: 22px; height: 22px; }
.fo-crs-id { flex: 1; min-width: 0; }
.fo-crs-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 7px; }
.fo-crs-title { font-size: 18px; font-weight: 750; letter-spacing: -0.02em; color: var(--fo-ink); }
.fo-crs-sub { font-size: 12.5px; color: var(--fo-ink-2); line-height: 1.5; margin-top: 3px; }
.fo-crs-prog { display: flex; align-items: center; gap: 11px; margin: 16px 0; }
.fo-crs-prog-bar { flex: 1; height: 7px; border-radius: 999px; background: var(--fo-accent-soft); overflow: hidden; }
.fo-crs-prog-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--fo-accent); }
.fo-crs-prog span:last-child { font-size: 11.5px; font-weight: 600; color: var(--fo-ink-2); white-space: nowrap; }
.fo-crs-lessons { display: flex; flex-direction: column; gap: 7px; }
.fo-crs-lesson { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); }
.fo-crs-lesson-n { flex: none; width: 26px; height: 26px; border-radius: 999px; background: var(--fo-canvas); border: 1.5px solid var(--fo-line-strong); color: var(--fo-ink-3); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.fo-crs-lesson-n svg.fo-i { width: 13px; height: 13px; }
.fo-crs-lesson.is-done .fo-crs-lesson-n { background: var(--fo-ok-soft); border-color: transparent; color: var(--fo-ok); }
.fo-crs-lesson.is-current { border-color: var(--fo-accent); background: var(--fo-accent-soft); }
.fo-crs-lesson.is-current .fo-crs-lesson-n { background: var(--fo-accent); border-color: var(--fo-accent); color: #fff; }
.fo-crs-lesson.is-locked { opacity: 0.62; }
.fo-crs-lesson-t { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: var(--fo-ink); }
.fo-crs-lesson-meta { font-size: 11.5px; color: var(--fo-ink-3); white-space: nowrap; }
.fo-learn-pair { align-items: start; }
.fo-crs-viewer-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fo-accent); }
.fo-crs-viewer-title { font-size: 17px; font-weight: 750; letter-spacing: -0.02em; color: var(--fo-ink); margin: 4px 0 14px; }
.fo-crs-video { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; aspect-ratio: 16 / 9; background: var(--fo-canvas); border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); color: var(--fo-ink-3); margin-bottom: 14px; }
.fo-crs-video svg.fo-i { width: 28px; height: 28px; opacity: 0.6; }
.fo-crs-video span { font-size: 11.5px; font-weight: 600; }
.fo-crs-viewer-body { font-size: 13px; line-height: 1.65; color: var(--fo-ink-2); margin: 0 0 16px; }
.fo-crs-viewer-foot { display: flex; justify-content: space-between; gap: 10px; }
.fo-quiz-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.fo-quiz-eyebrow { font-size: 13px; font-weight: 700; color: var(--fo-ink); }
.fo-quiz-meta { font-size: 11.5px; color: var(--fo-ink-3); }
.fo-quiz-q { margin-bottom: 16px; }
.fo-quiz-q-t { display: flex; align-items: baseline; gap: 9px; font-size: 13.5px; font-weight: 650; color: var(--fo-ink); margin-bottom: 10px; }
.fo-quiz-q-t span { flex: none; width: 20px; height: 20px; border-radius: 999px; background: var(--fo-accent-soft); color: var(--fo-accent); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.fo-quiz-q-t em { font-style: normal; font-weight: 500; font-size: 12px; color: var(--fo-ink-3); }
.fo-quiz-opt { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); cursor: pointer; margin-bottom: 7px; font-size: 13px; color: var(--fo-ink-2); transition: border-color var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease); }
.fo-quiz-opt:hover { border-color: var(--fo-line-strong); }
.fo-quiz-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fo-quiz-mark { flex: none; width: 18px; height: 18px; border-radius: 999px; border: 1.5px solid var(--fo-line-strong); transition: all var(--fo-fast) var(--fo-ease); }
.fo-quiz-mark.is-box { border-radius: 6px; }
.fo-quiz-opt input:checked ~ .fo-quiz-mark { border-color: var(--fo-accent); border-width: 5px; }
.fo-quiz-opt input:checked ~ .fo-quiz-mark.is-box { border-width: 1.5px; background: var(--fo-accent); box-shadow: inset 0 0 0 2px var(--fo-surface); }
.fo-quiz-opt:has(input:checked) { border-color: var(--fo-accent); background: var(--fo-accent-soft); color: var(--fo-ink); }
.fo-quiz-result { display: flex; align-items: flex-start; gap: 11px; padding: 13px 15px; border-radius: var(--fo-r-md); margin-bottom: 14px; }
.fo-quiz-result svg.fo-i { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.fo-quiz-result b { display: block; font-size: 13.5px; font-weight: 700; }
.fo-quiz-result span { display: block; font-size: 12px; line-height: 1.5; margin-top: 2px; }
.fo-quiz-result.is-pass { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-quiz-result.is-pass b, .fo-quiz-result.is-pass span { color: var(--fo-ok); }
.fo-quiz-result.is-fail { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-quiz-result.is-fail b, .fo-quiz-result.is-fail span { color: var(--fo-danger); }
.fo-quiz-foot { display: flex; gap: 9px; }

/* ───────────────── 7 · Checklist builder ───────────────── */
.fo-ck-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--fo-line); }
.fo-ck-bar-id { display: flex; align-items: center; gap: 9px; }
.fo-ck-bar-name { font-size: 14.5px; font-weight: 700; color: var(--fo-ink); }
.fo-ck-items { display: flex; flex-direction: column; gap: 8px; }
.fo-ck-item { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); background: var(--fo-surface); transition: opacity var(--fo-base) var(--fo-ease); }
.fo-ck-item.is-off { opacity: 0.58; }
.fo-ck-grip { color: var(--fo-ink-3); cursor: grab; display: grid; place-items: center; }
.fo-ck-grip svg.fo-i { width: 15px; height: 15px; }
.fo-ck-num { flex: none; width: 24px; height: 24px; border-radius: 7px; background: var(--fo-canvas); color: var(--fo-ink-2); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.fo-ck-main { flex: 1; min-width: 0; }
.fo-ck-title { font-size: 13px; font-weight: 650; color: var(--fo-ink); }
.fo-ck-kind { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--fo-ink-3); margin-top: 3px; flex-wrap: wrap; }
.fo-ck-kind code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 10.5px; background: var(--fo-canvas); padding: 1px 6px; border-radius: 5px; color: var(--fo-ink-2); }
.fo-ck-kindbadge { font-size: 10px; font-weight: 700; letter-spacing: 0.03em; padding: 2px 8px; border-radius: 5px; }
.fo-ck-kindbadge.is-manual { background: rgba(24,27,33,0.06); color: var(--fo-ink-2); }
.fo-ck-kindbadge.is-doc { background: var(--fo-accent-soft); color: var(--fo-accent); }
.fo-ck-kindbadge.is-train { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-ck-kindbadge.is-auto { background: var(--fo-info-soft); color: var(--fo-info); }
.fo-ck-kindbadge.is-link { background: var(--fo-warn-soft); color: var(--fo-warn); }

/* ───────────────── 8 · Document-template library ───────────────── */
.fo-tmpl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.fo-tmpl-card { display: flex; align-items: center; gap: 12px; padding: 14px 15px; background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); box-shadow: var(--fo-shadow-1); }
.fo-tmpl-card.is-custom { border-style: dashed; }
.fo-tmpl-ic { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; }
.fo-tmpl-ic svg.fo-i { width: 18px; height: 18px; }
.fo-tmpl-ic.is-a { background: var(--fo-accent-soft); color: var(--fo-accent); }
.fo-tmpl-ic.is-b { background: var(--fo-info-soft); color: var(--fo-info); }
.fo-tmpl-ic.is-c { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-tmpl-ic.is-d { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-tmpl-ic.is-ghost { background: rgba(24,27,33,0.05); color: var(--fo-ink-3); }
.fo-tmpl-main { flex: 1; min-width: 0; }
.fo-tmpl-name { font-size: 13px; font-weight: 700; color: var(--fo-ink); }
.fo-tmpl-cat { font-size: 11px; color: var(--fo-ink-3); margin-top: 1px; }
.fo-tmpl-drop { margin: 12px 0 0; }
.fo-tmpl-drop-t { font-size: 13px; font-weight: 650; color: var(--fo-ink-2); }
.fo-tmpl-drop-s { font-size: 12px; color: var(--fo-ink-3); }
.fo-tmpl-drop.is-analyzing { border-color: var(--fo-accent); background: var(--fo-accent-soft); }
.fo-tmpl-drop.is-analyzing .fo-tmpl-drop-t, .fo-tmpl-drop.is-done .fo-tmpl-drop-t { color: var(--fo-accent-deep); }
.fo-tmpl-drop.is-done { border-style: solid; border-color: var(--fo-ok); background: var(--fo-ok-soft); }
.fo-tmpl-drop.is-done .fo-tmpl-drop-t { color: var(--fo-ok); }
.fo-tmpl-editor { align-items: start; }
.fo-tmpl-ed-head { font-size: 13px; font-weight: 700; color: var(--fo-ink); margin-bottom: 14px; }
.fo-tmpl-slot { margin-bottom: 14px; }
.fo-tmpl-slot-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.fo-tmpl-slot-tags { display: inline-flex; align-items: center; gap: 8px; }
.fo-tmpl-reset { font-size: 11px; font-weight: 650; color: var(--fo-accent); background: none; border: none; cursor: pointer; padding: 0; }
.fo-tmpl-slot.is-custom .fo-input { border-color: var(--fo-accent); }
.fo-tmpl-preview { display: flex; flex-direction: column; }
.fo-tmpl-paper { background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); box-shadow: 0 8px 24px -14px rgba(24,27,33,0.25); padding: 26px 28px; font-size: 12.5px; line-height: 1.65; color: var(--fo-ink-2); }
.fo-tmpl-paper p { margin: 0 0 11px; }
.fo-tmpl-paper-lh { display: flex; align-items: center; gap: 9px; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 2px solid var(--fo-accent); }
.fo-tmpl-paper-lh img { width: 28px; height: 28px; border-radius: 7px; }
.fo-tmpl-paper-lh span { font-size: 13px; font-weight: 750; color: var(--fo-ink); }
.fo-tmpl-paper-h { font-family: var(--fo-font-display); font-size: 16px; font-weight: 750; color: var(--fo-ink); margin-bottom: 14px; }
.fo-tmpl-paper b { color: var(--fo-ink); font-weight: 700; }
.fo-tmpl-paper-muted { color: var(--fo-ink-3); }
.fo-tmpl-paper-sig { margin-top: 22px; font-size: 10.5px; color: var(--fo-ink-3); }
.fo-tmpl-paper-sigline { display: block; width: 160px; border-bottom: 1.5px solid var(--fo-ink); margin-bottom: 5px; height: 22px; }
.fo-tmpl-preview-cap { font-size: 11px; font-weight: 600; color: var(--fo-ink-3); text-align: center; margin-top: 10px; }

/* ───────────────── 9 · Legend ───────────────── */
.fo-ob-legend { display: flex; flex-direction: column; gap: 12px; }
.fo-ob-legend-grp { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.fo-ob-legend-lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fo-ink-3); width: 130px; flex: none; }

/* ═══════════════════ Onboarding — mobile (additive only) ═══════════════════ */
@media (max-width: 1080px) {
  .fo-pipe-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fo-pipe-board.is-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fo-ob-bands { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fo-tmpl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  /* the pipeline cannot keep four lanes — default to single-lane, pick a stage */
  .fo-pipe-board { grid-template-columns: minmax(0, 1fr); }
  .fo-pipe-board.is-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fo-ob-hero { flex-direction: column; align-items: stretch; text-align: center; }
  .fo-ob-hero-ring { align-self: center; }
  .fo-ob-hero-greet { text-align: left; }
  .fo-pk-grid { grid-template-columns: minmax(0, 1fr); }
  .fo-learn-pair { grid-template-columns: minmax(0, 1fr); }
  .fo-tmpl-grid { grid-template-columns: minmax(0, 1fr); }
  .fo-tmpl-editor { grid-template-columns: minmax(0, 1fr); }
  /* hide the live A4 preview on phones — open in a new tab instead */
  .fo-tmpl-preview { display: none; }
  .fo-ob-legend-lbl { width: 100%; }
}
@media (max-width: 520px) {
  .fo-ob-bands { grid-template-columns: minmax(0, 1fr); }
  .fo-ck-item { flex-wrap: wrap; }
  .fo-ck-main { flex-basis: 100%; order: 3; }
  .fo-pipe-bar .fo-seg { overflow-x: auto; max-width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════════════
   FLEET REGISTRY — filterable vehicle/trailer table.  (?v=175)
   Styleguide: /styleguide/fleet-registry. Reuses .fo-table, .fo-toolbar,
   .fo-search, .fo-select, .fo-menu, .fo-pager, .fo-chip, .fo-d-pulse, .fo-ava.
   ═══════════════════════════════════════════════════════════════════════ */
.fo-fr-kpis { margin-bottom: 20px; }
.fo-fr-card { overflow: visible; }
.fo-fr-toolbar { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--fo-line); flex-wrap: wrap; }
.fo-fr-search { flex: 1; min-width: 220px; }
.fo-fr-count { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--fo-ink-3); white-space: nowrap; }
/* chip neutral — explicit grey for retired/withdrawn etc. */
.fo-chip.is-neutral { background: rgba(24, 27, 33, 0.06); color: var(--fo-ink-2); }

/* avatar variants used by the registry */
.fo-ava.is-sm { width: 24px; height: 24px; border-radius: 7px; font-size: 10.5px; }
.fo-ava.is-trailer { background: var(--fo-info-soft); color: var(--fo-info); }
.fo-ava.is-retired { background: rgba(24, 27, 33, 0.06); color: var(--fo-ink-3); }
.fo-ava.is-trailer > svg.fo-i, .fo-ava.is-retired > svg.fo-i { width: 17px; height: 17px; }

/* table cells */
.fo-fr-unit { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; font-weight: 600; color: var(--fo-ink-2); }
.fo-fr-asset { display: flex; align-items: center; gap: 11px; }
.fo-fr-asset-id { min-width: 0; }
.fo-fr-asset-name { display: block; font-size: 13px; font-weight: 650; color: var(--fo-ink); text-decoration: none; }
.fo-fr-asset-name:hover { color: var(--fo-accent); }
.fo-fr-asset-sub { display: block; font-size: 11px; color: var(--fo-ink-3); margin-top: 1px; }
.fo-fr-assignee { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--fo-ink-2); }
.fo-fr-muted { color: var(--fo-ink-3); }
.fo-fr-late { color: var(--fo-danger); font-weight: 600; }
.fo-fr-od { margin-left: 4px; }
.fo-fr-table th.act, .fo-fr-table td.act { width: 48px; text-align: right; }
.fo-fr-emptyrow td { padding: 0; }
.fo-fr-emptyrow .fo-empty { padding: 40px 20px; }

@media (max-width: 620px) {
  .fo-fr-search { flex-basis: 100%; min-width: 0; }
  .fo-fr-count { margin-left: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════
   ENGAGEMENT · NEW SESSION — the 1:1 / coaching log form.  (?v=176)
   Styleguide: /styleguide/engagement-create. Reuses .fo-card/.fo-field/
   .fo-label/.fo-input/.fo-select/.fo-btn/.fo-ava/.fo-chip.
   ═══════════════════════════════════════════════════════════════════════ */
/* shared: textareas adopt the input skin */
textarea.fo-input { min-height: 84px; resize: vertical; line-height: 1.55; padding-top: 9px; }
.fo-input.is-sm { padding: 8px 11px; font-size: 13px; }

.fo-eng { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.fo-eng-recur { display: flex; align-items: center; gap: 12px; padding: 13px 16px; background: var(--fo-accent-soft); border-radius: var(--fo-r-md); font-size: 13px; color: var(--fo-accent-deep); }
.fo-eng-recur svg.fo-i { width: 17px; height: 17px; color: var(--fo-accent); flex: none; }
.fo-eng-recur div { flex: 1; }
.fo-eng-recur strong { font-weight: 700; }
.fo-eng-sec-head { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 700; color: var(--fo-ink); margin-bottom: 16px; }
.fo-eng-sec-head svg.fo-i { width: 17px; height: 17px; color: var(--fo-accent); }
.fo-eng-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fo-eng-req { color: var(--fo-danger); font-weight: 700; }
.fo-eng-opt { font-size: 10.5px; font-weight: 600; color: var(--fo-ink-3); text-transform: uppercase; letter-spacing: 0.04em; }
.fo-eng-hint { font-size: 12px; color: var(--fo-ink-3); margin: 0 0 7px; }
.fo-eng-more { font-size: 12px; color: var(--fo-ink-3); margin-top: 12px; }

/* employee chips + search */
.fo-eng-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 12px; }
.fo-eng-chip { display: flex; align-items: center; gap: 9px; padding: 8px 10px 8px 9px; border: 1px solid var(--fo-line); border-radius: 999px; background: var(--fo-surface); }
.fo-eng-chip.is-primary { border-color: var(--fo-accent); background: var(--fo-accent-soft); }
.fo-eng-chip-info { min-width: 0; }
.fo-eng-chip-name { display: block; font-size: 12.5px; font-weight: 650; color: var(--fo-ink); }
.fo-eng-primary { font-size: 8.5px; font-weight: 800; letter-spacing: 0.07em; color: #fff; background: var(--fo-accent); padding: 1px 6px; border-radius: 999px; vertical-align: middle; margin-left: 3px; }
.fo-eng-chip-meta { display: block; font-size: 10.5px; color: var(--fo-ink-3); }
.fo-eng-chip-x { border: none; background: transparent; color: var(--fo-ink-3); cursor: pointer; display: grid; place-items: center; padding: 2px; border-radius: 6px; }
.fo-eng-chip-x:hover { background: rgba(24,27,33,0.06); color: var(--fo-ink); }
.fo-eng-chip-x svg.fo-i { width: 13px; height: 13px; }
.fo-eng-search { position: relative; display: flex; align-items: center; gap: 9px; border: 1px solid var(--fo-line-strong); border-radius: var(--fo-r-md); padding: 0 12px; }
.fo-eng-search > svg.fo-i { width: 16px; height: 16px; color: var(--fo-ink-3); flex: none; }
.fo-eng-search .fo-input { border: none; box-shadow: none; padding: 11px 0; background: transparent; }
.fo-eng-search .fo-input:focus { box-shadow: none; }
.fo-eng-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20; background: var(--fo-surface); border: 1px solid var(--fo-line-strong); border-radius: var(--fo-r-md); box-shadow: var(--fo-shadow-2); padding: 5px; display: none; }
.fo-eng-results.is-open { display: block; }
.fo-eng-result { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 10px; border: none; background: transparent; border-radius: 9px; cursor: pointer; }
.fo-eng-result:hover { background: var(--fo-canvas); }

/* performance points */
.fo-eng-pts-hint { font-size: 12.5px; color: var(--fo-ink-2); line-height: 1.5; margin: 0 0 14px; }
.fo-eng-pts { display: flex; flex-direction: column; gap: 12px; }
.fo-eng-pt { display: grid; grid-template-columns: 180px minmax(0, 1fr) 200px; gap: 14px; align-items: center; }
.fo-eng-pt-lbl { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; color: var(--fo-ink); }
.fo-eng-pt-lbl svg.fo-i { width: 15px; height: 15px; color: var(--fo-ink-3); }
.fo-eng-pt-slide { display: flex; align-items: center; gap: 12px; }
.fo-eng-range { flex: 1; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--fo-danger-soft), var(--fo-line) 50%, var(--fo-ok-soft)); cursor: pointer; }
.fo-eng-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 999px; background: var(--fo-surface); border: 2px solid var(--fo-accent); box-shadow: var(--fo-shadow-1); cursor: grab; }
.fo-eng-range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 999px; background: var(--fo-surface); border: 2px solid var(--fo-accent); box-shadow: var(--fo-shadow-1); cursor: grab; }
.fo-eng-pt-val { flex: none; min-width: 30px; text-align: center; font-family: var(--fo-font-display); font-size: 16px; font-weight: 750; font-variant-numeric: tabular-nums; }
.fo-eng-pt-val.is-pos { color: var(--fo-ok); }
.fo-eng-pt-val.is-neg { color: var(--fo-danger); }
.fo-eng-pt-val.is-zero { color: var(--fo-ink-3); }
.fo-eng-pt-note { margin: 0; }

/* topics */
.fo-eng-topics { display: flex; flex-wrap: wrap; gap: 8px; }
.fo-eng-topic { display: inline-flex; align-items: center; }
.fo-eng-topic input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fo-eng-topic span { display: inline-block; padding: 7px 14px; font-size: 12.5px; font-weight: 600; border-radius: 999px; border: 1px solid var(--fo-line); background: var(--fo-surface); color: var(--fo-ink-2); cursor: pointer; transition: all var(--fo-fast) var(--fo-ease); }
.fo-eng-topic:hover span { border-color: var(--fo-line-strong); }
.fo-eng-topic input:checked ~ span { background: var(--fo-accent-soft); border-color: transparent; color: var(--fo-accent); }
.fo-eng-topic input:focus-visible ~ span { box-shadow: 0 0 0 3px var(--fo-accent-soft); }

/* sentiment scale */
.fo-eng-sent { display: flex; flex-wrap: wrap; gap: 8px; }
.fo-eng-sent-opt { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; font-size: 12.5px; font-weight: 600; border-radius: 999px; border: 1px solid var(--fo-line); background: var(--fo-surface); color: var(--fo-ink-2); cursor: pointer; transition: all var(--fo-fast) var(--fo-ease); }
.fo-eng-sent-opt:hover { border-color: var(--fo-line-strong); }
.fo-eng-sent-opt .dot { width: 9px; height: 9px; border-radius: 999px; flex: none; }
.fo-eng-sent-opt.is-active { border-color: var(--fo-accent); background: var(--fo-accent-soft); color: var(--fo-accent-deep); }

/* indicator pills */
.fo-eng-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.fo-eng-pills button { padding: 7px 13px; font-size: 12.5px; font-weight: 600; border-radius: 9px; border: 1px solid var(--fo-line); background: var(--fo-surface); color: var(--fo-ink-2); cursor: pointer; transition: all var(--fo-fast) var(--fo-ease); }
.fo-eng-pills button:hover { border-color: var(--fo-line-strong); }
.fo-eng-pills button.is-active { background: var(--fo-accent-soft); border-color: transparent; color: var(--fo-accent); }
.fo-eng-stay { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 12.5px; color: var(--fo-ink-2); cursor: pointer; }
.fo-eng-stay input { width: 16px; height: 16px; accent-color: var(--fo-accent); }

/* action items */
.fo-eng-ai { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.fo-eng-ai-row { display: flex; align-items: center; gap: 9px; }
.fo-eng-ai-grip { color: var(--fo-ink-3); display: grid; place-items: center; cursor: grab; flex: none; }
.fo-eng-ai-grip svg.fo-i { width: 15px; height: 15px; }
.fo-eng-ai-row .fo-input { flex: 1; }
.fo-eng-ai-due { flex: none !important; width: 150px; }
.fo-eng-ai-x { border: none; background: transparent; color: var(--fo-ink-3); cursor: pointer; display: grid; place-items: center; padding: 6px; border-radius: 7px; flex: none; }
.fo-eng-ai-x:hover { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-eng-ai-x svg.fo-i { width: 15px; height: 15px; }
.fo-eng-ai-add { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; font-size: 12.5px; font-weight: 600; border: 1px dashed var(--fo-line-strong); border-radius: var(--fo-r-md); background: transparent; color: var(--fo-accent); cursor: pointer; transition: all var(--fo-fast) var(--fo-ease); }
.fo-eng-ai-add:hover { border-color: var(--fo-accent); background: var(--fo-accent-soft); }
.fo-eng-ai-add svg.fo-i { width: 14px; height: 14px; }

/* save bar */
.fo-eng-savebar { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px; padding: 14px 0; background: linear-gradient(180deg, rgba(246,246,244,0), var(--fo-canvas) 36%); }

@media (max-width: 680px) {
  .fo-eng-grid { grid-template-columns: minmax(0, 1fr); }
  .fo-eng-pt { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .fo-eng-pt-note { grid-column: 1; }
  .fo-eng-ai-due { width: 130px; }
}

/* ═══ Multi-select search combobox (shared) — pick people by name or number ═══ */
.fo-mcombo { position: relative; }
.fo-mcombo-field { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 44px; padding: 6px 11px; border: 1px solid var(--fo-line-strong); border-radius: var(--fo-r-md); background: var(--fo-surface); cursor: text; transition: border-color var(--fo-fast) var(--fo-ease), box-shadow var(--fo-fast) var(--fo-ease); }
.fo-mcombo-field:focus-within { border-color: var(--fo-accent); box-shadow: 0 0 0 3px var(--fo-accent-soft); }
.fo-mcombo-search { width: 16px; height: 16px; color: var(--fo-ink-3); flex: none; }
.fo-mcombo-input { flex: 1; min-width: 130px; border: none; outline: none; background: transparent; font: inherit; font-size: 13.5px; color: var(--fo-ink); padding: 5px 2px; }
.fo-mcombo-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 7px 4px 5px; background: var(--fo-accent-soft); color: var(--fo-accent-deep); border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.fo-mcombo-chip-ava { width: 20px; height: 20px; border-radius: 999px; background: var(--fo-accent); color: #fff; font-size: 9px; font-weight: 700; display: grid; place-items: center; flex: none; }
.fo-mcombo-chip-x { border: none; background: transparent; color: var(--fo-accent); cursor: pointer; display: grid; place-items: center; padding: 0; opacity: 0.65; }
.fo-mcombo-chip-x:hover { opacity: 1; }
.fo-mcombo-chip-x svg.fo-i { width: 12px; height: 12px; }
.fo-mcombo-pop { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40; background: var(--fo-surface); border: 1px solid var(--fo-line-strong); border-radius: var(--fo-r-md); box-shadow: var(--fo-shadow-2); padding: 5px; display: none; max-height: 288px; overflow: auto; }
.fo-mcombo-pop.is-open { display: block; }
.fo-mcombo-opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 9px; border: none; background: transparent; border-radius: 9px; cursor: pointer; }
.fo-mcombo-opt.is-hi, .fo-mcombo-opt:hover { background: var(--fo-canvas); }
.fo-mcombo-opt-main { flex: 1; min-width: 0; }
.fo-mcombo-opt-main .nm { display: block; font-size: 13px; font-weight: 600; color: var(--fo-ink); }
.fo-mcombo-opt-main .mt { display: block; font-size: 11.5px; color: var(--fo-ink-3); }
.fo-mcombo-opt-id { font-size: 12px; font-weight: 600; color: var(--fo-ink-3); font-variant-numeric: tabular-nums; flex: none; }
.fo-mcombo-empty { padding: 12px 10px; font-size: 12.5px; color: var(--fo-ink-3); }

/* ── engagement: drawer-based new session (v3 rethink) ── */
.fo-eng-recent { max-width: 560px; }
.fo-eng-recent-head { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fo-ink-3); margin-bottom: 10px; }
.fo-eng-recent-row { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 9px 10px; border: none; background: transparent; border-radius: 10px; cursor: pointer; transition: background var(--fo-fast) var(--fo-ease); }
.fo-eng-recent-row:hover { background: var(--fo-canvas); }
.fo-eng-recent-main { flex: 1; min-width: 0; }
.fo-eng-recent-main .nm { display: block; font-size: 13px; font-weight: 650; color: var(--fo-ink); }
.fo-eng-recent-main .mt { display: block; font-size: 11.5px; color: var(--fo-ink-3); margin-top: 1px; }
.fo-eng-sent-dot { width: 9px; height: 9px; border-radius: 999px; flex: none; }
.fo-eng-recent-tone { font-size: 11.5px; font-weight: 600; color: var(--fo-ink-3); width: 58px; }

/* the recur note sits at the top of the drawer body */
.fo-drawer .fo-eng-recur { margin-bottom: 4px; }
.fo-dsec.is-first { border-top: none; padding-top: 2px; }

/* disclosure — the depth, one tap away */
.fo-eng-disc { display: flex; align-items: center; gap: 9px; width: 100%; padding: 12px 15px; margin-top: 18px; font-size: 13px; font-weight: 650; color: var(--fo-accent); background: var(--fo-accent-soft); border: none; border-radius: var(--fo-r-md); cursor: pointer; transition: background var(--fo-fast) var(--fo-ease); }
.fo-eng-disc:hover { background: #dde8fa; }
.fo-eng-disc.is-open { border-radius: var(--fo-r-md) var(--fo-r-md) 0 0; }
.fo-eng-disc > span { flex: 1; text-align: left; }
.fo-eng-disc svg.fo-i { width: 15px; height: 15px; }
.fo-eng-disc-chev { transition: transform var(--fo-base) var(--fo-ease); }
.fo-eng-disc.is-open .fo-eng-disc-chev { transform: rotate(180deg); }
/* the optional depth, grouped as one calm recessed block under the button */
.fo-eng-disc-body { padding: 2px 16px 16px; background: var(--fo-surface-2); border: 1px solid var(--fo-line); border-top: none; border-radius: 0 0 var(--fo-r-md) var(--fo-r-md); animation: fo-rep-subf-in var(--fo-base) var(--fo-ease) both; }
.fo-eng-disc-body .fo-dsec { padding: 18px 0; }
.fo-eng-disc-body .fo-dsec:first-child { border-top: none; padding-top: 14px; }
.fo-eng-disc-body .fo-dsec-title { margin-bottom: 14px; }

/* reused controls, sized for the 600px drawer (no note column here) */
.fo-drawer .fo-eng-pts { gap: 16px; }
.fo-drawer .fo-eng-pt { grid-template-columns: 140px minmax(0, 1fr) 36px; gap: 14px; align-items: center; }
.fo-drawer .fo-eng-pt-slide { gap: 0; }
.fo-drawer .fo-eng-pt-val { min-width: 0; text-align: right; }
.fo-drawer .fo-eng-sent { gap: 6px; }
.fo-drawer .fo-eng-sent-opt { padding: 7px 11px; }
.fo-drawer .fo-eng-ai-due { width: 148px; }
/* controls read crisply against the recessed panel */
.fo-eng-disc-body .fo-eng-topic span, .fo-eng-disc-body .fo-eng-pills button { background: var(--fo-surface); }
/* optional conversation notes — stack narrow, two-up when expanded wide */
.fo-eng-notes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 13px; }
.fo-eng-notes textarea.fo-input { min-height: 64px; }
.fo-eng-notes-full { grid-column: 1 / -1; }
.fo-drawer.is-wide .fo-eng-notes { grid-template-columns: 1fr 1fr; }
.fo-drawer.is-wide .fo-eng-pts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 30px; }

/* ═══════════════════════════════════════════════════════════════════════
   PULSE — "moments to celebrate" agenda (v3 rethink, not a calendar grid).
   Styleguide: /styleguide/pulse-calendar.  (?v=178)
   A calm single-column feed grouped by time. Birthdays / anniversaries /
   milestones / new hires, each a person moment with a gentle action.
   ═══════════════════════════════════════════════════════════════════════ */
.ev-mile { --ev: #a16207; --ev-bg: #faf3e3; }            /* milestone — amber (completes the calendar ev-* set) */

/* The Celebrations views sit on the Report-Center surface recipe (user
   directive 2026-07-07: "background inside the box same as /reports/") —
   canvas wash + hairline + xl radius, so the white row/day cards read
   against it. The `border`/`padding`/`flex` here also neutralize the
   employee-drawer "pulse strip" further up this file, which shares the
   .fo-pulse class (its leaked border-left drew a stray full-height line). */
.fo-pulse {
  max-width: 1180px; margin: 0 auto; flex: none;
  background: var(--fo-canvas);
  border: 1px solid var(--fo-line);
  border-radius: var(--fo-r-xl);
  padding: 22px;
}
.fo-pulse-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.fo-pulse-spacer { flex: 1; }
/* the reading lists stay a comfortable width and centre; the calendar fills the page */
.fo-pulse-panel[data-panel="up"] { max-width: 900px; margin: 0 auto; }
.fo-pulse-summary { font-size: 14.5px; color: var(--fo-ink-2); margin-bottom: 22px; }
.fo-pulse-summary strong { color: var(--fo-ink); font-weight: 700; }
.fo-pulse-today { color: var(--fo-accent); font-weight: 650; }
.fo-pulse-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.fo-pulse-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; border-radius: 999px; border: 1px solid var(--fo-line); background: var(--fo-surface); color: var(--fo-ink-2); cursor: pointer; transition: all var(--fo-fast) var(--fo-ease); }
.fo-pulse-chip:hover { border-color: var(--fo-line-strong); }
.fo-pulse-chip.is-active { background: var(--fo-accent-soft); border-color: transparent; color: var(--fo-accent); }
.fo-pulse-chip .dot { width: 8px; height: 8px; border-radius: 999px; flex: none; }
.fo-pulse-chip .dot.is-bday { background: #7a5ea8; }
.fo-pulse-chip .dot.is-anni { background: var(--fo-accent); }
.fo-pulse-chip .dot.is-mile { background: var(--fo-warn); }
.fo-pulse-chip .dot.is-newh { background: var(--fo-ok); }

/* calm toolbar — Filters collapse into one button + a popover; active filters
   surface as small removable chips so the bar never crowds */
.fo-pulse-filtwrap { position: relative; }
.fo-pulse-filtbadge { margin-left: 6px; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px; background: var(--fo-accent); color: #fff; font-size: 10.5px; font-weight: 700; display: inline-grid; place-items: center; }
.fo-pulse-filtbadge[hidden] { display: none; }
.fo-pulse-filtpop { position: absolute; top: calc(100% + 7px); right: 0; width: 280px; z-index: 40; background: var(--fo-surface); border: 1px solid var(--fo-line-strong); border-radius: var(--fo-r-md); box-shadow: var(--fo-shadow-2); padding: 15px; }
.fo-pulse-filtpop-lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fo-ink-3); margin: 0 0 9px; }
.fo-pulse-filtpop .fo-pulse-filters { margin-bottom: 15px; }
.fo-pulse-filtpop .fo-select { width: 100%; margin-bottom: 15px; }
.fo-pulse-filtreset { width: 100%; padding: 8px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--fo-line); border-radius: 9px; background: var(--fo-surface); color: var(--fo-ink-2); cursor: pointer; transition: all var(--fo-fast) var(--fo-ease); }
.fo-pulse-filtreset:hover { border-color: var(--fo-line-strong); color: var(--fo-ink); }
.fo-pulse-active { display: flex; flex-wrap: wrap; gap: 7px; }
.fo-pulse-activechip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; font-size: 12px; font-weight: 600; border-radius: 999px; border: none; background: var(--fo-accent-soft); color: var(--fo-accent-deep); cursor: pointer; }
.fo-pulse-activechip .dot { width: 8px; height: 8px; border-radius: 999px; flex: none; }
.fo-pulse-activechip .dot.is-bday { background: #7a5ea8; }
.fo-pulse-activechip .dot.is-anni { background: var(--fo-accent); }
.fo-pulse-activechip .dot.is-mile { background: var(--fo-warn); }
.fo-pulse-activechip .dot.is-newh { background: var(--fo-ok); }
.fo-pulse-activechip svg.fo-i { width: 12px; height: 12px; }
.fo-pulse-activechip svg.fo-i:last-child { opacity: 0.65; }
.fo-pulse-activechip:hover svg.fo-i:last-child { opacity: 1; }

.fo-pulse-group { margin-bottom: 26px; }
.fo-pulse-grouphead { display: flex; align-items: baseline; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fo-ink-3); margin-bottom: 11px; }
.fo-pulse-grouphead span { font-weight: 500; letter-spacing: 0; text-transform: none; font-size: 12px; }

/* a single moment */
.fo-pm { display: flex; align-items: center; gap: 15px; padding: 15px 18px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); background: var(--fo-surface); margin-bottom: 9px; transition: transform var(--fo-fast) var(--fo-ease), box-shadow var(--fo-fast) var(--fo-ease), border-color var(--fo-fast) var(--fo-ease); }
.fo-pm:hover { transform: translateY(-1px); box-shadow: var(--fo-shadow-1); border-color: var(--fo-line-strong); }
.fo-pm.is-today { background: var(--fo-accent-soft); border-color: transparent; }
.fo-pm-ava { flex: none; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 15px; font-weight: 750; }
.fo-pm-ava.is-bday { background: #f1ecf8; color: #7a5ea8; }
.fo-pm-ava.is-anni { background: var(--fo-accent-soft); color: var(--fo-accent); }
.fo-pm-ava.is-mile { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-pm-ava.is-newh { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-pm-body { flex: 1; min-width: 0; }
.fo-pm-name { font-size: 15px; font-weight: 700; color: var(--fo-ink); }
.fo-pm-kind { font-size: 12px; font-weight: 600; color: var(--fo-ink-3); margin-left: 5px; }
.fo-pm-meta { font-size: 12.5px; color: var(--fo-ink-2); margin-top: 2px; }
.fo-pm-when { flex: none; font-size: 12px; font-weight: 650; color: var(--fo-ink-3); font-variant-numeric: tabular-nums; }
.fo-pm-act { flex: none; padding: 7px 14px; font-size: 12.5px; font-weight: 600; border-radius: 9px; border: 1px solid var(--fo-line-strong); background: var(--fo-surface); color: var(--fo-ink-2); cursor: pointer; transition: all var(--fo-fast) var(--fo-ease); }
.fo-pm-act:hover { border-color: var(--fo-accent); color: var(--fo-accent); background: var(--fo-surface); }
.fo-pm.is-today .fo-pm-act { background: var(--fo-surface); }

.fo-pulse-empty { text-align: center; padding: 48px 20px; }
.fo-pulse-empty svg.fo-i { width: 26px; height: 26px; color: var(--fo-ink-3); opacity: 0.55; margin: 0 auto 10px; display: block; }
.fo-pulse-note { display: flex; align-items: flex-start; gap: 9px; margin: 22px 0 0; font-size: 12.5px; color: var(--fo-ink-3); line-height: 1.55; }
.fo-pulse-note svg.fo-i { width: 15px; height: 15px; color: var(--fo-accent); flex: none; margin-top: 1px; }

.fo-pm { cursor: pointer; }
.fo-pulse-sitefilter { min-width: 148px; }

/* calendar view */
.fo-pulse-calhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.fo-pulse-calhead h3 { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; color: var(--fo-ink); }
.fo-pulse-nav { display: flex; gap: 6px; }
button.fo-cl-event { border: 0; border-left: 3px solid var(--ev); font-family: inherit; text-align: left; cursor: pointer; }

/* bigger calendar inside Pulse — fills the page, far more legible (scoped, so the
   shared /styleguide/calendar component is untouched) */
.fo-pulse-panel[data-panel="cal"] .fo-pulse-calhead h3 { font-size: 19px; }
.fo-pulse-panel[data-panel="cal"] .fo-cl-dow span { font-size: 12px; padding: 0 12px 11px; }
.fo-pulse-panel[data-panel="cal"] .fo-cl-day { min-height: 118px; padding: 9px 10px 10px; gap: 4px; }
.fo-pulse-panel[data-panel="cal"] .fo-cl-daynum { font-size: 14px; width: 27px; height: 27px; }
.fo-pulse-panel[data-panel="cal"] .fo-cl-event { font-size: 12px; padding: 3px 9px 3px 8px; border-radius: 7px; gap: 6px; }

/* week-strip — compact, elegant (this week + the next two) */
#pulseWeeks .fo-card.is-pad { padding: 14px 16px 16px; margin-bottom: 12px; border-radius: var(--fo-r-lg); }
#pulseWeeks .fo-scr-sec-head { margin-bottom: 10px; }
#pulseWeeks .fo-cl-dow span { padding: 0 8px 8px; font-size: 10.5px; }
#pulseWeeks .fo-cl-day { min-height: 74px; padding: 7px 8px; gap: 3px; }
#pulseWeeks .fo-cl-daynum { font-size: 12px; width: 22px; height: 22px; }
#pulseWeeks .fo-cl-event { font-size: 11px; }

/* by-site view */
.fo-pulse-panel[data-panel="site"] #pulseSites { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; align-items: start; }
.fo-pulse-panel[data-panel="site"] .fo-pulse-sitecard { margin-bottom: 0; }
.fo-pulse-sitecard { border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); padding: 16px 18px; margin-bottom: 12px; background: var(--fo-surface); box-shadow: var(--fo-shadow-1); }
.fo-pulse-sitehead { display: flex; align-items: center; gap: 10px; margin-bottom: 3px; }
.fo-pulse-sitehead svg.fo-i { width: 16px; height: 16px; color: var(--fo-accent); flex: none; }
.fo-pulse-sitehead-id { flex: 1; min-width: 0; }
.fo-pulse-sitehead-id .nm { font-size: 14.5px; font-weight: 700; color: var(--fo-ink); }
.fo-pulse-sitehead-id .num { font-size: 11.5px; font-weight: 600; color: var(--fo-ink-3); margin-left: 8px; }
.fo-pulse-sitecount { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--fo-accent-soft); color: var(--fo-accent); font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.fo-pulse-sitesummary { font-size: 12px; color: var(--fo-ink-3); margin-bottom: 12px; }
.fo-pulse-siterow { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 9px 11px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); background: var(--fo-surface); cursor: pointer; margin-bottom: 7px; transition: border-color var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease); }
.fo-pulse-siterow:hover { border-color: var(--fo-line-strong); background: var(--fo-canvas); }
.fo-pulse-siterow .fo-pm-ava { width: 34px; height: 34px; border-radius: 10px; font-size: 12px; }
.fo-pulse-siterow-main { flex: 1; min-width: 0; }
.fo-pulse-siterow-main .nm { display: block; font-size: 13px; font-weight: 650; color: var(--fo-ink); }
.fo-pulse-siterow-main .mt { display: block; font-size: 11.5px; color: var(--fo-ink-3); margin-top: 1px; }
.fo-pulse-ship { display: inline-flex; align-items: center; gap: 7px; margin-top: 7px; padding: 8px 14px; font-size: 12.5px; font-weight: 600; border: 1px dashed var(--fo-line-strong); border-radius: 9px; background: transparent; color: var(--fo-accent); cursor: pointer; transition: all var(--fo-fast) var(--fo-ease); }
.fo-pulse-ship:hover { border-color: var(--fo-accent); background: var(--fo-accent-soft); }
.fo-pulse-ship svg.fo-i { width: 14px; height: 14px; }

/* peek drawer */
.fo-pulse-peekhero { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.fo-pulse-peekhero .fo-pm-ava { width: 52px; height: 52px; border-radius: 15px; font-size: 18px; }
.fo-pulse-peekmoment { font-size: 15px; font-weight: 700; color: var(--fo-ink); }
.fo-pulse-facts { display: flex; flex-direction: column; }
.fo-pulse-fact { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--fo-line); font-size: 13px; }
.fo-pulse-fact:last-child { border-bottom: none; }
.fo-pulse-fact span { color: var(--fo-ink-3); flex: none; }
.fo-pulse-fact b { color: var(--fo-ink); font-weight: 650; text-align: right; }
.fo-pulse-mini-list { display: flex; flex-direction: column; gap: 4px; }
.fo-pulse-mini { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 9px; border: none; background: transparent; border-radius: 9px; cursor: pointer; transition: background var(--fo-fast) var(--fo-ease); }
.fo-pulse-mini:hover { background: var(--fo-canvas); }
.fo-pulse-mini .fo-pm-ava { width: 30px; height: 30px; border-radius: 8px; font-size: 11px; }
.fo-pulse-mini-main { flex: 1; min-width: 0; }
.fo-pulse-mini-main .nm { display: block; font-size: 12.5px; font-weight: 650; color: var(--fo-ink); }
.fo-pulse-mini-main .mt { display: block; font-size: 11px; color: var(--fo-ink-3); margin-top: 1px; }
.fo-pulse-mini-when { font-size: 11.5px; font-weight: 600; color: var(--fo-ink-3); flex: none; }
.fo-pulse-mini-empty { font-size: 12.5px; color: var(--fo-ink-3); font-style: italic; padding: 4px 9px; }
/* peek as a top drawer — two calm columns */
.fo-pulse-peektop { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.fo-pulse-peektop .fo-pulse-peekhero { margin-bottom: 0; }
.fo-pulse-peektop .fo-btn { flex: none; }
.fo-pulse-peekacts { display: flex; gap: 10px; flex: none; }
.fo-pulse-peekgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
@media (max-width: 620px) {
  .fo-pulse { padding: 15px; }   /* the fo-rep-surface mobile inset */
  .fo-pulse-peekgrid { grid-template-columns: minmax(0, 1fr); }
  .fo-pulse-peektop { flex-direction: column; align-items: stretch; }
  .fo-pulse-peektop .fo-btn { width: 100%; justify-content: center; }
  .fo-pulse-peekacts { flex-direction: column; width: 100%; }
}

@media (max-width: 560px) {
  .fo-pm { flex-wrap: wrap; }
  .fo-pm-body { flex-basis: calc(100% - 56px); }
  .fo-pm-when { margin-left: 56px; }
  .fo-pm-act { margin-left: auto; }
}

/* ═══════════════════════════════════════════════════════════════════════
   ENGAGEMENT · SCORES & TRENDS — read-side of the 8 performance dimensions.
   Styleguide: /styleguide/engagement-scores.  (?v=181)
   ═══════════════════════════════════════════════════════════════════════ */
.fo-scr { max-width: 1120px; }
.fo-scr-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.fo-scr-who { display: flex; align-items: center; gap: 12px; }
.fo-scr-who-id .nm { font-size: 15px; font-weight: 700; color: var(--fo-ink); }
.fo-scr-who-id .mt { font-size: 12px; color: var(--fo-ink-3); }
.fo-scr-kpis { margin-bottom: 22px; }
.fo-scr-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.fo-scr-dim { background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); box-shadow: var(--fo-shadow-1); padding: 14px 15px; }
.fo-scr-dim-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.fo-scr-dim-ic { width: 28px; height: 28px; border-radius: 8px; background: var(--fo-accent-soft); color: var(--fo-accent); display: grid; place-items: center; flex: none; }
.fo-scr-dim-ic svg.fo-i { width: 15px; height: 15px; }
.fo-scr-dim-name { font-size: 13px; font-weight: 650; color: var(--fo-ink); }
.fo-scr-dim-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fo-scr-dim-val { font-family: var(--fo-font-display); font-size: 26px; font-weight: 780; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.fo-scr-dim-val.is-pos { color: var(--fo-ok); }
.fo-scr-dim-val.is-neg { color: var(--fo-danger); }
.fo-scr-dim-val.is-zero { color: var(--fo-ink-3); }
.fo-scr-spark { width: 96px; height: 30px; flex: none; }
.fo-scr-spark .zero { stroke: var(--fo-line-strong); stroke-width: 1; stroke-dasharray: 2 2; }
.fo-scr-dim-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--fo-line); }
.fo-scr-trend { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; }
.fo-scr-trend svg.fo-i { width: 13px; height: 13px; }
.fo-scr-trend.is-up { color: var(--fo-ok); }
.fo-scr-trend.is-down { color: var(--fo-danger); }
.fo-scr-trend.is-flat { color: var(--fo-ink-3); font-weight: 600; }
.fo-scr-dim-window { font-size: 11px; color: var(--fo-ink-3); }
.fo-scr-lower { align-items: start; }
.fo-scr-sec-head { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--fo-ink); margin-bottom: 16px; }
.fo-scr-sec-head svg.fo-i { width: 16px; height: 16px; color: var(--fo-accent); }
.fo-scr-sentsvg { width: 100%; height: auto; }
.fo-scr-sent-x { font-size: 9px; fill: var(--fo-ink-3); text-anchor: middle; font-family: var(--fo-font); }
.fo-scr-sent-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; font-size: 11.5px; color: var(--fo-ink-2); }
.fo-scr-sent-legend span { display: inline-flex; align-items: center; gap: 5px; }
.fo-scr-sent-legend i { width: 9px; height: 9px; border-radius: 999px; }
.fo-scr-sessions { display: flex; flex-direction: column; gap: 4px; }
.fo-scr-session { display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; padding: 10px; border: none; background: transparent; border-radius: 10px; cursor: pointer; transition: background var(--fo-fast) var(--fo-ease); }
.fo-scr-session:hover { background: var(--fo-canvas); }
.fo-scr-session .fo-eng-sent-dot { margin-top: 5px; }
.fo-scr-session-main { min-width: 0; }
.fo-scr-session-main .nm { display: block; font-size: 12.5px; font-weight: 650; color: var(--fo-ink); }
.fo-scr-session-main .mt { display: block; font-size: 11.5px; color: var(--fo-ink-2); line-height: 1.45; margin-top: 2px; }
@media (max-width: 1080px) { .fo-scr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .fo-scr-grid { grid-template-columns: minmax(0, 1fr); } }

/* session export — printable doc body (reuses the .fo-rep-* letterhead frame) */
.fo-ses-doc { max-width: 880px; }
.fo-ses-sec { margin: 22px 0; }
.fo-ses-sec-head { font-size: 13px; font-weight: 700; letter-spacing: -0.01em; color: var(--fo-ink); padding-bottom: 7px; border-bottom: 1px solid var(--fo-line); margin-bottom: 13px; }
.fo-ses-body { font-size: 13px; line-height: 1.6; color: var(--fo-ink-2); margin: 0; }
.fo-ses-scores { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.fo-ses-score { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 13px; background: var(--fo-surface-2); border: 1px solid var(--fo-line); border-radius: 9px; }
.fo-ses-score .nm { font-size: 12px; font-weight: 600; color: var(--fo-ink-2); }
.fo-ses-score .v { font-family: var(--fo-font-display); font-size: 17px; font-weight: 750; font-variant-numeric: tabular-nums; }
.fo-ses-score .v.is-pos { color: var(--fo-ok); }
.fo-ses-score .v.is-neg { color: var(--fo-danger); }
.fo-ses-score .v.is-zero { color: var(--fo-ink-3); }
.fo-ses-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; }
.fo-ses-note .lbl { font-size: 10px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fo-ink-3); margin-bottom: 5px; }
.fo-ses-note .txt { font-size: 12.5px; line-height: 1.55; color: var(--fo-ink-2); }
.fo-ses-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.fo-ses-follow { font-size: 12.5px; color: var(--fo-ink-2); line-height: 1.65; }
.fo-ses-follow b { color: var(--fo-ink); font-weight: 650; }
@media (max-width: 720px) {
  .fo-ses-scores { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fo-ses-notes { grid-template-columns: minmax(0, 1fr); }
}

/* ════════════════════════════════════════════════════════════════════
   Engagement · Sessions, Session record & Team tracker
   ════════════════════════════════════════════════════════════════════ */

/* shared sentiment pill (5-level scale: dot + label) */
.fo-sent-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--fo-ink-2); white-space: nowrap; }
.fo-sent-pill i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.fo-sent-pill.is-none { color: var(--fo-ink-3); }
.fo-sent-pill.is-lg { font-size: 13.5px; font-weight: 650; color: var(--fo-ink); padding: 5px 12px 5px 10px; background: var(--fo-surface-2); border: 1px solid var(--fo-line); border-radius: 999px; }
.fo-sent-pill.is-lg i { width: 9px; height: 9px; }

/* a muted, archival chip (Closed sessions) */
.fo-chip.is-quiet { background: transparent; color: var(--fo-ink-3); border: 1px solid var(--fo-line); }

/* ── Sessions list (recorded sessions console) ── */
.fo-ses-kpis { margin-bottom: 22px; }
.fo-ses-card { margin-bottom: 4px; }
.fo-ses-toolbar, .fo-trk-toolbar { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--fo-line); flex-wrap: wrap; }
.fo-ses-toolbar > .fo-flex, .fo-trk-toolbar > .fo-flex { margin-left: auto; gap: 8px; }
.fo-ses-toolbar .fo-seg.is-sm, .fo-trk-toolbar .fo-seg.is-sm { flex-wrap: wrap; }
.fo-ses-filtbadge, .fo-pulse-filtbadge { display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; margin-left: 2px; border-radius: 8px; background: var(--fo-accent); color: #fff; font-size: 10.5px; font-weight: 700; }
.fo-ses-filtbadge[hidden] { display: none; }
.fo-ses-filtreset { border: 0; background: none; font: inherit; font-size: 12px; font-weight: 600; color: var(--fo-accent); cursor: pointer; padding: 0; }
.fo-ses-table { width: 100%; }
.fo-ses-table th, .fo-ses-table td { vertical-align: middle; }
.fo-ses-table th.r, .fo-ses-table td.r { text-align: right; }
.fo-ses-no { font-family: var(--fo-font-mono, ui-monospace, monospace); font-size: 12.5px; font-weight: 650; color: var(--fo-accent); text-decoration: none; display: block; }
.fo-ses-no:hover { text-decoration: underline; }
.fo-ses-type { display: block; font-size: 11px; color: var(--fo-ink-3); margin-top: 2px; }
.fo-ses-emp { display: inline-flex; align-items: center; gap: 10px; }
.fo-ses-emp-id { display: flex; flex-direction: column; line-height: 1.25; }
.fo-ses-emp-id .nm { font-size: 13px; font-weight: 650; color: var(--fo-ink); }
.fo-ses-emp-id .mt { font-size: 11.5px; color: var(--fo-ink-3); }
.fo-ses-mgr { font-size: 12.5px; color: var(--fo-ink-2); white-space: nowrap; }
.fo-ses-date { font-size: 12.5px; color: var(--fo-ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fo-ses-follow-cell { font-size: 12.5px; color: var(--fo-ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fo-ses-follow-cell.is-over { color: var(--fo-danger); font-weight: 600; }
.fo-ses-overflag { font-size: 10px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--fo-danger); }
.fo-ses-actcount { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 7px; background: var(--fo-accent-soft); color: var(--fo-accent-deep); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fo-ses-actcount.is-zero { background: transparent; color: var(--fo-ink-3); }
.fo-ses-dash { color: var(--fo-ink-3); }
.fo-ses-count { font-size: 12.5px; color: var(--fo-ink-3); margin-top: 12px; padding-left: 2px; }
.fo-ses-empty { margin: 8px; }

/* ── Session record (read view) ── */
.fo-sx-hero { display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); box-shadow: var(--fo-shadow-1); margin-bottom: 18px; }
.fo-sx-hero .fo-ava.is-lg { flex: none; }
.fo-sx-hero-id { flex: 1; min-width: 0; }
.fo-sx-hero-name { font-family: var(--fo-font-display); font-size: 20px; font-weight: 760; letter-spacing: -0.02em; color: var(--fo-ink); }
.fo-sx-hero-meta { font-size: 12.5px; color: var(--fo-ink-2); margin-top: 3px; }
.fo-sx-no { font-weight: 650; color: var(--fo-accent); }
.fo-sx-hero-badges { display: flex; align-items: center; gap: 10px; flex: none; }
.fo-sx-grid { align-items: start; }
.fo-sx-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.fo-sx-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.fo-sx-card { padding: 18px 20px; }
.fo-sx-card-head { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--fo-ink); padding-bottom: 12px; border-bottom: 1px solid var(--fo-line); margin-bottom: 14px; }
.fo-sx-card-head svg.fo-i { width: 16px; height: 16px; color: var(--fo-accent); }
.fo-sx-card-head.is-mini { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fo-ink-3); padding-bottom: 10px; margin-bottom: 12px; }
.fo-sx-card-head .fo-sx-pts-total, .fo-sx-card-head .fo-sx-side-count { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--fo-ink-3); letter-spacing: 0; text-transform: none; }
.fo-sx-card-head .fo-sx-pts-total b { color: var(--fo-ok); font-weight: 750; font-size: 14px; }
.fo-sx-summary { font-size: 14px; line-height: 1.6; color: var(--fo-ink); margin-bottom: 16px; }
.fo-sx-disc { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 28px; }
.fo-sx-disc-item .lbl { font-size: 10px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fo-ink-3); margin-bottom: 5px; }
.fo-sx-disc-item .txt { font-size: 13px; line-height: 1.55; color: var(--fo-ink-2); }
.fo-sx-pts-note { font-size: 11.5px; color: var(--fo-ink-3); margin: 14px 0 0; }
.fo-sx-points { display: flex; flex-direction: column; }
.fo-sx-pt { display: grid; grid-template-columns: 28px 124px 1fr 44px; align-items: center; gap: 12px; padding: 8px 0; }
.fo-sx-pt + .fo-sx-pt { border-top: 1px solid var(--fo-line); }
.fo-sx-pt-ic { width: 28px; height: 28px; border-radius: 8px; background: var(--fo-accent-soft); color: var(--fo-accent); display: grid; place-items: center; }
.fo-sx-pt-ic svg.fo-i { width: 15px; height: 15px; }
.fo-sx-pt-name { font-size: 13px; font-weight: 600; color: var(--fo-ink-2); }
.fo-sx-pt-bar { position: relative; height: 6px; border-radius: 3px; background: var(--fo-surface-2); border: 1px solid var(--fo-line); }
.fo-sx-pt-bar .zero { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--fo-line-strong); }
.fo-sx-pt-fill { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.fo-sx-pt-fill.is-pos { background: var(--fo-ok); }
.fo-sx-pt-fill.is-neg { background: var(--fo-danger); }
.fo-sx-pt-fill.is-zero { background: transparent; }
.fo-sx-pt-val { text-align: right; font-family: var(--fo-font-display); font-size: 15px; font-weight: 750; font-variant-numeric: tabular-nums; }
.fo-sx-pt-val.is-pos { color: var(--fo-ok); }
.fo-sx-pt-val.is-neg { color: var(--fo-danger); }
.fo-sx-pt-val.is-zero { color: var(--fo-ink-3); }
.fo-sx-facts { display: flex; flex-direction: column; }
.fo-sx-fact { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 7px 0; font-size: 13px; }
.fo-sx-fact + .fo-sx-fact { border-top: 1px solid var(--fo-line); }
.fo-sx-fact span { color: var(--fo-ink-3); }
.fo-sx-fact b { color: var(--fo-ink); font-weight: 650; text-align: right; }
.fo-sx-ind { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.fo-sx-indpill { display: inline-flex; flex-direction: column; gap: 1px; padding: 6px 11px; border-radius: 10px; background: var(--fo-surface-2); border: 1px solid var(--fo-line); font-size: 12.5px; font-weight: 650; color: var(--fo-ink); }
.fo-sx-indpill i { font-style: normal; font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fo-ink-3); }
.fo-sx-indpill.is-ok { background: var(--fo-ok-soft); border-color: transparent; color: var(--fo-ok); }
.fo-sx-indpill.is-ok i { color: var(--fo-ok); opacity: 0.8; }
.fo-sx-action { padding: 10px 0; }
.fo-sx-action + .fo-sx-action { border-top: 1px solid var(--fo-line); }
.fo-sx-action-top { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.fo-sx-action-title { font-size: 13px; font-weight: 600; color: var(--fo-ink); }
.fo-sx-action-meta { font-size: 11.5px; color: var(--fo-ink-3); margin-top: 3px; }
.fo-sx-trail { display: flex; flex-direction: column; gap: 14px; position: relative; }
.fo-sx-trailrow { display: flex; gap: 11px; font-size: 12.5px; color: var(--fo-ink-2); }
.fo-sx-trailrow .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--fo-line-strong); flex: none; margin-top: 4px; }
.fo-sx-trailrow .dot.is-ok { background: var(--fo-ok); }
.fo-sx-trailrow b { color: var(--fo-ink); font-weight: 650; }
.fo-sx-trailrow .ts { display: block; font-size: 11px; color: var(--fo-ink-3); margin-top: 2px; }
@media (max-width: 720px) { .fo-sx-disc { grid-template-columns: minmax(0, 1fr); } }

/* ── Team tracker ── */
.fo-trk-scope { display: inline-flex; align-items: center; gap: 9px; }
.fo-trk-scope svg.fo-i { width: 17px; height: 17px; color: var(--fo-ink-3); }
.fo-trk-lower { align-items: start; margin-bottom: 8px; }
.fo-trk-trend { margin: 4px 0 8px; }
.fo-trk-trend svg { width: 100%; height: auto; }
.fo-trk-sentbar { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--fo-line); }
.fo-trk-sentbar-head { display: flex; align-items: baseline; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--fo-ink-3); margin-bottom: 8px; }
.fo-trk-sentbar-enps b { color: var(--fo-ok); font-weight: 750; font-size: 13.5px; margin-left: 2px; }
.fo-trk-sentbar-track { display: flex; gap: 2px; height: 12px; border-radius: 6px; overflow: hidden; }
.fo-trk-sentseg { display: block; }
.fo-trk-sentbar-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; font-size: 11.5px; color: var(--fo-ink-2); }
.fo-trk-sentbar-legend span { display: inline-flex; align-items: center; gap: 5px; }
.fo-trk-sentbar-legend i { width: 9px; height: 9px; border-radius: 2px; }
.fo-trk-focus-sub { font-size: 12.5px; color: var(--fo-ink-2); line-height: 1.5; margin: 0 0 14px; }
.fo-trk-focus-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; }
.fo-trk-focus-item + .fo-trk-focus-item { border-top: 1px solid var(--fo-line); }
.fo-trk-focus-item .fo-scr-dim-ic { flex: none; }
.fo-trk-focus-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.fo-trk-focus-main .nm { font-size: 13.5px; font-weight: 650; color: var(--fo-ink); }
.fo-trk-focus-main .mt { font-size: 11.5px; color: var(--fo-ink-3); }
.fo-trk-focus-note { display: flex; gap: 8px; margin-top: 16px; padding: 11px 13px; background: var(--fo-surface-2); border-radius: var(--fo-r-md); font-size: 12px; line-height: 1.5; color: var(--fo-ink-2); }
.fo-trk-focus-note svg.fo-i { width: 15px; height: 15px; color: var(--fo-ink-3); flex: none; margin-top: 1px; }
.fo-trk-card { margin-bottom: 8px; }
.fo-trk-hint { font-size: 12px; color: var(--fo-ink-3); }
.fo-trk-table th.r, .fo-trk-table td.r { text-align: right; }
.fo-trk-emp { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.fo-trk-emp-id { display: flex; flex-direction: column; line-height: 1.25; }
.fo-trk-emp-id .nm { font-size: 13px; font-weight: 650; color: var(--fo-ink); }
.fo-trk-emp-id .mt { font-size: 11.5px; color: var(--fo-ink-3); }
.fo-trk-emp:hover .nm { color: var(--fo-accent); }
.fo-trk-num { font-size: 13px; color: var(--fo-ink-2); font-variant-numeric: tabular-nums; }
.fo-trk-pts, .fo-trk-delta { font-family: var(--fo-font-display); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; }
.fo-trk-pts.is-pos, .fo-trk-delta.is-pos { color: var(--fo-ok); }
.fo-trk-pts.is-neg, .fo-trk-delta.is-neg { color: var(--fo-danger); }
.fo-trk-pts.is-zero, .fo-trk-delta.is-zero { color: var(--fo-ink-3); }
.fo-trk-go { color: var(--fo-ink-3); display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; }
.fo-trk-go:hover { background: var(--fo-accent-soft); color: var(--fo-accent); }
.fo-trk-go svg.fo-i { width: 16px; height: 16px; }

/* ── Pulse gift-prep export doc ── */
.fo-pulse-giftdoc .fo-rep-doctable td { font-size: 12.5px; }
.fo-pulse-giftdoc .fo-gift-date { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--fo-ink-2); }


/* ════════════════════════════════════════════════════════════════════
   Warnings — list, record & progressive-discipline ladder
   ════════════════════════════════════════════════════════════════════ */
.fo-warn-kpis { margin-bottom: 22px; }
.fo-warn-card { margin-bottom: 4px; }
.fo-warn-cat { font-size: 12.5px; color: var(--fo-ink-2); white-space: nowrap; }

/* severity pill — level badge + name (the discipline ladder) */
.fo-wsev { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 3px; border-radius: 999px; font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.fo-wsev .lv { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; font-size: 10.5px; font-weight: 800; color: #fff; flex: none; }
.fo-wsev.is-l1 { background: rgba(24, 27, 33, 0.06); color: var(--fo-ink-2); } .fo-wsev.is-l1 .lv { background: var(--fo-ink-3); }
.fo-wsev.is-l2 { background: var(--fo-warn-soft); color: var(--fo-warn); } .fo-wsev.is-l2 .lv { background: var(--fo-warn); }
.fo-wsev.is-l3 { background: var(--fo-warn-soft); color: #8a5108; } .fo-wsev.is-l3 .lv { background: #b8740c; }
.fo-wsev.is-l4 { background: var(--fo-danger-soft); color: var(--fo-danger); } .fo-wsev.is-l4 .lv { background: var(--fo-danger); }
.fo-wsev.is-l5 { background: #7a1410; color: #fff; } .fo-wsev.is-l5 .lv { background: #fff; color: #7a1410; }

/* ladder progression dots */
.fo-wprog { display: inline-flex; align-items: center; gap: 4px; }
.fo-wprog .d { width: 8px; height: 8px; border-radius: 50%; background: var(--fo-line-strong); }
.fo-wprog .d.on { background: var(--fo-accent); }
.fo-wprog .d.on.hot { background: var(--fo-danger); }
.fo-wprog.is-lg { gap: 7px; margin: 4px 0 2px; }
.fo-wprog.is-lg .d { width: 14px; height: 14px; }

/* warning record (detail) — reuses .fo-sx-* primitives */
.fo-wd-steps { display: flex; align-items: flex-start; padding: 18px 10px 8px; margin-bottom: 18px; background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); box-shadow: var(--fo-shadow-1); }
.fo-wd-step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; }
.fo-wd-step::before { content: ''; position: absolute; top: 13px; left: -50%; width: 100%; height: 2px; background: var(--fo-line); z-index: 0; }
.fo-wd-step:first-child::before { display: none; }
.fo-wd-step.is-done::before, .fo-wd-step.is-current::before { background: var(--fo-ok); }
.fo-wd-step .dot { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; background: var(--fo-surface-2); border: 1.5px solid var(--fo-line-strong); color: var(--fo-ink-3); position: relative; z-index: 1; }
.fo-wd-step .dot svg.fo-i { width: 14px; height: 14px; }
.fo-wd-step .lbl { font-size: 11.5px; font-weight: 600; color: var(--fo-ink-3); white-space: nowrap; }
.fo-wd-step.is-done .dot { background: var(--fo-ok); border-color: var(--fo-ok); color: #fff; }
.fo-wd-step.is-done .lbl { color: var(--fo-ink-2); }
.fo-wd-step.is-current .dot { background: var(--fo-accent); border-color: var(--fo-accent); box-shadow: 0 0 0 4px var(--fo-accent-soft); }
.fo-wd-step.is-current .lbl { color: var(--fo-accent-deep); font-weight: 700; }
.fo-wd-class { display: flex; flex-direction: column; }
.fo-wd-block + .fo-wd-block { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--fo-line); }
.fo-wd-block .lbl { font-size: 10px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fo-ink-3); margin-bottom: 6px; }
.fo-wd-block p { font-size: 13.5px; line-height: 1.6; color: var(--fo-ink); margin: 0; }
.fo-wd-internal { font-size: 13px; line-height: 1.6; color: var(--fo-ink-2); margin: 0; padding: 12px 14px; background: var(--fo-warn-soft); border-radius: var(--fo-r-md); }
.fo-wd-cap { display: flex; flex-direction: column; }
.fo-wd-mile { display: flex; align-items: flex-start; gap: 12px; padding: 9px 0; }
.fo-wd-mile + .fo-wd-mile { border-top: 1px solid var(--fo-line); }
.fo-wd-mile .m-dot { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--fo-line-strong); background: var(--fo-surface); margin-top: 3px; flex: none; }
.fo-wd-mile.is-done .m-dot { background: var(--fo-ok); border-color: var(--fo-ok); }
.fo-wd-mile.is-next .m-dot { border-color: var(--fo-accent); background: var(--fo-accent); box-shadow: 0 0 0 3px var(--fo-accent-soft); }
.fo-wd-mile .m-main { display: flex; flex-direction: column; line-height: 1.35; }
.fo-wd-mile .m-lbl { font-size: 13px; font-weight: 600; color: var(--fo-ink); }
.fo-wd-mile .m-sub { font-size: 11.5px; color: var(--fo-ink-3); }
.fo-wd-signrow { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.fo-wd-signstate { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fo-ink-2); }
.fo-wd-signstate svg.fo-i { width: 15px; height: 15px; color: var(--fo-warn); }
.fo-wd-signstate b { color: var(--fo-ink); font-weight: 650; }
.fo-wd-signacts { display: flex; flex-wrap: wrap; gap: 8px; }
.fo-wd-signlink { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; background: var(--fo-surface-2); border: 1px solid var(--fo-line); border-radius: 999px; font-size: 12px; }
.fo-wd-signlink svg.fo-i { width: 13px; height: 13px; color: var(--fo-ink-3); flex: none; }
.fo-wd-signlink code { font-family: var(--fo-mono); color: var(--fo-ink-2); }
.fo-wd-signlink-ttl { font-size: 10.5px; color: var(--fo-ink-3); white-space: nowrap; padding-left: 7px; border-left: 1px solid var(--fo-line-strong); }
.fo-wd-signnote { font-size: 11.5px; line-height: 1.5; color: var(--fo-ink-3); margin: 12px 0 0; }
/* header: identity + classification meta strip (replaces the gappy classification card) */
.fo-wd-header { background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); box-shadow: var(--fo-shadow-1); padding: 18px 20px; margin-bottom: 16px; }
.fo-wd-id { display: flex; align-items: center; gap: 16px; }
.fo-wd-id .fo-ava.is-lg { flex: none; }
.fo-wd-id-main { flex: 1; min-width: 0; }
.fo-wd-id-name { font-family: var(--fo-font-display); font-size: 20px; font-weight: 760; letter-spacing: -0.02em; color: var(--fo-ink); }
.fo-wd-id-meta { font-size: 12.5px; color: var(--fo-ink-2); margin-top: 3px; }
.fo-wd-id-badges { display: flex; align-items: center; gap: 10px; flex: none; }
.fo-wd-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--fo-line); }
.fo-wd-metaitem { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fo-wd-metaitem .k { font-size: 10px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fo-ink-3); }
.fo-wd-metaitem .v { font-size: 13.5px; font-weight: 650; color: var(--fo-ink); }
/* internal note inset */
.fo-wd-note { margin-top: 18px; padding: 12px 14px; background: var(--fo-warn-soft); border-radius: var(--fo-r-md); }
.fo-wd-note-lbl { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #8a5108; margin-bottom: 6px; }
.fo-wd-note-lbl svg.fo-i { width: 12px; height: 12px; }
.fo-wd-note p { font-size: 12.5px; line-height: 1.55; color: var(--fo-ink-2); margin: 0; }
/* corrective action plan — horizontal timeline */
.fo-wd-cap-tl { display: flex; align-items: flex-start; padding: 6px 6px 2px; }
.fo-wd-capnode { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; }
.fo-wd-capnode::before { content: ''; position: absolute; top: 9px; left: -50%; width: 100%; height: 2px; background: var(--fo-line); z-index: 0; }
.fo-wd-capnode:first-child::before { display: none; }
.fo-wd-capnode.is-done::before, .fo-wd-capnode.is-current::before { background: var(--fo-ok); }
.fo-wd-capnode .dot { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--fo-surface); border: 2px solid var(--fo-line-strong); position: relative; z-index: 1; }
.fo-wd-capnode .dot svg.fo-i { width: 11px; height: 11px; color: #fff; }
.fo-wd-capnode.is-done .dot { background: var(--fo-ok); border-color: var(--fo-ok); }
.fo-wd-capnode.is-current .dot { background: var(--fo-accent); border-color: var(--fo-accent); box-shadow: 0 0 0 4px var(--fo-accent-soft); }
.fo-wd-capnode .cl { font-size: 12.5px; font-weight: 650; color: var(--fo-ink); }
.fo-wd-capnode .cd { font-size: 11px; color: var(--fo-ink-3); font-variant-numeric: tabular-nums; }
.fo-wd-cap-note { font-size: 11.5px; line-height: 1.5; color: var(--fo-ink-3); margin: 16px 0 0; }
@media (max-width: 620px) { .fo-wd-meta { grid-template-columns: repeat(2, 1fr); } .fo-wd-id-badges { flex-direction: column; align-items: flex-end; gap: 6px; } }
.fo-wd-count { display: flex; align-items: baseline; gap: 8px; }
.fo-wd-count .n { font-family: var(--fo-font-display); font-size: 34px; font-weight: 780; letter-spacing: -0.03em; color: var(--fo-danger); line-height: 1; }
.fo-wd-count .of { font-size: 12.5px; color: var(--fo-ink-3); }
.fo-wd-threat { display: flex; gap: 9px; margin-top: 12px; padding: 11px 13px; background: var(--fo-danger-soft); border-radius: var(--fo-r-md); font-size: 12px; line-height: 1.5; color: var(--fo-ink-2); }
.fo-wd-threat svg.fo-i { width: 15px; height: 15px; color: var(--fo-danger); flex: none; margin-top: 1px; }
.fo-wd-threat b { color: var(--fo-ink); }
.fo-wd-past { display: flex; align-items: center; gap: 11px; padding: 9px 0; text-decoration: none; }
.fo-wd-past + .fo-wd-past { border-top: 1px solid var(--fo-line); }
.fo-wd-past .fo-wsev { padding: 2px; }
.fo-wd-past-main { display: flex; flex-direction: column; line-height: 1.3; }
.fo-wd-past-main .nm { font-size: 13px; font-weight: 600; color: var(--fo-ink); }
.fo-wd-past-main .mt { font-size: 11.5px; color: var(--fo-ink-3); }
.fo-wd-past:hover .nm { color: var(--fo-accent); }
.fo-wd-hold { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fo-wd-hold-state { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--fo-ink-3); }
.fo-wd-sigblock { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 8px; }
.fo-wd-sigline { display: flex; flex-direction: column; gap: 6px; }
.fo-wd-sigline .line { height: 34px; border-bottom: 1.5px solid var(--fo-ink); }
.fo-wd-sigline .cap { font-size: 10.5px; color: var(--fo-ink-3); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
@media (max-width: 760px) { .fo-wd-steps { overflow-x: auto; } .fo-wd-step { min-width: 78px; } }


/* ════════════════════════════════════════════════════════════════════
   Notifications — bell dropdown + center inbox
   ════════════════════════════════════════════════════════════════════ */
.fo-noti-pop { position: fixed; top: 54px; right: 18px; z-index: 60; width: min(384px, calc(100vw - 24px)); display: flex; flex-direction: column; max-height: min(560px, calc(100vh - 72px)); background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); box-shadow: var(--fo-shadow-2); overflow: hidden; animation: foNotiIn 160ms var(--fo-ease); }
.fo-noti-pop[hidden] { display: none; }
@keyframes foNotiIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.fo-noti-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; }
.fo-noti-title { font-family: var(--fo-font-display); font-size: 15px; font-weight: 750; color: var(--fo-ink); }
.fo-noti-markall { border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--fo-accent); cursor: pointer; padding: 0; }
.fo-noti-tabs { display: flex; gap: 4px; padding: 0 12px 8px; border-bottom: 1px solid var(--fo-line); }
.fo-noti-tabs button { border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--fo-ink-3); padding: 6px 11px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.fo-noti-tabs button.is-active { background: var(--fo-accent-soft); color: var(--fo-accent-deep); }
.fo-noti-tabcount { display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--fo-accent); color: #fff; font-size: 10px; font-weight: 700; }
.fo-noti-list { overflow-y: auto; flex: 1; }
.fo-noti-item { display: flex; align-items: flex-start; gap: 11px; width: 100%; text-align: left; padding: 11px 16px; background: none; border: 0; border-bottom: 1px solid var(--fo-line); cursor: pointer; transition: background var(--fo-fast); }
.fo-noti-item:last-child { border-bottom: 0; }
.fo-noti-item:hover { background: var(--fo-surface-2); }
.fo-noti-item.is-unread { background: rgba(11, 63, 158, 0.035); }
.fo-noti-item.is-unread:hover { background: rgba(11, 63, 158, 0.06); }
.fo-noti-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.fo-noti-ic svg.fo-i { width: 16px; height: 16px; }
.fo-noti-ic.is-accent { background: var(--fo-accent-soft); color: var(--fo-accent); }
.fo-noti-ic.is-danger { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-noti-ic.is-info { background: var(--fo-info-soft); color: var(--fo-info); }
.fo-noti-ic.is-ok { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-noti-ic.is-ink { background: rgba(24, 27, 33, 0.06); color: var(--fo-ink-2); }
.fo-noti-body { flex: 1; min-width: 0; }
.fo-noti-row1 { display: flex; align-items: center; gap: 7px; }
.fo-noti-t { font-size: 13px; font-weight: 650; color: var(--fo-ink); line-height: 1.3; }
.fo-noti-pri { font-size: 9px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fo-danger); background: var(--fo-danger-soft); padding: 1px 5px; border-radius: 5px; flex: none; }
.fo-noti-b { font-size: 12px; color: var(--fo-ink-2); line-height: 1.45; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fo-noti-meta { font-size: 11px; color: var(--fo-ink-3); margin-top: 4px; }
.fo-noti-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fo-accent); flex: none; margin-top: 4px; }
.fo-noti-foot { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px; font-size: 12.5px; font-weight: 600; color: var(--fo-accent); text-decoration: none; border-top: 1px solid var(--fo-line); }
.fo-noti-foot svg.fo-i { width: 14px; height: 14px; }
.fo-noti-foot:hover { background: var(--fo-surface-2); }
.fo-noti-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 34px 16px; font-size: 12.5px; color: var(--fo-ink-3); }
.fo-noti-empty svg.fo-i { width: 22px; height: 22px; color: var(--fo-ok); }

/* notifications center */
.fo-noti-kpis { margin-bottom: 22px; }
.fo-noti-card { margin-bottom: 4px; }
.fo-noti-bulk { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 16px; background: var(--fo-accent-soft); border-bottom: 1px solid var(--fo-line); }
.fo-noti-bulk[hidden] { display: none; }
.fo-noti-bulk-n { font-size: 12.5px; font-weight: 650; color: var(--fo-accent-deep); }
.fo-noti-bulk-acts { display: flex; gap: 8px; }
.fo-noti-grouphead { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fo-ink-3); padding: 13px 18px 6px; }
.fo-noti-crow { display: flex; align-items: flex-start; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--fo-line); position: relative; cursor: pointer; transition: background var(--fo-fast); }
.fo-noti-crow:hover { background: var(--fo-surface-2); }
.fo-noti-crow.is-unread { background: rgba(11, 63, 158, 0.03); }
.fo-noti-crow.is-unread::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--fo-accent); }
.fo-noti-crow.is-sel { background: var(--fo-accent-soft); }
.fo-noti-crow .fo-noti-dot { display: none; }
.fo-noti-check { display: grid; place-items: center; flex: none; margin-top: 3px; cursor: pointer; position: relative; }
.fo-noti-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.fo-noti-check .box { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--fo-line-strong); display: grid; place-items: center; color: transparent; transition: background var(--fo-fast), border-color var(--fo-fast); }
.fo-noti-check .box svg.fo-i { width: 12px; height: 12px; }
.fo-noti-check input:checked + .box { background: var(--fo-accent); border-color: var(--fo-accent); color: #fff; }
.fo-noti-cbody { flex: 1; min-width: 0; }
.fo-noti-cbody .fo-noti-row1 { align-items: center; }
.fo-noti-cat-tag { font-size: 10px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--fo-ink-3); margin-left: auto; flex: none; padding-left: 8px; }
.fo-noti-cacts { display: flex; gap: 4px; flex: none; opacity: 0; transition: opacity var(--fo-fast); }
.fo-noti-crow:hover .fo-noti-cacts { opacity: 1; }
.fo-noti-cact { width: 28px; height: 28px; border-radius: 8px; border: 0; background: none; color: var(--fo-ink-3); display: grid; place-items: center; cursor: pointer; }
.fo-noti-cact:hover { background: var(--fo-surface); color: var(--fo-ink); }
.fo-noti-cact svg.fo-i { width: 15px; height: 15px; }
.fo-noti-prefhead { display: grid; grid-template-columns: 1fr 50px 50px 50px; gap: 8px; align-items: center; padding: 2px 0 8px; font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fo-ink-3); }
.fo-noti-prefhead span:not(:first-child) { text-align: center; }
.fo-noti-prefrow { display: grid; grid-template-columns: 1fr 50px 50px 50px; gap: 8px; align-items: center; padding: 9px 0; border-top: 1px solid var(--fo-line); }
.fo-noti-prefmod { font-size: 13px; font-weight: 600; color: var(--fo-ink); }
.fo-noti-prefrow .fo-toggle { justify-self: center; }
@media (max-width: 640px) { .fo-noti-cat-tag { display: none; } .fo-noti-cacts { opacity: 1; } }


/* ── New-warning drawer specifics ── */
.fo-wn-risk { margin-top: 14px; }
.fo-wn-risk-empty { display: flex; align-items: center; gap: 9px; padding: 13px 15px; background: var(--fo-surface-2); border: 1px dashed var(--fo-line-strong); border-radius: var(--fo-r-md); font-size: 12px; color: var(--fo-ink-3); }
.fo-wn-risk-empty svg.fo-i { width: 16px; height: 16px; opacity: 0.6; flex: none; }
.fo-wn-risk.is-on { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 14px; padding: 9px 13px; background: var(--fo-surface-2); border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); }
.fo-wn-risk-chip { flex: none; }
.fo-wn-risk .st { display: inline-flex; align-items: center; gap: 7px; }
.fo-wn-risk .st b { font-family: var(--fo-font-display); font-size: 17px; font-weight: 750; color: var(--fo-ink); line-height: 1; }
.fo-wn-risk .st i { font-style: normal; font-size: 11px; color: var(--fo-ink-3); margin-left: -4px; }
.fo-wn-risk .x { font-size: 11.5px; color: var(--fo-ink-3); }
.fo-wn-risk .x b { color: var(--fo-ink); font-weight: 600; }
.fo-wn-risk .x b.is-next { color: var(--fo-danger); }
/* templates — deliberately discreet & optional (text-only chips under the selects) */
.fo-wn-tplrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0 8px; }
.fo-wn-tpllbl { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--fo-ink-3); }
.fo-wn-tpls { display: flex; flex-wrap: wrap; gap: 6px; }
.fo-wn-tpl { font-size: 11.5px; font-weight: 600; color: var(--fo-ink-2); padding: 3px 11px; background: transparent; border: 1px solid var(--fo-line); border-radius: 999px; cursor: pointer; white-space: nowrap; transition: border-color var(--fo-fast), color var(--fo-fast), background var(--fo-fast); }
.fo-wn-tpl:hover { border-color: var(--fo-line-strong); color: var(--fo-ink); }
.fo-wn-tpl.is-active { border-color: var(--fo-accent); color: var(--fo-accent-deep); background: var(--fo-accent-soft); }
.fo-wn-tpl.is-blank { color: var(--fo-ink-3); }
.fo-wn-policy { display: flex; gap: 9px; margin-top: 14px; padding: 11px 13px; background: var(--fo-accent-soft); border-radius: var(--fo-r-md); font-size: 12px; line-height: 1.5; color: var(--fo-ink-2); }
.fo-wn-policy svg.fo-i { width: 15px; height: 15px; color: var(--fo-accent); flex: none; margin-top: 1px; }
.fo-wn-policy b { color: var(--fo-ink); font-weight: 650; }
.fo-wn-policy.is-warn { background: var(--fo-warn-soft); }
.fo-wn-policy.is-warn svg.fo-i { color: var(--fo-warn); }
.fo-wn-policy[hidden] { display: none; }
.fo-wn-lblrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fo-wn-ai { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; font: inherit; font-size: 12px; font-weight: 600; color: var(--fo-accent); cursor: pointer; padding: 0; }
.fo-wn-ai svg.fo-i { width: 14px; height: 14px; }
.fo-wn-opt { font-size: 10px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: var(--fo-ink-3); margin-left: 4px; }
.fo-wn-consequence { border-color: rgba(179, 38, 30, 0.35) !important; }
.fo-wn-consequence:focus { border-color: var(--fo-danger) !important; }


/* ════════════════════════════════════════════════════════════════════
   New-hire onboarding — public flow (phone) + admin tracker
   ════════════════════════════════════════════════════════════════════ */
/* public flow — builds on the .fo-lite / .fo-device kit */
.fo-nh-prog { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.fo-nh-prog[hidden] { display: none; }
.fo-nh-prog .lbl { font-size: 11px; font-weight: 600; color: var(--fo-ink-3); white-space: nowrap; }
.fo-nh-prog .bar { flex: 1; height: 5px; border-radius: 3px; background: var(--fo-line); overflow: hidden; }
.fo-nh-prog .fill { display: block; height: 100%; background: var(--fo-accent); border-radius: 3px; transition: width var(--fo-base) var(--fo-ease); }
.fo-nh-steps { flex: 1; min-height: 0; display: flex; flex-direction: column; margin-top: 16px; }
.fo-nh-step { display: none; }
.fo-nh-step.is-active { display: flex; flex-direction: column; flex: 1; min-height: 0; animation: foNhIn 200ms var(--fo-ease); }
@keyframes foNhIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.fo-nh-offer { margin-top: 16px; padding: 13px 15px; background: var(--fo-accent-soft); border-radius: 14px; display: flex; flex-direction: column; gap: 8px; }
.fo-nh-offer .r { display: flex; justify-content: space-between; font-size: 13px; }
.fo-nh-offer .r span { color: var(--fo-accent); }
.fo-nh-offer .r b { color: var(--fo-accent-deep); font-weight: 700; }
.fo-nh-check { display: flex; align-items: flex-start; gap: 9px; margin-top: 14px; font-size: 12.5px; color: var(--fo-ink-2); line-height: 1.4; cursor: pointer; }
.fo-nh-check input { margin-top: 1px; width: 17px; height: 17px; accent-color: var(--fo-accent); flex: none; }
.fo-nh-note { display: flex; gap: 8px; margin-top: 14px; padding: 10px 12px; background: var(--fo-surface-2); border-radius: 11px; font-size: 11.5px; line-height: 1.45; color: var(--fo-ink-3); }
.fo-nh-note svg.fo-i { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.fo-nh-nav { display: flex; flex-direction: column; gap: 6px; margin-top: 18px; }
.fo-nh-back { border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--fo-ink-3); cursor: pointer; padding: 6px; }
.fo-nh-back:hover { color: var(--fo-ink); }
.fo-nh-seg { width: 100%; }
.fo-nh-seg button { flex: 1; }
.fo-nh-ups { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.fo-nh-up { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px; background: var(--fo-surface); border: 1.5px dashed var(--fo-line-strong); border-radius: 14px; cursor: pointer; text-align: center; transition: border-color var(--fo-fast); }
.fo-nh-up:hover { border-color: var(--fo-accent); }
.fo-nh-up > svg.fo-i { width: 26px; height: 26px; color: var(--fo-ink-3); }
.fo-nh-up .t { font-size: 13px; font-weight: 650; color: var(--fo-ink); }
.fo-nh-up .d { font-size: 11.5px; color: var(--fo-ink-3); }
.fo-nh-up .ok { position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%; background: var(--fo-ok); color: #fff; display: grid; place-items: center; opacity: 0; transform: scale(0.6); transition: opacity var(--fo-fast), transform 0.3s var(--fo-spring); }
.fo-nh-up .ok svg.fo-i { width: 13px; height: 13px; }
.fo-nh-up.is-done { border-style: solid; border-color: var(--fo-ok); background: var(--fo-ok-soft); }
.fo-nh-up.is-done > svg.fo-i { color: var(--fo-ok); }
.fo-nh-up.is-done .ok { opacity: 1; transform: none; }
.fo-nh-docs { display: flex; flex-direction: column; gap: 7px; margin-top: 14px; }
.fo-nh-doc { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: 11px; }
.fo-nh-doc .ic { width: 26px; height: 26px; border-radius: 8px; background: var(--fo-accent-soft); color: var(--fo-accent); display: grid; place-items: center; flex: none; }
.fo-nh-doc .ic svg.fo-i { width: 14px; height: 14px; }
.fo-nh-doc .t { flex: 1; font-size: 12.5px; font-weight: 600; color: var(--fo-ink); }
.fo-nh-doc .st { font-size: 11px; font-weight: 600; color: var(--fo-ink-3); }
.fo-nh-doc.is-signed .ic { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-nh-doc.is-signed .st { color: var(--fo-ok); }
.fo-nh-sig { margin-top: 14px; height: 92px; border: 1.5px dashed var(--fo-line-strong); border-radius: 14px; display: grid; place-items: center; background: var(--fo-surface); position: relative; }
.fo-nh-sig .ph { font-size: 13px; color: var(--fo-ink-3); }
.fo-nh-sig.is-signed { border-style: solid; border-color: var(--fo-ok); background: var(--fo-ok-soft); }
.fo-nh-sig .name { font-family: "Brush Script MT", "Segoe Script", "Snell Roundhand", cursive; font-size: 28px; color: var(--fo-ink); }
.fo-nh-sig .seal { position: absolute; bottom: 8px; right: 11px; display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; color: var(--fo-ok); }
.fo-nh-sig .seal svg.fo-i { width: 12px; height: 12px; }
.fo-nh-siglink { display: block; width: 100%; text-align: center; border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--fo-accent); cursor: pointer; padding: 8px; }
/* legend beside the phone */
.fo-nh-legend { flex: 1; min-width: 250px; max-width: 380px; align-self: flex-start; padding-top: 6px; }
.fo-nh-legend-h { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fo-ink-3); margin-bottom: 12px; }
.fo-nh-legend-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.fo-nh-legend-list li { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--fo-ink); cursor: pointer; transition: background var(--fo-fast); }
.fo-nh-legend-list li em { font-style: normal; font-weight: 500; color: var(--fo-ink-3); font-size: 11.5px; margin-left: auto; text-align: right; }
.fo-nh-legend-list li .n { width: 22px; height: 22px; border-radius: 50%; background: var(--fo-surface-2); border: 1px solid var(--fo-line); color: var(--fo-ink-3); display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; transition: all var(--fo-fast); }
.fo-nh-legend-list li:hover { background: var(--fo-surface-2); }
.fo-nh-legend-list li.is-cur { background: var(--fo-accent-soft); color: var(--fo-accent-deep); }
.fo-nh-legend-list li.is-cur .n { background: var(--fo-accent); border-color: var(--fo-accent); color: #fff; }
.fo-nh-legend-list li.is-done .n { background: var(--fo-ok); border-color: var(--fo-ok); color: #fff; }
.fo-nh-legend-note { display: flex; gap: 8px; margin-top: 18px; padding: 12px 13px; background: var(--fo-surface-2); border-radius: var(--fo-r-md); font-size: 11.5px; line-height: 1.5; color: var(--fo-ink-3); }
.fo-nh-legend-note svg.fo-i { width: 15px; height: 15px; flex: none; margin-top: 1px; }

/* admin tracker */
.fo-nht-kpis { margin-bottom: 22px; }
.fo-nht-card { margin-bottom: 4px; }
.fo-nht-steps { display: inline-flex; align-items: center; gap: 5px; }
.fo-nht-pip { width: 9px; height: 9px; border-radius: 50%; background: var(--fo-line-strong); flex: none; }
.fo-nht-pip.is-done { background: var(--fo-ok); }
.fo-nht-pip.is-cur { background: var(--fo-accent); box-shadow: 0 0 0 3px var(--fo-accent-soft); }
.fo-nht-count { margin-left: 6px; font-size: 11.5px; font-weight: 600; color: var(--fo-ink-3); font-variant-numeric: tabular-nums; }
.fo-nht-flag { display: inline-grid; place-items: center; color: var(--fo-danger); vertical-align: -1px; }
.fo-nht-flag svg.fo-i { width: 13px; height: 13px; }
.fo-nht-doctoggles { display: flex; flex-direction: column; gap: 0; }
.fo-nht-doctoggle { display: flex; align-items: center; gap: 10px; padding: 9px 2px; font-size: 13px; font-weight: 500; color: var(--fo-ink); cursor: pointer; }
.fo-nht-doctoggle + .fo-nht-doctoggle { border-top: 1px solid var(--fo-line); }
.fo-nht-doctoggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.fo-nht-doctoggle .box { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--fo-line-strong); display: grid; place-items: center; color: transparent; flex: none; transition: background var(--fo-fast), border-color var(--fo-fast); }
.fo-nht-doctoggle .box svg.fo-i { width: 12px; height: 12px; }
.fo-nht-doctoggle input:checked + .box { background: var(--fo-accent); border-color: var(--fo-accent); color: #fff; }


/* ════════════════════════════════════════════════════════════════════
   Fleet — single asset detail
   ════════════════════════════════════════════════════════════════════ */
.fo-asd-id { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.fo-asd-ava { width: 46px; height: 46px; border-radius: 13px; background: var(--fo-accent-soft); color: var(--fo-accent); display: grid; place-items: center; flex: none; }
.fo-asd-ava svg.fo-i { width: 24px; height: 24px; }
.fo-asd-id-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 13px; color: var(--fo-ink-2); }
.fo-asd-id-meta .dot { color: var(--fo-ink-3); }
.fo-asd-unit { font-weight: 750; color: var(--fo-ink); }
.fo-asd-tag { font-family: var(--fo-mono); font-size: 12px; font-weight: 650; color: var(--fo-accent-deep); background: var(--fo-accent-soft); padding: 2px 8px; border-radius: 6px; }
.fo-asd-id-badges { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.fo-asd-id-badges .fo-chip svg.fo-i { width: 12px; height: 12px; }
.fo-asd-kpis { margin-bottom: 20px; }
.fo-asd-grid { align-items: start; margin-bottom: 20px; }
.fo-asd-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.fo-asd-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.fo-asd-specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 20px; }
.fo-asd-spec { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fo-asd-spec .k { font-size: 10px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fo-ink-3); }
.fo-asd-spec .v { font-size: 13.5px; font-weight: 650; color: var(--fo-ink); }
.fo-asd-spec .v.is-mono { font-family: var(--fo-mono); font-size: 12.5px; }
.fo-asd-spec .v i { font-style: normal; font-size: 11px; font-weight: 500; color: var(--fo-ink-3); }
.fo-asd-dates { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.fo-asd-date { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 14px; background: var(--fo-surface-2); border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); }
.fo-asd-date .k { font-size: 10px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fo-ink-3); }
.fo-asd-date .d { font-size: 14px; font-weight: 650; color: var(--fo-ink); font-variant-numeric: tabular-nums; }
.fo-asd-date .fo-chip { align-self: flex-start; }
.fo-asd-upload { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; font: inherit; font-size: 12px; font-weight: 600; color: var(--fo-accent); cursor: pointer; padding: 0; letter-spacing: 0; text-transform: none; }
.fo-asd-upload svg.fo-i { width: 14px; height: 14px; }
/* Key dates + Attachments share a row to fill the width */
.fo-asd-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
/* compact photo thumbnails — expand to a lightbox on demand */
.fo-asd-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.fo-asd-thumb { width: 58px; height: 58px; border-radius: 10px; border: 1px solid var(--fo-line); cursor: pointer; padding: 0; background-size: cover; transition: transform var(--fo-fast) var(--fo-ease), box-shadow var(--fo-fast); }
.fo-asd-thumb:hover { transform: scale(1.06); box-shadow: var(--fo-shadow-1); }
.fo-asd-thumb.is-add { display: grid; place-items: center; background: var(--fo-surface-2); border-style: dashed; border-color: var(--fo-line-strong); color: var(--fo-ink-3); }
.fo-asd-thumb.is-add:hover { transform: none; box-shadow: none; border-color: var(--fo-accent); color: var(--fo-accent); }
.fo-asd-thumb.is-add svg.fo-i { width: 18px; height: 18px; }
/* lightbox */
.fo-asd-lightbox { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 48px; background: rgba(16, 22, 34, 0.74); backdrop-filter: blur(4px); opacity: 0; transition: opacity var(--fo-base) var(--fo-ease); }
.fo-asd-lightbox[hidden] { display: none; }
.fo-asd-lightbox.is-open { opacity: 1; }
.fo-asd-lb-img { width: min(600px, 86vw); aspect-ratio: 4 / 3; border-radius: 16px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6); transform: scale(0.96); transition: transform var(--fo-base) var(--fo-spring); }
.fo-asd-lightbox.is-open .fo-asd-lb-img { transform: none; }
.fo-asd-lb-close, .fo-asd-lb-nav { position: fixed; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.16); color: #fff; display: grid; place-items: center; cursor: pointer; transition: background var(--fo-fast); }
.fo-asd-lb-close:hover, .fo-asd-lb-nav:hover { background: rgba(255, 255, 255, 0.28); }
.fo-asd-lb-close { top: 22px; right: 24px; }
.fo-asd-lb-close svg.fo-i { width: 18px; height: 18px; }
.fo-asd-lb-nav { top: 50%; transform: translateY(-50%); }
.fo-asd-lb-nav.is-prev { left: 24px; } .fo-asd-lb-nav.is-next { right: 24px; }
.fo-asd-lb-nav svg.fo-i { width: 20px; height: 20px; }
.fo-asd-lb-cap { position: fixed; bottom: 28px; left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, 0.85); font-size: 13px; }
.fo-asd-files { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.fo-asd-file { display: flex; align-items: center; gap: 11px; padding: 9px 12px; background: var(--fo-surface-2); border: 1px solid var(--fo-line); border-radius: 10px; min-width: 0; }
.fo-asd-file .ic { width: 28px; height: 28px; border-radius: 8px; background: var(--fo-surface); border: 1px solid var(--fo-line); color: var(--fo-ink-2); display: grid; place-items: center; flex: none; }
.fo-asd-file .ic svg.fo-i { width: 14px; height: 14px; }
.fo-asd-file .bd { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.fo-asd-file .t { font-size: 13px; font-weight: 600; color: var(--fo-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-asd-file .mt { font-size: 11px; color: var(--fo-ink-3); }
.fo-asd-actions { display: flex; flex-direction: column; gap: 8px; }
.fo-asd-actions .fo-btn { width: 100%; justify-content: flex-start; }
.fo-asd-assignee { display: flex; align-items: center; gap: 11px; }
.fo-asd-assignee-id .nm { font-size: 14px; font-weight: 650; color: var(--fo-ink); }
.fo-asd-assignee-id .mt { font-size: 12px; color: var(--fo-ink-3); }
.fo-asd-qr { display: flex; align-items: center; gap: 13px; }
.fo-asd-qr-code { width: 62px; height: 62px; border-radius: 10px; border: 1px solid var(--fo-line); background: var(--fo-surface-2); display: grid; place-items: center; color: var(--fo-ink); flex: none; }
.fo-asd-qr-code svg.fo-i { width: 34px; height: 34px; }
.fo-asd-qr-meta { min-width: 0; }
.fo-asd-qr-link { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--fo-ink-2); }
.fo-asd-qr-link svg.fo-i { width: 13px; height: 13px; color: var(--fo-ink-3); flex: none; }
.fo-asd-qr-link code { font-family: var(--fo-mono); font-size: 11.5px; }
.fo-asd-qr-code-val { font-size: 12px; color: var(--fo-ink-3); margin-top: 6px; }
.fo-asd-qr-code-val b { color: var(--fo-ink); font-family: var(--fo-mono); }
.fo-asd-history { margin-bottom: 8px; }
.fo-asd-htable th.r, .fo-asd-htable td.r { text-align: right; }
@media (max-width: 900px) { .fo-asd-row2 { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .fo-asd-specs { grid-template-columns: repeat(2, 1fr); }
  .fo-asd-id-badges { margin-left: 0; }
}
@media (max-width: 560px) { .fo-asd-lb-nav { display: none; } }
/* new-asset drawer bits */
.fo-fr-classeg { width: 100%; margin-bottom: 12px; }
.fo-fr-classeg button { flex: 1; }
.fo-fr-newtag { font-size: 12px; color: var(--fo-ink-3); }
.fo-fr-newtag b { font-family: var(--fo-mono); color: var(--fo-accent-deep); }
.fo-fr-newname { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 13px; background: var(--fo-accent-soft); border-radius: var(--fo-r-md); font-size: 13.5px; font-weight: 650; color: var(--fo-accent-deep); }
.fo-fr-newname svg.fo-i { width: 16px; height: 16px; color: var(--fo-accent); }
.fo-fr-newname[hidden] { display: none; }

/* ── Inline edit (dual-node view / control) ───────────────────────── */
/* .fo-btn's display:inline-flex would otherwise beat the [hidden] attribute */
.fo-btn[hidden] { display: none !important; }
[data-edit-control] { display: none; }
[data-edit-only] { display: none; }
.fo-asd-main.is-editing [data-edit-view] { display: none; }
.fo-asd-main.is-editing input[data-edit-control],
.fo-asd-main.is-editing select[data-edit-control] { display: block; }
.fo-asd-main.is-editing .fo-asd-edit2[data-edit-control] { display: flex; }
.fo-asd-main.is-editing [data-edit-only] { display: inline-block; }
.fo-asd-main.is-editing .fo-asd-date.is-derived { opacity: 0.68; }
.fo-asd-edit { width: 100%; font: inherit; font-size: 13px; font-weight: 600; color: var(--fo-ink); background: var(--fo-surface); border: 1px solid var(--fo-line-strong); border-radius: 8px; padding: 6px 9px; outline: none; transition: border-color var(--fo-fast), box-shadow var(--fo-fast); }
.fo-asd-edit:focus { border-color: var(--fo-accent); box-shadow: 0 0 0 3px var(--fo-accent-soft); }
.fo-asd-edit.is-mono { font-family: var(--fo-mono); font-size: 12px; }
select.fo-asd-edit { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 26px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7785' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; }
.fo-asd-edit2 { gap: 6px; }
.fo-asd-edit2 .fo-asd-edit:first-child { flex: 1; min-width: 0; }
.fo-asd-edit2 .fo-asd-edit:last-child { max-width: 96px; }
.fo-asd-editing-tag { margin-left: auto; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fo-accent-deep); background: var(--fo-accent-soft); padding: 3px 9px; border-radius: 999px; }
.fo-asd-auto { font-size: 9px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fo-ink-3); background: var(--fo-surface); border: 1px solid var(--fo-line); padding: 1px 5px; border-radius: 5px; margin-left: 4px; vertical-align: middle; }

/* ── Public safety profile card (asset aside) ─────────────────────── */
.fo-asd-pub { display: flex; gap: 13px; align-items: flex-start; }
.fo-asd-pub-qr { width: 72px; height: 72px; border-radius: 12px; border: 1px solid var(--fo-line); background: var(--fo-surface-2); display: grid; place-items: center; color: var(--fo-ink); flex: none; }
.fo-asd-pub-qr svg.fo-i { width: 40px; height: 40px; }
.fo-asd-pub-body { min-width: 0; flex: 1; }
.fo-asd-pub-lbl { font-size: 10px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fo-ink-3); margin-bottom: 5px; }
.fo-asd-pub-url { display: flex; align-items: center; gap: 8px; }
.fo-asd-pub-url code { font-family: var(--fo-mono); font-size: 11.5px; color: var(--fo-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.fo-asd-pub-urlbtns { display: flex; gap: 4px; flex: none; }
.fo-asd-pub-tb { font: inherit; font-size: 11px; font-weight: 650; color: var(--fo-accent-deep); background: var(--fo-accent-soft); border: 0; border-radius: 6px; padding: 3px 8px; cursor: pointer; text-decoration: none; transition: background var(--fo-fast); }
.fo-asd-pub-tb:hover { background: #dce8f9; }
.fo-asd-pub-tb.is-sm { padding: 1px 7px; font-size: 10px; margin-left: 7px; }
.fo-asd-pub-code { font-size: 12px; color: var(--fo-ink-3); margin-top: 9px; display: flex; align-items: center; }
.fo-asd-pub-code b { color: var(--fo-ink); font-family: var(--fo-mono); font-size: 12px; margin-left: 4px; }
.fo-asd-pub-note { font-size: 11.5px; color: var(--fo-ink-3); line-height: 1.5; margin: 13px 0 0; }
.fo-asd-pub-mlink { font: inherit; font-size: 11.5px; color: var(--fo-accent-deep); background: none; border: 0; padding: 0; cursor: pointer; font-weight: 600; }
.fo-asd-pub-mlink:hover { text-decoration: underline; }
.fo-asd-pub-acts { display: flex; gap: 8px; margin-top: 14px; }
.fo-asd-pub-acts .fo-btn { flex: 1; justify-content: center; }

/* ── Printable sticker previews (Print-labels drawer) ─────────────── */
.fo-stk-row { display: flex; gap: 17px; align-items: center; padding: 18px 0; border-top: 1px solid var(--fo-line); }
.fo-stk-row:first-child { border-top: 0; padding-top: 4px; }
.fo-stk { flex: none; border-radius: 10px; overflow: hidden; box-shadow: var(--fo-shadow-1); background: #fff; border: 1px solid var(--fo-line); color: #0e1830; display: flex; flex-direction: column; align-items: center; text-align: center; }
.fo-stk.is-badge { width: 122px; padding-bottom: 0; }
.fo-stk.is-square { width: 122px; padding-bottom: 9px; }
.fo-stk.is-tag { width: 176px; flex-direction: row; text-align: left; align-items: stretch; }
.fo-stk-bar { width: 100%; background: var(--fo-accent-deep); color: #fff; font-size: 8px; font-weight: 800; letter-spacing: 0.12em; padding: 6px 4px; }
.fo-stk-name { font-size: 17px; font-weight: 800; margin-top: 9px; color: #0e1830; line-height: 1; }
.fo-stk-name.is-sm { font-size: 14px; }
.fo-stk-tag { font-size: 9px; font-weight: 600; color: #5b6b7e; margin-top: 3px; }
.fo-stk-sub { font-size: 8px; color: #97a3b1; margin-top: 1px; }
.fo-stk-qr { color: #0e1830; }
.fo-stk-cta { font-size: 9px; font-weight: 700; color: #0e1830; }
.fo-stk-hint { font-size: 7.5px; color: #97a3b1; margin-top: 2px; }
.fo-stk-foot { width: 100%; background: #f1f4f8; padding: 5px 4px; margin-top: 8px; line-height: 1.25; }
.fo-stk-foot b { display: block; font-size: 8px; color: #0e1830; }
.fo-stk-foot span { font-size: 7px; color: #97a3b1; font-family: var(--fo-mono); }
.fo-stk.is-badge .fo-stk-qr { margin: 9px 0 6px; }
.fo-stk.is-badge .fo-stk-qr svg.fo-i { width: 56px; height: 56px; }
.fo-stk.is-badge .fo-stk-cta { margin-top: 2px; }
.fo-stk.is-square .fo-stk-qr { margin: 9px 0 7px; }
.fo-stk.is-square .fo-stk-qr svg.fo-i { width: 64px; height: 64px; }
.fo-stk.is-tag .fo-stk-tagL { flex: 1; min-width: 0; padding: 9px 10px; display: flex; flex-direction: column; }
.fo-stk.is-tag .fo-stk-tagR { width: 58px; flex: none; background: #f1f4f8; display: grid; place-items: center; }
.fo-stk.is-tag .fo-stk-bar { width: auto; align-self: flex-start; padding: 3px 6px; border-radius: 4px; font-size: 7px; letter-spacing: 0.08em; }
.fo-stk.is-tag .fo-stk-name { margin-top: 7px; font-size: 14px; }
.fo-stk.is-tag .fo-stk-cta { margin-top: 7px; }
.fo-stk.is-tag .fo-stk-qr svg.fo-i { width: 42px; height: 42px; }
.fo-stk-meta { flex: 1; min-width: 0; }
.fo-stk-ttl { font-size: 14px; font-weight: 700; color: var(--fo-ink); }
.fo-stk-size { font-size: 11.5px; font-weight: 600; color: var(--fo-accent-deep); margin-top: 1px; }
.fo-stk-desc { font-size: 12px; color: var(--fo-ink-3); line-height: 1.45; margin: 7px 0 11px; }
.fo-stk-acts { display: flex; gap: 8px; }

/* ── Asset action drawers (assign · status · maintenance · inspection) ── */
.fo-dctx { display: flex; align-items: center; gap: 10px; padding: 11px 13px; margin-bottom: 16px; background: var(--fo-surface-2); border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); font-size: 13px; color: var(--fo-ink-2); }
.fo-dctx svg.fo-i { width: 16px; height: 16px; color: var(--fo-ink-3); flex: none; }
.fo-dctx b { color: var(--fo-ink); font-weight: 700; }
.fo-dctx.is-person { gap: 12px; }
.fo-dctx.is-person .nm { font-size: 13.5px; font-weight: 650; color: var(--fo-ink); }
.fo-dctx.is-person .mt { font-size: 12px; color: var(--fo-ink-3); margin-top: 1px; }
.fo-opt, .fo-req { font-size: 10px; font-weight: 600; text-transform: none; letter-spacing: 0; margin-left: 7px; }
.fo-opt { color: var(--fo-ink-3); }
.fo-req { color: var(--fo-accent); }
.fo-updrop { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border: 1.5px dashed var(--fo-line-strong); border-radius: var(--fo-r-md); background: var(--fo-surface-2); color: var(--fo-ink-3); font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color var(--fo-fast), color var(--fo-fast); }
.fo-updrop:hover { border-color: var(--fo-accent); color: var(--fo-accent); }
.fo-updrop svg.fo-i { width: 17px; height: 17px; }
/* inspection checklist */
.fo-ckl-result { margin-left: auto; font-size: 11px; font-weight: 700; letter-spacing: 0; text-transform: none; padding: 2px 9px; border-radius: 999px; }
.fo-ckl-result.is-ok { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-ckl-result.is-warn { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-ckl { display: flex; flex-direction: column; }
.fo-ckl-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--fo-line); }
.fo-ckl-row:first-child { border-top: 0; }
.fo-ckl-row .lbl { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--fo-ink); }
.fo-ck3 { display: inline-flex; flex: none; border: 1px solid var(--fo-line); border-radius: 9px; overflow: hidden; background: var(--fo-surface); }
.fo-ck3 button { font: inherit; font-size: 11.5px; font-weight: 650; color: var(--fo-ink-3); background: none; border: 0; border-left: 1px solid var(--fo-line); padding: 6px 11px; cursor: pointer; transition: background var(--fo-fast), color var(--fo-fast); }
.fo-ck3 button:first-child { border-left: 0; }
.fo-ck3 button:hover { background: var(--fo-surface-2); }
.fo-ck3 button[data-v="pass"].is-on { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-ck3 button[data-v="fail"].is-on { background: var(--fo-danger-soft, #fbecea); color: var(--fo-danger); }
.fo-ck3 button[data-v="na"].is-on { background: var(--fo-surface-2); color: var(--fo-ink); }
.fo-capa-hint { display: flex; align-items: center; gap: 9px; margin-top: 12px; padding: 10px 12px; background: var(--fo-warn-soft); border: 1px solid #efddb8; border-radius: var(--fo-r-md); font-size: 12.5px; color: var(--fo-warn); font-weight: 600; }
.fo-capa-hint[hidden] { display: none; }
.fo-capa-hint svg.fo-i { width: 15px; height: 15px; flex: none; }
.fo-dctx.is-handoff { margin-top: 16px; margin-bottom: 0; background: var(--fo-accent-soft); border-color: #d7e3f6; color: var(--fo-accent-deep); align-items: flex-start; line-height: 1.5; }
.fo-dctx.is-handoff svg.fo-i { color: var(--fo-accent); margin-top: 1px; }
.fo-dctx.is-handoff b { color: var(--fo-accent-deep); }

/* ════════════════════════════════════════════════════════════════════
   Safety — capture flows (observation · inspection · slim incident)
   ════════════════════════════════════════════════════════════════════ */
.fo-cap-rule { display: flex; align-items: flex-start; gap: 12px; padding: 15px 18px; background: var(--fo-accent-soft); border: 1px solid #d7e3f6; border-radius: var(--fo-r-lg); margin-bottom: 20px; }
.fo-cap-rule svg.fo-i { width: 18px; height: 18px; color: var(--fo-accent); flex: none; margin-top: 1px; }
.fo-cap-rule p { margin: 0; font-size: 13px; color: var(--fo-ink-2); line-height: 1.55; }
.fo-cap-rule b { color: var(--fo-ink); }
.fo-cap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.fo-cap-card { display: flex; flex-direction: column; padding: 20px; background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); box-shadow: var(--fo-shadow-1); }
.fo-cap-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px; }
.fo-cap-ic svg.fo-i { width: 21px; height: 21px; }
.fo-cap-ic.is-ok { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-cap-ic.is-info { background: var(--fo-info-soft, #e6f3f7); color: var(--fo-info); }
.fo-cap-ic.is-danger { background: var(--fo-danger-soft, #fbecea); color: var(--fo-danger); }
.fo-cap-tag { display: inline-block; align-self: flex-start; font-size: 10.5px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--fo-surface-2); color: var(--fo-ink-3); margin-bottom: 10px; }
.fo-cap-tag.is-accent { background: var(--fo-accent-soft); color: var(--fo-accent-deep); }
.fo-cap-ttl { font-size: 16px; font-weight: 750; color: var(--fo-ink); }
.fo-cap-desc { font-size: 12.5px; color: var(--fo-ink-3); line-height: 1.5; margin: 6px 0 16px; flex: 1; }
.fo-cap-foot { margin-top: 16px; padding: 14px 18px; background: var(--fo-surface-2); border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); font-size: 12.5px; color: var(--fo-ink-3); line-height: 1.55; }
.fo-cap-foot strong { color: var(--fo-ink-2); }

/* observation kind tiles */
.fo-obs-kind { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fo-obs-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 13px; background: var(--fo-surface); border: 1.5px solid var(--fo-line); border-radius: var(--fo-r-md); cursor: pointer; font: inherit; transition: border-color var(--fo-fast), background var(--fo-fast); }
.fo-obs-tile:hover { border-color: var(--fo-line-strong); }
.fo-obs-tile .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; margin-bottom: 5px; }
.fo-obs-tile .ic svg.fo-i { width: 16px; height: 16px; }
.fo-obs-tile .lb { font-size: 13.5px; font-weight: 700; color: var(--fo-ink); }
.fo-obs-tile .sb { font-size: 11px; color: var(--fo-ink-3); }
.fo-obs-tile.is-ok .ic { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-obs-tile.is-warn .ic { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-obs-tile.is-danger .ic { background: var(--fo-danger-soft, #fbecea); color: var(--fo-danger); }
.fo-obs-tile.is-info .ic { background: var(--fo-info-soft, #e6f3f7); color: var(--fo-info); }
.fo-obs-tile.is-on.is-ok { border-color: var(--fo-ok); background: var(--fo-ok-soft); }
.fo-obs-tile.is-on.is-warn { border-color: var(--fo-warn); background: var(--fo-warn-soft); }
.fo-obs-tile.is-on.is-danger { border-color: var(--fo-danger); background: var(--fo-danger-soft, #fbecea); }
.fo-obs-tile.is-on.is-info { border-color: var(--fo-info); background: var(--fo-info-soft, #e6f3f7); }
.fo-obs-flags { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--fo-line); }
.fo-obs-flags .fo-toggle > span:last-child { font-size: 13px; font-weight: 600; color: var(--fo-ink-2); }

/* incident severity segmented */
.fo-sev-seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fo-sev-seg button { font: inherit; font-size: 13px; font-weight: 650; color: var(--fo-ink-2); background: var(--fo-surface); border: 1.5px solid var(--fo-line); border-radius: 10px; padding: 11px 6px; cursor: pointer; transition: border-color var(--fo-fast), background var(--fo-fast), color var(--fo-fast); }
.fo-sev-seg button:hover { border-color: var(--fo-line-strong); }
.fo-sev-seg button.is-ok.is-on { background: var(--fo-ok-soft); border-color: var(--fo-ok); color: var(--fo-ok); }
.fo-sev-seg button.is-warn.is-on { background: var(--fo-warn-soft); border-color: var(--fo-warn); color: var(--fo-warn); }
.fo-sev-seg button.is-danger.is-on { background: var(--fo-danger-soft, #fbecea); border-color: var(--fo-danger); color: var(--fo-danger); }
.fo-sev-seg button.is-crit.is-on { background: #2a2f3a; border-color: #2a2f3a; color: #fff; }

@media (max-width: 900px) { .fo-cap-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .fo-obs-kind { grid-template-columns: 1fr; } .fo-sev-seg { grid-template-columns: 1fr 1fr; } }

/* ════════════════════════════════════════════════════════════════════
   Public equipment safety profile  (/eq/<slug>)
   ════════════════════════════════════════════════════════════════════ */
.fo-pub-stage { display: grid; grid-template-columns: 300px 1fr; gap: 30px; align-items: start; }
.fo-pub-stage-col { min-width: 0; }
.fo-pub-stage-col.is-gate .fo-device { max-width: 300px; margin: 0 auto; }
.fo-pub-demo-tag { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: var(--fo-ink); margin-bottom: 14px; }
.fo-pub-demo-tag .n { width: 22px; height: 22px; border-radius: 7px; background: var(--fo-accent); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; }
.fo-pub-demo-tag.is-wide { margin-top: 36px; }
.fo-pub-mono { width: 38px; height: 38px; border-radius: 11px; background: var(--fo-accent-soft); color: var(--fo-accent-deep); display: grid; place-items: center; font-size: 14px; font-weight: 800; letter-spacing: -0.01em; flex: none; }
.fo-pub-mono.is-onband { background: rgba(255, 255, 255, 0.16); color: #fff; }

/* gate extras (reuses .fo-lite kit) */
.fo-pub-gate-lock { width: 54px; height: 54px; border-radius: 16px; background: var(--fo-accent-soft); color: var(--fo-accent); display: grid; place-items: center; margin: 26px 0 16px; }
.fo-pub-gate-lock svg.fo-i { width: 26px; height: 26px; }
.fo-pub-code-in { font-family: var(--fo-mono); letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700; }

/* browser chrome around the public page */
.fo-pub-browser { border-radius: 16px; overflow: hidden; border: 1px solid var(--fo-line); box-shadow: var(--fo-shadow-2); background: var(--fo-surface); }
.fo-pub-browser-bar { display: flex; align-items: center; gap: 13px; padding: 10px 14px; background: var(--fo-surface-2); border-bottom: 1px solid var(--fo-line); }
.fo-pub-browser-bar .dots { display: flex; gap: 6px; flex: none; }
.fo-pub-browser-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--fo-line-strong); }
.fo-pub-browser-bar .url { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; font-family: var(--fo-mono); font-size: 12px; color: var(--fo-ink-2); background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: 8px; padding: 5px 11px; }
.fo-pub-browser-bar .url svg.fo-i { width: 12px; height: 12px; color: var(--fo-ok); flex: none; }
.fo-pub-browser-screen { background: var(--fo-canvas); padding-bottom: 8px; }

/* the public profile itself */
.fo-pub { max-width: 640px; margin: 0 auto; }
.fo-pub-head { background: linear-gradient(135deg, var(--fo-accent-deep), #061f54); color: #fff; padding: 30px 30px 28px; }
.fo-pub-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 20px; }
.fo-pub-brand .co { font-size: 14px; font-weight: 700; color: #fff; }
.fo-pub-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.62); }
.fo-pub-h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin: 8px 0 0; color: #fff; line-height: 1.12; }
.fo-pub-subline { font-size: 13px; color: rgba(255, 255, 255, 0.72); margin-top: 7px; }
.fo-pub-content { position: relative; padding: 22px; margin-top: -18px; display: flex; flex-direction: column; gap: 16px; }
.fo-pub-card { background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); box-shadow: var(--fo-shadow-1); padding: 18px 20px; }
.fo-pub-card-head { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 700; color: var(--fo-ink); margin-bottom: 16px; }
.fo-pub-card-head svg.fo-i { width: 17px; height: 17px; color: var(--fo-accent); }
.fo-pub-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 22px; }
.fo-pub-fact { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fo-pub-fact .k { font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fo-ink-3); }
.fo-pub-fact .v { font-size: 14px; font-weight: 650; color: var(--fo-ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fo-pub-fact .v.is-mono { font-family: var(--fo-mono); font-size: 13px; }
.fo-pub-pill { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.fo-pub-pill.is-ok { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-pub-pill.is-warn { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-pub-pill.is-quiet { background: var(--fo-surface-2); color: var(--fo-ink-3); }
.fo-pub-insp { display: flex; flex-direction: column; }
.fo-pub-irow { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 13px 6px; background: none; border: 0; border-top: 1px solid var(--fo-line); cursor: pointer; font: inherit; transition: background var(--fo-fast); }
.fo-pub-irow:first-child { border-top: 0; }
.fo-pub-irow:hover { background: var(--fo-surface-2); }
.fo-pub-i-main { flex: 1; min-width: 0; }
.fo-pub-i-main .t { font-size: 14px; font-weight: 650; color: var(--fo-ink); }
.fo-pub-i-main .m { font-size: 12px; color: var(--fo-ink-3); margin-top: 2px; }
.fo-pub-i-go { color: var(--fo-ink-3); display: grid; place-items: center; flex: none; }
.fo-pub-i-go svg.fo-i { width: 16px; height: 16px; }
.fo-pub-foot { text-align: center; padding: 22px; font-size: 12px; color: var(--fo-ink-3); }

/* inspection report (printable) */
.fo-pub-report { max-width: 680px; margin: 0 auto; }
.fo-pub-report-bar { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.fo-pub-doc { background: var(--fo-surface); border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg); box-shadow: var(--fo-shadow-2); overflow: hidden; }
.fo-pub-doc-head { background: linear-gradient(135deg, var(--fo-accent-deep), #061f54); color: #fff; padding: 24px 28px; }
.fo-pub-doc-head .brand { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, 0.92); }
.fo-pub-doc-head .brand .fo-pub-mono { width: 26px; height: 26px; border-radius: 7px; font-size: 11px; background: rgba(255, 255, 255, 0.16); color: #fff; }
.fo-pub-doc-head .eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); margin-top: 15px; }
.fo-pub-doc-head h2 { font-size: 20px; font-weight: 800; margin: 6px 0 0; color: #fff; }
.fo-pub-doc-head .sub { font-size: 12.5px; color: rgba(255, 255, 255, 0.72); margin-top: 4px; }
.fo-pub-doc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 20px; padding: 22px 28px; border-bottom: 1px solid var(--fo-line); }
.fo-pub-doc-sec { padding: 20px 28px; border-bottom: 1px solid var(--fo-line); }
.fo-pub-doc-sec:last-of-type { border-bottom: 0; }
.fo-pub-doc-sec h3 { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fo-ink-2); margin: 0 0 14px; }
.fo-pub-doc-sec h3 svg.fo-i { width: 15px; height: 15px; color: var(--fo-accent); }
.fo-pub-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fo-pub-check { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--fo-ink); padding: 9px 12px; border-radius: 9px; background: var(--fo-surface-2); }
.fo-pub-check b { margin-left: auto; font-size: 11px; font-weight: 700; }
.fo-pub-check .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.fo-pub-check.is-pass { background: #f4fbf7; }
.fo-pub-check.is-pass .dot { background: var(--fo-ok); }
.fo-pub-check.is-pass b { color: var(--fo-ok); }
.fo-pub-check.is-na .dot { background: var(--fo-ink-3); }
.fo-pub-check.is-na b { color: var(--fo-ink-3); }
.fo-pub-doc-notes { font-size: 13.5px; color: var(--fo-ink-2); line-height: 1.6; margin: 0; }
.fo-pub-sigs { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.fo-pub-sig .ink { font-family: 'Snell Roundhand', 'Brush Script MT', cursive; font-size: 24px; color: var(--fo-ink); padding-bottom: 2px; }
.fo-pub-sig .ln { height: 1px; background: var(--fo-line-strong); margin: 2px 0 8px; }
.fo-pub-sig .who { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fo-ink-3); }
.fo-pub-sig .dt { font-size: 12px; color: var(--fo-ink-3); margin-top: 3px; }
.fo-pub-doc-foot { text-align: center; padding: 18px; font-size: 11.5px; color: var(--fo-ink-3); background: var(--fo-surface-2); }

@media (max-width: 1040px) {
  .fo-pub-stage { grid-template-columns: 1fr; gap: 38px; }
}
@media (max-width: 620px) {
  .fo-pub-sum, .fo-pub-doc-grid, .fo-pub-checks, .fo-pub-sigs { grid-template-columns: 1fr; }
  .fo-pub-head, .fo-pub-doc-head { padding-left: 20px; padding-right: 20px; }
  .fo-pub-content { padding: 16px; }
  .fo-pub-doc-sec, .fo-pub-doc-grid { padding-left: 20px; padding-right: 20px; }
}




/* ── v3 shell: lucide icons in the launcher/nav + Admin/tab badges (Phase 0.3) ── */
.fo-tile svg { width: 16px; height: 16px; color: var(--fo-ink-2); opacity: 0.85; flex: none; }
.fo-tile:hover svg { color: var(--fo-ink); opacity: 1; }
.fo-tile-badge { margin-left: auto; font-size: 8.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fo-warn); background: var(--fo-warn-soft); padding: 1px 5px; border-radius: 5px; flex: none; }
.fo-nav a svg.lucide { width: 18px; height: 18px; flex: none; }
.fo-nav-badge { margin-left: auto; font-size: 10px; font-weight: 700; color: var(--fo-accent-deep); background: var(--fo-accent-soft); padding: 0 6px; border-radius: 999px; }

/* ============================================================
   TICKETS — universal internal request desk (2026-07-02)
   Ported verbatim from the styleguide pattern set (fieldops.css).
   Net-new .fo-tkt-* over the shared patterns (worklist, record,
   settings, reporting, lite). Tokens only; states are .is-*.
   ============================================================ */

/* ---------- 6-up KPI band (the ticket desk) — one line ---------- */
.fo-inc-kpis.fo-tkt-6 { grid-template-columns: repeat(6, 1fr); }
.fo-inc-kpis.fo-tkt-6 .fo-inc-kpi { padding: 14px 16px; gap: 11px; }
.fo-inc-kpis.fo-tkt-6 .fo-inc-kpi .v { font-size: 27px; }
@media (max-width: 1240px) {
  .fo-inc-kpis.fo-tkt-6 { grid-template-columns: repeat(3, 1fr); }
  .fo-inc-kpis.fo-tkt-6 .fo-inc-kpi { border-top: 1px solid var(--fo-line); border-left: 1px solid var(--fo-line); }
  .fo-inc-kpis.fo-tkt-6 .fo-inc-kpi:nth-child(-n+3) { border-top: 0; }
  .fo-inc-kpis.fo-tkt-6 .fo-inc-kpi:nth-child(3n+1) { border-left: 0; }
}
@media (max-width: 620px) {
  .fo-inc-kpis.fo-tkt-6 { grid-template-columns: repeat(2, 1fr); }
  .fo-inc-kpis.fo-tkt-6 .fo-inc-kpi { border-top: 1px solid var(--fo-line); border-left: 1px solid var(--fo-line); }
  .fo-inc-kpis.fo-tkt-6 .fo-inc-kpi:nth-child(-n+2) { border-top: 0; }
  .fo-inc-kpis.fo-tkt-6 .fo-inc-kpi:nth-child(odd) { border-left: 0; }
}

/* ---------- status chip: the ticket's lifecycle state ---------- */
.fo-tkt-status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px 3px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 650; white-space: nowrap;
  background: var(--fo-canvas); color: var(--fo-ink-2);
}
.fo-tkt-status::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; flex: none;
}
.fo-tkt-status.is-new    { background: var(--fo-accent-soft); color: var(--fo-accent-deep); }
.fo-tkt-status.is-open   { background: var(--fo-info-soft);   color: var(--fo-info); }
.fo-tkt-status.is-pending{ background: var(--fo-warn-soft);   color: var(--fo-warn); }
.fo-tkt-status.is-hold   { background: var(--fo-canvas);      color: var(--fo-ink-3); }
.fo-tkt-status.is-solved { background: var(--fo-ok-soft);     color: var(--fo-ok); }
.fo-tkt-status.is-closed { background: var(--fo-canvas);      color: var(--fo-ink-3); }
.fo-tkt-status.is-closed::before { opacity: .55; }

/* ---------- priority: the .fo-sev severity idiom ---------- */
.fo-tkt-prio {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--fo-ink-2); white-space: nowrap;
}
.fo-tkt-prio .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--fo-ink-3); flex: none; }
.fo-tkt-prio.is-low    .dot { background: var(--fo-info); }
.fo-tkt-prio.is-med    .dot { background: var(--fo-warn); }
.fo-tkt-prio.is-high   .dot { background: var(--fo-danger); }
.fo-tkt-prio.is-urgent .dot { background: var(--fo-danger); box-shadow: 0 0 0 3px var(--fo-danger-soft); }
.fo-tkt-prio.is-urgent { color: var(--fo-danger); font-weight: 700; }

/* ---------- SLA countdown: time to breach, seen by both sides ---------- */
.fo-tkt-sla {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px 3px 7px; border-radius: 999px;
  font-size: 11.5px; font-weight: 650; white-space: nowrap;
  background: var(--fo-ok-soft); color: var(--fo-ok);
  font-variant-numeric: tabular-nums;
}
.fo-tkt-sla svg.fo-i { width: 13px; height: 13px; }
.fo-tkt-sla.is-warn     { background: var(--fo-warn-soft);   color: var(--fo-warn); }
.fo-tkt-sla.is-danger   { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-tkt-sla.is-breached { background: var(--fo-danger); color: #fff; }
.fo-tkt-sla.is-paused   { background: var(--fo-canvas); color: var(--fo-ink-3); }
.fo-tkt-sla.is-met      { background: var(--fo-ok-soft); color: var(--fo-ok); }

/* ---------- owner cell (queue + facts): one owner, always visible ---------- */
.fo-tkt-owner { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.fo-tkt-owner .nm { font-size: 13px; color: var(--fo-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fo-tkt-owner.is-none { color: var(--fo-ink-3); font-size: 12.5px; font-style: italic; }
.fo-tkt-owner.is-none .fo-ava {
  background: repeating-linear-gradient(-45deg, var(--fo-canvas) 0 4px, transparent 4px 8px);
  border: 1px dashed var(--fo-line-strong); color: var(--fo-ink-3);
}

/* small source/channel glyph in the queue */
.fo-tkt-src { display: inline-flex; color: var(--fo-ink-3); }
.fo-tkt-src svg.fo-i { width: 15px; height: 15px; }

/* ---------- deflection panel (compose + field): the KB at submit ---------- */
.fo-tkt-deflect {
  border: 1px solid var(--fo-line); border-radius: var(--fo-r-md);
  background: var(--fo-surface-2); overflow: hidden;
  transition: opacity var(--fo-base) var(--fo-ease);
}
.fo-tkt-deflect-head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; font-size: 12px; font-weight: 650; color: var(--fo-accent-deep);
}
.fo-tkt-deflect-head svg.fo-i { width: 15px; height: 15px; color: var(--fo-accent); }
.fo-tkt-deflect-head .sub { margin-left: auto; font-weight: 500; color: var(--fo-ink-3); font-size: 11.5px; }
.fo-tkt-deflect-list { display: flex; flex-direction: column; }
.fo-tkt-kb {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left;
  padding: 11px 12px; border: 0; border-top: 1px solid var(--fo-line);
  background: var(--fo-surface); cursor: pointer;
  transition: background var(--fo-fast) var(--fo-ease);
}
.fo-tkt-kb:hover { background: var(--fo-accent-soft); }
.fo-tkt-kb-ico { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: var(--fo-accent-soft); color: var(--fo-accent); }
.fo-tkt-kb-ico svg.fo-i { width: 16px; height: 16px; }
.fo-tkt-kb-main { min-width: 0; }
.fo-tkt-kb-t { font-size: 13px; font-weight: 600; color: var(--fo-ink); }
.fo-tkt-kb-d { font-size: 12px; color: var(--fo-ink-2); line-height: 1.45; margin-top: 1px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fo-tkt-kb-go { margin-left: auto; align-self: center; color: var(--fo-ink-3); flex: none; }
.fo-tkt-deflect-foot { padding: 9px 12px; border-top: 1px solid var(--fo-line);
  font-size: 12px; color: var(--fo-ink-3); display: flex; align-items: center; gap: 6px; }

/* ---------- routing preview: where it lands, live ---------- */
.fo-tkt-route {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--fo-r-md);
  background: linear-gradient(180deg, var(--fo-accent-soft), color-mix(in srgb, var(--fo-accent-soft) 55%, #fff));
  border: 1px solid color-mix(in srgb, var(--fo-accent) 16%, transparent);
}
.fo-tkt-route-ico { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: var(--fo-grad); color: #fff; box-shadow: var(--fo-shadow-1); }
.fo-tkt-route-ico svg.fo-i { width: 18px; height: 18px; }
.fo-tkt-route-main { min-width: 0; flex: 1; }
.fo-tkt-route-eye { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--fo-accent); }
.fo-tkt-route-team { font-size: 14px; font-weight: 700; color: var(--fo-ink); }
.fo-tkt-route-sub { font-size: 12px; color: var(--fo-ink-2); margin-top: 1px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fo-tkt-route-sub .fo-ava { width: 20px; height: 20px; font-size: 9px; }

/* ---------- AI "what to fix" panel (workspace aside) ---------- */
.fo-tkt-ai {
  border: 1px solid color-mix(in srgb, var(--fo-accent) 18%, transparent);
  border-radius: var(--fo-r-lg); overflow: hidden; background: var(--fo-surface);
}
.fo-tkt-ai-head {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  background: linear-gradient(180deg, var(--fo-accent-soft), transparent);
  font-size: 13px; font-weight: 700; color: var(--fo-ink);
}
.fo-tkt-ai-head svg.fo-i { width: 16px; height: 16px; color: var(--fo-accent); }
.fo-tkt-ai-head .tag { margin-left: auto; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--fo-accent); background: var(--fo-surface); border: 1px solid var(--fo-accent-soft); border-radius: 999px; padding: 2px 8px; }
.fo-tkt-ai-body { padding: 4px 14px 14px; display: flex; flex-direction: column; gap: 12px; }
.fo-tkt-ai-block .k { font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--fo-ink-3); margin-bottom: 5px; }
.fo-tkt-ai-block p { font-size: 13px; color: var(--fo-ink); line-height: 1.5; }
.fo-tkt-ai-sim { display: flex; flex-direction: column; gap: 6px; }
.fo-tkt-ai-simrow { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--fo-ink-2);
  padding: 7px 9px; background: var(--fo-surface-2); border-radius: 8px; }
.fo-tkt-ai-simrow .id { font-family: var(--fo-mono); font-size: 11px; color: var(--fo-accent); }
.fo-tkt-ai-acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- thread: public replies vs internal notes ---------- */
.fo-tkt-thread { display: flex; flex-direction: column; gap: 14px; }
.fo-tkt-msg { display: flex; gap: 11px; }
.fo-tkt-msg-body { min-width: 0; flex: 1;
  border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); padding: 11px 13px; background: var(--fo-surface); }
.fo-tkt-msg.is-internal .fo-tkt-msg-body {
  background: var(--fo-warn-soft); border-color: color-mix(in srgb, var(--fo-warn) 22%, transparent); }
.fo-tkt-msg-meta { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; margin-bottom: 4px; }
.fo-tkt-msg-meta b { font-size: 13px; color: var(--fo-ink); }
.fo-tkt-msg-meta .ts { font-size: 11.5px; color: var(--fo-ink-3); margin-left: auto; }
.fo-tkt-msg-tag { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 1px 6px; border-radius: 5px; }
.fo-tkt-msg-tag.is-internal { color: var(--fo-warn); background: color-mix(in srgb, var(--fo-warn) 14%, transparent); }
.fo-tkt-msg-tag.is-public { color: var(--fo-ink-3); background: var(--fo-canvas); }
.fo-tkt-msg-text { font-size: 13px; color: var(--fo-ink); line-height: 1.55; }
/* the composer's public/internal switch */
.fo-tkt-compose-mode { display: inline-flex; }

/* ---------- automation rule row (settings): when → if → then ---------- */
.fo-tkt-rule {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 13px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); background: var(--fo-surface);
}
.fo-tkt-rule-main { min-width: 0; }
.fo-tkt-rule-when { font-size: 13.5px; color: var(--fo-ink); line-height: 1.5; }
.fo-tkt-rule-when b { color: var(--fo-accent-deep); font-weight: 650; }
.fo-tkt-rule-flow { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 7px; }
.fo-tkt-rule-pill { display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: var(--fo-canvas); color: var(--fo-ink-2); }
.fo-tkt-rule-pill.is-if  { background: var(--fo-info-soft); color: var(--fo-info); }
.fo-tkt-rule-pill.is-then{ background: var(--fo-accent-soft); color: var(--fo-accent-deep); }
.fo-tkt-rule-flow .arr { color: var(--fo-ink-3); }

/* ---------- recurring-issue cluster (reporting): data → fixes ---------- */
.fo-tkt-cluster {
  border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); padding: 14px; background: var(--fo-surface);
  display: flex; flex-direction: column; gap: 10px;
}
.fo-tkt-cluster-top { display: flex; align-items: flex-start; gap: 11px; }
.fo-tkt-cluster-ct { flex: none; min-width: 46px; text-align: center; }
.fo-tkt-cluster-ct .n { font-family: var(--fo-font-display); font-size: 24px; font-weight: 800; color: var(--fo-danger); line-height: 1; }
.fo-tkt-cluster-ct .l { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--fo-ink-3); margin-top: 3px; }
.fo-tkt-cluster-main { min-width: 0; }
.fo-tkt-cluster-t { font-size: 14px; font-weight: 650; color: var(--fo-ink); }
.fo-tkt-cluster-d { font-size: 12.5px; color: var(--fo-ink-2); line-height: 1.5; margin-top: 2px; }
.fo-tkt-cluster-acts { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 2px; border-top: 1px solid var(--fo-line); }
.fo-tkt-cluster-acts { padding-top: 10px; }

/* ---------- help center hero + my-requests (requester front door) ---------- */
.fo-tkt-help {
  border-radius: var(--fo-r-xl); padding: 34px 28px; text-align: center;
  background:
    radial-gradient(120% 90% at 50% -30%, var(--fo-accent-soft), transparent 60%),
    var(--fo-surface);
  border: 1px solid var(--fo-line);
}
.fo-tkt-help-h { font-family: var(--fo-font-display); font-size: 24px; font-weight: 800; color: var(--fo-ink); letter-spacing: -0.01em; }
.fo-tkt-help-sub { font-size: 14px; color: var(--fo-ink-2); margin-top: 6px; }
.fo-tkt-help-search { max-width: 560px; margin: 18px auto 0; }
.fo-tkt-help-search .fo-search { height: 46px; border-radius: var(--fo-r-lg); }
.fo-tkt-help-search .fo-search .fo-input { font-size: 15px; }
.fo-tkt-help-quick { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }

.fo-tkt-mine { display: flex; flex-direction: column; }
.fo-tkt-mine-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 13px 4px; border: 0; border-bottom: 1px solid var(--fo-line); background: transparent; cursor: pointer;
}
.fo-tkt-mine-row:hover { background: var(--fo-surface-2); }
.fo-tkt-mine-row:last-child { border-bottom: 0; }
.fo-tkt-mine-main { min-width: 0; flex: 1; }
.fo-tkt-mine-t { font-size: 13.5px; font-weight: 600; color: var(--fo-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fo-tkt-mine-meta { font-size: 12px; color: var(--fo-ink-3); margin-top: 2px; }
.fo-tkt-mine-id { font-family: var(--fo-mono); font-size: 11px; color: var(--fo-ink-3); }

/* ---------- compose flagship: detect chip · live deflection · sent ---------- */
/* AI-detected category, revealed under the subject as you type */
.fo-tkt-detect {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 9px;
  font-size: 12px; color: var(--fo-ink-2);
  background: var(--fo-accent-soft); border-radius: 999px; padding: 4px 11px 4px 8px;
  max-width: 100%; opacity: 0; transform: translateY(-3px);
  transition: opacity var(--fo-base) var(--fo-ease), transform var(--fo-base) var(--fo-ease);
}
.fo-tkt-detect.is-on { opacity: 1; transform: none; }
.fo-tkt-detect svg.fo-i { width: 13px; height: 13px; color: var(--fo-accent); flex: none; }
.fo-tkt-detect b { color: var(--fo-accent-deep); font-weight: 700; }

/* expandable KB rows (live compose results) — wraps the existing .fo-tkt-kb header */
.fo-tkt-kbwrap { border-top: 1px solid var(--fo-line); }
.fo-tkt-kbwrap:first-child { border-top: 0; }
.fo-tkt-kbwrap > .fo-tkt-kb { border-top: 0; }
.fo-tkt-kbwrap.is-open > .fo-tkt-kb { background: var(--fo-accent-soft); }
.fo-tkt-kb-go svg.fo-i { transition: transform var(--fo-fast) var(--fo-ease); }
.fo-tkt-kbwrap.is-open .fo-tkt-kb-go svg.fo-i { transform: rotate(90deg); }
.fo-tkt-kb-answer { display: none; padding: 0 14px 13px 52px; }
.fo-tkt-kbwrap.is-open .fo-tkt-kb-answer { display: block; }
.fo-tkt-kb-answer p { font-size: 12.5px; color: var(--fo-ink-2); line-height: 1.55; margin: 0 0 10px; }
.fo-tkt-kb-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.fo-tkt-kb .hl { background: color-mix(in srgb, var(--fo-accent-sky) 40%, transparent); border-radius: 3px; padding: 0 1px; color: var(--fo-ink); }

/* searching skeleton (reuses .fo-skel) */
.fo-tkt-kb-skel { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-top: 1px solid var(--fo-line); }
.fo-tkt-kb-skel:first-child { border-top: 0; }
.fo-tkt-kb-skel .fo-skel { border-radius: 6px; }

/* no article matched — the honest "we'll route it to a person" */
.fo-tkt-deflect-none { display: flex; align-items: center; gap: 11px; padding: 14px; }
.fo-tkt-deflect-none .ic { width: 34px; height: 34px; border-radius: 9px; flex: none; display: grid; place-items: center; background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-tkt-deflect-none .ic svg.fo-i { width: 17px; height: 17px; }
.fo-tkt-deflect-none .tx { font-size: 12.5px; color: var(--fo-ink-2); line-height: 1.45; }
.fo-tkt-deflect-none .tx b { color: var(--fo-ink); font-weight: 650; display: block; }

/* idle prompt before there's enough text */
.fo-tkt-deflect-idle { display: flex; align-items: center; gap: 9px; padding: 14px; font-size: 12.5px; color: var(--fo-ink-3); }
.fo-tkt-deflect-idle svg.fo-i { width: 16px; height: 16px; color: var(--fo-ink-3); }

/* routing preview extras: confidence · target SLA · change team */
.fo-tkt-route-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 7px; }
.fo-tkt-route-conf { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--fo-ok); background: var(--fo-ok-soft); border-radius: 999px; padding: 2px 8px; }
.fo-tkt-route-target { font-size: 11.5px; color: var(--fo-ink-2); display: inline-flex; align-items: center; gap: 5px; }
.fo-tkt-route-target svg.fo-i { width: 13px; height: 13px; color: var(--fo-ink-3); }
.fo-tkt-route-change { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--fo-accent-deep); background: none; border: 0; cursor: pointer; padding: 4px 2px; border-radius: 6px; }
.fo-tkt-route-change:hover { text-decoration: underline; }

/* inline field error (the blocked/validation state) */
.fo-field.is-err .fo-input { border-color: var(--fo-danger); box-shadow: 0 0 0 3px var(--fo-danger-soft); }
.fo-tkt-fielderr { display: none; align-items: center; gap: 5px; font-size: 12px; color: var(--fo-danger); margin-top: 6px; }
.fo-tkt-fielderr svg.fo-i { width: 13px; height: 13px; }
.fo-field.is-err .fo-tkt-fielderr { display: flex; }

/* the confirmation that replaces the compose body on submit / deflect */
.fo-tkt-sent { text-align: center; padding: 22px 8px 8px; animation: fo-fade var(--fo-base) var(--fo-ease); }
.fo-tkt-sent .ring { width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; margin: 6px auto 16px; background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-tkt-sent.is-deflect .ring { background: var(--fo-accent-soft); color: var(--fo-accent); }
.fo-tkt-sent .ring svg.fo-i { width: 32px; height: 32px; }
.fo-tkt-sent h3 { font-family: var(--fo-font-display); font-size: 20px; font-weight: 800; color: var(--fo-ink); letter-spacing: -0.01em; }
.fo-tkt-sent > p { font-size: 13px; color: var(--fo-ink-2); margin-top: 6px; line-height: 1.5; max-width: 380px; margin-left: auto; margin-right: auto; }
.fo-tkt-sent-card { text-align: left; margin: 18px auto 0; max-width: 360px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); overflow: hidden; background: var(--fo-surface); }
.fo-tkt-sent-row { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-top: 1px solid var(--fo-line); font-size: 13px; }
.fo-tkt-sent-row:first-child { border-top: 0; }
.fo-tkt-sent-row .k { color: var(--fo-ink-3); }
.fo-tkt-sent-row .v { margin-left: auto; color: var(--fo-ink); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.fo-tkt-sent-num { font-family: var(--fo-mono); }

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .fo-tkt-rule { grid-template-columns: 1fr; }
  .fo-tkt-route { flex-wrap: wrap; }
  .fo-tkt-help { padding: 26px 18px; }
  .fo-tkt-route-change { margin-left: 0; }
}



/* ============================================================
   WORKERS' COMP — claims & case tracking (Safety Hub surface)
   Net-new .fo-wc-* over the case-record archetype. Tokens only;
   states are .is-*. Deadline countdowns reuse .fo-tkt-sla.
   ============================================================ */

/* ---------- status pipeline chip ---------- */
.fo-wc-status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px 3px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 650; white-space: nowrap;
  background: var(--fo-canvas); color: var(--fo-ink-2);
}
.fo-wc-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.fo-wc-status.is-reported      { background: var(--fo-accent-soft); color: var(--fo-accent-deep); }
.fo-wc-status.is-investigating { background: var(--fo-info-soft);   color: var(--fo-info); }
.fo-wc-status.is-treatment     { background: var(--fo-warn-soft);   color: var(--fo-warn); }
.fo-wc-status.is-lightduty     { background: var(--fo-info-soft);   color: var(--fo-info); }
.fo-wc-status.is-litigation    { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-wc-status.is-closed        { background: var(--fo-canvas);      color: var(--fo-ink-3); }
.fo-wc-status.is-closed::before { opacity: .55; }

/* ---------- OSHA recordability flag ---------- */
.fo-wc-osha {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .02em;
  background: var(--fo-danger-soft); color: var(--fo-danger);
}
.fo-wc-osha svg.fo-i { width: 12px; height: 12px; }
.fo-wc-osha.is-dart  { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-wc-osha.is-other { background: var(--fo-canvas); color: var(--fo-ink-2); }
.fo-wc-osha.is-none  { background: var(--fo-ok-soft); color: var(--fo-ok); }

/* ---------- confidential flag ---------- */
.fo-wc-confidential {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  color: var(--fo-ink-2); background: var(--fo-canvas); border: 1px solid var(--fo-line-strong);
  border-radius: 6px; padding: 2px 7px;
}
.fo-wc-confidential svg.fo-i { width: 12px; height: 12px; }

/* ---------- communications log (official record) ---------- */
.fo-wc-comm { display: flex; flex-direction: column; }
.fo-wc-comm-row { display: flex; gap: 12px; padding: 13px 2px; border-top: 1px solid var(--fo-line); }
.fo-wc-comm-row:first-child { border-top: 0; }
.fo-wc-comm-ico { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: var(--fo-surface-2); color: var(--fo-ink-2); }
.fo-wc-comm-ico svg.fo-i { width: 16px; height: 16px; }
.fo-wc-comm-row.is-out .fo-wc-comm-ico { background: var(--fo-accent-soft); color: var(--fo-accent); }
.fo-wc-comm-main { min-width: 0; flex: 1; }
.fo-wc-comm-top { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.fo-wc-comm-party { font-size: 13px; font-weight: 650; color: var(--fo-ink); }
.fo-wc-comm-dir { font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 1px 6px; border-radius: 5px; background: var(--fo-canvas); color: var(--fo-ink-3); }
.fo-wc-comm-dir.is-in  { background: var(--fo-info-soft); color: var(--fo-info); }
.fo-wc-comm-dir.is-out { background: var(--fo-accent-soft); color: var(--fo-accent-deep); }
.fo-wc-comm-time { margin-left: auto; font-size: 11.5px; color: var(--fo-ink-3); white-space: nowrap; }
.fo-wc-comm-subj { font-size: 13px; color: var(--fo-ink); margin-top: 2px; font-weight: 600; }
.fo-wc-comm-body { font-size: 12.5px; color: var(--fo-ink-2); line-height: 1.5; margin-top: 3px; }
.fo-wc-comm-atts { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 8px; }
.fo-wc-chan { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--fo-ink-2); }
.fo-wc-chan svg.fo-i { width: 13px; height: 13px; color: var(--fo-ink-3); }

/* ---------- financials ---------- */
.fo-wc-money { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--fo-line);
  border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); overflow: hidden; }
.fo-wc-money-cell { background: var(--fo-surface); padding: 12px 14px; }
.fo-wc-money-cell .k { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--fo-ink-3); }
.fo-wc-money-cell .v { font-family: var(--fo-font-display); font-size: 20px; font-weight: 750; color: var(--fo-ink); margin-top: 3px; font-variant-numeric: tabular-nums; }
.fo-wc-money-cell .sub { font-size: 11px; color: var(--fo-ink-3); margin-top: 2px; }
.fo-wc-money-cell.is-total .v { color: var(--fo-accent-deep); }
.fo-wc-money-split { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.fo-wc-money-split .r { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; }
.fo-wc-money-split .r b { color: var(--fo-ink-3); font-weight: 500; }
.fo-wc-money-split .r span { color: var(--fo-ink); font-weight: 650; font-variant-numeric: tabular-nums; }

/* ---------- return-to-work ---------- */
.fo-wc-rtw { display: flex; flex-direction: column; gap: 12px; }
.fo-wc-rtw-band { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: var(--fo-r-md); }
.fo-wc-rtw-band.is-full  { background: var(--fo-ok-soft); }
.fo-wc-rtw-band.is-light { background: var(--fo-warn-soft); }
.fo-wc-rtw-band.is-off   { background: var(--fo-danger-soft); }
.fo-wc-rtw-band .ic { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: #fff; }
.fo-wc-rtw-band.is-full .ic  { color: var(--fo-ok); }
.fo-wc-rtw-band.is-light .ic { color: var(--fo-warn); }
.fo-wc-rtw-band.is-off .ic   { color: var(--fo-danger); }
.fo-wc-rtw-band .tx .t { font-size: 14px; font-weight: 700; color: var(--fo-ink); }
.fo-wc-rtw-band .tx .d { font-size: 12px; color: var(--fo-ink-2); margin-top: 1px; }
.fo-wc-rtw-days { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fo-wc-rtw-day { border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); padding: 11px 13px; text-align: center; }
.fo-wc-rtw-day .n { font-family: var(--fo-font-display); font-size: 24px; font-weight: 800; color: var(--fo-ink); font-variant-numeric: tabular-nums; }
.fo-wc-rtw-day .l { font-size: 11px; color: var(--fo-ink-3); margin-top: 2px; }
.fo-wc-restrict { display: flex; gap: 7px; flex-wrap: wrap; }

/* ---------- appointment row ---------- */
.fo-wc-appt { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-top: 1px solid var(--fo-line); }
.fo-wc-appt:first-child { border-top: 0; }
.fo-wc-appt-date { flex: none; width: 46px; text-align: center; }
.fo-wc-appt-date .d { font-family: var(--fo-font-display); font-size: 18px; font-weight: 800; color: var(--fo-ink); line-height: 1; }
.fo-wc-appt-date .mo { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--fo-ink-3); margin-top: 2px; }
.fo-wc-appt-main { min-width: 0; flex: 1; }
.fo-wc-appt-t { font-size: 13.5px; font-weight: 600; color: var(--fo-ink); }
.fo-wc-appt-sub { font-size: 12px; color: var(--fo-ink-3); margin-top: 1px; }
.fo-wc-appt-type { flex: none; font-size: 11px; font-weight: 650; padding: 3px 9px; border-radius: 999px; background: var(--fo-accent-soft); color: var(--fo-accent-deep); }

/* ---------- follow-up task row ---------- */
.fo-wc-followup { display: flex; align-items: center; gap: 11px; padding: 11px 2px; border-top: 1px solid var(--fo-line); }
.fo-wc-followup:first-child { border-top: 0; }
.fo-wc-followup-box { flex: none; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--fo-line-strong); display: grid; place-items: center; color: transparent; cursor: pointer; background: var(--fo-surface); }
.fo-wc-followup.is-done .fo-wc-followup-box { background: var(--fo-ok); border-color: var(--fo-ok); color: #fff; }
.fo-wc-followup-box svg.fo-i { width: 13px; height: 13px; }
.fo-wc-followup-main { min-width: 0; flex: 1; }
.fo-wc-followup-t { font-size: 13.5px; color: var(--fo-ink); }
.fo-wc-followup.is-done .fo-wc-followup-t { text-decoration: line-through; color: var(--fo-ink-3); }
.fo-wc-followup-meta { font-size: 12px; color: var(--fo-ink-3); margin-top: 1px; display: flex; align-items: center; gap: 8px; }
.fo-wc-followup-due.is-over { color: var(--fo-danger); font-weight: 650; }

@media (max-width: 640px) {
  .fo-wc-money { grid-template-columns: 1fr; }
}



/* ========================================================== MESSAGING
   Crew Messages — two-pane desk, phone threads, broadcast w/ acks.
   One .fo-msg-* family (ported from the styleguide kit) + the .msb-*
   broadcast-page layout + .fo-me-appr status chips. */

.fo-msg-split {
  display: grid; grid-template-columns: 290px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg);
  background: var(--fo-surface); overflow: hidden; min-height: 540px;
  box-shadow: var(--fo-shadow-1);
}
.fo-msg-rail { border-right: 1px solid var(--fo-line); display: flex; flex-direction: column; min-width: 0; background: var(--fo-canvas); overflow-y: auto; overflow-x: hidden; }
.fo-msg-chan {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer;
  border: 0; border-bottom: 1px solid var(--fo-line); background: transparent; text-align: left; font: inherit; color: inherit;
  width: 100%;
}
.fo-msg-chan:hover { background: rgba(11, 63, 158, 0.03); }
.fo-msg-chan.is-active { background: var(--fo-surface); box-shadow: inset 3px 0 0 var(--fo-accent); }
.fo-msg-chan .glyph {
  width: 34px; height: 34px; border-radius: 10px; background: var(--fo-accent-soft);
  color: var(--fo-accent-deep); display: grid; place-items: center; flex: none; font-size: 12px; font-weight: 800;
}
.fo-msg-chan .glyph .fo-i { width: 15px; height: 15px; }
/* overflow:hidden makes the text column a clipping block so neither the name
   nor the preview can push the row wider than the 290px rail — the root cause
   of the horizontal scroll (the column was overflow:visible) */
.fo-msg-chan .d { flex: 1; min-width: 0; overflow: hidden; }
.fo-msg-chan .nm { font-size: 13px; font-weight: 700; color: var(--fo-ink); display: flex; align-items: center; gap: 6px; min-width: 0; }
/* the name is the one flex item allowed to shrink+ellipsis; a long unbroken
   channel slug (#251010-sebring-corporate-and-admin-offices) was an anonymous
   text node that refused to shrink, forcing the whole rail to scroll sideways */
.fo-msg-chan .nm-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fo-msg-chan .nm .fo-msg-unread { flex: none; }
/* display:block so the preview's own text-overflow:ellipsis actually applies
   (an inline span ignores overflow/ellipsis and ran long) */
.fo-msg-chan .pv { display: block; font-size: 11.5px; color: var(--fo-ink-3); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fo-msg-chan .tm { font-size: 10.5px; color: var(--fo-ink-3); flex: none; align-self: flex-start; margin-top: 2px; }
.fo-msg-unread {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--fo-accent); color: #fff; font-size: 10.5px; font-weight: 750;
  display: inline-grid; place-items: center;
}
/* inline-grid beats the [hidden] UA rule — without this the empty dock
   badge renders as a blue dot even at zero unread */
.fo-msg-unread[hidden] { display: none; }
.fo-msg-thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.fo-msg-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--fo-line); background: var(--fo-surface); }
.fo-msg-head .nm { font-size: 13.5px; font-weight: 750; color: var(--fo-ink); }
.fo-msg-head .sub { font-size: 11.5px; color: var(--fo-ink-3); margin-top: 1px; }
.fo-msg-back { display: none; align-items: center; gap: 4px; border: 0; background: none; color: var(--fo-accent-deep); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; padding: 4px 6px 4px 0; }
.fo-msg-pin {
  display: flex; align-items: center; gap: 8px; padding: 8px 16px;
  background: var(--fo-accent-soft); color: var(--fo-accent-deep);
  font-size: 12px; border-bottom: 1px solid var(--fo-line);
}
.fo-msg-pin .fo-i { width: 13px; height: 13px; flex: none; }
.fo-msg-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.fo-msg-day {
  align-self: center; font-size: 10.5px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--fo-ink-3); background: var(--fo-canvas);
  border-radius: 999px; padding: 3px 11px; margin: 6px 0;
}
.fo-msg-day.is-new { color: var(--fo-accent-deep); background: var(--fo-accent-soft); }
.fo-msg { display: flex; gap: 9px; max-width: 100%; }
.fo-msg .ava {
  width: 28px; height: 28px; border-radius: 50%; background: var(--fo-accent-soft);
  color: var(--fo-accent-deep); display: grid; place-items: center; font-size: 10px; font-weight: 800; flex: none;
  align-self: flex-end;
}
.fo-msg .bub {
  max-width: 72%; padding: 9px 13px; border-radius: 15px;
  background: var(--fo-surface); border: 1px solid var(--fo-line);
  font-size: 13px; line-height: 1.5; color: var(--fo-ink);
  border-bottom-left-radius: 5px;
}
.fo-msg .who { font-size: 11px; font-weight: 750; color: var(--fo-accent-deep); margin-bottom: 2px; display: flex; align-items: baseline; gap: 7px; }
.fo-msg .who .wt { font-weight: 600; font-size: 10px; color: var(--fo-ink-3); }
.fo-msg .meta { font-size: 10.5px; color: var(--fo-ink-3); margin-top: 4px; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.fo-msg .meta .rcpt-btn { border: 0; background: none; padding: 0; font: inherit; font-size: 10.5px; color: inherit; cursor: pointer; text-decoration: underline dotted; }
.fo-msg .tr {
  margin-top: 7px; padding-top: 7px; border-top: 1px dashed var(--fo-line);
  font-size: 12.5px; font-style: italic; color: var(--fo-ink-2);
}
.fo-msg .ph { width: 240px; max-width: 100%; border-radius: 10px; overflow: hidden; margin-bottom: 6px; }
.fo-msg .ph img { display: block; width: 100%; max-height: 220px; object-fit: cover; }
.fo-msg.is-mine { justify-content: flex-end; }
.fo-msg.is-mine .bub {
  background: var(--fo-accent); border-color: var(--fo-accent); color: #fff;
  border-bottom-left-radius: 15px; border-bottom-right-radius: 5px;
}
.fo-msg.is-mine .bub .meta { color: rgba(255, 255, 255, 0.75); justify-content: flex-end; }

/* ── sender grouping — avatar + name show once per run; continuations
   tighten toward the message above and drop the repeated identity ── */
.fo-msg .ava.is-ghost { background: transparent; color: transparent; }
.fo-msg.is-cont { margin-top: -6px; }
.fo-msg.is-cont .bub { border-top-left-radius: 6px; }
.fo-msg.is-mine.is-cont .bub { border-top-left-radius: 15px; border-top-right-radius: 6px; }
/* quiet timestamps: one per run. Theirs live on the name line; mine sit in the
   meta and fold away on continuations, leaving just the read receipt. */
.fo-msg .meta .t { color: inherit; }
.fo-msg.is-cont .meta .t { display: none; }

/* file attachment chip — icon well + name + size, an authed download link
   (api_img forces Content-Disposition: attachment for kind='file') */
.fo-msg .fchip {
  display: flex; align-items: center; gap: 9px; max-width: 100%; margin-bottom: 5px;
  padding: 8px 11px; border-radius: 12px; background: var(--fo-canvas);
  border: 1px solid var(--fo-line); color: var(--fo-ink); text-decoration: none;
  transition: border-color var(--fo-fast) var(--fo-ease);
}
.fo-msg .fchip:hover { border-color: var(--fo-accent); }
.fo-msg .fchip-ic { width: 32px; height: 32px; border-radius: 9px; background: var(--fo-accent-soft);
  color: var(--fo-accent-deep); display: grid; place-items: center; flex: none; }
.fo-msg .fchip-ic .fo-i { width: 16px; height: 16px; }
.fo-msg .fchip-tx { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.fo-msg .fchip-nm { font-size: 12.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fo-msg .fchip-sz { font-size: 10.5px; color: var(--fo-ink-3); }
.fo-msg .fchip-dl { width: 16px; height: 16px; flex: none; color: var(--fo-ink-3); }
.fo-msg.is-mine .fchip { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.fo-msg.is-mine .fchip:hover { border-color: rgba(255, 255, 255, 0.55); }
.fo-msg.is-mine .fchip-ic { background: rgba(255, 255, 255, 0.22); color: #fff; }
.fo-msg.is-mine .fchip-sz, .fo-msg.is-mine .fchip-dl { color: rgba(255, 255, 255, 0.75); }

/* honest send states for attachments — optimistic bubble while uploading,
   an inline retry when it fails (the file is held so one tap re-sends) */
.fo-upl { display: flex; align-items: center; gap: 9px; min-width: 0; }
.fo-upl .fo-i { width: 16px; height: 16px; flex: none; opacity: .9; }
.fo-upl-nm { font-size: 12.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fo-upl-spin { width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor;
  border-top-color: transparent; opacity: .6; animation: fo-spin .7s linear infinite; flex: none; }
.fo-msg.is-pending .bub { opacity: .82; }
.fo-msg.is-failed .bub { background: var(--fo-danger-soft); border-color: rgba(179, 38, 30, 0.28); color: var(--fo-danger); }
.fo-msg.is-failed .bub .meta { color: var(--fo-danger); justify-content: flex-end; }
.fo-upl-retry { border: 0; background: none; padding: 0; font: inherit; font-weight: 750; color: inherit; text-decoration: underline; cursor: pointer; }

/* empty conversation — a quiet invitation, not a void */
.fo-msg-empty { margin: auto; max-width: 300px; padding: 30px 20px; display: flex;
  flex-direction: column; align-items: center; text-align: center; gap: 5px; }
.fo-msg-empty-mark { width: 54px; height: 54px; border-radius: 16px; background: var(--fo-accent-soft);
  color: var(--fo-accent); display: grid; place-items: center; margin-bottom: 8px; }
.fo-msg-empty-mark .fo-i { width: 24px; height: 24px; }
.fo-msg-empty-t { font-size: 14.5px; font-weight: 750; color: var(--fo-ink); }
.fo-msg-empty-s { font-size: 12.5px; color: var(--fo-ink-3); line-height: 1.5; }

.fo-msg.is-sys { justify-content: center; }
.fo-msg.is-sys .bub {
  max-width: 88%; background: var(--fo-accent-soft); border-color: transparent;
  border-radius: 12px; font-size: 12px; color: var(--fo-accent-deep); text-align: center;
}
.fo-msg.is-urgent .bub { box-shadow: 0 0 0 2px var(--fo-danger-soft); border-color: rgba(179, 38, 30, 0.35); }
.fo-msg.is-urgent .ava { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-msg.is-urgent .who { color: var(--fo-danger); }
.fo-msg-ackbtn {
  display: block; width: 100%; margin-top: 8px; padding: 9px; border: 0; border-radius: 9px;
  background: var(--fo-danger); color: #fff; font: inherit; font-weight: 750;
  letter-spacing: .06em; font-size: 12px; cursor: pointer;
}
.fo-msg-ackok { margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--fo-ok); }
.fo-msg-write {
  display: flex; align-items: center; gap: 9px; padding: 12px 14px;
  border-top: 1px solid var(--fo-line); background: var(--fo-surface);
}
.fo-msg-write input[type="text"] {
  flex: 1; min-width: 0; height: 38px; padding: 0 14px; border: 1px solid var(--fo-line);
  border-radius: 999px; font: inherit; font-size: 13px; background: var(--fo-canvas); color: var(--fo-ink); outline: none;
}
.fo-msg-write input[type="text"]:focus { border-color: var(--fo-accent); background: var(--fo-surface); }
.fo-msg-lock {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px;
  border-top: 1px solid var(--fo-line); font-size: 12.5px; color: var(--fo-ink-3);
}
.fo-msg-lock .fo-i { width: 13px; height: 13px; }
/* phone: rail is the first screen; opening a channel slides to the thread */
@media (max-width: 920px) {
  .fo-msg-split { grid-template-columns: 1fr; }
  .fo-msg-thread { display: none; }
  .fo-msg-split.is-open .fo-msg-rail { display: none; }
  .fo-msg-split.is-open .fo-msg-thread { display: flex; }
  .fo-msg-back { display: inline-flex; }
}

/* status chips shared with the phone rail (ported .fo-me-appr family) */
.fo-me-appr {
  display: inline-flex; align-items: center; gap: 5px; padding: 2.5px 9px;
  border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap;
}
.fo-me-appr .fo-i { width: 12px; height: 12px; }
.fo-me-appr.is-pending { background: var(--fo-warn-soft);   color: var(--fo-warn); }
.fo-me-appr.is-ok      { background: var(--fo-ok-soft);     color: var(--fo-ok); }
.fo-me-appr.is-no      { background: var(--fo-danger-soft); color: var(--fo-danger); }

/* broadcast page — compose | tracker layout */
.msb-grid { display: grid; gap: 20px; grid-template-columns: 430px minmax(0, 1fr); align-items: start; }
@media (max-width: 1080px) { .msb-grid { grid-template-columns: 1fr; } }
.msb-dl { display: flex; align-items: flex-start; gap: 9px; padding: 9px 2px; border-top: 1px solid var(--fo-line); font-size: 12.5px; color: var(--fo-ink-2); line-height: 1.5; }
.msb-dl:first-child { border-top: 0; }
.msb-dl > .fo-i { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--fo-ink-3); }
.msb-dl b { color: var(--fo-ink); font-weight: 700; }
.msb-ack { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 26px; padding: 12px 18px 14px; border-top: 1px solid var(--fo-line); background: var(--fo-canvas); }
@media (max-width: 720px) { .msb-ack { grid-template-columns: 1fr; } }
.msb-ack .r { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: 12px; min-width: 0; }
.msb-ack .r .nm { font-weight: 600; color: var(--fo-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msb-ack .r .tm { color: var(--fo-ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; flex: none; }
.msb-past { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-top: 1px solid var(--fo-line); }
.msb-past:first-child { border-top: 0; }
.msb-past .glyph { width: 34px; height: 34px; border-radius: 10px; background: var(--fo-accent-soft); color: var(--fo-accent-deep); display: grid; place-items: center; flex: none; }
.msb-past .glyph .fo-i { width: 16px; height: 16px; }
.msb-past .tx { flex: 1; min-width: 0; }
.msb-past .nm { font-size: 13px; font-weight: 650; color: var(--fo-ink); }
.msb-past .hp { font-size: 11.5px; color: var(--fo-ink-3); margin-top: 1px; line-height: 1.45; }

/* floating dock — ONE pill, two buttons (Messages + assistant) */
.fo-dock {
  position: fixed; bottom: 22px; right: 22px; z-index: 40;
  display: flex; align-items: center; gap: 2px; padding: 3px;
  border-radius: 999px; background: var(--fo-surface);
  border: 1px solid var(--fo-line); box-shadow: var(--fo-shadow-2);
}
@media (max-width: 920px) { .fo-dock { bottom: 16px; right: 16px; } }
.fo-dockbtn {
  position: relative; width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: transparent; color: var(--fo-accent);
  display: grid; place-items: center; cursor: pointer;
  transition: background var(--fo-fast) var(--fo-ease), transform var(--fo-fast) var(--fo-ease);
}
.fo-dockbtn:hover { background: var(--fo-accent-soft); transform: translateY(-1px); }
.fo-dockbtn.is-on { background: var(--fo-accent); color: #fff; }
.fo-dockbtn .fo-i { width: 19px; height: 19px; }
.fo-dock-div { width: 1px; height: 20px; background: var(--fo-line); flex: none; }
.fo-dockbtn .fo-msg-unread { position: absolute; top: -1px; right: -1px; box-shadow: 0 0 0 2px var(--fo-surface); }
.fo-msgdock { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.fo-msgdock-list { overflow-y: auto; overflow-x: hidden; flex: 1; min-height: 0; }
.fo-msgdock-list[hidden] { display: none; }
.fo-msgdock-thread { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.fo-msgdock-thread[hidden] { display: none; }
.fo-msgdock-tophead { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--fo-line); font-weight: 700; font-size: 13px; flex: none; }
.fo-msgdock-back { border: 0; background: none; cursor: pointer; color: var(--fo-accent-deep); display: grid; place-items: center; width: 26px; height: 26px; padding: 0; }
.fo-msgdock-back .fo-i { width: 14px; height: 14px; }
.fo-msgdock .fo-msg-scroll { padding: 12px 14px; }
.fo-msgdock .fo-msg-write .snd { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--fo-accent); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.fo-msgdock .fo-msg-write .snd .fo-i { width: 15px; height: 15px; }
/* the dock composer's attach button mirrors the desk's — a quiet round ghost */
.fo-msgdock .fo-msg-write .att { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--fo-line); background: var(--fo-surface); color: var(--fo-accent); display: grid; place-items: center; cursor: pointer; flex: none; transition: background var(--fo-fast) var(--fo-ease); }
.fo-msgdock .fo-msg-write .att:hover { background: var(--fo-accent-soft); }
.fo-msgdock .fo-msg-write .att .fo-i { width: 16px; height: 16px; }

/* .fo-field is display:flex, which beats the UA [hidden] rule — intake
   drawers toggle whole fields via the hidden attribute (styleguide guard) */
.fo-field[hidden] { display: none; }
/* ============================================================= ESTIMATING
   Preconstruction — takeoff → pricing → proposal (pattern set).
   Composes the worklist / record / settings archetypes; deadline
   countdowns reuse .fo-tkt-sla. One .fo-est-* family. */

/* ---------- status: the estimate pipeline ---------- */
.fo-est-status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px 3px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 650; white-space: nowrap;
}
.fo-est-status::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; flex: none;
}
.fo-est-status.is-draft     { background: var(--fo-canvas);      color: var(--fo-ink-3); }
.fo-est-status.is-takeoff   { background: var(--fo-info-soft);   color: var(--fo-info); }
.fo-est-status.is-pricing   { background: var(--fo-warn-soft);   color: var(--fo-warn); }
.fo-est-status.is-review    { background: var(--fo-accent-soft); color: var(--fo-accent-deep); }
.fo-est-status.is-submitted { background: var(--fo-accent);      color: var(--fo-accent-ink); }
.fo-est-status.is-won       { background: var(--fo-ok-soft);     color: var(--fo-ok); }
.fo-est-status.is-lost      { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-est-status.is-lost::before { opacity: .6; }

/* record-column KPI band: same idiom, 2×2 inside a record's main column —
   the rail + aside leave too little width for 4-up without truncating */
.fo-iv-main .fo-inc-kpis { grid-template-columns: repeat(2, 1fr); }
.fo-iv-main .fo-inc-kpis .fo-inc-kpi { padding: 14px 18px; gap: 12px; }
.fo-iv-main .fo-inc-kpis .fo-inc-kpi .v { font-size: 24px; }
.fo-iv-main .fo-inc-kpis .fo-inc-kpi:nth-child(odd)  { border-left: 0; }
.fo-iv-main .fo-inc-kpis .fo-inc-kpi:nth-child(even) { border-left: 1px solid var(--fo-line); }
.fo-iv-main .fo-inc-kpis .fo-inc-kpi:nth-child(n+3)  { border-top: 1px solid var(--fo-line); }
@media (max-width: 640px) {
  .fo-iv-main .fo-inc-kpis { grid-template-columns: 1fr; }
  .fo-iv-main .fo-inc-kpis .fo-inc-kpi:nth-child(even) { border-left: 0; }
  .fo-iv-main .fo-inc-kpis .fo-inc-kpi:nth-child(n+2)  { border-top: 1px solid var(--fo-line); }
}

/* five COMPACT KPIs in a record column (jobs overview) stay ONE line —
   the 2×2 idiom above is for 4-up bands whose values are too wide */
.fo-iv-main .fo-inc-kpis.fo-ex-5 { grid-template-columns: repeat(5, 1fr); }
.fo-iv-main .fo-inc-kpis.fo-ex-5 .fo-inc-kpi { padding: 13px 14px; gap: 10px; border-top: 0; }
.fo-iv-main .fo-inc-kpis.fo-ex-5 .fo-inc-kpi:nth-child(odd),
.fo-iv-main .fo-inc-kpis.fo-ex-5 .fo-inc-kpi:nth-child(even) { border-left: 1px solid var(--fo-line); }
.fo-iv-main .fo-inc-kpis.fo-ex-5 .fo-inc-kpi:first-child { border-left: 0; }
@media (max-width: 1100px) {
  .fo-iv-main .fo-inc-kpis.fo-ex-5 { grid-template-columns: repeat(3, 1fr); }
  .fo-iv-main .fo-inc-kpis.fo-ex-5 .fo-inc-kpi:nth-child(n+4) { border-top: 1px solid var(--fo-line); }
  .fo-iv-main .fo-inc-kpis.fo-ex-5 .fo-inc-kpi:nth-child(3n+1) { border-left: 0; }
}
@media (max-width: 700px) {
  .fo-iv-main .fo-inc-kpis.fo-ex-5 { grid-template-columns: 1fr; }
  .fo-iv-main .fo-inc-kpis.fo-ex-5 .fo-inc-kpi:nth-child(odd),
  .fo-iv-main .fo-inc-kpis.fo-ex-5 .fo-inc-kpi:nth-child(even) { border-left: 0; }
  .fo-iv-main .fo-inc-kpis.fo-ex-5 .fo-inc-kpi:nth-child(n+2) { border-top: 1px solid var(--fo-line); }
}

/* ---------- money stat (aside snapshot + summary) ---------- */
.fo-est-money { min-width: 0; }
.fo-est-money .v {
  font-size: 21px; font-weight: 750; letter-spacing: -0.02em;
  color: var(--fo-ink); font-variant-numeric: tabular-nums; line-height: 1.15;
}
.fo-est-money .v.is-sell { color: var(--fo-accent-deep); }
.fo-est-money .l { font-size: 11.5px; font-weight: 600; color: var(--fo-ink-3); margin-top: 2px; }
.fo-est-money .s { font-size: 11.5px; color: var(--fo-ink-3); margin-top: 1px; }

/* ---------- price build-up: cost → markups → sell ---------- */
.fo-est-stack { display: flex; flex-direction: column; }
.fo-est-stack-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 2px; border-bottom: 1px solid var(--fo-line); font-size: 13px;
}
.fo-est-stack-row .n { flex: 1; min-width: 0; font-weight: 600; color: var(--fo-ink-2); }
.fo-est-stack-row .n .sub { display: block; font-size: 11.5px; font-weight: 450; color: var(--fo-ink-3); margin-top: 1px; }
.fo-est-stack-row .pct {
  font-size: 11px; font-weight: 650; color: var(--fo-ink-3);
  background: var(--fo-canvas); border-radius: 999px; padding: 2px 7px;
  font-variant-numeric: tabular-nums;
}
.fo-est-stack-row .amt { font-weight: 650; color: var(--fo-ink); font-variant-numeric: tabular-nums; }
.fo-est-stack-row.is-subtotal { border-bottom: 1px solid var(--fo-line-strong); }
.fo-est-stack-row.is-subtotal .n, .fo-est-stack-row.is-subtotal .amt { font-weight: 750; color: var(--fo-ink); }
.fo-est-stack-row.is-sell { border-bottom: 0; padding-top: 12px; }
.fo-est-stack-row.is-sell .n { font-weight: 750; color: var(--fo-ink); }
.fo-est-stack-row.is-sell .amt { font-size: 18px; font-weight: 800; color: var(--fo-accent-deep); }

/* ---------- margin meter (with target notch) ---------- */
.fo-est-margin { min-width: 0; }
.fo-est-margin-top {
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: 12px; color: var(--fo-ink-3); margin-bottom: 6px;
}
.fo-est-margin-top b { font-size: 14px; font-weight: 750; color: var(--fo-ink); font-variant-numeric: tabular-nums; }
.fo-est-margin-bar { position: relative; height: 8px; border-radius: 6px; background: var(--fo-canvas); }
.fo-est-margin-fill { height: 100%; border-radius: 6px; background: var(--fo-accent); transition: width .4s var(--fo-ease); }
.fo-est-margin.is-low  .fo-est-margin-fill { background: var(--fo-danger); }
.fo-est-margin.is-ok   .fo-est-margin-fill { background: var(--fo-ok); }
.fo-est-margin-target {
  position: absolute; top: -3px; width: 2px; height: 14px;
  background: var(--fo-ink-3); border-radius: 1px;
}

/* ---------- takeoff sheet: division groups + line items ---------- */
.fo-est-sheet {
  border: 1px solid var(--fo-line); border-radius: var(--fo-r-md);
  background: var(--fo-surface); overflow: hidden;
}
.fo-est-cols, .fo-est-div, .fo-est-line {
  display: grid; align-items: center; gap: 0 10px; padding: 0 12px;
  grid-template-columns: minmax(0, 1fr) 76px 56px 104px 80px 112px 34px;
}
.fo-est-cols {
  height: 34px; background: var(--fo-canvas); border-bottom: 1px solid var(--fo-line);
  font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--fo-ink-3);
}
.fo-est-cols .num, .fo-est-line .num, .fo-est-div .num { text-align: right; font-variant-numeric: tabular-nums; }
.fo-est-div {
  min-height: 38px; background: var(--fo-canvas); border-top: 1px solid var(--fo-line);
  cursor: pointer; user-select: none;
}
.fo-est-div:first-of-type { border-top: 0; }
.fo-est-div .t { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12.5px; font-weight: 700; color: var(--fo-ink); }
.fo-est-div .t .fo-i { width: 14px; height: 14px; color: var(--fo-ink-3); transition: transform .18s var(--fo-ease); flex: none; }
.fo-est-div.is-open .t .fo-i { transform: rotate(90deg); }
.fo-est-div .code {
  font-size: 10.5px; font-weight: 750; color: var(--fo-accent-deep);
  background: var(--fo-accent-soft); border-radius: 6px; padding: 2px 7px; flex: none;
  font-variant-numeric: tabular-nums;
}
.fo-est-div .num { font-size: 12.5px; font-weight: 700; color: var(--fo-ink); }
.fo-est-line { min-height: 42px; border-top: 1px solid var(--fo-line); font-size: 13px; color: var(--fo-ink); }
.fo-est-line:hover { background: rgba(11, 63, 158, 0.025); }
.fo-est-line .d { min-width: 0; padding: 7px 0; }
.fo-est-line .d .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fo-est-line .d .sub { font-size: 11.5px; color: var(--fo-ink-3); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fo-est-line .unit { color: var(--fo-ink-3); font-size: 12px; }
.fo-est-line .tot { font-weight: 650; }
.fo-est-line .fo-icon-btn { opacity: 0; transition: opacity .15s; }
.fo-est-line:hover .fo-icon-btn, .fo-est-line .fo-icon-btn[aria-expanded="true"] { opacity: 1; }
/* inline edit: a cell swaps to an input on dblclick */
.fo-est-cell-input {
  width: 100%; height: 28px; padding: 0 7px; border: 1px solid var(--fo-accent);
  border-radius: 7px; font: inherit; font-size: 12.5px; text-align: right;
  background: var(--fo-surface); color: var(--fo-ink); outline: none;
  box-shadow: 0 0 0 3px var(--fo-accent-soft); font-variant-numeric: tabular-nums;
}
.fo-est-sheet-foot {
  display: flex; justify-content: flex-end; align-items: baseline; gap: 26px;
  padding: 11px 14px; background: var(--fo-canvas); border-top: 1px solid var(--fo-line-strong);
  font-size: 12.5px; color: var(--fo-ink-2);
}
.fo-est-sheet-foot b { font-size: 14px; font-weight: 750; color: var(--fo-ink); font-variant-numeric: tabular-nums; }

/* ---------- alternates ---------- */
.fo-est-alt {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); background: var(--fo-surface);
}
.fo-est-alt-main { flex: 1; min-width: 0; }
.fo-est-alt-t { font-size: 13.5px; font-weight: 650; color: var(--fo-ink); }
.fo-est-alt-s { font-size: 12px; color: var(--fo-ink-3); margin-top: 1px; }
.fo-est-alt .amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fo-est-altchip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px;
  border-radius: 999px; font-size: 11.5px; font-weight: 700; flex: none;
}
.fo-est-altchip.is-add    { background: var(--fo-ok-soft);     color: var(--fo-ok); }
.fo-est-altchip.is-deduct { background: var(--fo-danger-soft); color: var(--fo-danger); }

/* ---------- inclusions / exclusions ---------- */
.fo-est-incl { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.fo-est-incl h4 {
  margin: 0 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--fo-ink-3);
}
.fo-est-incl ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.fo-est-incl li { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--fo-ink-2); }
.fo-est-incl li .fo-i { width: 15px; height: 15px; flex: none; margin-top: 1.5px; }
.fo-est-incl .is-in  li .fo-i { color: var(--fo-ok); }
.fo-est-incl .is-out li .fo-i { color: var(--fo-ink-3); }

/* ---------- rate library ---------- */
.fo-est-rate {
  display: grid; align-items: center; gap: 0 10px; padding: 0 12px; min-height: 44px;
  grid-template-columns: minmax(0, 1fr) 64px 104px 88px 130px 34px;
  border-top: 1px solid var(--fo-line); font-size: 13px; background: var(--fo-surface);
}
.fo-est-rate:hover { background: rgba(11, 63, 158, 0.025); }
.fo-est-rate .num { text-align: right; font-variant-numeric: tabular-nums; }
.fo-est-rate .d { min-width: 0; padding: 7px 0; }
.fo-est-rate .d .nm { font-weight: 600; display: flex; align-items: center; gap: 7px; }
.fo-est-rate .d .sub { font-size: 11.5px; color: var(--fo-ink-3); margin-top: 1px; }
.fo-est-asmchip {
  display: inline-flex; align-items: center; gap: 4px; padding: 1.5px 7px;
  border-radius: 999px; font-size: 10.5px; font-weight: 700;
  background: var(--fo-accent-soft); color: var(--fo-accent-deep); flex: none;
}
.fo-est-asm-comp {
  display: grid; align-items: center; gap: 0 10px; min-height: 36px; font-size: 12.5px;
  grid-template-columns: minmax(0, 1fr) 64px 104px 88px 130px 34px;
  padding: 0 12px 0 34px; border-top: 1px dashed var(--fo-line);
  color: var(--fo-ink-2); background: var(--fo-canvas);
}
.fo-est-asm-comp .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- proposal sheet ---------- */
.fo-est-prop {
  max-width: 820px; margin: 0 auto; padding: 44px 52px;
  background: #fff; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md);
  box-shadow: 0 10px 34px rgba(18, 24, 40, 0.07);
}
.fo-est-prop-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  padding-bottom: 18px; border-bottom: 2px solid var(--fo-accent); margin-bottom: 22px;
}
.fo-est-prop-brand { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; color: var(--fo-accent-deep); }
.fo-est-prop-brand .sub { display: block; font-size: 11.5px; font-weight: 500; color: var(--fo-ink-3); margin-top: 3px; letter-spacing: 0; }
.fo-est-prop-meta { text-align: right; font-size: 12px; color: var(--fo-ink-2); line-height: 1.6; }
.fo-est-prop h3 {
  margin: 22px 0 9px; font-size: 11.5px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--fo-ink-3);
}
.fo-est-prop p { margin: 0 0 10px; font-size: 13px; line-height: 1.65; color: var(--fo-ink-2); }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .fo-est-cols, .fo-est-div, .fo-est-line { grid-template-columns: minmax(0, 1fr) 68px 88px 100px 30px; }
  .fo-est-cols .hide-md, .fo-est-div .hide-md, .fo-est-line .hide-md { display: none; }
  .fo-est-rate, .fo-est-asm-comp { grid-template-columns: minmax(0, 1fr) 56px 92px 30px; }
  .fo-est-rate .hide-md, .fo-est-asm-comp .hide-md { display: none; }
  .fo-est-prop { padding: 30px 26px; }
}
@media (max-width: 640px) {
  .fo-est-incl { grid-template-columns: 1fr; }
  .fo-est-line .fo-icon-btn { opacity: 1; }
}

/* seg fills its row — ported from the styleguide (intake Start-from etc.) */
.fo-seg.is-fill { display: flex; width: 100%; }
.fo-seg.is-fill a,
.fo-seg.is-fill button { flex: 1 1 0; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }

/* ============================================================= BID BOARD
   Preconstruction pipeline â€” ITBs from invited to won/lost, client
   relationships, the go/no-go scorecard. Introduces the kanban pattern.
   One .fo-bid-* family. */

/* the kanban board */
.fo-bid-board {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(248px, 1fr);
  gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start;
  scrollbar-width: thin;
}
.fo-bid-col { min-width: 0; }
.fo-bid-col-h {
  display: flex; align-items: baseline; gap: 8px; padding: 0 4px 10px;
}
.fo-bid-col-h .nm {
  font-size: 11px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase;
  color: var(--fo-ink-2);
}
.fo-bid-col-h .ct {
  font-size: 11px; font-weight: 700; color: var(--fo-ink-3);
  background: var(--fo-canvas); border-radius: 999px; padding: 1px 8px;
}
.fo-bid-col-h .sum { margin-left: auto; font-size: 11px; font-weight: 650; color: var(--fo-ink-3); font-variant-numeric: tabular-nums; }
.fo-bid-col-body { display: flex; flex-direction: column; gap: 9px; min-height: 60px; }
.fo-bid-card {
  border: 1px solid var(--fo-line); border-radius: var(--fo-r-md);
  background: var(--fo-surface); padding: 12px 13px; cursor: pointer;
  box-shadow: 0 1px 2px rgba(18, 24, 40, 0.04);
  transition: box-shadow .15s, transform .15s, border-color .15s;
}
.fo-bid-card:hover { box-shadow: 0 8px 22px -10px rgba(18, 24, 40, 0.18); transform: translateY(-1px); }
.fo-bid-card .nm { font-size: 13px; font-weight: 700; color: var(--fo-ink); line-height: 1.35; }
.fo-bid-card .cl { font-size: 11.5px; color: var(--fo-ink-3); margin-top: 2px; }
.fo-bid-card .chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.fo-bid-card .foot {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
  padding-top: 9px; border-top: 1px solid var(--fo-line);
  font-size: 11.5px; color: var(--fo-ink-3);
}
.fo-bid-card .foot .sp { flex: 1; }
.fo-bid-card.is-won  { border-color: rgba(24, 129, 80, 0.35); }
.fo-bid-card.is-lost { opacity: .75; }
.fo-bid-col.is-drop .fo-bid-col-body {
  outline: 2px dashed var(--fo-accent-sky); outline-offset: 4px; border-radius: var(--fo-r-md);
}

/* pipeline lanes (.is-lanes) — the board fills the rest of the viewport and
   each stage is a soft rail, so the kanban ends where the page does instead
   of stopping mid-air. The calendar reuses .fo-bid-board as a bare week grid
   and keeps the original look. */
.fo-bid-board.is-lanes {
  align-items: stretch;
  min-height: max(420px, calc(100dvh - 424px));
}
.fo-bid-board.is-lanes .fo-bid-col {
  display: flex; flex-direction: column;
  background: var(--fo-canvas); border-radius: var(--fo-r-lg);
  padding: 12px 10px 10px;
}
.fo-bid-board.is-lanes .fo-bid-col-h { padding: 0 6px 10px; }
.fo-bid-board.is-lanes .fo-bid-col-h .ct { background: var(--fo-surface); }
.fo-bid-board.is-lanes .fo-bid-col-body { flex: 1; }

/* the board is the page's one horizontal scroll container — a closed card
   menu (visibility:hidden is still a box) counts as scrollable overflow, so
   every card grew the scroll area and pinned a permanent phantom scrollbar
   under the lanes. Closed menus leave layout entirely here; @starting-style
   keeps the spring entrance in engines that animate from display:none. */
.fo-bid-board .fo-menu:not(.is-open) { display: none; }
@starting-style {
  .fo-bid-board .fo-menu.is-open { transform: translateY(-6px) scale(0.96); }
}

/* outcome + value chips */
.fo-bid-outcome {
  display: inline-flex; align-items: center; gap: 5px; padding: 2.5px 9px;
  border-radius: 999px; font-size: 11px; font-weight: 750; white-space: nowrap;
  text-transform: uppercase; letter-spacing: .03em;
}
.fo-bid-outcome .fo-i { width: 12px; height: 12px; }
.fo-bid-outcome.is-won  { background: var(--fo-ok-soft);     color: var(--fo-ok); }
.fo-bid-outcome.is-lost { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-bid-val {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; background: var(--fo-canvas); color: var(--fo-ink-2);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* go / no-go scorecard rows */
.fo-bid-score { display: flex; flex-direction: column; }
.fo-bid-score-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 110px 44px; gap: 12px;
  align-items: center; padding: 9px 2px; border-bottom: 1px solid var(--fo-line);
  font-size: 13px;
}
.fo-bid-score-row .n { color: var(--fo-ink-2); font-weight: 600; }
.fo-bid-score-row .n small { display: block; font-size: 11px; font-weight: 450; color: var(--fo-ink-3); }
.fo-bid-dots { display: flex; gap: 4px; }
.fo-bid-dots i {
  width: 16px; height: 8px; border-radius: 5px; background: var(--fo-canvas); cursor: pointer;
}
.fo-bid-dots i.is-on { background: var(--fo-accent); }
.fo-bid-score-row .v { text-align: right; font-weight: 750; color: var(--fo-ink); font-variant-numeric: tabular-nums; }
.fo-bid-score-row.is-sum { border-bottom: 0; }
.fo-bid-score-row.is-sum .n, .fo-bid-score-row.is-sum .v { font-weight: 800; color: var(--fo-ink); }

/* client relationship stat block */
.fo-bid-rel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fo-bid-rel .b {
  border: 1px solid var(--fo-line); border-radius: var(--fo-r-md);
  background: var(--fo-surface); padding: 10px 12px; min-width: 0;
}
.fo-bid-rel .v {
  font-family: var(--fo-font-display); font-size: 19px; font-weight: 800;
  letter-spacing: -0.02em; color: var(--fo-ink); font-variant-numeric: tabular-nums;
}
.fo-bid-rel .l { font-size: 10.5px; font-weight: 650; color: var(--fo-ink-3); margin-top: 2px; }

@media (max-width: 920px) {
  .fo-bid-board { grid-auto-columns: minmax(228px, 78vw); }
}


/* =============================================================== HR INBOX
   The HR mailbox, triaged by AI before anyone opens it — a split reading
   surface: the email list with a category + confidence read on every row,
   and a reading pane where the original email, the AI read (summary +
   extracted facts), and ONE suggested action sit in order.
   Ported 1:1 from New App/static/css/fieldops.css §HR INBOX — every var it
   references already exists in this file, so no token remaps were needed.
   One .fo-hrx-* family. */

.fo-hrx-split {
  display: grid; grid-template-columns: 336px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg);
  background: var(--fo-surface); overflow: hidden; min-height: 560px;
  box-shadow: var(--fo-shadow-1);
}

/* ── the list ── */
.fo-hrx-list { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--fo-line); background: var(--fo-canvas); }
.fo-hrx-tabs { padding: 12px 14px; border-bottom: 1px solid var(--fo-line); background: var(--fo-surface); }
.fo-hrx-rows { flex: 1; min-height: 0; overflow-y: auto; }
.fo-hrx-row {
  display: flex; gap: 10px; width: 100%; padding: 12px 14px; cursor: pointer;
  border: 0; border-bottom: 1px solid var(--fo-line); background: transparent;
  text-align: left; font: inherit; color: inherit;
}
.fo-hrx-row:hover { background: rgba(11, 63, 158, 0.03); }
.fo-hrx-row.is-active { background: var(--fo-surface); box-shadow: inset 3px 0 0 var(--fo-accent); }
.fo-hrx-row .fo-ava { width: 32px; height: 32px; font-size: 11px; flex: none; margin-top: 1px; }
.fo-hrx-row .d { flex: 1; min-width: 0; }
.fo-hrx-row .top { display: flex; align-items: baseline; gap: 8px; }
.fo-hrx-row .nm {
  display: inline-flex; align-items: center; gap: 6px; min-width: 0;
  font-size: 12.5px; font-weight: 650; color: var(--fo-ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fo-hrx-row .tm { margin-left: auto; flex: none; font-size: 10.5px; color: var(--fo-ink-3); font-variant-numeric: tabular-nums; }
.fo-hrx-row .sj, .fo-hrx-row .sn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fo-hrx-row .sj { font-size: 12.5px; font-weight: 600; color: var(--fo-ink-2); margin-top: 1px; }
.fo-hrx-row .sn { font-size: 11.5px; color: var(--fo-ink-3); margin-top: 1px; }
.fo-hrx-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--fo-accent); flex: none; display: none; }
.fo-hrx-row.is-unread .fo-hrx-dot { display: inline-block; }
.fo-hrx-row.is-unread .nm, .fo-hrx-row.is-unread .sj { font-weight: 800; color: var(--fo-ink); }

/* the AI chip — category + confidence; the tone IS the confidence */
.fo-hrx-tag {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%; margin-top: 6px;
  padding: 2.5px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 750; white-space: nowrap;
}
.fo-hrx-tag .fo-i { width: 11px; height: 11px; flex: none; }
.fo-hrx-tag .pct { font-weight: 650; opacity: 0.72; font-variant-numeric: tabular-nums; }
.fo-hrx-tag.is-hi { background: var(--fo-accent-soft); color: var(--fo-accent-deep); }
.fo-hrx-tag.is-lo { background: var(--fo-surface); color: var(--fo-ink-2); border: 1px dashed var(--fo-line-strong); }
.fo-hrx-tag.is-mute { background: var(--fo-surface); color: var(--fo-ink-3); border: 1px solid var(--fo-line); }
.fo-hrx-tag.is-done { background: var(--fo-ok-soft); color: var(--fo-ok); }

/* ── the reading pane ── */
.fo-hrx-pane {
  min-width: 0; min-height: 0; overflow-y: auto; padding: 20px 22px;
  display: flex; flex-direction: column; gap: 14px; background: var(--fo-surface);
}
.fo-hrx-back {
  display: none; align-items: center; gap: 6px; align-self: flex-start;
  border: 0; background: none; padding: 0; font: inherit; font-size: 12.5px;
  font-weight: 700; color: var(--fo-accent-deep); cursor: pointer;
}
.fo-hrx-back .fo-i { width: 13px; height: 13px; }

/* 1 · the original email */
.fo-hrx-mail { border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); background: var(--fo-surface); }
.fo-hrx-mailhead { display: flex; align-items: flex-start; gap: 11px; padding: 13px 16px; border-bottom: 1px solid var(--fo-line); }
.fo-hrx-mailhead .fo-ava { width: 36px; height: 36px; font-size: 12.5px; flex: none; }
.fo-hrx-mailhead .d { flex: 1; min-width: 0; }
.fo-hrx-mailhead .sj { font-size: 14.5px; font-weight: 750; letter-spacing: -0.01em; color: var(--fo-ink); }
.fo-hrx-mailhead .who { font-size: 11.5px; color: var(--fo-ink-3); margin-top: 2px; }
.fo-hrx-mailhead .who b { color: var(--fo-ink-2); font-weight: 650; }
.fo-hrx-mailhead .tm { flex: none; font-size: 11px; color: var(--fo-ink-3); white-space: nowrap; }
.fo-hrx-mailbody { padding: 14px 16px; font-size: 13px; line-height: 1.65; color: var(--fo-ink-2); }
.fo-hrx-mailbody p { margin: 0 0 10px; }
.fo-hrx-mailbody p:last-child { margin-bottom: 0; }
.fo-hrx-att {
  display: flex; align-items: center; gap: 9px; margin: 0 16px 14px; padding: 9px 12px;
  border: 1px solid var(--fo-line); border-radius: 10px; background: var(--fo-canvas);
  font-size: 12.5px; font-weight: 650; color: var(--fo-ink);
}
.fo-hrx-att .fo-i { width: 15px; height: 15px; flex: none; color: var(--fo-accent-deep); }
.fo-hrx-att small { font-weight: 500; color: var(--fo-ink-3); }
.fo-hrx-att .fo-btn { margin-left: auto; }

/* 2 · the AI read — summary + extracted facts */
.fo-hrx-read { border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); background: var(--fo-surface); padding: 14px 16px; }
.fo-hrx-read-hd {
  display: flex; align-items: center; gap: 7px; font-size: 10.5px; font-weight: 750;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--fo-accent-deep);
}
.fo-hrx-read-hd .fo-i { width: 13px; height: 13px; flex: none; }
.fo-hrx-read-hd .fo-hrx-tag { margin: 0 0 0 auto; }
.fo-hrx-read p { margin: 9px 0 0; font-size: 13px; line-height: 1.6; color: var(--fo-ink-2); }
.fo-hrx-facts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.fo-hrx-fact {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 4.5px 11px;
  border: 1px solid var(--fo-line); border-radius: 999px; background: var(--fo-canvas); font-size: 12px;
}
.fo-hrx-fact .k { font-size: 10px; font-weight: 750; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fo-ink-3); }
.fo-hrx-fact .v { font-weight: 700; color: var(--fo-ink); }

/* 3 · THE suggested action — the hero */
.fo-hrx-action {
  border: 1px solid rgba(11, 63, 158, 0.22); border-radius: var(--fo-r-lg);
  background: linear-gradient(180deg, rgba(11, 63, 158, 0.05), rgba(11, 63, 158, 0.015));
  padding: 16px;
}
.fo-hrx-action-hd { display: flex; align-items: center; gap: 12px; }
.fo-hrx-action-hd .glyph {
  width: 40px; height: 40px; border-radius: 12px; background: var(--fo-accent); color: #fff;
  display: grid; place-items: center; flex: none;
}
.fo-hrx-action-hd .glyph .fo-i { width: 18px; height: 18px; }
.fo-hrx-action-hd .kick { font-size: 10px; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fo-accent-deep); }
.fo-hrx-action-hd .ttl { font-family: var(--fo-font-display); font-size: 16.5px; font-weight: 750; letter-spacing: -0.015em; color: var(--fo-ink); margin-top: 1px; }
.fo-hrx-pre { margin-top: 13px; border-top: 1px solid rgba(11, 63, 158, 0.14); }
.fo-hrx-pre .r {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 7.5px 2px; border-bottom: 1px dashed rgba(11, 63, 158, 0.14); font-size: 12.5px;
}
.fo-hrx-pre .r:last-child { border-bottom: 0; }
.fo-hrx-pre .k { flex: none; font-weight: 600; color: var(--fo-ink-3); }
.fo-hrx-pre .v { min-width: 0; text-align: right; font-weight: 700; color: var(--fo-ink); }
.fo-hrx-caution {
  display: flex; align-items: center; gap: 7px; margin-top: 12px; padding: 8px 12px;
  border-radius: 10px; background: var(--fo-warn-soft); color: var(--fo-warn); font-size: 12px; font-weight: 650;
}
.fo-hrx-caution .fo-i { width: 13px; height: 13px; flex: none; }
.fo-hrx-action-fw { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 13px; }
.fo-hrx-alt {
  margin-left: auto; border: 0; background: none; padding: 0; font: inherit; font-size: 12px;
  font-weight: 650; color: var(--fo-ink-3); cursor: pointer;
  text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px;
}
.fo-hrx-alt:hover { color: var(--fo-accent-deep); }

/* the recorded outcome — what a done email keeps instead of an action */
.fo-hrx-outcome {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border: 1px solid rgba(24, 129, 80, 0.25); border-radius: var(--fo-r-lg); background: var(--fo-ok-soft);
}
.fo-hrx-outcome .glyph { width: 36px; height: 36px; border-radius: 50%; background: var(--fo-ok); color: #fff; display: grid; place-items: center; flex: none; }
.fo-hrx-outcome .glyph .fo-i { width: 16px; height: 16px; }
.fo-hrx-outcome .ttl { font-size: 13.5px; font-weight: 750; color: var(--fo-ink); }
.fo-hrx-outcome .sub { font-size: 12px; color: var(--fo-ink-2); margin-top: 1px; }

/* 4 · the drafted reply — collapsed, with a copy affordance */
.fo-hrx-reply { border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); background: var(--fo-surface); }
.fo-hrx-reply summary {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px; cursor: pointer;
  list-style: none; font-size: 12.5px; font-weight: 700; color: var(--fo-ink); user-select: none;
}
.fo-hrx-reply summary::-webkit-details-marker { display: none; }
.fo-hrx-reply summary > .fo-i { width: 14px; height: 14px; flex: none; color: var(--fo-accent-deep); }
.fo-hrx-reply summary .tw { margin-left: auto; width: 13px; height: 13px; flex: none; color: var(--fo-ink-3); transition: transform var(--fo-fast) var(--fo-ease); }
.fo-hrx-reply[open] summary .tw { transform: rotate(180deg); }
.fo-hrx-reply-body { padding: 12px 16px 14px; border-top: 1px dashed var(--fo-line); }
.fo-hrx-reply-body p { margin: 0 0 10px; font-size: 13px; line-height: 1.65; color: var(--fo-ink-2); }
.fo-hrx-reply-body p:last-of-type { margin-bottom: 12px; }

/* 5 · footer actions */
.fo-hrx-foot { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding-top: 2px; }
.fo-hrx-foot .sp { flex: 1; }

/* ── phone — the split collapses to list → detail ── */
@media (max-width: 900px) {
  .fo-hrx-split { grid-template-columns: 1fr; }
  .fo-hrx-list { border-right: 0; }
  .fo-hrx-pane { display: none; }
  .fo-hrx-split.is-detail .fo-hrx-list { display: none; }
  .fo-hrx-split.is-detail .fo-hrx-pane { display: flex; }
  .fo-hrx-back { display: inline-flex; }
}

/* ── HR Inbox — live-module additions (states the styleguide mock doesn't
   show but the real surface must: AI-unavailable triage, the re-triage
   control, the action picker, and the no-mailbox blank). Same family, and
   every value is an existing var or the accent/ok literals already used above. */

/* AI hasn't triaged yet (no key, or the call failed) — an honest pending tone;
   the email is still fully actionable underneath it */
.fo-hrx-tag.is-pending { background: var(--fo-warn-soft); color: var(--fo-warn); }

/* re-triage — a quiet control in the AI-read header (update-gated) */
.fo-hrx-retriage {
  display: inline-flex; align-items: center; gap: 5px; margin-left: auto;
  border: 0; background: none; padding: 0; font: inherit; font-size: 11px;
  font-weight: 700; color: var(--fo-ink-3); cursor: pointer;
}
.fo-hrx-retriage:hover { color: var(--fo-accent-deep); }
.fo-hrx-retriage .fo-i { width: 12px; height: 12px; flex: none; }
.fo-hrx-read-hd .fo-hrx-retriage + .fo-hrx-tag { margin-left: 8px; }

/* action picker — "Not this — choose another action" (create-gated) */
.fo-hrx-picker { margin-top: 12px; padding-top: 12px; border-top: 1px dashed rgba(11, 63, 158, 0.14); }
.fo-hrx-picker .lb { font-size: 10px; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fo-accent-deep); }
.fo-hrx-picker-opts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.fo-hrx-pick {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border: 1px solid var(--fo-line); border-radius: 999px; background: var(--fo-surface);
  font: inherit; font-size: 12px; font-weight: 700; color: var(--fo-ink-2); cursor: pointer;
}
.fo-hrx-pick:hover { border-color: var(--fo-accent); color: var(--fo-accent-deep); background: var(--fo-accent-soft); }
.fo-hrx-pick.is-on { border-color: var(--fo-accent); color: var(--fo-accent-deep); background: var(--fo-accent-soft); }
.fo-hrx-pick .fo-i { width: 13px; height: 13px; flex: none; }

/* no mailbox connected yet — the bordered blank that replaces the split */
.fo-hrx-blank {
  border: 1px solid var(--fo-line); border-radius: var(--fo-r-lg);
  background: var(--fo-surface); box-shadow: var(--fo-shadow-1);
}
.fo-hrx-blank .fo-btn { margin-top: 14px; }

/* ── Celebrate drawer (Celebrations page): multi-person shout-out / DM / announcement ── */
.fo-cele-recips { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; min-height: 30px; }
.fo-cele-empty { font-size: 12.5px; color: var(--fo-ink-3); }
.fo-cele-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.fo-cele-quickbtn { display: inline-flex; align-items: center; gap: 6px; border: 1px dashed var(--fo-line-strong); background: transparent; color: var(--fo-accent); border-radius: 999px; padding: 5px 12px; font: 600 12px var(--fo-font); cursor: pointer; transition: background var(--fo-fast) var(--fo-ease), border-color var(--fo-fast) var(--fo-ease), opacity var(--fo-fast) var(--fo-ease); }
.fo-cele-quickbtn:hover:not(:disabled) { background: var(--fo-accent-soft); border-color: var(--fo-accent); }
.fo-cele-quickbtn:disabled { opacity: 0.4; cursor: default; }
.fo-cele-quickbtn svg.fo-i { width: 13px; height: 13px; }

.fo-cele-channels { display: flex; flex-direction: column; gap: 9px; }
.fo-cele-ch { display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px 13px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); background: var(--fo-surface); cursor: pointer; transition: border-color var(--fo-fast) var(--fo-ease), background var(--fo-fast) var(--fo-ease); }
.fo-cele-ch:hover { border-color: var(--fo-line-strong); background: var(--fo-surface-2); }
.fo-cele-ch:has(input:checked) { border-color: var(--fo-accent); background: var(--fo-accent-soft); }
.fo-cele-ch-face { width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid; place-items: center; background: var(--fo-surface-2); color: var(--fo-accent); transition: background var(--fo-fast) var(--fo-ease); }
.fo-cele-ch:has(input:checked) .fo-cele-ch-face { background: #fff; }
.fo-cele-ch-face svg.fo-i { width: 16px; height: 16px; }
.fo-cele-ch-txt { display: flex; flex-direction: column; gap: 1px; line-height: 1.3; }
.fo-cele-ch-txt b { font-size: 13.5px; font-weight: 650; color: var(--fo-ink); }
.fo-cele-ch-txt span { font-size: 11.5px; color: var(--fo-ink-3); }
.fo-cele-nochan { display: flex; gap: 11px; align-items: flex-start; padding: 13px; border-radius: var(--fo-r-md); background: var(--fo-surface-2); border: 1px solid var(--fo-line); }
.fo-cele-nochan svg.fo-i { width: 17px; height: 17px; color: var(--fo-ink-3); flex: none; margin-top: 1px; }
.fo-cele-nochan b { display: block; font-size: 13px; font-weight: 650; color: var(--fo-ink); }
.fo-cele-nochan span { display: block; font-size: 12px; color: var(--fo-ink-3); margin-top: 2px; }

.fo-cele-themes { display: flex; flex-wrap: wrap; gap: 6px; }
.fo-cele-themehint { margin-top: 7px; font-size: 11.5px; color: var(--fo-ink-3); }
.fo-cele-optional { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--fo-ink-3); }
.fo-cele-drop { margin-top: 2px; }
.fo-cele-photoprev { margin-top: 10px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); overflow: hidden; }
.fo-cele-photoprev img { display: block; width: 100%; max-height: 180px; object-fit: cover; }
.fo-cele-photoprev .bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 11px; background: var(--fo-surface-2); }
.fo-cele-photoprev .nm { font-size: 12px; color: var(--fo-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fo-cele-photoprev .rm { display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; color: var(--fo-danger); font: 600 12px var(--fo-font); cursor: pointer; flex: none; }
.fo-cele-photoprev .rm svg.fo-i { width: 13px; height: 13px; }

.fo-cele-tokens { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.fo-cele-tokhint { font-size: 11.5px; color: var(--fo-ink-3); font-weight: 600; }
.fo-cele-tok { border: 1px dashed var(--fo-line-strong); background: var(--fo-surface); color: var(--fo-accent-deep); border-radius: 6px; padding: 2px 7px; font: 600 11.5px var(--fo-font); cursor: pointer; transition: background var(--fo-fast) var(--fo-ease), border-color var(--fo-fast) var(--fo-ease); }
.fo-cele-tok:hover { background: var(--fo-accent-soft); border-color: var(--fo-accent); }
.fo-cele-aichip { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--fo-warn); background: var(--fo-warn-soft); border-radius: 999px; padding: 3px 9px; }
.fo-cele-aichip svg.fo-i { width: 13px; height: 13px; }

.fo-cele-preview { margin-top: 10px; padding: 10px 13px; border-left: 2.5px solid var(--fo-accent); background: var(--fo-accent-soft); border-radius: 0 var(--fo-r-sm) var(--fo-r-sm) 0; }
.fo-cele-preview-lbl { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; color: var(--fo-accent-deep); margin-bottom: 3px; }
.fo-cele-preview-txt { font-size: 13px; color: var(--fo-ink); line-height: 1.5; white-space: pre-wrap; }

.fo-cele-fails { margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--fo-line); }
.fo-cele-faillist { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.fo-cele-fail { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: var(--fo-r-sm); background: var(--fo-danger-soft); }
.fo-cele-fail-ava { width: 26px; height: 26px; border-radius: 999px; background: var(--fo-danger); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; flex: none; }
.fo-cele-fail-main { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.fo-cele-fail-main .nm { font-size: 13px; font-weight: 600; color: var(--fo-ink); }
.fo-cele-fail-main .rs { font-size: 11.5px; color: var(--fo-danger); }


/* ============================================= COMPLIANCE COMMAND CENTER
   People / subcontractor / fleet expirations on one board — the Safety Hub
   compliance hub's Command Center (/safety-hub/compliance/center). Ported
   from the approved styleguide page (New App templates/styleguide/
   compliance-center.html), .cc-* renamed .fo-cc-*; the status pill is the
   styleguide's .fo-cq-ready readiness chip, not previously in this file.
   Wave 2 armed the hold banner: .fo-cc-note is the shared shell (amber),
   .is-done flips it green once overridden, .fo-cc-ov-form is the reason
   form, .fo-cc-audit the logged line — the styleguide's .cc-hold trio.
   One .fo-cc-* family; everything else on the page is existing kit. */

.fo-cc-note { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: var(--fo-r-md); background: var(--fo-warn-soft); margin-bottom: 16px; }
.fo-cc-note > svg.fo-i { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--fo-warn); }
.fo-cc-note-t { font-size: 13.5px; font-weight: 700; color: var(--fo-ink); }
.fo-cc-note-s { font-size: 12px; line-height: 1.55; color: var(--fo-ink-2); margin-top: 2px; }

.fo-cc-cred { display: flex; align-items: center; gap: 11px; padding: 9px 2px; border-bottom: 1px solid var(--fo-line); }
.fo-cc-cred:last-child { border-bottom: 0; }
.fo-cc-tile { width: 28px; height: 28px; border-radius: 8px; flex: none; display: grid; place-items: center; font-size: 8.5px; font-weight: 800; letter-spacing: 0.04em; color: var(--fo-danger); background: var(--fo-danger-soft); }
.fo-cc-tile.is-img { color: var(--fo-accent); background: var(--fo-accent-soft); }
.fo-cc-cred .d { flex: 1; min-width: 0; }
.fo-cc-cred .nm { font-size: 13px; font-weight: 650; color: var(--fo-ink); }
.fo-cc-cred .sub { font-size: 11.5px; color: var(--fo-ink-3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-cc-cred .when { flex: none; font-size: 12px; font-weight: 650; color: var(--fo-ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fo-cc-cred.is-bad .when { color: var(--fo-danger); }
.fo-cc-cred.is-warn .when { color: var(--fo-warn); }

.fo-cc-pol { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--fo-line); font-size: 12.5px; line-height: 1.55; color: var(--fo-ink-2); }
.fo-cc-pol:last-child { border-bottom: 0; }
.fo-cc-pol b { flex: none; width: 72px; color: var(--fo-ink); font-weight: 700; }
.fo-cc-polfoot { display: flex; align-items: flex-start; gap: 7px; margin-top: 4px; padding: 11px 0 2px; border-top: 1px solid var(--fo-line); font-size: 12px; line-height: 1.55; color: var(--fo-ink-3); }
.fo-cc-polfoot svg.fo-i { width: 13px; height: 13px; flex: none; margin-top: 2px; }

/* status pill — Expired / Expiring · Nd / Current / Missing / HOLD */
.fo-cc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 750; white-space: nowrap; }
.fo-cc-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.fo-cc-chip.is-ok { background: var(--fo-ok-soft); color: var(--fo-ok); }
.fo-cc-chip.is-warn { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-cc-chip.is-bad { background: var(--fo-danger-soft); color: var(--fo-danger); }

/* Wave 2 — the hold banner arms: live (amber .fo-cc-note) → reason form →
   overridden (green .is-done) with the audited line underneath. */
.fo-cc-note.is-done { background: var(--fo-ok-soft); }
.fo-cc-note.is-done > svg.fo-i { color: var(--fo-ok); }
.fo-cc-ov-form { display: flex; gap: 8px; margin-top: 11px; flex-wrap: wrap; }
.fo-cc-ov-form .fo-input { flex: 1; min-width: 200px; background: var(--fo-surface); }
.fo-cc-audit { display: flex; align-items: flex-start; gap: 7px; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(17, 20, 24, 0.08); font-size: 12px; line-height: 1.55; color: var(--fo-ink-2); }
.fo-cc-audit svg.fo-i { width: 13px; height: 13px; flex: none; margin-top: 2px; color: var(--fo-ink-3); }

/* ════════════════════════════════════════════════════════════════════════
   INSPECTIONS & AUDITS module (Wave 3 + Wave 4) — .fo-ia-*
   Ported from the approved styleguide (inspections-hub.html): template
   gallery pack headers + card grid, the on-fail automation glyphs, and
   the Wave-4 queue story row (held-equipment consequence strip).
   ════════════════════════════════════════════════════════════════════════ */
.fo-ia-gal { padding: 16px; border-top: 1px solid var(--fo-line); display: grid; gap: 20px; }
.fo-ia-pack { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 11px; font-weight: 750; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fo-ink-3); }
.fo-ia-pack svg.fo-i { width: 14px; height: 14px; flex: none; }
.fo-ia-pack .n { font-weight: 650; opacity: 0.85; }
.fo-ia-pack .ln { flex: 1; height: 1px; background: var(--fo-line); }
.fo-ia-packgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 12px; }
.fo-ia-tcard { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); background: var(--fo-surface); padding: 13px 14px 12px; box-shadow: var(--fo-shadow-1); transition: border-color var(--fo-fast) var(--fo-ease), box-shadow var(--fo-fast) var(--fo-ease); }
.fo-ia-tcard:hover { border-color: var(--fo-line-strong); box-shadow: var(--fo-shadow-2); }
.fo-ia-tcard .hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.fo-ia-tcard .nm { font-size: 13px; font-weight: 700; letter-spacing: -0.01em; color: var(--fo-ink); line-height: 1.25; }
.fo-ia-tcard .sub { font-size: 11.5px; line-height: 1.45; color: var(--fo-ink-3); flex: 1; }
.fo-ia-tcard .meta { font-size: 11px; font-weight: 600; color: var(--fo-ink-2); margin-top: 7px; padding-top: 9px; border-top: 1px solid var(--fo-line); }
.fo-ia-tcard .ft { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.fo-ia-tcard .use { font-size: 11px; color: var(--fo-ink-3); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fo-ia-tcard .use.is-idle { font-style: italic; }
.fo-ia-autogl { flex: none; width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: var(--fo-accent-soft); color: var(--fo-accent-deep); }
.fo-ia-autogl svg.fo-i { width: 15px; height: 15px; }
.fo-ia-autogl.is-danger { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-ia-autogl.is-warn { background: var(--fo-warn-soft); color: var(--fo-warn); }
.fo-ia-autogl.is-ink { background: var(--fo-canvas); color: var(--fo-ink-2); }
/* W4 — queue story row: the held-equipment consequence, inline under its row */
.fo-table tbody tr.fo-ia-storyrow td { border-top: 0; padding: 0 16px 12px 48px; }
.fo-table tbody tr.fo-ia-storyrow:hover { background: none; }
.fo-ia-storyrow .fo-insp-capa { margin-top: 0; }
/* ═══ end Inspections & Audits (.fo-ia-*) ═══ */

/* ═══ Punch & Closeout (.fo-pn-*) ════════════════════════════════════════
   Punch items to zero, then the turnover binder. Ported 1:1 from the LOCKED
   styleguide pages (New App punch-board / punch-closeout / punch-settings).
   .fo-cq-bar (the small done/total progress bar) ships here too — punch is
   the first Live-app module to use it. */
.fo-cq-bar { width: 92px; height: 6px; border-radius: 5px; background: var(--fo-canvas); overflow: hidden; flex: none; }
.fo-cq-bar i { display: block; height: 100%; border-radius: 5px; background: var(--fo-ok); }
.fo-cq-bar.is-short i { background: var(--fo-danger); }
.fo-pn-st {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 8px;
  border-radius: 999px; font-size: 11.5px; font-weight: 650; white-space: nowrap;
}
.fo-pn-st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.fo-pn-st.is-open     { background: var(--fo-accent-soft); color: var(--fo-accent-deep); }
.fo-pn-st.is-ready    { background: var(--fo-warn-soft);   color: var(--fo-warn); }
.fo-pn-st.is-closed   { background: var(--fo-ok-soft);     color: var(--fo-ok); }
.fo-pn-st.is-rejected { background: var(--fo-danger-soft); color: var(--fo-danger); }
.fo-pn-room {
  display: flex; align-items: baseline; gap: 10px; padding: 12px 2px 8px;
  font-size: 12px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; color: var(--fo-ink-2);
}
.fo-pn-room .ct { font-weight: 650; color: var(--fo-ink-3); font-variant-numeric: tabular-nums; text-transform: none; letter-spacing: 0; }
.fo-pn-photos { display: flex; gap: 8px; }
.fo-pn-photos .ph {
  width: 92px; height: 68px; border-radius: 9px; background: var(--fo-canvas);
  border: 1px solid var(--fo-line); position: relative; overflow: hidden;
  display: grid; place-items: center; color: var(--fo-ink-3);
}
.fo-pn-photos .ph .fo-i { width: 18px; height: 18px; }
.fo-pn-photos .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fo-pn-photos .ph .tag {
  position: absolute; bottom: 4px; left: 4px; font-size: 9px; font-weight: 750;
  letter-spacing: .04em; text-transform: uppercase; padding: 1.5px 6px; border-radius: 999px;
  background: rgba(18, 24, 40, 0.72); color: #fff; z-index: 1;
}
.fo-pn-sec {
  display: flex; align-items: center; gap: 13px; padding: 13px 14px;
  border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); background: var(--fo-surface);
}
.fo-pn-sec .glyph {
  width: 36px; height: 36px; border-radius: 10px; background: var(--fo-accent-soft);
  color: var(--fo-accent-deep); display: grid; place-items: center; flex: none;
}
.fo-pn-sec .glyph .fo-i { width: 17px; height: 17px; }
.fo-pn-sec .d { flex: 1; min-width: 0; }
.fo-pn-sec .nm { font-size: 13.5px; font-weight: 700; color: var(--fo-ink); }
.fo-pn-sec .rl { font-size: 11.5px; color: var(--fo-ink-3); margin-top: 1px; }
.fo-pn-sec .fo-cq-bar { width: 110px; }
/* ═══ end Punch & Closeout (.fo-pn-*) ═══ */

/* ═══ Accounting — General Ledger & CoA (.fo-gl-*) ═══════════════════════
   The four-tab ledger face (modules/accounting): account-type chips (type
   drives behavior), dimension-policy chips, the system-account lock, CoA
   group rows with rollups, the "dimensions carry the job" canon strip,
   journal source chips, clickable job chips (the pivot), trial-balance
   section/total rows + the footed guard band, close-ladder rungs, the
   books-closed-through guard, posting-discipline rail rows, and the JE
   composer line grid with its live balance pill. Ported 1:1 from the
   locked styleguide design (New App gl-ledger.html). */

/* account-type chip — the type IS the behavior */
.fo-gl-type{display:inline-flex;align-items:center;padding:2px 9px;border-radius:999px;font-size:10.5px;font-weight:750;letter-spacing:.04em;text-transform:uppercase;white-space:nowrap}
.fo-gl-type.is-asset{background:var(--fo-accent-soft);color:var(--fo-accent-deep)}
.fo-gl-type.is-liab{background:#f5ede2;color:#8a5a18}
.fo-gl-type.is-equity{background:#f1ecf8;color:#7a5ea8}
.fo-gl-type.is-income{background:var(--fo-ok-soft);color:var(--fo-ok)}
.fo-gl-type.is-cogs{background:#e6f3f7;color:#0e7490}
.fo-gl-type.is-exp{background:var(--fo-canvas);color:var(--fo-ink-2)}

/* dimension-policy chip + the system lock */
.fo-gl-dim{display:inline-flex;align-items:center;gap:5px;padding:2px 9px;border-radius:999px;background:var(--fo-canvas);color:var(--fo-ink-2);font-size:11px;font-weight:650;white-space:nowrap}
.fo-gl-dim.is-job{background:var(--fo-accent-soft);color:var(--fo-accent-deep)}
.fo-gl-dim svg.fo-i{width:11px;height:11px}
.fo-gl-lock{display:inline-flex;align-items:center;gap:4px;margin-left:7px;color:var(--fo-ink-3);vertical-align:-2px}
.fo-gl-lock svg.fo-i{width:12px;height:12px}

/* CoA register — group rows w/ rollups, indented account rows */
.fo-gl-grp td{font-weight:700;color:var(--fo-ink);background:var(--fo-surface-2);cursor:pointer}
.fo-gl-grp .chev{width:13px;height:13px;flex:none;color:var(--fo-ink-3);transition:transform .18s var(--fo-ease)}
.fo-gl-grp.is-closed .chev{transform:rotate(-90deg)}
.fo-gl-grp .n{font-size:11px;font-weight:650;color:var(--fo-ink-3)}
.fo-gl-acct td:first-child{padding-left:38px}
.fo-gl-code{display:inline-block;min-width:38px;margin-right:9px;font-family:var(--fo-mono);font-size:11.5px;font-weight:700;color:var(--fo-ink-3);font-variant-numeric:tabular-nums}
.fo-gl-money{font-variant-numeric:tabular-nums;font-weight:650;white-space:nowrap}
.fo-gl-money .side{margin-left:5px;font-size:10px;font-weight:750;letter-spacing:.04em;color:var(--fo-ink-3)}
.fo-gl-money.is-dim{color:var(--fo-ink-3);font-weight:500}

/* the canon strip — "no job numbers in accounts, dimensions carry them" */
.fo-gl-canon{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid var(--fo-line);background:var(--fo-canvas)}
.fo-gl-canon>div{display:flex;gap:11px;align-items:flex-start;padding:13px 16px;min-width:0}
.fo-gl-canon>div+div{border-left:1px solid var(--fo-line)}
.fo-gl-canon .mk{width:24px;height:24px;flex:none;border-radius:8px;display:grid;place-items:center}
.fo-gl-canon .mk svg.fo-i{width:13px;height:13px}
.fo-gl-canon .is-bad .mk{background:var(--fo-danger-soft);color:var(--fo-danger)}
.fo-gl-canon .is-good .mk{background:var(--fo-ok-soft);color:var(--fo-ok)}
.fo-gl-canon .t1{font-size:12.5px;font-weight:700;color:var(--fo-ink)}
.fo-gl-canon .is-bad .t1{text-decoration:line-through;color:var(--fo-ink-2);font-family:var(--fo-mono);font-size:12px}
.fo-gl-canon .t2{font-size:11.5px;line-height:1.5;color:var(--fo-ink-3);margin-top:2px}
@media (max-width:900px){.fo-gl-canon{grid-template-columns:1fr}.fo-gl-canon>div+div{border-left:0;border-top:1px solid var(--fo-line)}}

/* journal — source chips + the clickable job chip (the pivot) */
.fo-gl-src{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:999px;font-size:11.5px;font-weight:700;white-space:nowrap}
.fo-gl-src svg.fo-i{width:12px;height:12px}
.fo-gl-src.is-payroll{background:#f1ecf8;color:#7a5ea8}
.fo-gl-src.is-payapp{background:var(--fo-ok-soft);color:var(--fo-ok)}
.fo-gl-src.is-ap{background:var(--fo-accent-soft);color:var(--fo-accent-deep)}
.fo-gl-src.is-manual{background:var(--fo-canvas);color:var(--fo-ink-2)}
.fo-gl-job{display:inline-flex;align-items:center;gap:5px;padding:2px 9px;border:0;border-radius:999px;background:var(--fo-accent-soft);color:var(--fo-accent-deep);font:inherit;font-size:11px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap;cursor:pointer;transition:background .15s ease}
.fo-gl-job:hover{background:#dce8f9}
.fo-gl-job svg.fo-i{width:10px;height:10px}
.fo-gl-tie{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border:0;border-radius:999px;background:rgba(255,255,255,.7);color:inherit;font:inherit;font-size:11px;font-weight:750;font-variant-numeric:tabular-nums;cursor:pointer;vertical-align:1px}
.fo-gl-tie:hover{background:#fff}

/* peek — journal lines / job-slice lines */
.fo-gl-jl{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) 110px 110px;gap:4px 14px;align-items:center;padding:8px 0;border-bottom:1px solid var(--fo-line);font-size:12.5px}
.fo-gl-jl:last-child{border-bottom:0}
.fo-gl-jl .a{min-width:0;color:var(--fo-ink);font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fo-gl-jl .a .fo-gl-code{min-width:0}
.fo-gl-jl .d{min-width:0;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.fo-gl-jl .d .cc{font-size:11px;color:var(--fo-ink-3);white-space:nowrap}
.fo-gl-jl .num{text-align:right;font-variant-numeric:tabular-nums;font-weight:650;color:var(--fo-ink);white-space:nowrap}
.fo-gl-jl .num.is-empty{color:var(--fo-ink-3);font-weight:400}
.fo-gl-jl .memo{grid-column:1 / -1;margin-top:-4px;font-size:11px;color:var(--fo-ink-3)}
.fo-gl-jlhead{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) 110px 110px;gap:14px;padding:0 0 6px;font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--fo-ink-3)}
.fo-gl-jlhead .num{text-align:right}
.fo-gl-jlfoot{display:grid;grid-template-columns:minmax(0,2.5fr) 110px 110px;gap:14px;padding-top:9px;border-top:2px solid var(--fo-ink);font-size:13px;font-weight:800;color:var(--fo-ink)}
.fo-gl-jlfoot .num{text-align:right;font-variant-numeric:tabular-nums}

/* trial balance — section rows, total row, the footed guard band */
.fo-gl-sect td{font-size:11px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--fo-ink-3);background:var(--fo-surface-2);padding-top:9px;padding-bottom:9px}
.fo-gl-total td{font-weight:800;color:var(--fo-ink);border-top:2px solid var(--fo-ink);font-variant-numeric:tabular-nums}
.fo-gl-guard{display:flex;align-items:center;gap:10px;font-size:12.5px;font-weight:650;color:var(--fo-ok)}
.fo-gl-guard .mk{width:26px;height:26px;flex:none;border-radius:50%;display:grid;place-items:center;background:var(--fo-ok-soft);color:var(--fo-ok)}
.fo-gl-guard .mk svg.fo-i{width:14px;height:14px}
.fo-gl-guard .sub{display:block;font-size:11.5px;font-weight:500;color:var(--fo-ink-3);margin-top:1px}

/* close — the big guard date, override form, audit line */
.fo-gl-through{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.fo-gl-through .tile{width:52px;height:52px;flex:none;border-radius:14px;display:grid;place-items:center;background:var(--fo-accent-soft);color:var(--fo-accent-deep)}
.fo-gl-through .tile svg.fo-i{width:24px;height:24px}
.fo-gl-through.is-open .tile{background:var(--fo-warn-soft);color:var(--fo-warn)}
.fo-gl-through .dt{font-family:var(--fo-font-display);font-size:26px;font-weight:750;letter-spacing:-.02em;color:var(--fo-ink);line-height:1.1}
.fo-gl-through .k{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--fo-ink-3);margin-top:3px}
.fo-gl-ovform{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}
.fo-gl-ovform[hidden]{display:none}
.fo-gl-ovform .fo-input{flex:1;min-width:220px}
.fo-gl-ovform .fo-input.is-err{border-color:var(--fo-danger)}
.fo-gl-audit{display:flex;align-items:flex-start;gap:8px;margin-top:12px;padding-top:11px;border-top:1px solid var(--fo-line);font-size:12px;line-height:1.55;color:var(--fo-ink-2)}
.fo-gl-audit svg.fo-i{width:13px;height:13px;flex:none;margin-top:2px;color:var(--fo-ink-3)}

/* close — period ladder rungs */
.fo-gl-rung{position:relative;display:flex;gap:12px;padding:10px 0;align-items:flex-start}
.fo-gl-rung::before{content:"";position:absolute;left:12px;top:36px;bottom:-4px;width:1px;background:var(--fo-line-strong)}
.fo-gl-rung:last-child::before{display:none}
.fo-gl-rung .dot{width:25px;height:25px;flex:none;border-radius:50%;display:grid;place-items:center;background:var(--fo-canvas);color:var(--fo-ink-3)}
.fo-gl-rung .dot svg.fo-i{width:13px;height:13px}
.fo-gl-rung.is-open .dot{background:var(--fo-accent-soft);color:var(--fo-accent)}
.fo-gl-rung.is-warn .dot{background:var(--fo-warn-soft);color:var(--fo-warn)}
.fo-gl-rung .m{flex:1;min-width:0}
.fo-gl-rung .t{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:700;color:var(--fo-ink);flex-wrap:wrap}
.fo-gl-rung .s{font-size:12px;line-height:1.55;color:var(--fo-ink-2);margin-top:2px}

/* right rail — discipline rows + this-period mini stats */
.fo-gl-rail{display:flex;gap:11px;padding:11px 0;border-bottom:1px solid var(--fo-line);font-size:12.5px;line-height:1.55;color:var(--fo-ink-2)}
.fo-gl-rail:last-child{border-bottom:0}
.fo-gl-rail svg.fo-i{width:15px;height:15px;flex:none;margin-top:2px;color:var(--fo-accent)}
.fo-gl-rail b{color:var(--fo-ink)}
.fo-gl-creed{margin:12px 0 2px;padding-top:11px;border-top:1px solid var(--fo-line);font-size:11.5px;color:var(--fo-ink-3);font-style:italic}
.fo-gl-mini{display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px solid var(--fo-line);font-size:12.5px;color:var(--fo-ink-2)}
.fo-gl-mini:last-child{border-bottom:0}
.fo-gl-mini .v{font-weight:700;font-variant-numeric:tabular-nums;color:var(--fo-ink);white-space:nowrap}

/* JE composer — line grid + the live balance pill */
.fo-gl-line{display:grid;grid-template-columns:minmax(0,1fr) 148px 106px 106px 24px;gap:8px;align-items:start;padding:10px 0;border-bottom:1px solid var(--fo-line)}
.fo-gl-line .fo-input,.fo-gl-line .fo-select{height:36px}
.fo-gl-line .fo-input{text-align:right;font-variant-numeric:tabular-nums}
.fo-gl-line .is-err{border-color:var(--fo-danger)}
.fo-gl-line .x{width:24px;height:36px;border:0;background:transparent;color:var(--fo-ink-3);display:grid;place-items:center;cursor:pointer;border-radius:7px}
.fo-gl-line .x:hover{color:var(--fo-danger)}
.fo-gl-line .x svg.fo-i{width:14px;height:14px}
.fo-gl-linehead{display:grid;grid-template-columns:minmax(0,1fr) 148px 106px 106px 24px;gap:8px;padding-bottom:6px;font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--fo-ink-3)}
.fo-gl-linehead .num{text-align:right}
.fo-gl-diff{display:flex;align-items:center;gap:10px;margin-top:13px;padding:11px 14px;border-radius:var(--fo-r-md);background:var(--fo-canvas);font-size:12.5px;font-weight:650;color:var(--fo-ink-2)}
.fo-gl-diff svg.fo-i{width:15px;height:15px;flex:none}
.fo-gl-diff .tot{margin-left:auto;font-variant-numeric:tabular-nums;font-weight:700;color:var(--fo-ink);white-space:nowrap}
.fo-gl-diff.is-ok{background:var(--fo-ok-soft);color:var(--fo-ok)}
.fo-gl-diff.is-ok .tot{color:var(--fo-ok)}
.fo-gl-diff.is-bad{background:var(--fo-danger-soft);color:var(--fo-danger)}
.fo-gl-diff.is-bad .tot{color:var(--fo-danger)}
/* ═══ end Accounting — General Ledger & CoA (.fo-gl-*) ═══ */

/* ═══ Accounting — Banking & Reconciliation (.fo-bk-*) ═══════════════════
   Ports styleguide/bank-rec.html: the match-and-confirm pair rows, feed
   progress meter, period tick, quick-code rule box, register history
   rows, and the reconciliation-start inline form. ═══ */

/* feed progress meter — the board bar of the Reconcile loop */
.fo-bk-meter{display:flex;align-items:center;gap:16px;padding:14px 16px;flex-wrap:wrap}
.fo-bk-meter .t{min-width:0}
.fo-bk-meter .t1{font-size:13.5px;font-weight:700;color:var(--fo-ink)}
.fo-bk-meter .t2{font-size:12px;color:var(--fo-ink-3);margin-top:1px}
.fo-bk-meter .fo-select{flex:none;width:auto;max-width:240px}
.fo-bk-meter .fo-select[hidden]{display:none}
.fo-bk-bar{flex:1;min-width:140px;height:8px;border-radius:99px;background:var(--fo-canvas);overflow:hidden}
.fo-bk-bar i{display:block;height:100%;border-radius:99px;background:var(--fo-accent);transition:width .5s var(--fo-ease),background .3s}
.fo-bk-bar.is-full i{background:var(--fo-ok)}
.fo-bk-meter .ct{flex:none;font-size:12.5px;color:var(--fo-ink-2);font-variant-numeric:tabular-nums;white-space:nowrap}
.fo-bk-meter .ct b{color:var(--fo-ink);font-weight:700}

/* pair rows — statement line · connector · suggested match */
.fo-bk-cols{display:grid;grid-template-columns:minmax(0,1fr) 30px minmax(0,1.2fr);gap:12px;padding:12px 16px 0;border-top:1px solid var(--fo-line)}
.fo-bk-cols span{font-size:10.5px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--fo-ink-3)}
.fo-bk-pairs{display:flex;flex-direction:column;gap:10px;padding:12px 16px 16px}
.fo-bk-pair{display:grid;grid-template-columns:minmax(0,1fr) 30px minmax(0,1.2fr);gap:12px;align-items:stretch}
.fo-bk-card{border:1px solid var(--fo-line);border-radius:var(--fo-r-md);background:var(--fo-surface);padding:12px 14px;min-width:0;transition:background .25s,border-color .25s,opacity .25s}
.fo-bk-feed{display:flex;flex-direction:column;justify-content:center}
.fo-bk-feed .r1{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.fo-bk-feed .d{font-size:11.5px;font-weight:700;color:var(--fo-ink-3);letter-spacing:.02em}
.fo-bk-feed .desc{font-family:var(--fo-mono);font-size:12px;font-weight:600;color:var(--fo-ink);margin-top:6px;line-height:1.45;overflow-wrap:anywhere}
.fo-bk-feed .src{font-size:11.5px;color:var(--fo-ink-3);margin-top:5px}
.fo-bk-amt{font-variant-numeric:tabular-nums;font-weight:750;font-size:14px;color:var(--fo-ink);white-space:nowrap}
.fo-bk-amt.is-in{color:var(--fo-ok)}
.fo-bk-pair.is-done .fo-bk-feed{opacity:.72}
.fo-bk-pair .cx{align-self:center;justify-self:center;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:var(--fo-canvas);color:var(--fo-ink-3);flex:none}
.fo-bk-pair .cx svg.fo-i{width:14px;height:14px}
.fo-bk-pair.is-done .cx{background:var(--fo-ok-soft);color:var(--fo-ok)}

/* the suggestion card */
.fo-bk-sugg .r1{display:flex;align-items:center;justify-content:space-between;gap:10px}
.fo-bk-kind{display:inline-flex;align-items:center;gap:6px;padding:3px 9px;border-radius:99px;font-size:11px;font-weight:700;background:var(--fo-accent-soft);color:var(--fo-accent-deep);white-space:nowrap}
.fo-bk-kind svg.fo-i{width:12px;height:12px}
.fo-bk-sugg .t{font-size:13px;font-weight:700;color:var(--fo-ink);margin-top:8px}
.fo-bk-sugg .s{font-size:12px;line-height:1.5;color:var(--fo-ink-2);margin-top:2px}
.fo-bk-dims{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}
.fo-bk-dim{font-size:11px;font-weight:650;color:var(--fo-ink-2);background:var(--fo-canvas);border-radius:99px;padding:2.5px 9px;white-space:nowrap}
.fo-bk-sfoot{display:flex;align-items:center;gap:10px;margin-top:11px;padding-top:10px;border-top:1px solid var(--fo-line)}
.fo-bk-why{display:flex;flex-wrap:wrap;gap:5px 10px;flex:1;min-width:0}
.fo-bk-why span{display:inline-flex;align-items:center;gap:4px;font-size:11px;color:var(--fo-ink-3)}
.fo-bk-why svg.fo-i{width:11px;height:11px;color:var(--fo-ok);flex:none}
.fo-bk-sugg.is-none{border-style:dashed;background:none}
.fo-bk-sugg.is-none .t{display:flex;align-items:center;gap:7px;margin-top:0;color:var(--fo-ink-2)}
.fo-bk-sugg.is-none .t svg.fo-i{width:14px;height:14px;color:var(--fo-ink-3)}

/* confirmed state — the satisfying settle */
.fo-bk-pair.is-done .fo-bk-sugg{background:var(--fo-ok-soft);border-color:rgba(24,129,80,.22)}
.fo-bk-donerow{display:flex;align-items:center;gap:10px}
.fo-bk-donerow .ok{width:26px;height:26px;border-radius:50%;flex:none;display:grid;place-items:center;background:var(--fo-ok);color:#fff}
.fo-bk-donerow .ok svg.fo-i{width:13px;height:13px}
.fo-bk-donerow .tx{min-width:0}
.fo-bk-donerow .l1{font-size:13px;font-weight:700;color:var(--fo-ink)}
.fo-bk-donerow .l2{font-size:11.5px;color:var(--fo-ink-2);margin-top:1px}
.fo-bk-rulechip{display:inline-flex;align-items:center;gap:5px;margin-left:auto;padding:3px 9px;border-radius:99px;background:var(--fo-surface);color:var(--fo-accent-deep);font-size:11px;font-weight:700;white-space:nowrap}
.fo-bk-rulechip svg.fo-i{width:12px;height:12px;color:var(--fo-accent)}
.fo-bk-pair.is-fresh .fo-bk-donerow .ok{animation:fo-bk-pop .45s var(--fo-ease)}
.fo-bk-pair.is-fresh .fo-bk-sugg{animation:fo-bk-settle .45s var(--fo-ease)}
@keyframes fo-bk-pop{0%{transform:scale(.4);opacity:0}60%{transform:scale(1.15)}100%{transform:scale(1);opacity:1}}
@keyframes fo-bk-settle{from{background:var(--fo-surface)}to{background:var(--fo-ok-soft)}}

/* feed-clear completion card */
.fo-bk-done{text-align:center;padding:30px 20px 26px;border:1px dashed rgba(24,129,80,.35);border-radius:var(--fo-r-md);background:var(--fo-ok-soft);animation:fo-bk-settle .5s var(--fo-ease)}
.fo-bk-done .ring{width:56px;height:56px;border-radius:50%;display:grid;place-items:center;margin:0 auto 14px;background:var(--fo-ok);color:#fff;animation:fo-bk-pop .5s var(--fo-ease)}
.fo-bk-done .ring svg.fo-i{width:24px;height:24px}
.fo-bk-done .t{font-size:16px;font-weight:800;letter-spacing:-.01em;color:var(--fo-ink)}
.fo-bk-done .s{font-size:12.5px;line-height:1.6;color:var(--fo-ink-2);margin:6px auto 14px;max-width:460px}

/* the period tick — reconciliation feeding the close */
.fo-bk-tick{display:flex;align-items:center;gap:11px;padding:13px 16px;border-top:1px solid var(--fo-line);flex-wrap:wrap}
.fo-bk-tick .ok{width:24px;height:24px;border-radius:50%;flex:none;display:grid;place-items:center;background:var(--fo-ok-soft);color:var(--fo-ok)}
.fo-bk-tick .ok svg.fo-i{width:13px;height:13px}
.fo-bk-tick .tx{font-size:12.5px;color:var(--fo-ink-2);min-width:0}
.fo-bk-tick .tx b{color:var(--fo-ink);font-weight:700}
.fo-bk-startform{display:flex;gap:8px;flex-basis:100%;flex-wrap:wrap}
.fo-bk-startform[hidden]{display:none}
.fo-bk-startform .fo-input{flex:1;min-width:220px;text-align:right;font-variant-numeric:tabular-nums}
.fo-bk-startform .fo-input.is-err{border-color:var(--fo-danger)}

/* quick-code drawer — the bank line being coded + the rule suggestion */
.fo-bk-linebox{border:1px solid var(--fo-line);border-radius:var(--fo-r-md);background:var(--fo-canvas);padding:11px 13px;margin-bottom:16px}
.fo-bk-linebox .r1{display:flex;align-items:baseline;justify-content:space-between;gap:10px;font-size:11.5px;font-weight:700;color:var(--fo-ink-3)}
.fo-bk-linebox .desc{font-family:var(--fo-mono);font-size:12px;font-weight:600;color:var(--fo-ink);margin-top:5px}
.fo-bk-rulebox{display:flex;gap:11px;align-items:flex-start;padding:12px 14px;border-radius:var(--fo-r-md);background:var(--fo-accent-soft);cursor:pointer;margin-top:4px}
.fo-bk-rulebox[hidden]{display:none}
.fo-bk-rulebox input{width:16px;height:16px;flex:none;margin-top:2px;accent-color:var(--fo-accent)}
.fo-bk-rulebox .tx{font-size:12px;line-height:1.5;color:var(--fo-ink-2)}
.fo-bk-rulebox .tx b{display:block;font-size:12.5px;color:var(--fo-ink);font-weight:700;margin-bottom:1px}

/* register history rows (peek) */
.fo-bk-hist{display:flex;align-items:center;gap:11px;padding:9px 2px;border-bottom:1px solid var(--fo-line)}
.fo-bk-hist:last-child{border-bottom:0}
.fo-bk-hist .d{flex:1;min-width:0}
.fo-bk-hist .nm{font-size:13px;font-weight:650;color:var(--fo-ink)}
.fo-bk-hist .sub{font-size:11.5px;color:var(--fo-ink-3);margin-top:1px}

@media (max-width:940px){
  .fo-bk-pair{grid-template-columns:1fr}
  .fo-bk-pair .cx{display:none}
  .fo-bk-cols{grid-template-columns:1fr}
  .fo-bk-cols span:nth-child(n+2){display:none}
}
/* ═══ end Accounting — Banking & Reconciliation (.fo-bk-*) ═══ */

/* ═══ ACCOUNTS RECEIVABLE DESK (.ar-*) — page-scoped.. Aging bucket cells + the honest retainage pill
   ("held, not late"), dunning chips, pay-app source chips, cash-application
   allocation rows with the live remaining counter, the payment-method chip,
   the undeposited-funds strip, and the customer statement paper. ═══ */

/* aging cells */
.ar-money{font-variant-numeric:tabular-nums;font-weight:650;white-space:nowrap}
.ar-z{color:var(--fo-ink-3)}
.ar-b60{color:var(--fo-warn)}
.ar-b90{color:var(--fo-danger)}
.ar-ret{display:inline-flex;align-items:center;gap:5px;padding:3px 9px;border-radius:999px;background:var(--fo-accent-soft);color:var(--fo-accent-deep);font-size:12px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.ar-ret svg.fo-i{width:11px;height:11px}
.ar-dun{display:inline-flex;align-items:center;gap:6px;padding:3px 9px;border-radius:999px;background:var(--fo-canvas);color:var(--fo-ink-2);font-size:11.5px;font-weight:650;white-space:nowrap}
.ar-dun.is-final{background:var(--fo-danger-soft);color:var(--fo-danger)}
.ar-x{width:24px;height:24px;flex:none;border:0;border-radius:7px;background:transparent;color:var(--fo-ink-3);display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.ar-x svg.fo-i{width:14px;height:14px;transition:transform .16s ease}
.ar-x:hover{background:var(--fo-canvas);color:var(--fo-ink)}
.ar-x.is-open svg.fo-i{transform:rotate(90deg)}
tr.ar-sub td{background:var(--fo-canvas)}
tr.ar-sub .jb{padding-left:46px;font-size:12.5px;font-weight:600;color:var(--fo-ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:280px}

/* the customer peek runs five footer actions — wider than the stock top
   drawer so they live on one line (user ask, 2026-07-12) */
#arPeek .fo-drawer.is-top{width:min(880px,calc(100vw - 20px))}

/* pay-app source chip — the same invoice the pay-app world already knows */
.ar-src{display:inline-flex;align-items:center;gap:6px;padding:2px 8px;border-radius:7px;background:var(--fo-accent-soft);color:var(--fo-accent-deep);font-family:var(--fo-mono, ui-monospace, SFMono-Regular, Menlo, monospace);font-size:11px;font-weight:700;white-space:nowrap}

/* payment-method chip (port of the styleguide .fo-ap-pm) */
.ar-pm{display:inline-flex;align-items:center;gap:5px;padding:2.5px 9px;border-radius:999px;font-size:11px;font-weight:700;white-space:nowrap;background:var(--fo-canvas);color:var(--fo-ink-2)}
.ar-pm .fo-i{width:12px;height:12px}
.ar-pm.is-ach{background:var(--fo-accent-soft);color:var(--fo-accent-deep)}

/* undeposited-funds strip */
.ar-undep{display:flex;align-items:center;gap:12px;padding:12px 16px;border-top:1px solid var(--fo-line);background:var(--fo-canvas)}
.ar-undep .pill{width:30px;height:30px;flex:none;display:grid;place-items:center;border-radius:9px;background:var(--fo-accent-soft);color:var(--fo-accent-deep)}
.ar-undep .pill svg.fo-i{width:15px;height:15px}
.ar-undep .m{flex:1;min-width:0}
.ar-undep .t1{font-size:13px;font-weight:700;color:var(--fo-ink)}
.ar-undep .t2{font-size:11.5px;color:var(--fo-ink-3);margin-top:1px}

/* peek — open items + notes */
.ar-oi{display:flex;align-items:center;gap:12px;padding:9px 0;border-bottom:1px solid var(--fo-line)}
.ar-oi:last-child{border-bottom:0}
.ar-oi .m{flex:1;min-width:0}
.ar-oi .nm{font-size:13px;font-weight:650;color:var(--fo-ink)}
.ar-oi .sub{font-size:11.5px;color:var(--fo-ink-3);margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ar-oi .amt{flex:none;font-size:13px;font-weight:700;font-variant-numeric:tabular-nums;color:var(--fo-ink)}
.ar-note{display:flex;gap:10px;padding:9px 0;border-bottom:1px solid var(--fo-line);font-size:12.5px;line-height:1.55;color:var(--fo-ink-2)}
.ar-note:last-child{border-bottom:0}
.ar-note .who{flex:none;font-weight:700;color:var(--fo-ink)}
.ar-note .when{flex:none;color:var(--fo-ink-3)}
.ar-noteadd{display:flex;gap:8px;margin-top:11px}
.ar-noteadd .fo-input{flex:1;min-width:0}

/* cash application — live counter + allocation rows */
.ar-counter{display:flex;align-items:center;gap:14px;padding:14px 16px;border-radius:var(--fo-r-md);background:var(--fo-canvas)}
.ar-counter .v{font-size:26px;font-weight:800;letter-spacing:-.01em;font-variant-numeric:tabular-nums;color:var(--fo-ink);white-space:nowrap}
.ar-counter .k{font-size:12px;line-height:1.45;color:var(--fo-ink-3)}
.ar-counter.is-zero{background:var(--fo-ok-soft)}
.ar-counter.is-zero .v{color:var(--fo-ok)}
.ar-counter.is-over{background:var(--fo-danger-soft)}
.ar-counter.is-over .v{color:var(--fo-danger)}
.ar-alloc{border:1px solid var(--fo-line);border-radius:var(--fo-r-md);padding:11px 13px;margin-bottom:9px;transition:border-color .15s ease}
.ar-alloc.is-done{border-color:var(--fo-ok)}
.ar-alloc-top{display:flex;align-items:center;gap:11px}
.ar-alloc .m{flex:1;min-width:0}
.ar-alloc .nm{font-size:13px;font-weight:700;color:var(--fo-ink);font-variant-numeric:tabular-nums}
.ar-alloc .sub{font-size:11.5px;color:var(--fo-ink-3);margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ar-alloc .amt{width:118px;flex:none;text-align:right;font-variant-numeric:tabular-nums}
.ar-alloc .amt.is-err{border-color:var(--fo-danger);color:var(--fo-danger)}
.ar-alloc-short{display:flex;align-items:center;gap:9px;padding-top:10px;margin-top:10px;border-top:1px dashed var(--fo-line);font-size:12px;font-weight:650;color:var(--fo-warn)}
.ar-alloc-short[hidden]{display:none}
.ar-alloc-short .fo-select{flex:none;width:auto;min-width:210px}
.ar-alloc-short .fo-select.is-err{border-color:var(--fo-danger)}

/* record-receipt header fields */
.ar-rcgrid{display:grid;grid-template-columns:1fr 1fr;gap:10px 12px;margin-bottom:14px}
.ar-rcgrid .is-wide2{grid-column:1 / -1}

/* statements — customer list + the paper */
.ar-stmt-grid{display:grid;grid-template-columns:320px minmax(0,1fr);gap:16px;align-items:start}
@media (max-width:1080px){.ar-stmt-grid{grid-template-columns:1fr}}
.ar-cust{width:100%;display:flex;align-items:center;gap:11px;padding:11px 13px;margin-bottom:8px;border:1px solid var(--fo-line);border-radius:var(--fo-r-md);background:var(--fo-surface);cursor:pointer;text-align:left;font:inherit}
.ar-cust:hover{border-color:var(--fo-ink-3)}
.ar-cust.is-active{border-color:var(--fo-accent);box-shadow:0 0 0 1px var(--fo-accent)}
.ar-cust .m{flex:1;min-width:0}
.ar-cust .nm{font-size:13px;font-weight:700;color:var(--fo-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ar-cust .sub{font-size:11.5px;color:var(--fo-ink-3);margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ar-cust .amt{flex:none;font-size:12.5px;font-weight:700;font-variant-numeric:tabular-nums;color:var(--fo-ink)}
.ar-paper{max-width:660px;margin:0 auto;background:var(--fo-surface);border:1px solid var(--fo-line);border-radius:14px;box-shadow:var(--fo-shadow-1);padding:26px 28px}
.ar-paper-head{display:flex;justify-content:space-between;gap:18px;padding-bottom:14px;border-bottom:2px solid var(--fo-ink)}
.ar-paper-head .co{font-size:15px;font-weight:800;letter-spacing:.02em;color:var(--fo-ink)}
.ar-paper-head .co-sub{font-size:11px;color:var(--fo-ink-3);margin-top:2px;line-height:1.5}
.ar-paper-head .doc{text-align:right}
.ar-paper-head .doc .t{font-size:12px;font-weight:800;letter-spacing:.1em;color:var(--fo-ink)}
.ar-paper-head .doc .d{font-size:11px;color:var(--fo-ink-3);margin-top:2px;line-height:1.5}
.ar-paper-to{display:flex;justify-content:space-between;gap:18px;padding:13px 0;font-size:12px;line-height:1.55;color:var(--fo-ink-2)}
.ar-paper-to b{color:var(--fo-ink)}
.ar-paper table{width:100%;border-collapse:collapse;font-size:12.5px}
.ar-paper th{font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--fo-ink-3);text-align:left;padding:0 0 7px}
.ar-paper th.num,.ar-paper td.num{text-align:right}
.ar-paper td{padding:7px 0;border-top:1px solid var(--fo-line);color:var(--fo-ink-2);vertical-align:top}
.ar-paper td b{color:var(--fo-ink)}
.ar-paper .total td{border-top:2px solid var(--fo-ink);font-size:13.5px;font-weight:800;color:var(--fo-ink);padding-top:10px}
.ar-strip{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-top:16px}
.ar-strip>div{border:1px solid var(--fo-line);border-radius:9px;padding:7px 9px;min-width:0}
.ar-strip .k{font-size:9.5px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--fo-ink-3)}
.ar-strip .v{font-size:12.5px;font-weight:700;font-variant-numeric:tabular-nums;color:var(--fo-ink);margin-top:2px;white-space:nowrap}
.ar-strip>div.is-hot .v{color:var(--fo-danger)}
.ar-retline{display:flex;gap:9px;align-items:flex-start;margin-top:12px;padding:10px 12px;border-radius:9px;background:var(--fo-accent-soft);color:var(--fo-accent-deep);font-size:12px;line-height:1.55}
.ar-retline svg.fo-i{width:13px;height:13px;flex:none;margin-top:2px}
.ar-paper-foot{margin-top:16px;padding-top:12px;border-top:1px solid var(--fo-line);font-size:11px;line-height:1.6;color:var(--fo-ink-3)}
/* ═══ end ACCOUNTS RECEIVABLE DESK ═══ */

/* ═══ Accounting — Financial statements & WIP (.fo-fs-*) ═════════════════
   Ports styleguide/fin-statements.html: statement table rows (group /
   account / subtotal / total / band / section), the tie pill (same cents
   elsewhere on the page), the WIP % bar + over/under diverging bar, the
   one-dataset rail rows + close-ladder rungs, and the bonding-package
   checklist. ═══ */

/* statement tabs get their own full-width row inside the board */
.fo-fs-tabsrow{padding:13px 16px 2px}

/* bar text */
.fo-fs-barmeta{margin-left:auto;font-size:12px;color:var(--fo-ink-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fo-fs-bartitle{font-size:13px;font-weight:700;color:var(--fo-ink)}

/* statement table — accounting rows */
.fo-fs-table td,.fo-fs-table th{font-variant-numeric:tabular-nums}
.fo-fs-table td.num{white-space:nowrap}
.fo-fs-table .fo-fs-thsub{display:block;font-size:9.5px;font-weight:650;letter-spacing:.05em;color:var(--fo-ink-3);margin-top:1px}
.fo-fs-grp td{font-weight:700;color:var(--fo-ink);background:var(--fo-surface-2)}
.fo-fs-grp .fo-fs-chev{width:13px;height:13px;flex:none;color:var(--fo-ink-3);transform:rotate(-90deg);transition:transform .18s var(--fo-ease)}
.fo-fs-grp.is-open .fo-fs-chev{transform:rotate(0deg)}
.fo-fs-grp .fo-fs-n{font-size:11px;font-weight:650;color:var(--fo-ink-3)}
.fo-fs-acct td{color:var(--fo-ink-2)}
.fo-fs-acct td:first-child{padding-left:38px}
.fo-fs-code{display:inline-block;min-width:34px;margin-right:8px;font-size:11px;font-weight:650;color:var(--fo-ink-3);font-variant-numeric:tabular-nums}
.fo-fs-acct .fo-fs-hint{display:block;font-size:11px;color:var(--fo-ink-3);margin-top:1px}
.fo-fs-sub td{font-weight:750;color:var(--fo-ink);border-top:1px solid var(--fo-line-strong)}
.fo-fs-total td{font-weight:800;color:var(--fo-ink);border-top:2px solid var(--fo-ink);border-bottom:0}
.fo-fs-band td{font-size:11.5px;font-weight:650;color:var(--fo-ink-3);background:var(--fo-surface-2);padding-top:7px;padding-bottom:7px}
.fo-fs-sect td{font-size:11px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--fo-ink-3);background:var(--fo-surface-2);padding-top:9px;padding-bottom:9px}
.fo-fs-delta{font-weight:650}
.fo-fs-delta.is-good{color:var(--fo-ok)}
.fo-fs-delta.is-bad{color:var(--fo-danger)}

/* ties — a figure that is the same cents somewhere else on the page */
.fo-fs-tie{display:inline-flex;align-items:center;gap:4px;margin-left:8px;padding:2px 8px;border-radius:999px;background:var(--fo-accent-soft);color:var(--fo-accent);font-size:10.5px;font-weight:700;border:0;cursor:pointer;vertical-align:1px}
.fo-fs-tie svg.fo-i{width:10px;height:10px}
.fo-fs-tie:hover{filter:brightness(0.96)}

/* WIP — % complete + over/under diverging bar */
.fo-fs-pct{display:flex;align-items:center;gap:8px}
.fo-fs-pct .n{font-weight:700;color:var(--fo-ink);font-variant-numeric:tabular-nums}
.fo-fs-pctbar{width:52px;height:5px;border-radius:99px;background:var(--fo-line);overflow:hidden;flex:none}
.fo-fs-pctbar i{display:block;height:100%;border-radius:99px;background:var(--fo-accent)}
.fo-fs-ou{display:flex;flex-direction:column;gap:4px;align-items:flex-end}
.fo-fs-ou .amt{font-weight:700;font-variant-numeric:tabular-nums}
.fo-fs-ou .amt.is-over{color:var(--fo-accent)}
.fo-fs-ou .amt.is-under{color:var(--fo-warn)}
.fo-fs-oubar{position:relative;width:96px;height:6px;border-radius:99px;background:var(--fo-line)}
.fo-fs-oubar::before{content:"";position:absolute;left:50%;top:-2px;bottom:-2px;width:1px;background:var(--fo-ink-3);opacity:.55}
.fo-fs-oubar i{position:absolute;top:0;bottom:0;border-radius:99px}
.fo-fs-oubar i.is-over{left:50%;background:var(--fo-accent)}
.fo-fs-oubar i.is-under{right:50%;background:var(--fo-warn)}

/* right rail — one-dataset rows + close ladder */
.fo-fs-rail{display:flex;gap:11px;padding:11px 0;border-bottom:1px solid var(--fo-line);font-size:12.5px;line-height:1.55;color:var(--fo-ink-2)}
.fo-fs-rail:last-child{border-bottom:0}
.fo-fs-rail svg.fo-i{width:15px;height:15px;flex:none;margin-top:2px;color:var(--fo-accent)}
.fo-fs-rail b{color:var(--fo-ink)}
.fo-fs-rail .fo-fs-railsub{display:block;margin-top:2px;font-size:11.5px;color:var(--fo-ink-3)}
.fo-fs-creed{margin:12px 0 2px;padding-top:11px;border-top:1px solid var(--fo-line);font-size:11.5px;color:var(--fo-ink-3);font-style:italic}
.fo-fs-rung{position:relative;display:flex;gap:12px;padding:10px 0}
.fo-fs-rung::before{content:"";position:absolute;left:11px;top:34px;bottom:-4px;width:1px;background:var(--fo-line-strong)}
.fo-fs-rung:last-child::before{display:none}
.fo-fs-rung .dot{width:23px;height:23px;flex:none;border-radius:50%;display:grid;place-items:center;font-size:11px;font-weight:800;background:var(--fo-accent-soft);color:var(--fo-accent)}
.fo-fs-rung.is-done .dot{background:var(--fo-ok-soft);color:var(--fo-ok)}
.fo-fs-rung .t{font-size:13px;font-weight:700;color:var(--fo-ink)}
.fo-fs-rung .s{font-size:12px;line-height:1.55;color:var(--fo-ink-2);margin-top:2px}

/* bonding-package checklist */
.fo-fs-inc{display:flex;align-items:flex-start;gap:10px;padding:9px 2px;border-bottom:1px solid var(--fo-line);cursor:pointer}
.fo-fs-inc:last-child{border-bottom:0}
.fo-fs-inc input{margin-top:3px;accent-color:var(--fo-accent);width:15px;height:15px;flex:none;cursor:pointer}
.fo-fs-inc b{display:block;font-size:13px;font-weight:650;color:var(--fo-ink)}
.fo-fs-inc i{display:block;font-style:normal;font-size:11.5px;color:var(--fo-ink-3);margin-top:1px}
.fo-fs-drawernote{display:flex;gap:8px;align-items:flex-start;margin:4px 0 0;font-size:12px;line-height:1.55;color:var(--fo-ink-3)}
.fo-fs-drawernote svg.fo-i{width:13px;height:13px;flex:none;margin-top:2px;color:var(--fo-accent)}

/* peek — cost-type / by-job rows */
.fo-fs-line{display:flex;align-items:center;gap:11px;padding:8px 2px;border-bottom:1px solid var(--fo-line);font-size:13px}
.fo-fs-line:last-child{border-bottom:0}
.fo-fs-line .d{flex:1;min-width:0}
.fo-fs-line .nm{font-weight:650;color:var(--fo-ink)}
.fo-fs-line .sub{font-size:11.5px;color:var(--fo-ink-3);margin-top:1px}
.fo-fs-line .v{font-weight:700;font-variant-numeric:tabular-nums;color:var(--fo-ink);white-space:nowrap}
.fo-fs-line .v2{font-size:11.5px;font-variant-numeric:tabular-nums;color:var(--fo-ink-3);white-space:nowrap}
.fo-fs-linefoot{display:flex;justify-content:space-between;gap:10px;padding-top:9px;font-size:12px;font-weight:650;color:var(--fo-ink-2)}
/* ═══ end FINANCIAL STATEMENTS & WIP ═══ */

/* ═══ QBO MIGRATION (.fo-qm-*) — /accounting/migrate ═══
   The three-step spine (one calm page, no hidden steps), upload slots
   with the QBO export-path crumbs, the doesn't-foot error band, the
   collapse hero (per-job accounts → one account + job dimension),
   mapping rows with confidence chips + the inline review picker,
   the opening-entry line grid, open-item carried-list cards with tie
   rows, and the nothing-posts-until-you-confirm guard / done card. */

/* step header — number dot + title inside the board bar */
.fo-qm-step{display:flex;align-items:center;gap:12px;min-width:0;margin-right:auto}
.fo-qm-step .n{width:26px;height:26px;flex:none;border-radius:50%;display:grid;place-items:center;font-size:12.5px;font-weight:800;background:var(--fo-accent-soft);color:var(--fo-accent-deep)}
.fo-qm-step .t{font-size:13.5px;font-weight:700;color:var(--fo-ink)}
.fo-qm-step .s{font-size:12px;color:var(--fo-ink-3);margin-top:1px}

/* upload slots — 2×2, each with its QBO export-path crumbs */
.fo-qm-slots{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:14px 16px 16px}
.fo-qm-slot{border:1px solid var(--fo-line);border-radius:var(--fo-r-md);background:var(--fo-surface);padding:13px 14px;min-width:0}
.fo-qm-slot .t1{font-size:13px;font-weight:700;color:var(--fo-ink)}
.fo-qm-slot .fo-drop{background:none;width:100%;font:inherit;color:inherit}
.fo-qm-path{display:flex;align-items:center;gap:5px;flex-wrap:wrap;margin:6px 0 11px;font-size:11px;color:var(--fo-ink-3)}
.fo-qm-path b{font-weight:650;color:var(--fo-ink-2);background:var(--fo-canvas);border-radius:6px;padding:2px 7px;white-space:nowrap}
.fo-qm-path svg.fo-i{width:10px;height:10px;flex:none}
.fo-qm-note{display:flex;gap:9px;align-items:flex-start;padding:12px 16px;border-top:1px solid var(--fo-line);font-size:12px;line-height:1.55;color:var(--fo-ink-3)}
.fo-qm-note svg.fo-i{width:14px;height:14px;flex:none;margin-top:1px;color:var(--fo-accent)}

/* the doesn't-foot error band */
.fo-qm-err{display:flex;gap:11px;align-items:flex-start;margin-top:10px;padding:12px 14px;border-radius:var(--fo-r-md);background:var(--fo-danger-soft);font-size:12px;line-height:1.6;color:var(--fo-ink-2)}
.fo-qm-err svg.fo-i{width:15px;height:15px;flex:none;margin-top:2px;color:var(--fo-danger)}
.fo-qm-err b{color:var(--fo-danger)}
.fo-qm-err .fx{margin-top:9px}

/* the collapse hero — sprawl in, dimensions out */
.fo-qm-hero{display:grid;grid-template-columns:minmax(0,1fr) 54px minmax(0,1fr);gap:14px;padding:16px;border-top:1px solid var(--fo-line);background:var(--fo-canvas)}
.fo-qm-hero .hd{grid-column:1/-1;min-width:0}
.fo-qm-hero .hd .h1{font-size:13.5px;font-weight:750;color:var(--fo-ink)}
.fo-qm-hero .hd .h2{font-size:12px;line-height:1.55;color:var(--fo-ink-3);margin-top:2px;max-width:640px}
.fo-qm-sprawl{border:1px solid var(--fo-line);border-radius:var(--fo-r-md);background:var(--fo-surface);padding:11px 13px;min-width:0}
.fo-qm-sprawl .k{font-size:10px;font-weight:750;letter-spacing:.07em;text-transform:uppercase;color:var(--fo-ink-3);margin-bottom:5px}
.fo-qm-sprawl .row{display:flex;justify-content:space-between;gap:10px;padding:5.5px 0;border-bottom:1px dashed var(--fo-line);font-family:var(--fo-mono);font-size:11.5px;font-weight:600;color:var(--fo-ink-2);white-space:nowrap}
.fo-qm-sprawl .row:last-child{border-bottom:0}
.fo-qm-sprawl .row .b{font-variant-numeric:tabular-nums;color:var(--fo-ink-3);font-weight:500}
.fo-qm-fun{align-self:center;justify-self:center;display:grid;justify-items:center;gap:6px;text-align:center;font-size:9.5px;font-weight:750;letter-spacing:.06em;text-transform:uppercase;color:var(--fo-ink-3)}
.fo-qm-fun .c{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:var(--fo-accent-soft);color:var(--fo-accent)}
.fo-qm-fun .c svg.fo-i{width:15px;height:15px}
.fo-qm-tgts{display:grid;gap:10px;align-content:center;min-width:0}
.fo-qm-tgt{border:1px solid rgba(11,63,158,.16);border-radius:var(--fo-r-md);background:var(--fo-accent-soft);padding:11px 13px;min-width:0}
.fo-qm-tgt .nm{font-size:13px;font-weight:750;color:var(--fo-ink)}
.fo-qm-tgt .nm .fo-qm-code{color:var(--fo-accent-deep)}
.fo-qm-tgt .chips{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}
.fo-qm-tgt .sum{font-size:11.5px;color:var(--fo-accent-deep);margin-top:8px;font-weight:650}
.fo-qm-job{display:inline-flex;align-items:center;gap:5px;padding:2px 9px;border-radius:999px;background:rgba(255,255,255,.85);color:var(--fo-accent-deep);font-size:11px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.fo-qm-job svg.fo-i{width:10px;height:10px}

/* mapping table marks */
.fo-qm-code{display:inline-block;min-width:38px;margin-right:9px;font-family:var(--fo-mono);font-size:11.5px;font-weight:700;color:var(--fo-ink-3);font-variant-numeric:tabular-nums}
.fo-qm-sect td{font-size:11px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--fo-ink-3);background:var(--fo-surface-2);padding-top:9px;padding-bottom:9px}
.fo-qm-sect td .n{font-weight:650;text-transform:none;letter-spacing:0}
.fo-qm-hint{display:block;font-size:11px;color:var(--fo-ink-3);margin-top:1px;padding-left:47px}
.fo-qm-to{display:inline-flex;align-items:center;gap:7px;min-width:0}
.fo-qm-to>svg.fo-i{width:12px;height:12px;flex:none;color:var(--fo-ink-3)}
.fo-qm-to b{font-weight:650;color:var(--fo-ink);white-space:nowrap}
.fo-qm-subtle{display:block;font-size:11px;color:var(--fo-ink-3);margin-top:2px;padding-left:19px}
.fo-qm-money{font-variant-numeric:tabular-nums;font-weight:650;white-space:nowrap}
.fo-qm-money .side{margin-left:5px;font-size:10px;font-weight:750;letter-spacing:.04em;color:var(--fo-ink-3)}
.fo-qm-money.is-dim{color:var(--fo-ink-3);font-weight:400}
.fo-qm-conf{display:inline-flex;align-items:center;gap:5px;padding:2px 9px;border-radius:999px;font-size:10.5px;font-weight:750;letter-spacing:.03em;white-space:nowrap}
.fo-qm-conf svg.fo-i{width:11px;height:11px}
.fo-qm-conf.is-exact{background:var(--fo-ok-soft);color:var(--fo-ok)}
.fo-qm-conf.is-strong{background:var(--fo-accent-soft);color:var(--fo-accent-deep)}
.fo-qm-conf.is-review{background:var(--fo-warn-soft);color:var(--fo-warn)}
.fo-qm-conf.is-dim{background:#f1ecf8;color:#7a5ea8}
.fo-qm-conf.is-new{background:var(--fo-canvas);color:var(--fo-ink-2)}
.fo-qm-pick{min-width:0}
.fo-qm-pick .fo-select{height:34px;font-size:12.5px;width:100%;max-width:320px}
.fo-qm-pick .hint{display:block;font-size:11px;color:var(--fo-ink-3);margin-top:4px}
tr.fo-qm-fresh td{animation:fo-qm-settle .6s var(--fo-ease)}

/* opening entry — header, line grid, foot */
.fo-qm-jehead{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:13px 16px;border-top:1px solid var(--fo-line)}
.fo-qm-jehead .t{min-width:0;margin-right:auto}
.fo-qm-jehead .t .l1{font-size:13.5px;font-weight:700;color:var(--fo-ink)}
.fo-qm-jehead .t .l2{font-size:11.5px;color:var(--fo-ink-3);margin-top:1px}
.fo-qm-src{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:999px;background:var(--fo-accent-soft);color:var(--fo-accent-deep);font-size:11.5px;font-weight:700;white-space:nowrap}
.fo-qm-src svg.fo-i{width:12px;height:12px}
.fo-qm-jescroll{max-height:420px;overflow:auto;padding:2px 16px 0}
.fo-qm-jlhead{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) 110px 110px;gap:14px;padding:10px 16px 6px;font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--fo-ink-3)}
.fo-qm-jlhead .num{text-align:right}
.fo-qm-jl{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) 110px 110px;gap:4px 14px;align-items:center;padding:8px 0;border-bottom:1px solid var(--fo-line);font-size:12.5px}
.fo-qm-jl:last-child{border-bottom:0}
.fo-qm-jl .a{min-width:0;color:var(--fo-ink);font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fo-qm-jl .d{min-width:0;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.fo-qm-jl .d .cc{font-size:11px;color:var(--fo-ink-3);white-space:nowrap}
.fo-qm-jl .num{text-align:right;font-variant-numeric:tabular-nums;font-weight:650;color:var(--fo-ink);white-space:nowrap}
.fo-qm-jl .num.is-empty{color:var(--fo-ink-3);font-weight:400}
.fo-qm-jl .memo{grid-column:1/-1;margin-top:-4px;font-size:11px;color:var(--fo-ink-3)}
.fo-qm-jlfoot{display:grid;grid-template-columns:minmax(0,2.5fr) 110px 110px;gap:14px;padding:10px 16px 0;border-top:2px solid var(--fo-ink);margin:0 16px;font-size:13px;font-weight:800;color:var(--fo-ink)}
.fo-qm-jlfoot .num{text-align:right;font-variant-numeric:tabular-nums}
.fo-qm-jenote{padding:8px 16px 14px;font-size:11.5px;line-height:1.55;color:var(--fo-ink-3)}
.fo-qm-tiechip{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:999px;background:var(--fo-ok-soft);color:var(--fo-ok);font-size:10.5px;font-weight:700;white-space:nowrap}
.fo-qm-tiechip svg.fo-i{width:10px;height:10px}

/* open items — the carried lists */
.fo-qm-open{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:16px;border-top:1px solid var(--fo-line)}
.fo-qm-sub{border:1px solid var(--fo-line);border-radius:var(--fo-r-md);background:var(--fo-surface);padding:13px 14px;min-width:0;display:flex;flex-direction:column}
.fo-qm-sub .hd{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:700;color:var(--fo-ink);margin-bottom:4px}
.fo-qm-sub .hd svg.fo-i{width:15px;height:15px;flex:none;color:var(--fo-accent)}
.fo-qm-sub .hd .fo-tkt-sla{margin-left:auto}
.fo-qm-oi{display:flex;align-items:center;gap:12px;padding:8px 0;border-bottom:1px solid var(--fo-line)}
.fo-qm-oi:last-child{border-bottom:0}
.fo-qm-oi .m{flex:1;min-width:0}
.fo-qm-oi .nm{font-size:12.5px;font-weight:650;color:var(--fo-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fo-qm-oi .sub{font-size:11px;color:var(--fo-ink-3);margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fo-qm-oi .amt{flex:none;font-size:12.5px;font-weight:700;font-variant-numeric:tabular-nums;color:var(--fo-ink)}
.fo-qm-tie{display:flex;align-items:center;gap:8px;margin-top:auto;padding-top:10px;border-top:2px solid var(--fo-ink);font-size:12.5px;font-weight:700;color:var(--fo-ink)}
.fo-qm-tie svg.fo-i{width:13px;height:13px;flex:none;color:var(--fo-ok)}
.fo-qm-tie .amt{margin-left:auto;font-variant-numeric:tabular-nums;white-space:nowrap}
.fo-qm-tie.is-off{color:var(--fo-warn)}
.fo-qm-tie.is-off svg.fo-i{color:var(--fo-warn)}
.fo-qm-retnote{display:flex;gap:8px;align-items:flex-start;margin-top:9px;padding:9px 11px;border-radius:9px;background:var(--fo-accent-soft);color:var(--fo-accent-deep);font-size:11.5px;line-height:1.5}
.fo-qm-retnote svg.fo-i{width:12px;height:12px;flex:none;margin-top:2px}
.fo-qm-subempty{padding:22px 10px;text-align:center;font-size:12px;line-height:1.55;color:var(--fo-ink-3);border:1.5px dashed var(--fo-line-strong);border-radius:var(--fo-r-md)}

/* the guard footer + the done card */
.fo-qm-guard{display:flex;align-items:center;gap:12px;padding:14px 16px;border-top:1px solid var(--fo-line);background:var(--fo-canvas);flex-wrap:wrap}
.fo-qm-guard .mk{width:30px;height:30px;flex:none;border-radius:9px;display:grid;place-items:center;background:var(--fo-accent-soft);color:var(--fo-accent-deep)}
.fo-qm-guard .mk svg.fo-i{width:15px;height:15px}
.fo-qm-guard .tx{flex:1;min-width:240px;font-size:12.5px;line-height:1.55;color:var(--fo-ink-2)}
.fo-qm-guard .tx b{color:var(--fo-ink)}
.fo-qm-wait{font-size:11.5px;color:var(--fo-ink-3);text-align:right}
.fo-qm-done{text-align:center;margin:16px;padding:30px 20px 26px;border:1px dashed rgba(24,129,80,.35);border-radius:var(--fo-r-md);background:var(--fo-ok-soft);animation:fo-qm-settle .5s var(--fo-ease)}
.fo-qm-done .ring{width:56px;height:56px;border-radius:50%;display:grid;place-items:center;margin:0 auto 14px;background:var(--fo-ok);color:#fff;animation:fo-qm-pop .5s var(--fo-ease)}
.fo-qm-done .ring svg.fo-i{width:24px;height:24px}
.fo-qm-done .t{font-size:16px;font-weight:800;letter-spacing:-.01em;color:var(--fo-ink)}
.fo-qm-done .s{font-size:12.5px;line-height:1.6;color:var(--fo-ink-2);margin:6px auto 14px;max-width:520px}
.fo-qm-done .acts{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
@keyframes fo-qm-pop{0%{transform:scale(.4);opacity:0}60%{transform:scale(1.15)}100%{transform:scale(1);opacity:1}}
@keyframes fo-qm-settle{from{background:var(--fo-ok-soft)}to{background:transparent}}
.fo-qm-in{animation:fo-qm-in .3s var(--fo-ease)}
@keyframes fo-qm-in{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}

/* right rail — the rules of the move + the cutover date */
.fo-qm-rail{display:flex;gap:11px;padding:11px 0;border-bottom:1px solid var(--fo-line);font-size:12.5px;line-height:1.55;color:var(--fo-ink-2)}
.fo-qm-rail:last-child{border-bottom:0}
.fo-qm-rail svg.fo-i{width:15px;height:15px;flex:none;margin-top:2px;color:var(--fo-accent)}
.fo-qm-rail b{color:var(--fo-ink)}
.fo-qm-creed{margin:12px 0 2px;padding-top:11px;border-top:1px solid var(--fo-line);font-size:11.5px;color:var(--fo-ink-3);font-style:italic}
.fo-qm-cut{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.fo-qm-cut .tile{width:52px;height:52px;flex:none;border-radius:14px;display:grid;place-items:center;background:var(--fo-accent-soft);color:var(--fo-accent-deep)}
.fo-qm-cut .tile svg.fo-i{width:24px;height:24px}
.fo-qm-cut .dt{font-family:var(--fo-font-display);font-size:24px;font-weight:750;letter-spacing:-.02em;color:var(--fo-ink);line-height:1.1}
.fo-qm-cut .k{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--fo-ink-3);margin-top:3px}
.fo-qm-cutsub{font-size:12px;line-height:1.6;color:var(--fo-ink-2);margin-top:12px}
.fo-qm-mini{display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px solid var(--fo-line);font-size:12.5px;color:var(--fo-ink-2)}
.fo-qm-mini:last-child{border-bottom:0}
.fo-qm-mini .v{font-weight:700;font-variant-numeric:tabular-nums;color:var(--fo-ink);white-space:nowrap;text-align:right}

@media (max-width:940px){
  .fo-qm-slots,.fo-qm-open{grid-template-columns:1fr}
  .fo-qm-hero{grid-template-columns:1fr}
  .fo-qm-fun{padding:2px 0}
  .fo-qm-fun .c{transform:rotate(90deg)}
  .fo-qm-jlhead,.fo-qm-jl{grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) 88px 88px;gap:4px 10px}
}
/* ═══ end QBO MIGRATION ═══ */

/* ═══ Accounting — Dual-run month gate (.fo-dr-*) ═══════════════════════
   Lifted verbatim from dualrun.html (MIGRATE-ME block): side-by-side TB
   rows, gate hero, machine-checked sign-off, drill drawer. ═══ */
/* ══ MIGRATE-ME → static/v3/app.css ══
   DUAL-RUN MONTH GATE (.fo-dr-*) — page-scoped marks, lifted verbatim by
   the orchestrator this wave. The gate hero (one number: total absolute
   delta), the ours-vs-QBO trial-balance compare rows (quiet ties, loud
   finds), the finding chip + drill line grid, the A/R aging compare
   strip, the machine-checked sign-off rows, and the retire confirm. ── */

/* the gate hero — one number decides the month */
.fo-dr-hero{display:flex;align-items:center;gap:22px;flex-wrap:wrap;padding:20px 22px;border:1px solid var(--fo-line);border-radius:var(--fo-r-lg);background:var(--fo-surface);box-shadow:var(--fo-shadow-1);margin-bottom:18px}
.fo-dr-hero .tile{width:54px;height:54px;flex:none;border-radius:15px;display:grid;place-items:center;background:var(--fo-canvas);color:var(--fo-ink-3)}
.fo-dr-hero .tile svg.fo-i{width:25px;height:25px}
.fo-dr-hero.is-tie .tile{background:var(--fo-ok-soft);color:var(--fo-ok)}
.fo-dr-hero.is-div .tile{background:var(--fo-warn-soft);color:var(--fo-warn)}
.fo-dr-hero .num{flex:none}
.fo-dr-hero .num .v{font-family:var(--fo-font-display);font-size:34px;font-weight:750;letter-spacing:-.02em;line-height:1.05;color:var(--fo-ink);font-variant-numeric:tabular-nums;white-space:nowrap}
.fo-dr-hero.is-tie .num .v{color:var(--fo-ok)}
.fo-dr-hero.is-div .num .v{color:var(--fo-warn)}
.fo-dr-hero .num .k{font-size:10.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--fo-ink-3);margin-top:4px;white-space:nowrap}
.fo-dr-hero .mid{flex:1;min-width:250px}
.fo-dr-hero .mid .t1{display:flex;align-items:center;gap:9px;flex-wrap:wrap;font-size:15.5px;font-weight:800;letter-spacing:-.01em;color:var(--fo-ink)}
.fo-dr-hero .mid .t2{font-size:12.5px;line-height:1.55;color:var(--fo-ink-2);margin-top:3px;max-width:520px}
.fo-dr-hero .mid .chips{display:flex;gap:7px;flex-wrap:wrap;margin-top:9px}
.fo-dr-facts{flex:none;display:grid;gap:6px;min-width:220px}
.fo-dr-fact{display:flex;gap:10px;align-items:baseline;font-size:11.5px}
.fo-dr-fact .k{flex:none;width:76px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;font-size:9.5px;color:var(--fo-ink-3)}
.fo-dr-fact .v{min-width:0;color:var(--fo-ink-2);line-height:1.45}
.fo-dr-fact .v b{color:var(--fo-ink);font-weight:700}
@media (max-width:960px){.fo-dr-facts{min-width:0;flex:1 1 100%;grid-template-columns:1fr;border-top:1px solid var(--fo-line);padding-top:12px}}

/* the diverging-account chip — the hero names its accounts */
.fo-dr-acct{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border:0;border-radius:999px;background:var(--fo-warn-soft);color:var(--fo-warn);font:inherit;font-size:11.5px;font-weight:750;font-variant-numeric:tabular-nums;white-space:nowrap;cursor:pointer;transition:filter .15s ease}
.fo-dr-acct:hover{filter:brightness(.96)}
.fo-dr-acct svg.fo-i{width:11px;height:11px}

/* compare table — quiet ties, loud finds */
.fo-dr-grp td{font-weight:700;color:var(--fo-ink);background:var(--fo-surface-2);cursor:pointer}
.fo-dr-grp .chev{width:13px;height:13px;flex:none;color:var(--fo-ink-3);transition:transform .18s var(--fo-ease)}
.fo-dr-grp.is-closed .chev{transform:rotate(-90deg)}
.fo-dr-grp .n{font-size:11px;font-weight:650;color:var(--fo-ink-3)}
.fo-dr-acctrow td:first-child{padding-left:38px}
.fo-dr-code{display:inline-block;min-width:38px;margin-right:9px;font-family:var(--fo-mono);font-size:11.5px;font-weight:700;color:var(--fo-ink-3);font-variant-numeric:tabular-nums}
.fo-dr-bal{font-variant-numeric:tabular-nums;font-weight:650;white-space:nowrap;color:var(--fo-ink)}
.fo-dr-bal .side{margin-left:5px;font-size:10px;font-weight:750;letter-spacing:.04em;color:var(--fo-ink-3)}
.fo-dr-bal.is-dim{color:var(--fo-ink-3);font-weight:400}
.fo-dr-zero{color:var(--fo-ink-3);font-weight:400}
tr.is-find td{background:var(--fo-warn-soft)}
tr.is-find td:first-child{box-shadow:inset 3px 0 0 var(--fo-warn)}
.fo-dr-delta{font-variant-numeric:tabular-nums;font-weight:750;color:var(--fo-warn);white-space:nowrap}
.fo-dr-why{display:inline-flex;align-items:center;gap:5px;padding:3px 10px;border:0;border-radius:999px;background:var(--fo-surface);color:var(--fo-warn);font:inherit;font-size:11px;font-weight:750;white-space:nowrap;cursor:pointer;box-shadow:0 1px 2px rgba(17,20,24,.06)}
.fo-dr-why:hover{background:#fff}
.fo-dr-why svg.fo-i{width:11px;height:11px}
.fo-dr-total td{font-weight:800;color:var(--fo-ink);border-top:2px solid var(--fo-ink);font-variant-numeric:tabular-nums}

/* the footed-but-honest guard band */
.fo-dr-guard{display:flex;align-items:center;gap:10px;font-size:12.5px;font-weight:650;color:var(--fo-ok)}
.fo-dr-guard .mk{width:26px;height:26px;flex:none;border-radius:50%;display:grid;place-items:center;background:var(--fo-ok-soft);color:var(--fo-ok)}
.fo-dr-guard .mk svg.fo-i{width:14px;height:14px}
.fo-dr-guard.is-warn{color:var(--fo-warn)}
.fo-dr-guard.is-warn .mk{background:var(--fo-warn-soft);color:var(--fo-warn)}
.fo-dr-guard .sub{display:block;font-size:11.5px;font-weight:500;color:var(--fo-ink-3);margin-top:1px}

/* upload — the honest "nothing to compare" state */
.fo-dr-up{padding:20px 16px 18px;border-top:1px solid var(--fo-line)}
.fo-dr-upnote{display:flex;justify-content:center;gap:16px;flex-wrap:wrap;margin-top:12px;font-size:11.5px;color:var(--fo-ink-3)}
.fo-dr-upnote span{display:inline-flex;align-items:center;gap:6px}
.fo-dr-upnote svg.fo-i{width:12px;height:12px}
.fo-dr-uperr{margin:0 0 14px}

/* A/R aging compare strip */
.fo-dr-ar{display:grid;grid-template-columns:repeat(6,1fr);gap:8px}
.fo-dr-ar>div{border:1px solid var(--fo-line);border-radius:10px;padding:9px 11px;min-width:0}
.fo-dr-ar .k{font-size:9.5px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--fo-ink-3);white-space:nowrap}
.fo-dr-ar .v{font-size:13px;font-weight:750;font-variant-numeric:tabular-nums;color:var(--fo-ink);margin-top:3px;white-space:nowrap}
.fo-dr-ar .v.is-dim{color:var(--fo-ink-3);font-weight:500}
.fo-dr-ar .s{display:flex;align-items:center;gap:4px;font-size:10.5px;font-weight:650;color:var(--fo-ok);margin-top:3px;white-space:nowrap}
.fo-dr-ar .s.is-dim{color:var(--fo-ink-3);font-weight:500}
.fo-dr-ar .s.is-warn{color:var(--fo-warn)}
.fo-dr-ar .s svg.fo-i{width:10px;height:10px;flex:none}
.fo-dr-ar>div.is-ret{background:var(--fo-accent-soft);border-color:transparent}
.fo-dr-ar>div.is-ret .k,.fo-dr-ar>div.is-ret .s{color:var(--fo-accent-deep)}
.fo-dr-arline{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin-top:12px;font-size:12px;line-height:1.55;color:var(--fo-ink-2)}
.fo-dr-arline svg.fo-i{width:13px;height:13px;flex:none;color:var(--fo-ok)}
.fo-dr-arline.is-wait svg.fo-i{color:var(--fo-ink-3)}
.fo-dr-arline.is-warn svg.fo-i{color:var(--fo-warn)}
.fo-dr-arline .tx{flex:1;min-width:200px}
@media (max-width:1080px){.fo-dr-ar{grid-template-columns:repeat(3,1fr)}}
@media (max-width:560px){.fo-dr-ar{grid-template-columns:repeat(2,1fr)}}

/* sign-off — machine-checked rows + the one human act */
.fo-dr-chk{display:flex;gap:11px;padding:10px 0;border-bottom:1px solid var(--fo-line);align-items:flex-start}
.fo-dr-chk:last-child{border-bottom:0}
.fo-dr-chk .dot{width:25px;height:25px;flex:none;border-radius:50%;display:grid;place-items:center;background:var(--fo-canvas);color:var(--fo-ink-3)}
.fo-dr-chk .dot svg.fo-i{width:13px;height:13px}
.fo-dr-chk.is-ok .dot{background:var(--fo-ok-soft);color:var(--fo-ok)}
.fo-dr-chk.is-fail .dot{background:var(--fo-warn-soft);color:var(--fo-warn)}
.fo-dr-chk .m{flex:1;min-width:0}
.fo-dr-chk .nm{font-size:13px;font-weight:700;color:var(--fo-ink)}
.fo-dr-chk .ev{font-size:11.5px;line-height:1.5;color:var(--fo-ink-3);margin-top:1px}
.fo-dr-chk.is-fail .ev{color:var(--fo-warn);font-weight:600}
.fo-dr-retire{margin-top:13px;padding-top:14px;border-top:1px solid var(--fo-line)}
.fo-dr-retire .fo-btn{width:100%;justify-content:center}
.fo-dr-retire .why{margin:9px 0 0;font-size:11.5px;line-height:1.55;color:var(--fo-ink-3);text-align:center}
.fo-dr-done{display:flex;gap:10px;align-items:flex-start;padding:11px 13px;border-radius:var(--fo-r-md);background:var(--fo-ok-soft);color:var(--fo-ok);font-size:12.5px;font-weight:650;line-height:1.5}
.fo-dr-done svg.fo-i{width:15px;height:15px;flex:none;margin-top:1px}
.fo-dr-done .sub{display:block;font-size:11.5px;font-weight:500;color:var(--fo-ink-2);margin-top:1px}

/* right-rail voice rows */
.fo-dr-rail{display:flex;gap:11px;padding:11px 0;border-bottom:1px solid var(--fo-line);font-size:12.5px;line-height:1.55;color:var(--fo-ink-2)}
.fo-dr-rail:last-child{border-bottom:0}
.fo-dr-rail svg.fo-i{width:15px;height:15px;flex:none;margin-top:2px;color:var(--fo-accent)}
.fo-dr-rail b{color:var(--fo-ink)}
.fo-dr-creed{margin:12px 0 2px;padding-top:11px;border-top:1px solid var(--fo-line);font-size:11.5px;color:var(--fo-ink-3);font-style:italic}

/* drill — the journal lines behind our number */
.fo-dr-jlhead{display:grid;grid-template-columns:minmax(0,1.7fr) 96px 96px;gap:14px;padding:0 0 6px;font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--fo-ink-3)}
.fo-dr-jlhead .num{text-align:right}
.fo-dr-jl{display:grid;grid-template-columns:minmax(0,1.7fr) 96px 96px;gap:4px 14px;align-items:center;padding:8px 0;border-bottom:1px solid var(--fo-line);font-size:12.5px}
.fo-dr-jl:last-child{border-bottom:0}
.fo-dr-jl .a{min-width:0;color:var(--fo-ink);font-weight:650}
.fo-dr-jl .a .cc{display:block;font-size:11px;font-weight:500;color:var(--fo-ink-3);margin-top:1px}
.fo-dr-jl .num{text-align:right;font-variant-numeric:tabular-nums;font-weight:650;color:var(--fo-ink);white-space:nowrap}
.fo-dr-jl .num.is-empty{color:var(--fo-ink-3);font-weight:400}
.fo-dr-jlfoot{display:grid;grid-template-columns:minmax(0,1.7fr) 96px 96px;gap:14px;padding-top:9px;border-top:2px solid var(--fo-ink);font-size:12.5px;font-weight:800;color:var(--fo-ink)}
.fo-dr-jlfoot .num{text-align:right;font-variant-numeric:tabular-nums}
.fo-dr-note{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;border-radius:12px;background:var(--fo-accent-soft);color:var(--fo-accent-deep);font-size:12.5px;line-height:1.55}
.fo-dr-note svg.fo-i{width:15px;height:15px;flex:none;margin-top:1px}

/* retire confirm */
.fo-dr-ret{display:flex;gap:11px;padding:11px 0;border-bottom:1px solid var(--fo-line);font-size:12.5px;line-height:1.55;color:var(--fo-ink-2)}
.fo-dr-ret:last-child{border-bottom:0}
.fo-dr-ret .pill{width:30px;height:30px;flex:none;display:grid;place-items:center;border-radius:9px;background:var(--fo-canvas);color:var(--fo-ink-2)}
.fo-dr-ret .pill svg.fo-i{width:15px;height:15px}
.fo-dr-ret b{display:block;color:var(--fo-ink);font-weight:700}
.fo-dr-ack{display:flex;gap:11px;align-items:flex-start;padding:12px 14px;border-radius:var(--fo-r-md);background:var(--fo-canvas);cursor:pointer;margin-top:14px}
.fo-dr-ack input{width:16px;height:16px;flex:none;margin-top:2px;accent-color:var(--fo-accent);cursor:pointer}
.fo-dr-ack .tx{font-size:12px;line-height:1.5;color:var(--fo-ink-2)}
.fo-dr-ack .tx b{color:var(--fo-ink)}

/* month-switch settle */
@keyframes fo-dr-in{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
.fo-dr-fade{animation:fo-dr-in .26s var(--fo-ease)}
/* ═══ end Accounting — Dual-run month gate (.fo-dr-*) ═══ */

/* ═══ Accounting — Budgets & Forecasts (.fo-bg-*) ═══
   The budget board rows + quiet health pill, cost-code depth grid with
   the budget/actual/committed slim bar, the FAC formula strip (locked
   terms + the one editable ETC), the no-budget-yet honest row, the
   set-a-budget drawer lines, one-owner rail rows, and the payment-rails
   strip with its disabled-but-explained processor slot. ═══ */

/* board — money cells, variance, health pill */
.fo-bg-money{font-variant-numeric:tabular-nums;font-weight:650;white-space:nowrap;color:var(--fo-ink)}
.fo-bg-money.is-dim{color:var(--fo-ink-3);font-weight:400}
.fo-bg-thsub{display:block;font-size:9.5px;font-weight:650;letter-spacing:.05em;color:var(--fo-ink-3);margin-top:1px}
.fo-bg-var{font-variant-numeric:tabular-nums;font-weight:700;white-space:nowrap}
.fo-bg-var.is-under{color:var(--fo-ok)}
.fo-bg-var.is-over{color:var(--fo-danger)}
.fo-bg-health{display:inline-flex;align-items:center;gap:5px;padding:3px 10px;border-radius:999px;font-size:11px;font-weight:700;white-space:nowrap}
.fo-bg-health svg.fo-i{width:11px;height:11px}
.fo-bg-health.is-ok{background:var(--fo-ok-soft);color:var(--fo-ok)}
.fo-bg-health.is-watch{background:var(--fo-warn-soft);color:var(--fo-warn)}
.fo-bg-health.is-over{background:var(--fo-danger-soft);color:var(--fo-danger)}
.fo-bg-chev{width:13px;height:13px;flex:none;color:var(--fo-ink-3);transform:rotate(-90deg);transition:transform .18s var(--fo-ease)}
.fo-bg-chev.is-open{transform:rotate(0deg)}

/* the honest no-budget row */
.fo-bg-nob{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.fo-bg-nob .mk{width:34px;height:34px;flex:none;border-radius:10px;border:1px dashed var(--fo-line-strong);display:grid;place-items:center;color:var(--fo-ink-3)}
.fo-bg-nob .mk svg.fo-i{width:15px;height:15px}
.fo-bg-nob .tx{flex:1;min-width:220px;font-size:12.5px;line-height:1.55;color:var(--fo-ink-2)}
.fo-bg-nob .tx b{color:var(--fo-ink)}

/* cost-code depth — grid rows + the slim budget/actual/committed bar */
.fo-bg-deep>td{background:var(--fo-canvas);padding:4px 22px 16px}
.fo-bg-cghead{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(110px,1fr) 96px 96px 96px 96px;gap:12px;padding:9px 0 6px;font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--fo-ink-3)}
.fo-bg-cghead .num{text-align:right}
.fo-bg-cghead .lg{display:flex;align-items:center;gap:9px;text-transform:none;letter-spacing:0;font-size:10.5px;font-weight:600}
.fo-bg-sw{display:inline-block;width:8px;height:8px;border-radius:2px;margin-right:4px;vertical-align:-1px}
.fo-bg-sw.is-a{background:var(--fo-accent)}
.fo-bg-sw.is-c{background:#b9cdf2}
.fo-bg-sw.is-o{background:var(--fo-danger)}
.fo-bg-crow{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(110px,1fr) 96px 96px 96px 96px;gap:12px;align-items:center;padding:8px 0;border-top:1px solid var(--fo-line);font-size:12.5px}
.fo-bg-crow .cc{min-width:0;font-weight:650;color:var(--fo-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fo-bg-crow .cc .ct{font-weight:650;font-size:11px;color:var(--fo-ink-3);margin-left:6px}
.fo-bg-crow .cc .ub{display:block;font-size:11px;font-weight:500;color:var(--fo-warn)}
.fo-bg-crow .num{text-align:right;font-variant-numeric:tabular-nums;font-weight:650;color:var(--fo-ink);white-space:nowrap}
.fo-bg-crow .num.is-dim{color:var(--fo-ink-3);font-weight:400}
.fo-bg-crow .num.is-over{color:var(--fo-danger);font-weight:700}
.fo-bg-bar{position:relative;display:flex;height:7px;border-radius:99px;background:var(--fo-line);overflow:hidden}
.fo-bg-bar i{display:block;height:100%}
.fo-bg-bar i.a{background:var(--fo-accent)}
.fo-bg-bar i.ao{background:var(--fo-danger)}
.fo-bg-bar i.c{background:#b9cdf2}
.fo-bg-bar i.co{background:#f3b8b8}
.fo-bg-bar b{position:absolute;top:0;bottom:0;width:2px;background:rgba(15,23,42,.55);border-radius:1px;transform:translateX(-1px)}

/* the FAC strip — a formula, editable only at ETC */
.fo-bg-fac{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:12px;padding:11px 14px;border:1px solid var(--fo-line);border-radius:var(--fo-r-md);background:var(--fo-surface)}
.fo-bg-fac .t{min-width:0}
.fo-bg-fac .k{display:flex;align-items:center;gap:4px;font-size:10px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--fo-ink-3);white-space:nowrap}
.fo-bg-fac .k svg.fo-i{width:10px;height:10px}
.fo-bg-fac .v{font-size:13.5px;font-weight:700;font-variant-numeric:tabular-nums;color:var(--fo-ink);margin-top:2px;white-space:nowrap}
.fo-bg-fac .op{font-size:14px;font-weight:700;color:var(--fo-ink-3)}
.fo-bg-fac .res .v{font-size:15px;font-weight:800}
.fo-bg-etc{display:inline-flex;align-items:center;gap:5px;margin-top:2px;padding:3px 9px;border:0;border-radius:8px;background:var(--fo-accent-soft);color:var(--fo-accent-deep);font:inherit;font-size:13px;font-weight:700;font-variant-numeric:tabular-nums;cursor:pointer;transition:background .15s ease}
.fo-bg-etc:hover{background:#dce8f9}
.fo-bg-etc svg.fo-i{width:11px;height:11px}
.fo-bg-etcin{width:112px;height:30px;margin-top:2px;text-align:right;font-variant-numeric:tabular-nums}
.fo-bg-facnote{display:flex;gap:8px;align-items:flex-start;margin-top:9px;font-size:11.5px;line-height:1.5;color:var(--fo-ink-3)}
.fo-bg-facnote svg.fo-i{width:12px;height:12px;flex:none;margin-top:1px;color:var(--fo-danger)}

/* P&L budget — actual/budget row pairs */
.fo-bg-pl td{font-variant-numeric:tabular-nums;white-space:nowrap}
.fo-bg-pl td:first-child{white-space:normal}
tr.fo-bg-plact td{border-bottom:0;padding-bottom:3px;font-weight:650;color:var(--fo-ink)}
tr.fo-bg-plbud td{padding-top:0;font-size:12px;font-weight:400;color:var(--fo-ink-3)}
.fo-bg-plsub{display:block;font-size:11px;font-weight:400;color:var(--fo-ink-3);margin-top:1px}
.fo-bg-pltag{font-size:10.5px;font-weight:650;letter-spacing:.04em;text-transform:uppercase;color:var(--fo-ink-3)}
tr.fo-bg-plsubt td{border-top:1px solid var(--fo-line-strong);font-weight:750}
tr.fo-bg-pltot td{border-top:2px solid var(--fo-ink);font-weight:800}
.fo-bg-delta{font-weight:650}
.fo-bg-delta.is-good{color:var(--fo-ok)}
.fo-bg-delta.is-bad{color:var(--fo-danger)}

/* right rail — one number, one owner */
.fo-bg-rail{display:flex;gap:11px;padding:11px 0;border-bottom:1px solid var(--fo-line);font-size:12.5px;line-height:1.55;color:var(--fo-ink-2)}
.fo-bg-rail:last-child{border-bottom:0}
.fo-bg-rail svg.fo-i{width:15px;height:15px;flex:none;margin-top:2px;color:var(--fo-accent)}
.fo-bg-rail b{color:var(--fo-ink)}
.fo-bg-creed{margin:12px 0 2px;padding-top:11px;border-top:1px solid var(--fo-line);font-size:11.5px;color:var(--fo-ink-3);font-style:italic}
.fo-bg-mini{display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px solid var(--fo-line);font-size:12.5px;color:var(--fo-ink-2)}
.fo-bg-mini:last-of-type{border-bottom:0}
.fo-bg-mini .v{font-weight:700;font-variant-numeric:tabular-nums;color:var(--fo-ink);white-space:nowrap}

/* payment rails — the strip + the honest processor slot */
.fo-bg-railsgrid{display:grid;grid-template-columns:1.05fr 1.2fr 1.05fr;border-top:1px solid var(--fo-line)}
.fo-bg-railsgrid>div{padding:15px 16px;min-width:0}
.fo-bg-railsgrid>div+div{border-left:1px solid var(--fo-line)}
.fo-bg-railcard .rt{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:700;color:var(--fo-ink)}
.fo-bg-railcard .rt svg.fo-i{width:14px;height:14px;color:var(--fo-accent);flex:none}
.fo-bg-railcard .rs{font-size:12px;line-height:1.55;color:var(--fo-ink-2);margin-top:6px}
.fo-bg-railcard .rs b{color:var(--fo-ink)}
.fo-bg-slot{height:100%;border:1px dashed var(--fo-line-strong);border-radius:var(--fo-r-md);padding:13px 14px;display:flex;flex-direction:column;gap:8px}
.fo-bg-slot .rt{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:700;color:var(--fo-ink)}
.fo-bg-slot .rt svg.fo-i{width:14px;height:14px;color:var(--fo-ink-3);flex:none}
.fo-bg-slot .rs{font-size:12px;line-height:1.55;color:var(--fo-ink-2)}
.fo-bg-slot .fo-btn[disabled]{opacity:.55;cursor:not-allowed}
.fo-bg-slot .dim{font-size:11px;color:var(--fo-ink-3)}

/* set-a-budget drawer */
.fo-bg-est{border:1px solid var(--fo-line);border-radius:var(--fo-r-md);background:var(--fo-canvas);padding:11px 13px;margin-bottom:14px}
.fo-bg-est .r1{display:flex;align-items:baseline;justify-content:space-between;gap:10px;font-size:12px;font-weight:700;color:var(--fo-ink)}
.fo-bg-est .r1 .amt{font-variant-numeric:tabular-nums}
.fo-bg-est .r2{font-size:11.5px;color:var(--fo-ink-3);margin-top:2px}
.fo-bg-bline{display:grid;grid-template-columns:minmax(0,1fr) 118px;gap:8px;align-items:center;padding:7px 0;border-bottom:1px solid var(--fo-line)}
.fo-bg-bline:last-of-type{border-bottom:0}
.fo-bg-bline .cc{min-width:0;font-size:12.5px;font-weight:650;color:var(--fo-ink)}
.fo-bg-bline .cc .ct{font-size:11px;font-weight:650;color:var(--fo-ink-3);margin-left:6px}
.fo-bg-bline .cc .sub{display:block;font-size:11px;font-weight:400;color:var(--fo-ink-3);margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fo-bg-bline .fo-input,.fo-bg-bline .fo-select{height:34px}
.fo-bg-bline .fo-input{text-align:right;font-variant-numeric:tabular-nums}
.fo-bg-btot{display:flex;justify-content:space-between;gap:10px;margin-top:2px;padding-top:10px;border-top:2px solid var(--fo-ink);font-size:13px;font-weight:800;color:var(--fo-ink);font-variant-numeric:tabular-nums}
.fo-bg-note{display:flex;gap:8px;align-items:flex-start;margin:14px 0 0;font-size:12px;line-height:1.55;color:var(--fo-ink-3)}
.fo-bg-note svg.fo-i{width:13px;height:13px;flex:none;margin-top:2px;color:var(--fo-accent)}

@media (max-width:1100px){
  .fo-bg-cghead,.fo-bg-crow{grid-template-columns:minmax(0,1.4fr) 90px 90px 90px 90px}
  .fo-bg-cghead .lg,.fo-bg-crow .fo-bg-bar{display:none}
}
@media (max-width:900px){
  .fo-bg-railsgrid{grid-template-columns:1fr}
  .fo-bg-railsgrid>div+div{border-left:0;border-top:1px solid var(--fo-line)}
}
/* ═══ end Accounting — Budgets & Forecasts (.fo-bg-*) ═══ */

/* ═══ ACCOUNTS PAYABLE DESK (.fo-ap-* — payables page family; the approvals
   inbox owns a disjoint .fo-ap-* set above, class names checked to never
   collide). Ports styleguide/ap-bills.html + ap-run.html into one desk:
   the source chip (PO · Sub · Desk), the sticky run totals bar, the
   bill-coding rows with the live remaining counter, the run history rows,
   the W-9 status chip and the honest processor slot. ═══ */

/* source chip — which subledger the payable really lives in */
.fo-ap-src{display:inline-flex;align-items:center;padding:2px 8px;border-radius:7px;font-family:var(--fo-mono, ui-monospace, SFMono-Regular, Menlo, monospace);font-size:11px;font-weight:700;white-space:nowrap;background:var(--fo-canvas);color:var(--fo-ink-2)}
.fo-ap-src.is-po{background:var(--fo-accent-soft);color:var(--fo-accent-deep)}
.fo-ap-src.is-sub{background:var(--fo-ok-soft);color:var(--fo-ok)}

/* payment-run totals bar (port of the styleguide .fo-ap-runbar) */
.fo-ap-runbar{position:sticky;bottom:14px;z-index:5;display:flex;align-items:center;gap:18px;padding:12px 18px;margin-top:16px;border-radius:var(--fo-r-lg);background:var(--fo-ink);color:#fff;box-shadow:0 14px 34px -12px rgba(15,25,50,.45)}
.fo-ap-runbar[hidden]{display:none}
.fo-ap-runbar .n{font-size:13px;font-weight:600;opacity:.85}
.fo-ap-runbar .amt{font-size:17px;font-weight:800;font-variant-numeric:tabular-nums;letter-spacing:-.01em}
.fo-ap-runbar .sp{flex:1}

/* bill GL-coding rows — read view + the drawer's editable grid */
.fo-ap-coderow{display:flex;align-items:center;gap:12px;padding:9px 0;border-top:1px solid var(--fo-line)}
.fo-ap-coderow .m{flex:1;min-width:0}
.fo-ap-coderow .nm{font-size:13px;font-weight:650;color:var(--fo-ink)}
.fo-ap-coderow .sub{font-size:11.5px;color:var(--fo-ink-3);margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fo-ap-coderow .amt{flex:none;font-size:13px;font-weight:700;font-variant-numeric:tabular-nums;color:var(--fo-ink)}
.fo-ap-coderow.is-edit{border:1px solid var(--fo-line);border-radius:var(--fo-r-md);padding:10px 12px;margin-bottom:9px;border-top:1px solid var(--fo-line)}
.fo-ap-coderow.is-edit .g{flex:1;min-width:0;display:grid;grid-template-columns:minmax(0,1.5fr) 96px minmax(0,1fr) minmax(0,1fr);gap:8px}
.fo-ap-coderow.is-edit .amt{text-align:right}
@media (max-width:640px){.fo-ap-coderow.is-edit .g{grid-template-columns:1fr 96px}}

/* live remaining-to-code counter (the cash-application counter idiom) */
.fo-ap-counter{display:flex;align-items:center;gap:14px;padding:14px 16px;border-radius:var(--fo-r-md);background:var(--fo-canvas)}
.fo-ap-counter .v{font-size:26px;font-weight:800;letter-spacing:-.01em;font-variant-numeric:tabular-nums;color:var(--fo-ink);white-space:nowrap}
.fo-ap-counter .k{font-size:12px;line-height:1.45;color:var(--fo-ink-3)}
.fo-ap-counter.is-zero{background:var(--fo-ok-soft)}
.fo-ap-counter.is-zero .v{color:var(--fo-ok)}
.fo-ap-counter.is-over{background:var(--fo-danger-soft)}
.fo-ap-counter.is-over .v{color:var(--fo-danger)}

/* run history rows */
.fo-ap-runrow{display:flex;align-items:center;gap:12px;padding:10px 2px;border-bottom:1px solid var(--fo-line)}
.fo-ap-runrow:last-child{border-bottom:0}
.fo-ap-runrow .m{flex:1;min-width:0}
.fo-ap-runrow .nm{font-size:13px;font-weight:650;color:var(--fo-ink)}
.fo-ap-runrow .sub{font-size:11.5px;color:var(--fo-ink-3);margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* W-9 status chip — the 1099 tab's honest tri-state */
.fo-ap-w9{display:inline-flex;align-items:center;gap:5px;padding:2.5px 9px;border-radius:999px;font-size:11px;font-weight:700;white-space:nowrap}
.fo-ap-w9 .fo-i{width:12px;height:12px}
.fo-ap-w9.is-ok{background:var(--fo-ok-soft);color:var(--fo-ok)}
.fo-ap-w9.is-warn{background:var(--fo-warn-soft);color:var(--fo-warn)}
.fo-ap-w9.is-none{background:var(--fo-danger-soft);color:var(--fo-danger)}

/* processor slot — disabled but explained (the Plaid honesty pattern) */
.fo-ap-proc{display:flex;align-items:center;gap:12px;padding:13px 16px;margin-top:16px;border:1px dashed var(--fo-line-strong);border-radius:var(--fo-r-md);background:var(--fo-canvas)}
.fo-ap-proc .pill{width:30px;height:30px;flex:none;display:grid;place-items:center;border-radius:9px;background:var(--fo-surface);color:var(--fo-ink-3)}
.fo-ap-proc .pill svg.fo-i{width:15px;height:15px}
.fo-ap-proc .m{flex:1;min-width:0}
.fo-ap-proc .t1{font-size:13px;font-weight:700;color:var(--fo-ink)}
.fo-ap-proc .t2{font-size:11.5px;line-height:1.5;color:var(--fo-ink-3);margin-top:1px}
/* ═══ end Accounts Payable desk (.fo-ap-* payables family) ═══ */

/* every drawer expands (2026-07-09): is-wide already covers is-right (600->1000);
   top drawers get their own wide step so the injected .fo-expand works there too. */
.fo-drawer.is-top.is-wide{width:min(1080px,calc(100vw - 20px));max-height:min(860px,calc(100vh - 20px))}

/* ═══ .fo-aix-* — AI invoice autofill (payables Enter-a-bill drawer) ═══
   AI is a proposer, never an actor: every AI-filled control wears .is-ai
   until the human touches it; the chip is the one honest summary line. */
.fo-input.is-ai,.fo-select.is-ai{border-color:var(--fo-accent-sky);box-shadow:0 0 0 1.5px var(--fo-accent-soft), inset 0 0 0 1px var(--fo-accent-sky)}
.fo-ddwrap:has(> select.is-ai)>button.fo-select{border-color:var(--fo-accent-sky);box-shadow:0 0 0 1.5px var(--fo-accent-soft), inset 0 0 0 1px var(--fo-accent-sky)}
.fo-aix-line{font-size:11.5px;line-height:1.5;color:var(--fo-ink-3);margin-top:6px}
.fo-aix-chip{display:flex;align-items:center;gap:8px;padding:8px 12px;margin-bottom:14px;border-radius:10px;background:var(--fo-accent-soft);color:var(--fo-accent);font-size:12px;font-weight:650;line-height:1.45}
.fo-aix-chip .fo-i{width:13px;height:13px;flex:none}
.fo-aix-chip span{min-width:0}
.fo-aix-chip .x{margin-left:auto;flex:none;display:grid;place-items:center;padding:3px;border:0;border-radius:6px;background:none;color:inherit;cursor:pointer;opacity:.65}
.fo-aix-chip .x:hover{opacity:1;background:rgba(11,63,158,.08)}
.fo-aix-chip .x .fo-i{width:12px;height:12px}
/* ═══ end .fo-aix-* — AI invoice autofill ═══ */

/* ═══ AP automation — Invoice register (.fo-ar2-*) ═══ lifted from its template head ═══ */
/* MIGRATE-ME → static/v3/app.css section: AP INVOICE REGISTER (.fo-ar2-*)
   — locked design New App/templates/styleguide/ap-register.html. Kept in
   the template head this wave so a parallel agent's app.css append can't
   collide and no V3_CSS_VER bump is needed. */

/* honesty laws strip */
.fo-ar2-laws{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 18px}

/* source chips — three ways in, one register */
.fo-ar2-src{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:999px;font-size:11.5px;font-weight:700;white-space:nowrap}
.fo-ar2-src svg.fo-i{width:12px;height:12px}
.fo-ar2-src.is-po{background:var(--fo-accent-soft);color:var(--fo-accent-deep)}
.fo-ar2-src.is-sub{background:var(--fo-ok-soft);color:var(--fo-ok)}
.fo-ar2-src.is-desk{background:var(--fo-canvas);color:var(--fo-ink-2)}

/* document presence — a real clip, or an honestly empty one */
th.fo-ar2-clipcell,td.fo-ar2-clipcell{text-align:center;width:36px}
.fo-ar2-clip{display:inline-grid;place-items:center;width:24px;height:24px;color:var(--fo-accent)}
.fo-ar2-clip svg{width:15px;height:15px}
.fo-ar2-clip.is-none{color:var(--fo-ink-3);opacity:.3}

/* quiet status subline + aged tail */
.fo-ar2-sub{display:block;font-size:11px;color:var(--fo-ink-3);margin-top:3px;white-space:nowrap}
.fo-ar2-date{white-space:nowrap;font-variant-numeric:tabular-nums}
.fo-ar2-age{display:block;font-size:11px;color:var(--fo-ink-3);margin-top:2px;white-space:nowrap}
.fo-ar2-age.is-warn{color:var(--fo-warn);font-weight:650}

/* filters can be many — let the toolbar wrap */
.fo-ar2-bar .fo-inc-toolbar{flex-wrap:wrap}

/* peek — document pane beside the coding; defrows read label-over-value */
.fo-ar2-grid{display:grid;grid-template-columns:250px minmax(0,1fr);gap:22px;align-items:start}
.fo-ar2-grid .fo-defrow{cursor:default}
.fo-ar2-grid .fo-defrow .k{display:block;font-size:11px;font-weight:650;letter-spacing:.02em;color:var(--fo-ink-3);margin-bottom:1px}
.fo-ar2-grid .fo-defrow .v{display:block;font-size:13.5px;font-weight:550;line-height:1.5;color:var(--fo-ink)}
.fo-ar2-thumb{position:relative;border:1px solid var(--fo-line);border-radius:10px;background:#fff;box-shadow:var(--fo-shadow-1);padding:14px 13px 12px;min-height:186px;display:flex;flex-direction:column;gap:7px}
.fo-ar2-thumb .tag{position:absolute;top:10px;right:10px;font-size:8.5px;font-weight:800;letter-spacing:.05em;padding:2px 6px;border-radius:5px;background:var(--fo-accent-soft);color:var(--fo-accent-deep)}
.fo-ar2-thumb .vn{font-size:9px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--fo-ink-2);max-width:70%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fo-ar2-thumb .fn{font-size:11.5px;font-weight:650;color:var(--fo-ink);overflow-wrap:anywhere}
.fo-ar2-thumb .ln{display:block;height:5px;border-radius:3px;background:var(--fo-canvas)}
.fo-ar2-thumb .rw{display:flex;justify-content:space-between;gap:8px}
.fo-ar2-thumb .rw .ln{flex:none}
.fo-ar2-thumb .tot{margin-top:auto;padding-top:8px;border-top:1px solid var(--fo-line);text-align:right;font-size:10.5px;font-weight:750;font-variant-numeric:tabular-nums;color:var(--fo-ink)}
.fo-ar2-nodoc{border:1px dashed var(--fo-line-strong);border-radius:10px;background:var(--fo-canvas);padding:30px 18px;text-align:center;min-height:186px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px}
.fo-ar2-nodoc svg.fo-i{width:24px;height:24px;color:var(--fo-ink-3);opacity:.35;margin-bottom:4px}
.fo-ar2-nodoc .t{font-size:12.5px;font-weight:700;color:var(--fo-ink-2)}
.fo-ar2-nodoc .s{font-size:11.5px;line-height:1.55;color:var(--fo-ink-3)}
.fo-ar2-shar{display:flex;align-items:flex-start;gap:7px;margin-top:10px;font-size:11px;line-height:1.5;color:var(--fo-ink-3)}
.fo-ar2-shar svg.fo-i{width:12px;height:12px;flex:none;margin-top:2px}
.fo-ar2-mono{font-family:var(--fo-mono);font-size:10.5px;color:var(--fo-ink-2);background:var(--fo-canvas);border-radius:5px;padding:1px 5px;white-space:nowrap}

/* the approval timeline — real stamps only in W1 */
.fo-ar2-ev{position:relative;display:flex;gap:12px;padding:10px 0;align-items:flex-start}
.fo-ar2-ev::before{content:"";position:absolute;left:12px;top:38px;bottom:-6px;width:1px;background:var(--fo-line-strong)}
.fo-ar2-ev:last-of-type::before{display:none}
.fo-ar2-ev .dot{width:25px;height:25px;flex:none;border-radius:50%;display:grid;place-items:center;background:var(--fo-ok-soft);color:var(--fo-ok)}
.fo-ar2-ev .dot svg.fo-i{width:13px;height:13px}
.fo-ar2-ev.is-wait .dot{background:var(--fo-warn-soft);color:var(--fo-warn)}
.fo-ar2-ev.is-sys .dot{background:var(--fo-accent-soft);color:var(--fo-accent)}
.fo-ar2-ev.is-gray .dot{background:var(--fo-canvas);color:var(--fo-ink-3)}
.fo-ar2-ev .m{flex:1;min-width:0}
.fo-ar2-ev .t{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:13px;font-weight:400;color:var(--fo-ink)}
.fo-ar2-ev .t b{font-weight:700}
.fo-ar2-ev .s{font-size:12px;line-height:1.55;color:var(--fo-ink-2);margin-top:2px}

@media (max-width:860px){.fo-ar2-grid{grid-template-columns:1fr}}
/* ═══ end AP automation — Invoice register ═══ */

/* ═══ AP automation — Capture inbox (.fo-ai-*) ═══ lifted from its template head ═══ */
/* MIGRATE-ME → static/v3/app.css section: AP CAPTURE INBOX (.fo-ai-*)
   — locked design New App/templates/styleguide/ap-inbox.html. Kept in
   the template head this wave so a parallel agent's app.css append can't
   collide and no V3_CSS_VER bump is needed. The .is-ai review-ring rules
   already live in app.css (the shipped payables pattern) — not repeated
   here. */

/* hero — the drop and the mail slot, side by side */
.fo-ai-hero{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:14px;align-items:stretch;margin:0 0 18px}
.fo-ai-hero .fo-drop{margin:0}
.fo-ai-mail{display:flex;gap:13px;align-items:center;padding:16px 18px;border:1.5px dashed var(--fo-line-strong);border-radius:var(--fo-r-lg);background:var(--fo-canvas)}
.fo-ai-mail .pill{width:34px;height:34px;flex:none;border-radius:10px;display:grid;place-items:center;background:var(--fo-surface);color:var(--fo-ink-3)}
.fo-ai-mail .pill svg.fo-i{width:16px;height:16px}
.fo-ai-mail .t1{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:13px;font-weight:700;color:var(--fo-ink)}
.fo-ai-mail .soon{font-size:9.5px;font-weight:750;letter-spacing:.05em;text-transform:uppercase;padding:2px 8px;border-radius:999px;background:var(--fo-surface);border:1px solid var(--fo-line);color:var(--fo-ink-3)}
.fo-ai-mail .t2{font-size:11.5px;line-height:1.55;color:var(--fo-ink-3);margin-top:3px}
@media (max-width:940px){.fo-ai-hero{grid-template-columns:1fr}}

/* queue cards — each captured file is one honest row */
.fo-ai-card{display:grid;grid-template-columns:44px minmax(0,1.3fr) minmax(0,1.1fr) 110px 215px 16px;gap:14px;align-items:center;width:100%;padding:12px 16px;border:0;border-top:1px solid var(--fo-line);background:var(--fo-surface);text-align:left;font:inherit;cursor:pointer;transition:background var(--fo-fast) var(--fo-ease)}
.fo-ai-card:first-child{border-top:0}
.fo-ai-card:hover{background:var(--fo-surface-2)}
.fo-ai-card:focus-visible{outline:none;box-shadow:inset 0 0 0 3px var(--fo-accent-soft)}
.fo-ai-card .fm{min-width:0}
.fo-ai-card .f{display:block;font-size:13px;font-weight:650;color:var(--fo-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fo-ai-card .f small{font-size:11px;font-weight:550;color:var(--fo-ink-3)}
.fo-ai-card .cap{display:block;font-size:11.5px;color:var(--fo-ink-3);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fo-ai-card .cap .sha{font-family:var(--fo-mono);font-size:10.5px}
.fo-ai-card .vd{min-width:0}
.fo-ai-card .vd b{display:block;font-size:12.5px;font-weight:650;color:var(--fo-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fo-ai-card .vd span{display:block;font-size:11.5px;color:var(--fo-ink-3);margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fo-ai-card .amt{text-align:right;font-variant-numeric:tabular-nums;font-weight:650;font-size:13px;color:var(--fo-ink);white-space:nowrap}
.fo-ai-card .amt.is-empty{color:var(--fo-ink-3);font-weight:400}
.fo-ai-card .st{display:flex;flex-direction:column;align-items:flex-start;gap:3px;min-width:0}
.fo-ai-card .st .hint{font-size:11px;color:var(--fo-ink-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.fo-ai-card .go{color:var(--fo-ink-3);flex:none}
.fo-ai-card .go svg.fo-i{width:14px;height:14px}
@media (max-width:880px){
  .fo-ai-card{grid-template-columns:44px minmax(0,1fr) 16px}
  .fo-ai-card .vd,.fo-ai-card .amt{display:none}
}

/* mini page glyph (queue) */
.fo-ai-th{position:relative;width:38px;height:48px;flex:none;background:#fff;border:1px solid var(--fo-line);border-radius:5px;padding:7px 6px;display:flex;flex-direction:column;gap:3.5px;box-shadow:0 2px 6px -2px rgba(24,27,33,.14)}
.fo-ai-th i{display:block;height:2.5px;border-radius:2px;background:var(--fo-line-strong)}
.fo-ai-th i.hd{width:62%;background:var(--fo-accent-sky)}
.fo-ai-th i.sm{width:46%}
.fo-ai-th.is-photo{transform:rotate(-2.5deg);background:#fdfaf3}
.fo-ai-minispin{width:11px;height:11px;flex:none;border:1.5px solid var(--fo-line-strong);border-top-color:var(--fo-accent);border-radius:50%;animation:fo-ai-spin .7s linear infinite}
@keyframes fo-ai-spin{to{transform:rotate(360deg)}}

/* ── split view: document left · proposals right ── */
/* This top drawer is a working SPLIT, not a content-height peek: #aiBody
   scrolls two-pane content far taller than the panel. The kit's is-top
   picker exception (overflow:visible — right for short peeks like the org
   Set-level drawer) un-clipped this body while a select/date pop was open,
   painting the whole split out the drawer's bottom onto the page (the
   inbox "design gets damaged" bug, 2026-07-12). Keep the body a scroll
   container while a pop is open — fo-controls flips the pop upward and
   scrolls it into view inside the body, the proven side-drawer behavior.
   The id outranks the kit's class chain, so order never matters. */
#aiBody:has(.fo-pop.is-open),
#aiBody:has(.dsdp-popup.is-open),
#aiBody:has(.fo-mcombo-pop.is-open){overflow:hidden auto}
.fo-ai-split{display:grid;grid-template-columns:320px minmax(0,1fr);min-height:100%}
.fo-ai-doc{background:var(--fo-canvas);border-right:1px solid var(--fo-line);padding:20px;display:flex;flex-direction:column;gap:12px}
.fo-ai-page{position:relative;width:100%;aspect-ratio:8.5/11;background:#fff;border:1px solid var(--fo-line);border-radius:8px;box-shadow:0 14px 30px -18px rgba(24,27,33,.35);overflow:hidden;display:grid;place-items:center}
.fo-ai-page img{width:100%;height:100%;object-fit:contain;display:block}
.fo-ai-page .nopv{display:flex;flex-direction:column;align-items:center;gap:8px;padding:24px;text-align:center;color:var(--fo-ink-3);font-size:11.5px;line-height:1.55}
.fo-ai-page .nopv svg.fo-i{width:22px;height:22px;opacity:.4}
.fo-ai-page .reading{position:absolute;inset:0;display:grid;place-items:center;background:rgba(255,255,255,.74)}
.fo-ai-page .reading>div{display:flex;flex-direction:column;align-items:center;gap:9px;font-size:11.5px;font-weight:650;color:var(--fo-ink-2)}
.fo-ai-pgnav{text-align:center;font-size:11px;color:var(--fo-ink-3)}
.fo-ai-docmeta{display:flex;flex-direction:column;gap:5px;font-size:11.5px}
.fo-ai-docmeta .r{display:flex;justify-content:space-between;gap:10px}
.fo-ai-docmeta .k{color:var(--fo-ink-3)}
.fo-ai-docmeta .v{font-weight:600;color:var(--fo-ink-2);text-align:right;min-width:0;overflow-wrap:anywhere}
.fo-ai-sha{font-family:var(--fo-mono);font-size:10.5px;line-height:1.6;color:var(--fo-ink-3);overflow-wrap:anywhere;padding:8px 10px;border:1px solid var(--fo-line);border-radius:8px;background:var(--fo-surface)}
.fo-ai-fields{padding:18px 22px 10px;min-width:0}
@media (max-width:920px){
  .fo-ai-split{grid-template-columns:1fr}
  .fo-ai-doc{border-right:0;border-bottom:1px solid var(--fo-line)}
  .fo-ai-page{max-width:280px;margin:0 auto}
}

/* the honest AI summary line (chip) */
.fo-ai-chip{display:flex;align-items:flex-start;gap:9px;padding:10px 13px;margin:0 0 16px;border-radius:10px;background:var(--fo-accent-soft);color:var(--fo-accent);font-size:12px;font-weight:600;line-height:1.55}
.fo-ai-chip svg.fo-i{width:13px;height:13px;flex:none;margin-top:2.5px}
.fo-ai-chip b{color:var(--fo-accent-deep)}
.fo-ai-chip.is-done{background:var(--fo-ok-soft);color:var(--fo-ok)}
.fo-ai-chip.is-done b{color:var(--fo-ok)}
.fo-ai-chip.is-plain{background:var(--fo-canvas);color:var(--fo-ink-2)}
.fo-ai-chip.is-plain b{color:var(--fo-ink)}
.fo-ai-chip .fo-btn{margin-left:auto;flex:none}

/* review-ring key (the ring rules themselves are the shipped app.css
   payables .is-ai pattern) */
.fo-ai-ringkey{display:flex;align-items:center;gap:8px;margin:12px 0 2px;font-size:11px;color:var(--fo-ink-3)}
.fo-ai-ringkey .sw{width:14px;height:14px;flex:none;border-radius:5px;background:#fff;border:1px solid var(--fo-accent-sky);box-shadow:0 0 0 1.5px var(--fo-accent-soft),inset 0 0 0 1px var(--fo-accent-sky)}
.fo-ai-fgrid{display:grid;grid-template-columns:1fr 1fr;gap:12px 14px}
.fo-ai-fgrid .is-full{grid-column:1/-1}
.fo-ai-fgrid .fo-field{margin:0}
.fo-ai-hint{font-size:12px;line-height:1.55;color:var(--fo-ink-3);margin:2px 0 12px}
.fo-ai-hint b{color:var(--fo-ink-2)}
@media (max-width:560px){.fo-ai-fgrid{grid-template-columns:1fr}}

/* GL coding lines — one row per item, like the invoice itself (user
   call 2026-07-12): the column labels live ONCE in .fo-ai-lhead, each
   line is a lean grid of bare controls (their real <label>s stay in
   the DOM, hidden here, shown again in the small-screen fallback).
   The inbox split alone gets extra width for this — see the #aiSplit
   override below. */
.fo-ai-lhead,.fo-ai-line{display:grid;grid-template-columns:minmax(0,2.1fr) minmax(0,.8fr) 56px minmax(0,1.5fr) 92px minmax(0,1.2fr) minmax(0,1.2fr) 22px;gap:8px;align-items:end}
.fo-ai-lhead{margin:0 0 6px;font-size:10.5px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--fo-ink-3)}
.fo-ai-lhead span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fo-ai-line{margin:0 0 8px}
.fo-ai-line .fo-field{margin:0}
.fo-ai-line .fo-field .fo-label{display:none}   /* the header row carries them */
.fo-ai-line .rm{border:0;background:none;padding:0 0 9px;color:var(--fo-ink-3);cursor:pointer}
.fo-ai-line .rm:hover{color:var(--fo-danger)}
.fo-ai-line .rm svg.fo-i{width:14px;height:14px}
.fo-ai-sum{font-size:11.5px;color:var(--fo-ink-3);margin:4px 0 0;font-variant-numeric:tabular-nums}
.fo-ai-sum.is-zero{color:var(--fo-ok);font-weight:650}
.fo-ai-sum.is-over{color:var(--fo-danger);font-weight:650}
/* the three-way match said no — the flagged row + its resolution note
   (resolve-to-record, Program B) */
.fo-ai-line.is-exc .fo-input,.fo-ai-line.is-exc .fo-select{border-color:var(--fo-warn);box-shadow:0 0 0 1.5px var(--fo-warn-soft)}
.fo-ai-exc{display:flex;flex-direction:column;gap:6px;margin:-2px 0 10px;padding:9px 12px;border:1px solid var(--fo-warn);border-radius:10px;background:var(--fo-warn-soft)}
.fo-ai-exc .vd{font-size:11.5px;font-weight:700;color:var(--fo-warn)}
.fo-ai-exc .fo-input{background:#fff}

/* the extras allocator (Program A) — tax/freight/other spread across the
   bill's jobs; [hidden] guard because the flex display would win it */
.fo-ai-alloc{border:1px dashed var(--fo-line-strong);border-radius:12px;padding:12px 14px;margin:10px 0 0;display:flex;flex-direction:column;gap:8px;background:var(--fo-canvas)}
.fo-ai-alloc[hidden]{display:none}
.fo-ai-alloc .t1{font-size:12px;font-weight:700;color:var(--fo-ink-2)}
.fo-ai-alloc .xr{display:grid;grid-template-columns:150px minmax(0,1.5fr) minmax(0,1.2fr);gap:8px;align-items:end}
.fo-ai-alloc .xr.is-foot{grid-template-columns:260px minmax(0,1fr);margin-top:2px}
.fo-ai-alloc .xr .acts{display:flex;gap:8px;justify-content:flex-end;padding-bottom:1px}
@media (max-width:1100px){.fo-ai-alloc .xr,.fo-ai-alloc .xr.is-foot{grid-template-columns:1fr 1fr}}
/* the roomier canvas the one-line grid earns — THIS split only; the
   other is-top.is-wide drawers keep the kit's 1080 */
#aiSplit .fo-drawer.is-top.is-wide{width:min(1400px,calc(100vw - 24px))}
/* small screens: back to the labeled two-deck card — no header row,
   every field wears its own label again */
@media (max-width:1100px){
  .fo-ai-lhead{display:none}
  .fo-ai-line{grid-template-columns:1fr 1fr;grid-auto-rows:auto;border:1px solid var(--fo-line);border-radius:12px;padding:12px 14px 14px;margin:0 0 10px;background:var(--fo-surface)}
  .fo-ai-line .fo-field .fo-label{display:block}
  .fo-ai-line .rm{justify-self:end;padding:0}
}

/* duplicate-SHA warning band */
.fo-ai-dup{display:flex;gap:12px;align-items:flex-start;padding:13px 14px;margin:0 0 16px;border:1px solid rgba(179,38,30,.25);border-radius:var(--fo-r-md);background:var(--fo-danger-soft)}
.fo-ai-dup .mk{width:30px;height:30px;flex:none;border-radius:9px;display:grid;place-items:center;background:#fff;color:var(--fo-danger)}
.fo-ai-dup .mk svg.fo-i{width:15px;height:15px}
.fo-ai-dup .m{flex:1;min-width:0}
.fo-ai-dup .t1{font-size:13px;font-weight:750;color:var(--fo-danger)}
.fo-ai-dup .t2{font-size:12px;line-height:1.55;color:var(--fo-ink-2);margin-top:2px}
.fo-ai-dup .t2 .sha{font-family:var(--fo-mono);font-size:11px}
.fo-ai-dup .acts{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:10px}
.fo-ai-dup .keep{border:0;background:none;padding:0;font:inherit;font-size:12px;font-weight:650;color:var(--fo-ink-3);cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.fo-ai-dup .keep:hover{color:var(--fo-ink)}
.fo-ai-dup.is-kept{border-color:var(--fo-line);background:var(--fo-canvas)}
.fo-ai-dup.is-kept .mk{color:var(--fo-ink-3)}
.fo-ai-dup.is-kept .t1{color:var(--fo-ink)}

/* capture-evidence rows — the stamps that exist */
.fo-ai-ev{display:flex;gap:11px;padding:10px 0;border-bottom:1px solid var(--fo-line)}
.fo-ai-ev:last-of-type{border-bottom:0}
.fo-ai-ev .dot{width:26px;height:26px;flex:none;border-radius:50%;display:grid;place-items:center;background:var(--fo-canvas);color:var(--fo-ink-3)}
.fo-ai-ev .dot svg.fo-i{width:13px;height:13px}
.fo-ai-ev .dot.is-ok{background:var(--fo-ok-soft);color:var(--fo-ok)}
.fo-ai-ev .dot.is-ai{background:var(--fo-accent-soft);color:var(--fo-accent)}
.fo-ai-ev .dot.is-danger{background:var(--fo-danger-soft);color:var(--fo-danger)}
.fo-ai-ev .m{flex:1;min-width:0}
.fo-ai-ev .l1{display:flex;align-items:baseline;gap:8px;font-size:12.5px;color:var(--fo-ink-2)}
.fo-ai-ev .l1 b{color:var(--fo-ink);font-weight:650}
.fo-ai-ev .l1 .t{margin-left:auto;flex:none;font-size:11px;color:var(--fo-ink-3);font-variant-numeric:tabular-nums;white-space:nowrap}

/* routed-pane defrows carry sentences — let the values wrap */
.fo-ai-fields .fo-defrow .vl{white-space:normal;overflow:visible;text-overflow:clip}

/* drawer-foot chain statement + inline discard-reason row */
.fo-ai-chain{margin-right:auto;min-width:0;font-size:12px;line-height:1.5;color:var(--fo-ink-3)}
.fo-ai-chain b{color:var(--fo-ink-2)}
.fo-ai-reason{display:flex;flex:1;gap:8px;align-items:center;min-width:0}
.fo-ai-reason .fo-input{flex:1;min-width:0}
/* ═══ end AP automation — Capture inbox ═══ */

/* ── Benefits module (.fo-ben-*) — ported from styleguide 2026-07-11 ──
   Source: New App/static/css/fieldops.css §BENEFITS. */

/* plan compare card */
.fo-ben-plan {
  position: relative; border: 1.5px solid var(--fo-line); border-radius: var(--fo-r-md);
  background: var(--fo-surface); padding: 13px 14px; cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.fo-ben-plan.is-selected { border-color: var(--fo-accent); box-shadow: 0 0 0 3px var(--fo-accent-soft); }
.fo-ben-plan .nm { font-size: 13.5px; font-weight: 750; color: var(--fo-ink); display: flex; align-items: center; gap: 7px; }
.fo-ben-plan .tag {
  font-size: 10px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px; background: var(--fo-accent-soft); color: var(--fo-accent-deep);
}
.fo-ben-plan .price { margin-top: 8px; }
.fo-ben-plan .price .v {
  font-family: var(--fo-font-display); font-size: 22px; font-weight: 800;
  letter-spacing: -0.02em; color: var(--fo-ink); font-variant-numeric: tabular-nums;
}
.fo-ben-plan .price .u { font-size: 11px; font-weight: 600; color: var(--fo-ink-3); }
.fo-ben-plan .facts { margin-top: 9px; display: flex; flex-direction: column; gap: 4px; }
.fo-ben-plan .facts .f { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; color: var(--fo-ink-2); }
.fo-ben-plan .facts .f b { color: var(--fo-ink); font-variant-numeric: tabular-nums; }
.fo-ben-plan .chk {
  position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; background: var(--fo-accent); color: #fff; opacity: 0;
  transition: opacity .15s;
}
.fo-ben-plan .chk .fo-i { width: 12px; height: 12px; }
.fo-ben-plan.is-selected .chk { opacity: 1; }

/* per-paycheck cost ticker */
.fo-ben-ticker {
  position: sticky; bottom: 0; z-index: 4; margin-top: 12px;
  display: flex; align-items: baseline; gap: 10px; padding: 11px 14px;
  border-radius: var(--fo-r-md); background: var(--fo-ink); color: #fff;
  box-shadow: 0 10px 26px -10px rgba(15, 25, 50, 0.4);
}
.fo-ben-ticker .l { font-size: 11px; font-weight: 600; opacity: .8; }
.fo-ben-ticker .v { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.fo-ben-ticker .sp { flex: 1; }
.fo-ben-ticker .d { font-size: 10.5px; opacity: .7; }

/* enrollment progress chip */
.fo-ben-prog {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 8px;
  border-radius: 999px; font-size: 11.5px; font-weight: 650; white-space: nowrap;
}
.fo-ben-prog::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.fo-ben-prog.is-done    { background: var(--fo-ok-soft);   color: var(--fo-ok); }
.fo-ben-prog.is-going   { background: var(--fo-accent-soft); color: var(--fo-accent-deep); }
.fo-ben-prog.is-not     { background: var(--fo-canvas);    color: var(--fo-ink-3); }
.fo-ben-prog.is-waived  { background: var(--fo-warn-soft); color: var(--fo-warn); }

/* coverage summary row */
.fo-ben-cov {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px;
  border: 1px solid var(--fo-line); border-radius: var(--fo-r-md); background: var(--fo-surface);
}
.fo-ben-cov .glyph {
  width: 34px; height: 34px; border-radius: 10px; background: var(--fo-accent-soft);
  color: var(--fo-accent-deep); display: grid; place-items: center; flex: none;
}
.fo-ben-cov .glyph .fo-i { width: 16px; height: 16px; }
.fo-ben-cov .d { flex: 1; min-width: 0; }
.fo-ben-cov .nm { font-size: 13px; font-weight: 650; color: var(--fo-ink); }
.fo-ben-cov .rl { font-size: 11.5px; color: var(--fo-ink-3); margin-top: 1px; }
.fo-ben-cov .amt { font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* ═══ end Benefits module (.fo-ben-*) ═══ */

/* ============================================================
   Pattern · Product tours — .fo-tour-* family
   First-run coach marks: a spotlight veil (giant box-shadow
   around the target), an anchored card with stepper dots, and
   a relaunch affordance. Plays once per user per surface.
   ============================================================ */
.fo-tour-spot {
  position: fixed; z-index: 320; pointer-events: none;
  border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(24, 27, 33, 0.44), 0 0 0 2px var(--fo-accent-sky);
  transition: top .32s var(--fo-ease), left .32s var(--fo-ease),
              width .32s var(--fo-ease), height .32s var(--fo-ease);
}
.fo-tour-card {
  position: fixed; z-index: 321; width: 330px; max-width: calc(100vw - 24px);
  background: var(--fo-surface); border-radius: var(--fo-r-lg);
  box-shadow: var(--fo-shadow-3); padding: 16px 18px 14px;
  transition: top .32s var(--fo-ease), left .32s var(--fo-ease);
}
.fo-tour-card.is-in { animation: fo-tour-in .28s var(--fo-spring); }
@keyframes fo-tour-in {
  0% { opacity: 0; transform: translateY(7px) scale(.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.fo-tour-card .eyebrow {
  font-size: 10px; font-weight: 800; letter-spacing: .1em;
  color: var(--fo-accent); text-transform: uppercase;
}
.fo-tour-card h3 {
  font-family: var(--fo-font-display); font-size: 15.5px; font-weight: 750;
  margin: 5px 0 6px; letter-spacing: -.01em;
}
.fo-tour-card p { font-size: 12.5px; line-height: 1.55; color: var(--fo-ink-2); margin: 0 0 13px; }
.fo-tour-foot { display: flex; align-items: center; gap: 10px; }
.fo-tour-dots { display: flex; gap: 5px; flex: 1; }
.fo-tour-dots i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--fo-line-strong);
  transition: background .2s var(--fo-ease), transform .2s var(--fo-ease);
}
.fo-tour-dots i.is-on { background: var(--fo-accent); transform: scale(1.3); }
.fo-tour-dots i.is-past { background: var(--fo-accent-sky); }
@media (prefers-reduced-motion: reduce) {
  .fo-tour-spot, .fo-tour-card, .fo-tour-dots i { transition: none; }
  .fo-tour-card.is-in { animation: none; }
}

/* ── HR Inbox W11 — search, category chips, assignment, automation ──────── */
.fo-hrx-filter { display: flex; flex-direction: column; gap: 9px; margin-top: 11px; }
.fo-hrx-search { position: relative; }
.fo-hrx-search .fo-i {
  position: absolute; left: 10px; top: 50%; width: 13px; height: 13px;
  transform: translateY(-50%); color: var(--fo-ink-3); pointer-events: none;
}
.fo-hrx-search input {
  width: 100%; height: 30px; padding: 0 10px 0 30px; font-size: 12px;
  border: 1px solid var(--fo-line); border-radius: 8px;
  background: var(--fo-canvas); color: var(--fo-ink); outline: none;
  transition: border-color .15s var(--fo-ease), box-shadow .15s var(--fo-ease);
}
.fo-hrx-search input:focus {
  border-color: var(--fo-accent); box-shadow: 0 0 0 3px var(--fo-accent-soft);
  background: var(--fo-surface);
}
.fo-hrx-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fo-hrx-chip {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px;
  font-size: 11px; font-weight: 650; color: var(--fo-ink-2);
  background: var(--fo-canvas); border: 1px solid var(--fo-line);
  border-radius: 999px; cursor: pointer; font-variant-numeric: tabular-nums;
  transition: border-color .15s var(--fo-ease), background .15s var(--fo-ease), color .15s var(--fo-ease);
}
.fo-hrx-chip:hover { border-color: var(--fo-accent); color: var(--fo-accent-deep); }
.fo-hrx-chip.is-on { background: var(--fo-accent-soft); border-color: var(--fo-accent); color: var(--fo-accent-deep); }
.fo-hrx-chip.is-danger { margin-left: auto; color: var(--fo-danger); background: var(--fo-surface); }
.fo-hrx-chip.is-danger:hover, .fo-hrx-chip.is-danger.is-armed {
  background: var(--fo-danger-soft); border-color: var(--fo-danger); color: var(--fo-danger);
}
.fo-hrx-asg {
  flex: none; width: 18px; height: 18px; margin-left: 6px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 8.5px; font-weight: 800; letter-spacing: .02em; align-self: center;
  background: var(--fo-accent-soft); color: var(--fo-accent-deep);
}
.fo-hrx-tag.is-done.is-auto { background: var(--fo-accent-soft); color: var(--fo-accent-deep); }
