/* Orbit: calm cards on a quiet canvas, summary first and detail one click away. One sans-serif family; status is a dot and a word. */
:root {
  --bg: #f4f5f7; --panel: #ffffff; --panel-2: #f7f8fa; --ink: #14171c; --ink-2: #3d4450; --muted: #5d6470;
  --line: #e3e6eb; --line-2: #eef0f3; --field-line: #80868f;
  --accent: #0b6a86; --accent-ink: #ffffff; --accent-soft: #e6f2f6;
  --ok: #17713e; --warn: #8a5300; --bad: #b3261e; --info: #3949a8;
  --ok-bg: #e7f4ec; --warn-bg: #fbf1e1; --bad-bg: #fcebe9; --info-bg: #eceffb;
  --c-esg: #1d2330; --c-horizon: #0b6a86; --c-sarah: #23784a; --c-scout: #6a6f00; --c-atlas: #3a4bb0;
  --c-aspire: #6e3fa6; --c-guardian: #b0283c; --c-prism: #3d4b52; --c-people: #9a5c00; --c-carla: #a3366a;
  /* the Dashboard's seven agent teams in the map's order, plus Orbit and people (checked for colour blindness on --panel, both themes) */
  --onb: #c4561c; /* onboarding: a warm orange (Employees cards) */
  --dv-1: #2a78d6; --dv-2: #eb6834; --dv-3: #1baf7a; --dv-4: #eda100; --dv-5: #e87ba4; --dv-6: #008300; --dv-7: #6250d6; --dv-other: #a3a9b3;
  --radius: 16px; --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(40, 36, 20, .04), 0 10px 30px rgba(40, 36, 20, .06);
  /* elevation: 1 = cards (with a 1px --line border), 2 = menus and the toast, 3 = dialogs */
  --shadow-1: 0 1px 2px rgb(16 24 40 / .04); --shadow-2: 0 8px 24px rgb(16 24 40 / .10); --shadow-3: 0 24px 64px rgb(16 24 40 / .20);
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --r-sm: 8px; --r-md: 10px; --r-lg: 14px; --r-pill: 999px;
  color-scheme: light;
}
/* dark: Orbit's navy theme (html[data-theme="dark"], the default since 11 Nov 2026), no longer the computer's setting */
  :root[data-theme="dark"] {
    --bg: #0f1115; --panel: #171a20; --panel-2: #13161b; --ink: #e8eaee; --ink-2: #bcc2cc; --muted: #9aa1ad;
    --line: #2a2f38; --line-2: #20242c; --field-line: #6c7380;
    --accent: #5cc3e0; --accent-ink: #06222b; --accent-soft: #11303a;
    --ok: #5fcf8e; --warn: #f2ae4e; --bad: #ff8f80; --info: #a9b3f8;
    --ok-bg: #14301f; --warn-bg: #33260f; --bad-bg: #3a1a17; --info-bg: #1e2342;
    --c-esg: #e9ecf2; --c-horizon: #5cc3e0; --c-sarah: #6fd39a; --c-scout: #c8cc4e; --c-atlas: #97a4f5;
    --c-aspire: #c3a3f5; --c-guardian: #ff8a96; --c-prism: #b7c4c9; --c-people: #f0a640; --c-carla: #f29ac0;
    --onb: #f29a62;
    --dv-1: #3987e5; --dv-2: #d95926; --dv-3: #199e70; --dv-4: #c98500; --dv-5: #d55181; --dv-6: #008300; --dv-7: #9085e9; --dv-other: #5d6470;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .25);
    --shadow-1: none; --shadow-2: 0 8px 24px rgb(0 0 0 / .45); --shadow-3: 0 24px 64px rgb(0 0 0 / .6);
    color-scheme: dark;
  }


* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
button { font: inherit; }
h2 { font-size: 22px; letter-spacing: -.01em; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; } /* headings we move focus to (#inspName, #personTitle) */
a { color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow { font-size: 13px; font-weight: 500; color: var(--muted); }
.display, .page h2 { font-weight: 650; letter-spacing: -.02em; }
.n { font-variant-numeric: tabular-nums; }

/* ---------- header: a hairline bar with underline tabs ---------- */
.top { position: relative; z-index: 20; flex: none; display: flex; align-items: center; gap: var(--s5); min-height: 56px;
  padding: 0 var(--s5); border-bottom: 1px solid var(--line); background: var(--bg); }
.brand { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.title { font-size: 18px; font-weight: 700; letter-spacing: -.03em; white-space: nowrap; } /* the wordmark: the name alone, no logo */
.tabs { display: flex; gap: var(--s1); align-self: stretch; flex-wrap: nowrap; }
.tabs button { border: 0; background: none; border-radius: 0; padding: 0 var(--s3); color: var(--ink-2); font-size: 14px;
  font-weight: 500; white-space: nowrap; cursor: pointer; box-shadow: inset 0 -2px 0 transparent; transition: color .15s, box-shadow .15s; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.tabs button:focus-visible, .subtabs button:focus-visible { outline-offset: -3px; }
.badge { display: inline-block; min-width: 20px; padding: 0 7px; border-radius: var(--r-pill); background: var(--warn-bg); color: var(--warn);
  font-size: 12px; font-weight: 600; line-height: 18px; text-align: center; margin-left: 4px; font-variant-numeric: tabular-nums; }
/* system status: one quiet summary chip, the details in a menu */
.sys { margin-left: auto; }
.sys-sum { min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--panel);
  color: var(--ink-2); font-size: 13px; max-width: 260px; }
.sys-sum:hover { border-color: var(--field-line); }
.sys-sum::after { margin-left: 2px; }
#sysText { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sys-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.sys-dot.warn { background: var(--warn); } .sys-dot.bad { background: var(--bad); } .sys-dot.info { background: var(--info); }
.sys-meta { padding: var(--s2) 0; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line-2); }
#status { display: grid; }
#status .pill { display: flex; align-items: center; gap: var(--s2); padding: 10px 2px; font-size: 13px; color: var(--ink); }
#status .pill + .pill { border-top: 1px solid var(--line-2); }
.pill::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.pill.ok::before { background: var(--ok); } .pill.warn::before { background: var(--warn); } .pill.bad::before { background: var(--bad); } .pill.info::before { background: var(--info); }

main { flex: 1; min-height: 0; display: flex; }
.view { display: none; flex: 1; min-height: 0; min-width: 0; }
.view.on { display: flex; }

/* ---------- cards: one surface for every card-like block ---------- */
.card, .feed-wrap, .strip, .sarah-bar, .action {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.card { padding: var(--s5); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: var(--s2) var(--s3); margin: 0 0 var(--s4); }
.card-head :is(h3, h4) { margin: 0; font-size: 15px; font-weight: 600; }
.notice { padding: var(--s3) var(--s4); }
.notice.bad { background: var(--bad-bg); border-color: transparent; }
.notice.bad b { color: var(--bad); }
.notice.info { background: var(--info-bg); border-color: transparent; font-size: 14px; }
.notice.has-btn { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4); }
.notice.has-btn > span { flex: 1 1 280px; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel); color: var(--ink);
  font-size: 14px; font-weight: 500; line-height: 1.2; white-space: nowrap; cursor: pointer; box-shadow: none;
  transition: background .15s, border-color .15s; }
.btn:hover { background: var(--panel-2); border-color: var(--field-line); }
.btn.primary, .btn.good { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); } /* one accent */
.btn.primary:hover, .btn.good:hover { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); border-color: transparent; }
.btn.danger { background: transparent; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.btn.danger:hover { background: var(--bad-bg); border-color: var(--bad); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--line-2); }
.btn.small { min-height: 32px; padding: 0 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
input, select, textarea { font: inherit; font-size: 14px; color: var(--ink); background: var(--panel);
  border: 1px solid var(--field-line); border-radius: var(--r-sm); padding: 7px 12px; min-height: 36px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--accent); }
::placeholder { color: var(--muted); opacity: 1; }
input[type=checkbox] { min-height: 0; width: 16px; height: 16px; padding: 0; accent-color: var(--accent); }
textarea { width: 100%; min-height: 90px; resize: vertical; line-height: 1.5; }
label.sel, label.chk { display: inline-flex; align-items: center; gap: var(--s2); color: var(--ink-2); font-size: 14px; }
label.sel { max-width: 100%; }
label.sel select { min-width: 0; }

/* segmented control (map style toggle) */
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--line-2); border-radius: 10px; box-shadow: none; }
.seg button { border: 0; background: transparent; color: var(--ink-2); min-height: 30px; padding: 0 14px; border-radius: 7px;
  font-size: 13px; font-weight: 500; cursor: pointer; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--field-line), var(--shadow-1); }

/* disclosure: every <details> gets the same quiet chevron */
details > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--s2); min-height: 32px;
  color: var(--accent); font-size: 14px; font-weight: 500; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: ""; flex: none; width: 6px; height: 6px; border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
details[open] > summary::after { transform: translateY(1px) rotate(-135deg); }

/* menu popover (header status, map Layers): a <details class="menu"> with a .menu-panel */
.menu { position: relative; z-index: 30; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); width: max-content; min-width: 240px;
  max-width: min(340px, calc(100vw - 32px)); padding: var(--s2) var(--s4); background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-2); }
.menu.left .menu-panel { left: 0; right: auto; }

/* small labels: status chip (.st), plain tag (.tag) */
.tag { flex: none; font-size: 12px; font-weight: 500; color: var(--ink-2); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 1px 8px; white-space: nowrap; }

/* empty state: a short line of direction */
.empty { display: grid; justify-items: center; gap: var(--s2); text-align: center; color: var(--muted);
  padding: var(--s6) var(--s5); max-width: 440px; margin: 0 auto; font-size: 14px; }
.empty b { color: var(--ink); font-size: 15px; font-weight: 600; }
.empty-mark { display: none; }

/* ---------- live map: the orbit ---------- */
.map-wrap { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: var(--s5) var(--s4) var(--s5) var(--s5); gap: var(--s4); }
/* toolbar: map style, what to show, overlays in a Layers menu; the actions sit right */
.map-tools { display: flex; gap: var(--s2) var(--s3); align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
label.sel select { max-width: 220px; }
.layers > summary { color: var(--ink); }
.menu-panel label.chk { display: flex; min-height: 40px; }
.graph-box { position: relative; flex: 1; min-height: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: clip; /* clip: the drawer parked off its right edge must not make it scroll */
  background: var(--mm-bg); box-shadow: none; } /* the map's flat canvas */
#graph { width: 100%; height: calc(100% - 40px); display: block; } /* the bottom strip is the legend's, so labels never run under it */
.legend { position: absolute; left: 18px; bottom: 12px; display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); pointer-events: none; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
/* the legend's signs, drawn as the map draws them */
.lg-sign { width: 18px; height: 18px; flex: none; overflow: visible; }
.lg-sign .lg-r { fill: var(--mm-node); } .lg-sign .lg-d { fill: var(--mm-disc); }
.lg-sign .lg-ext { fill: none; stroke: rgb(255 255 255 / .75); stroke-width: .9; stroke-dasharray: 1.6 1.6; }
.lg-sign .lg-wait { fill: var(--mm-waitdot); }
.lg-sign .lg-glow { fill: color-mix(in srgb, var(--mm-node) 22%, transparent); stroke: var(--mm-node); stroke-width: 1.4; }
.lg-sign .lg-think { fill: none; stroke: var(--mm-node); stroke-width: 1.6; stroke-dasharray: 3 2.4; }

/* the map: a network of circles on a flat canvas. Every agent alike: a white disc in a thick light blue ring with a soft shadow,
   names and roles in dark ink, sub-agents' icons a deeper blue; dotted blue lines join Orbit to each lead and a lead to its
   sub-agents. In dark mode the discs are a dark panel and the ink light, the ring the same blue */
:root {
  --mm-node: #58aaea; --mm-node-ink: #1f6aa8; /* the ring and the dots; the icons and initials on the white disc (5:1) */
  --mm-disc: #ffffff; --mm-disc-ink: #182b40; --mm-disc-role: #4d6074; --mm-shadow: rgb(24 64 110 / .18);
  --mm-bg: #ffffff; --mm-ring: #3d4a5c; --mm-label: var(--ink-2); /* --mm-ring: the slate edge of a travelling dot, and the way across */
  /* the light dots that travel along the lines: a message, an answer, waiting for a person, a failure */
  --mm-req: #8ad8ef; --mm-res: #93e0b2; --mm-wait: #ffc46e; --mm-err: #ff9e94;
  --mm-waitdot: #d96f00; /* a person's waiting dot: a clear orange */
  --mm-across: var(--mm-ring); /* messages so far across the canvas, to the three outside the map (at .38: about 1.9:1 on either canvas) */
}
/* dark: Orbit's navy theme (html[data-theme="dark"], the default since 11 Nov 2026), no longer the computer's setting */
  :root[data-theme="dark"] { --mm-bg: #12151a; --mm-ring: #414e62; --mm-waitdot: #f2ae4e; --mm-across: #8a96a8;
    --mm-node: #4f9fdc; --mm-node-ink: #8cc6f2; --mm-disc: #1c232d; --mm-disc-ink: #e9eef4; --mm-disc-role: #a9b6c4; --mm-shadow: rgb(0 0 0 / .5); }

/* the dotted lines: one static layer, drawn once (only a line's opacity changes, when the map steps back) */
.net { fill: none; stroke: var(--mm-node); stroke-linecap: round; pointer-events: none; }
.net path { transition: opacity .25s; } /* the veils' timing: a line fades with its rings */
.net path.main { stroke-width: 7; stroke-dasharray: 0 13; animation: mm-spoke 2.6s linear infinite; } /* the dots flow out from Orbit */
.net circle.orbit { stroke-width: 4; stroke-dasharray: 0 11; animation: mm-drift 90s linear infinite; } /* a lead's orbit turns slowly */
@keyframes mm-spoke { to { stroke-dashoffset: -13; } }
@keyframes mm-drift { to { stroke-dashoffset: -440; } }
@media (prefers-reduced-motion: reduce) { .net path.main, .net circle.orbit { animation: none; } }
/* a moon's name: shown when its team is flown in to, when it is pointed at or focused, or when a step marks it */
#graph .node.sub .lbl.name { transition: opacity .3s; }
#graph:not(.flown) .node.sub:not(:hover, :focus-visible, .hl) .lbl.name { opacity: 0; }
.net path.back { opacity: .2; }

.node { cursor: pointer; transition: opacity .25s; }
.node:focus { outline: none; }
.node .ring { fill: var(--mm-disc); stroke: var(--c); filter: drop-shadow(0 4px 7px var(--mm-shadow)); } /* the blue band and the white inside: whole while the disc pops in */
.node .body { fill: var(--mm-disc); transform-box: fill-box; transform-origin: center; transition: transform .15s ease; }
.node:hover .body { transform: scale(1.05); }
.node .hit { fill: transparent; }
.node .ico { fill: none; stroke: var(--mm-node-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.node .ini { text-anchor: middle; font-size: 14px; font-weight: 700; fill: var(--mm-node-ink); pointer-events: none; }
.node .ext-ring { fill: none; stroke: rgb(255 255 255 / .62); stroke-width: 1.3; stroke-dasharray: 3 3.5; pointer-events: none; } /* an existing system (Sarah, Scout's team, Laya): a stitched line round its ring */
.node .lbl:is(.c-name, .c-role, .d-name, .d-role) { pointer-events: none; } /* a name outside its disc takes the click too */
.node .c-name { text-anchor: middle; font-size: 30px; font-weight: 750; letter-spacing: -.02em; fill: var(--mm-disc-ink); }
.node .c-role { text-anchor: middle; font-size: 15px; font-weight: 500; fill: var(--mm-disc-role); }
.node .d-name { text-anchor: middle; font-size: 20px; font-weight: 700; fill: var(--mm-disc-ink); }
.node .d-role { text-anchor: middle; font-size: 13.5px; font-weight: 500; fill: var(--mm-disc-role); }
.node .d-role.st { font-size: 12px; font-weight: 400; }
.node .lbl.name, .node .lbl.role { paint-order: stroke; stroke: var(--mm-bg); stroke-width: 3px; stroke-linejoin: round; } /* a who-works-with-whom line passing a name stops short of the letters */
.node .lbl.name { font-size: 15px; font-weight: 600; fill: var(--mm-label); }
.node .lbl.role { font-size: 12.5px; fill: var(--muted); }
.node:hover .lbl.name, .node:focus-visible .lbl.name { fill: var(--ink); }
.node .halo, .node .waitdot, .node .mark { pointer-events: none; } /* the hit circle is the target */
/* working: a flat band of the agent's colour round its ring that breathes; thinking: turning dashes; waiting for a person: an orange dot */
.node .halo { fill: color-mix(in srgb, var(--c) 30%, transparent); stroke: var(--c); stroke-width: 3; opacity: 0; }
.node.working .halo { opacity: 1; animation: mm-breathe 1.6s ease-in-out infinite; }
.node.thinking .halo { opacity: 1; fill: none; stroke-width: 3; stroke-dasharray: 6 5; animation: spin 1.4s linear infinite; }
.node .mark { fill: none; stroke: none; }
#gNodes .node:focus-visible .mark { stroke: var(--accent); stroke-width: 3; stroke-dasharray: none; }
.node .waitdot { fill: var(--mm-waitdot); stroke: var(--mm-bg); stroke-width: 2.5; opacity: 0; }
.node.waiting .waitdot { opacity: 1; }
/* stepping back: a veil of the canvas over the disc and its ring (solid, so nothing shows through it), a faded name, and the
   dotted lines that reach it faded to the same strength (.net path.back, set by paintBridges()) */
.node .veil { fill: var(--mm-bg); opacity: 0; pointer-events: none; transition: opacity .25s; }
:is(.dim .node:not(.hl), #graph.picking:not(.dim) .node:not(.pk)):not(:focus-visible) .veil { opacity: .8; }
:is(.dim .node:not(.hl), #graph.picking:not(.dim) .node:not(.pk)):not(:focus-visible) :is(.lbl.name, .lbl.role) { opacity: .3; }
/* a step picked in the case strip: its agents stay, the rest step back; the owner's ring solid, a helper's dashed, who is told dotted */
.dim #gTraffic, .dim #gLinks { opacity: .35; }
.node.hl-inf .mark { stroke: var(--ink-2); stroke-width: 2; stroke-dasharray: 2 4; }
.node.hl-sup .mark { stroke: var(--ink); stroke-width: 2.5; stroke-dasharray: 6 4; }
.node.hl-owner .mark { stroke: var(--ink); stroke-width: 3; stroke-dasharray: none; } /* last: the owner's ring wins over any other role it also has */
/* an agent's panel open: it and the agents it works with stay, the rest step back (a picked step wins) */
#graph.picking:not(.dim) .node.picked:not(:focus-visible) .mark { stroke: var(--ink); stroke-width: 3; }
.maplink { stroke: var(--info); stroke-width: 1.2; fill: none; opacity: .35; }
/* messages so far: a light band under each dotted line; across the canvas to the three outside the map, a quiet slate one (dark on
   white, light on the dark canvas) */
.traffic { fill: none; stroke: var(--mm-req); stroke-linecap: round; opacity: .55; }
.traffic.across { stroke: var(--mm-across); opacity: .38; }
#gFlows { pointer-events: none; }
.flow { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.flow.req { stroke: var(--mm-req); } .flow.res { stroke: var(--mm-res); } .flow.wait { stroke: var(--mm-wait); } .flow.err { stroke: var(--mm-err); }
.comet { stroke: var(--mm-ring); stroke-width: 1.4; } /* the dark edge keeps a dot seen where it crosses the white */
.comet.req { fill: var(--mm-req); } .comet.res { fill: var(--mm-res); } .comet.wait { fill: var(--mm-wait); } .comet.err { fill: var(--mm-err); }
@keyframes breathe { 50% { opacity: .12; } }
@keyframes mm-breathe { 50% { opacity: .4; } } /* the map's glow: it never fades out of sight while the agent works */
@keyframes spin { to { stroke-dashoffset: -24; } }
@keyframes pulse { 50% { opacity: .35; } }

.strip { padding: var(--s4) var(--s5); display: flex; flex-direction: column; gap: var(--s3); max-height: 210px; }
.strip-head { display: flex; gap: var(--s2) var(--s3); align-items: baseline; flex-wrap: wrap; font-size: 14px; }
.strip-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.stepchip { min-width: 36px; height: 36px; border-radius: var(--r-sm); border: 0; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); font-size: 13px; font-weight: 600; cursor: pointer; padding: 0 var(--s2); font-variant-numeric: tabular-nums; }
.stepchip.done { color: var(--ok); }
.stepchip.running { color: var(--info); } /* status shows by colour and the " …" suffix, no pulsing */
.stepchip.waiting { color: var(--warn); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 50%, var(--line)); }
.stepchip.error { color: var(--bad); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad) 50%, var(--line)); }
.stepchip.sel { box-shadow: inset 0 0 0 2px var(--ink); }
.stepchip.done::after { content: " ✓"; } .stepchip.running::after { content: " …"; } .stepchip.waiting::after { content: " !"; } .stepchip.error::after { content: " ✕"; }
.strip-detail { font-size: 14px; color: var(--ink-2); overflow: auto; }

/* the Explainer: a caption bar under the diagram, so it covers none of it; the case's step strip waits meanwhile */
.tour { flex: none; display: flex; flex-direction: column; gap: var(--s1); padding: var(--s3) var(--s4); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); }
#view-map.touring .strip { display: none; }
.tour-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4); flex-wrap: wrap; }
.tour-ctl { flex: none; display: flex; gap: var(--s2); flex-wrap: wrap; }
/* the timeline: a numbered circle for each step on one line, sideways when they do not all fit; the ring fills as the step plays */
.tour-line { flex: 1 1 320px; min-width: 0; display: flex; align-items: center; gap: var(--s1); }
.tour-steps { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; margin: 0; padding: 3px; list-style: none; overflow-x: auto; scrollbar-width: none; }
.tour-steps::-webkit-scrollbar { display: none; }
.tour-steps li { flex: none; display: flex; align-items: center; }
.tour-steps li + li::before { content: ""; width: 12px; height: 2px; background: var(--line); }
.tour-steps li.past::before, .tour-steps li.now::before { background: var(--accent); }
.tour-steps button { width: 28px; height: 28px; padding: 0; border: 2px solid var(--line); border-radius: 50%; background: var(--panel); color: var(--ink-2); font: inherit; font-size: 12px; font-variant-numeric: tabular-nums; line-height: 1; cursor: pointer; }
.tour-steps button:hover { border-color: var(--accent); color: var(--ink); }
.tour-steps .past button { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.tour-steps .now button { border: 3px solid transparent; background: linear-gradient(var(--accent), var(--accent)) padding-box, conic-gradient(var(--ink) calc(var(--p, 0) * 1%), var(--line) 0) border-box; color: var(--accent-ink); font-weight: 600; }
.tour-more { flex: none; width: 28px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-sm, 6px); background: var(--panel); color: var(--ink); font: inherit; font-size: 16px; line-height: 1; cursor: pointer; }
.tour-more:hover:not(:disabled) { border-color: var(--accent); }
.tour-more:disabled { color: var(--muted); opacity: .5; cursor: default; }
.tour-more[hidden] { display: none; }
.tour-text { display: flex; align-items: baseline; gap: 0 var(--s2); flex-wrap: wrap; }
.tour-title { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.3; }
.tour-title:focus { outline: none; }
.tour-say { margin: 0; font-size: 14px; color: var(--ink-2); }
.tour-foot { min-height: 20px; display: flex; align-items: center; justify-content: space-between; gap: 0 var(--s4); flex-wrap: wrap; }
.tour-now { flex: 1 1 280px; min-width: 0; margin: 0; display: flex; gap: var(--s2); align-items: baseline; font-size: 13px; line-height: 20px; }
.tour-now i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.tour-now i.res { background: var(--ok); } .tour-now i.wait { background: var(--warn); }
.tour-meta { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) { /* the map scrolls here: while the Explainer plays, the diagram makes room for its caption */
  #view-map.touring .graph-box { height: max(340px, calc(100dvh - 310px)); }
}
@media (max-width: 800px) {
  /* a phone's map scrolls sideways around Orbit; the Explainer shows the whole orbit instead, so every step's agents are in view */
  #view-map.touring .graph-box:has(> #graph:not([hidden])) { height: auto; overflow: hidden; }
  #view-map.touring #graph { min-width: 0; width: 100%; height: auto; display: block; }
  .tour { padding: var(--s3); margin-right: calc(32px - var(--s4)); } /* the drawer's fixed tab keeps its gutter */
  .tour-ctl { width: 100%; }
  .tour-ctl .btn { flex: 1 1 auto; min-height: 40px; }
}
/* the Demo's two kinds, each with what it can play */
.demo-sec + .demo-sec { margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--line-2); }
.demo-sec h4 { margin: 0 0 var(--s1); font-size: 15px; font-weight: 600; }
.demo-sec p { margin: 0 0 var(--s3); font-size: 14px; color: var(--ink-2); }
.demo-note { padding: var(--s2) var(--s3); border-radius: var(--r-sm); background: var(--warn-bg); color: var(--ink) !important; }
.demo-hand { display: flex; align-items: center; gap: var(--s2) var(--s3); flex-wrap: wrap; margin-top: var(--s4); font-size: 14px; }
.demo-hand input { width: 64px; margin-left: var(--s1); }
.demo-hand-note { margin: var(--s1) 0 0 !important; font-size: 13px !important; }
.demo-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s2); }
.demo-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 44px; padding: var(--s2) var(--s3); text-align: left;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); color: var(--ink); cursor: pointer; }
.demo-opt:hover { background: var(--panel-2); border-color: var(--field-line); }
.demo-opt b { font-size: 14px; font-weight: 600; }
.demo-opt span { font-size: 12.5px; color: var(--muted); }
.demo-opts .demo-opt:first-child { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); } /* the full run first */

/* side panel: agent details + what's happening */
/* What's happening: a drawer over the map's right edge, opened from a small « tab */
.feed-wrap { position: absolute; top: 12px; right: 12px; bottom: 12px; z-index: 3; width: min(340px, calc(100% - 24px)); margin: 0;
  display: flex; flex-direction: column; min-height: 0; overflow: hidden; box-shadow: var(--shadow-2);
  transform: translateX(calc(100% + 16px)); visibility: hidden; transition: transform .22s ease, visibility 0s linear .22s; }
#view-map.feed-open .feed-wrap { transform: none; visibility: visible; transition: transform .22s ease; }
.feed-tab { position: absolute; right: 0; top: 50%; z-index: 2; display: grid; place-items: center; width: 26px; height: 52px; margin-top: -26px; padding: 0;
  border: 1px solid var(--line); border-right: 0; border-radius: var(--r-md) 0 0 var(--r-md); background: var(--panel); color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; }
.feed-tab:hover { color: var(--accent); background: var(--panel-2); }
#view-map.feed-open .feed-tab { visibility: hidden; }
@media (min-width: 801px) {
  #graph { transition: width .22s ease; }
  #view-map.feed-open #graph { width: calc(100% - min(340px, 100% - 24px) - 24px); }
  #view-map.feed-open .office-note { right: 370px; }
}
.feed-head { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s2) var(--s1) var(--s4); font-weight: 600; font-size: 14px; }
.feed-head .muted { margin-left: auto; font-weight: 400; font-size: 12px; }
.feed-close { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--r-sm); background: none; color: var(--muted); font-size: 16px; cursor: pointer; }
.feed-close:hover { background: var(--line-2); color: var(--ink); }
.feed { flex: 1; overflow: auto; padding: 0 var(--s2) var(--s2); }
/* minimal lines in the drawer: who and what, one line of detail, the time */
.feed-wrap .msg { padding: 9px var(--s2); }
.feed-wrap .msg-av { display: none; }
.feed-wrap .msg-line { font-size: 13px; }
.feed-wrap .msg .sum { -webkit-line-clamp: 1; font-size: 12.5px; color: var(--muted); }
.feed-wrap .msg-meta { margin-top: 1px; font-size: 11.5px; }
@media (prefers-reduced-motion: reduce) { .feed-wrap, #view-map.feed-open .feed-wrap, #graph { transition: none; } .node .body { transition: none; } }
/* flat rows inside the card, split by hairlines */
.msg { display: flex; gap: var(--s3); padding: var(--s3) var(--s3); border-radius: 0; }
.feed .msg + .msg { border-top: 1px solid var(--line-2); }
.msg.clickable { cursor: pointer; }
.msg.clickable:hover { background: var(--panel-2); }
.msg-main { min-width: 0; flex: 1; }
.msg-line { font-size: 14px; line-height: 1.4; }
.msg-line b { font-weight: 600; }
.msg .sum { color: var(--ink-2); font-size: 13px; margin-top: 2px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.msg-meta { font-size: 12px; color: var(--muted); margin-top: 3px; font-variant-numeric: tabular-nums; }
.state { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.state.completed::before { background: var(--ok); }
.state.input-required::before { background: var(--warn); }
.state.failed::before, .state.rejected::before { background: var(--bad); }

/* an agent's panel: it takes the whole drawer (What's happening steps aside while it is open) */
.feed-wrap:has(> .inspector:not([hidden])) > :not(.inspector) { display: none; }
.inspector { flex: 1; min-height: 0; overflow: auto; padding: var(--s4) var(--s3) var(--s5) var(--s4); }
.insp-head { display: flex; gap: var(--s3); align-items: flex-start; padding-left: var(--s1); }
.insp-head .mm-mark { margin-top: 2px; }
.insp-head .btn { margin-left: auto; flex: none; }
.insp-title { min-width: 0; }
.insp-name { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.01em; line-height: 1.3; }
.insp-about { margin: 2px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.insp-sub { margin: var(--s5) 0 var(--s2) var(--s1); font-size: 13px; font-weight: 600; color: var(--ink-2); }
/* the agents it works with, in order: one row each, a thin line through their circles */
.insp-flow { list-style: none; margin: 0; padding: 0; }
.insp-flow li { position: relative; }
.insp-flow li + li::before { content: ""; position: absolute; z-index: 1; left: 23px; top: -8px; height: 16px; border-left: 1.5px solid color-mix(in srgb, var(--field-line) 55%, transparent); pointer-events: none; }
.insp-agent { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: var(--s3); width: 100%; min-height: 44px;
  padding: 0 var(--s2); border: 0; border-radius: var(--r-sm); background: none; color: var(--ink); text-align: left; cursor: pointer; }
.insp-agent:hover { background: var(--panel-2); }
.insp-agent:focus-visible { outline-offset: -2px; }
.insp-agent .nm { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.insp-agent .rl { font-size: 13px; color: var(--muted); white-space: nowrap; }
/* an agent's disc as the map draws it, small, in its dark ring */
.mm-mark { display: block; flex: none; }
.mm-mark .mm-ring { fill: var(--c); }
.mm-mark .mm-body { fill: var(--mm-disc); }
.mm-mark .mm-ico { fill: none; stroke: var(--mm-node-ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.mm-mark .mm-ini { text-anchor: middle; font-size: 9px; font-weight: 700; fill: var(--mm-node-ink); }
.dot-label::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); margin-right: 6px; }
.dot-label.on::before { background: var(--ok); }
.dot-label.wait::before { background: var(--warn); }

/* avatars */
.av { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: color-mix(in srgb, var(--c) 15%, var(--panel)); color: color-mix(in srgb, var(--c) 78%, var(--ink));
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--c) 45%, transparent) inset; font-size: 12px; font-weight: 700; }
.av.xs { width: 18px; height: 18px; font-size: 8.5px; box-shadow: none; }
.av.sm { width: 28px; height: 28px; font-size: 10.5px; }
.av.lg { width: 46px; height: 46px; font-size: 15px; }

/* ---------- cases: one card per person; a card opens that person's page ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s2) var(--s3); }
.page .page-head h2 { margin: 0; }
.head-actions { display: flex; gap: var(--s2); flex-wrap: wrap; }
.people-filter { margin-bottom: var(--s4); }
/* equal cards in even columns that fill the row, as many as fit at 300px or more */
.people { --gap: var(--s4); list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.people > li { display: flex; min-width: 0; }
.person { flex: 1; min-width: 0; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 0 var(--s3); align-items: center; padding: var(--s4);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); color: inherit; text-decoration: none; }
.person:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.person:hover .person-go { border-color: var(--accent); }
/* everything done: a calm green; onboarding: a warm orange. A light tint with a coloured edge, the text stays ink */
.person.done { --tint: var(--ok); } .person.onb { --tint: var(--onb); }
.person:is(.done, .onb) { background: color-mix(in srgb, var(--tint) 5%, var(--panel)); border-color: color-mix(in srgb, var(--tint) 28%, var(--line));
  box-shadow: inset 4px 0 0 color-mix(in srgb, var(--tint) 80%, var(--panel)); }
.person:is(.done, .onb):hover { border-color: color-mix(in srgb, var(--tint) 55%, var(--line)); }
.person:is(.done, .onb) .person-mark { background: color-mix(in srgb, var(--tint) 14%, var(--panel)); color: var(--tint); }
.person-mark { position: relative; overflow: hidden; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 14px; font-weight: 650; }
.person-mark.lg { width: 52px; height: 52px; font-size: 17px; }
.person-mark img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; } /* a face is near the top of a passport-style photo */
.person-mark:empty { background: var(--line-2); }
/* a company's logo: white in dark mode too, because most logos have black lettering */
.co-logo { display: block; box-sizing: border-box; width: 96px; height: 54px; padding: 5px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); }
.co-logo img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.co-logo.lg { width: 148px; height: 80px; padding: 8px; }
.person.co { grid-template-columns: 96px minmax(0, 1fr) auto; }
.person.co > .person-mark { justify-self: center; }
.person-id { display: grid; min-width: 0; }
.person-name { font-size: 16px; font-weight: 650; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-meta { margin: 0; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-go { width: 7px; height: 7px; margin-right: 4px; border-top: 1.5px solid var(--muted); border-right: 1.5px solid var(--muted); transform: rotate(45deg); }
.person-now { grid-column: 1 / -1; display: grid; gap: 6px; margin-top: var(--s4); font-size: 13.5px; font-weight: 500; color: var(--ink); }
.person-now .n { font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.mini-bar { display: block; height: 4px; border-radius: 2px; background: var(--line-2); overflow: hidden; }
.mini-bar i { display: block; height: 100%; background: var(--accent); }
.mini-bar.done i { background: var(--ok); } .mini-bar.others i { background: var(--info); } .mini-bar.waiting i { background: var(--warn); } .mini-bar.error i, .mini-bar.stopped i { background: var(--bad); } .mini-bar.cancelled i { background: var(--muted); }
.person-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s1) var(--s3); margin-top: var(--s3); font-size: 12.5px; color: var(--muted); }
/* a person's page: back to the cards, who they are, then their processes as the same cards; a card opens its process as a page under them */
.person-back { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; margin-bottom: var(--s3); color: var(--accent); font-size: 14px; font-weight: 500; text-decoration: none; }
.person-back::before { content: ""; width: 6px; height: 6px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.person-back:hover { text-decoration: underline; }
.person-top { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: var(--s1) var(--s4); align-items: center; margin-bottom: var(--s5); }
.page .person-top h2 { margin: 0; font-size: 24px; font-weight: 650; line-height: 1.2; letter-spacing: -.02em; overflow-wrap: anywhere; }
.person-top .person-meta { white-space: normal; font-size: 14px; }
.person-top.co { grid-template-columns: 148px minmax(0, 1fr) auto; }
.proc-card { align-content: space-between; } /* in a row of cards, the states line up at the bottom */
.proc-card .person-name { white-space: normal; overflow-wrap: anywhere; } /* a company-wide one's "· all employees" runs on, not cut off */
.proc-wide { font-weight: 400; color: var(--muted); white-space: nowrap; }
.proc-page { padding-top: var(--s4); border-top: 1px solid var(--line); }
.proc-head { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: var(--s3) var(--s4); align-items: center; margin-bottom: var(--s5); }
.page .proc-head h3 { margin: 0; font-size: 20px; font-weight: 650; line-height: 1.25; letter-spacing: -.01em; overflow-wrap: anywhere; }
.proc-id { min-width: 0; }
.proc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--s4); margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.proc-meta > span { white-space: nowrap; }
.proc-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s2); }
.proc-head > :is(.pbar, .proc-demo) { grid-column: 1 / -1; }
.proc-demo { margin: 0; font-size: 13px; color: var(--muted); }
.proc-loading { margin: var(--s3) 0; }
@media (max-width: 640px) {
  .person-top { grid-template-columns: 52px minmax(0, 1fr); }
  .person-top.co { grid-template-columns: 96px minmax(0, 1fr); }
  .person-top.co .co-logo { width: 96px; height: 54px; padding: 5px; }
  .person-top .person-st { grid-column: 2; }
  .proc-head { grid-template-columns: 44px minmax(0, 1fr); }
  .proc-head > .ring { align-self: start; } /* beside the name, however many lines the facts under it take */
  .proc-acts { grid-column: 1 / -1; justify-content: stretch; }
  .proc-acts .btn { flex: 1 1 auto; }
}
.ring { flex: none; }
.ring-bg { fill: none; stroke: var(--line-2); stroke-width: 4; }
.ring-fg { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; }
.ring.done .ring-fg { stroke: var(--ok); } .ring.others .ring-fg { stroke: var(--info); } .ring.cancelled .ring-fg { stroke: var(--muted); } .ring.waiting .ring-fg { stroke: var(--warn); } .ring.error .ring-fg, .ring.stopped .ring-fg { stroke: var(--bad); }
/* status: a coloured dot and a word, never a filled pill */
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.st::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.st.running::before, .st.others::before { background: var(--info); } /* others: waiting on someone outside HR */
.st.waiting::before { background: var(--warn); }
.st.done::before { background: var(--ok); }
.st.error, .st.stopped { color: var(--bad); }
.st.error::before, .st.stopped::before { background: var(--bad); }
.kv { display: flex; gap: 8px 14px; flex-wrap: wrap; align-items: center; color: var(--ink-2); font-size: 14px; margin: 6px 0 4px; }

.case-detail { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.case-detail > * { flex: none; }
.case-detail .action { margin: 0; }
/* stage-run progress: one segment per run of same-stage steps, the live one ringed */
.pbar { display: flex; gap: 3px; height: 6px; }
.pseg { min-width: 4px; background: var(--line); border-radius: var(--r-pill); overflow: hidden; }
.pseg i { display: block; height: 100%; background: var(--accent); }
.pbar.done .pseg i { background: var(--ok); }
.pseg.now { box-shadow: 0 0 0 1.5px var(--panel), 0 0 0 3px var(--accent); }

/* the steps: a stepper by stage, one line per step (its mark, its short title, who it waits on or when it was done on the right);
   the current step gently highlighted, steps done muted, the rest of a step in its own detail. Marks: done a check on green,
   to do a hollow ring with its number, the one being worked on filled in its state's colour */
.progress .card-head { margin-bottom: var(--s3); }
.ps { --ps-x: 8px; --ps-indent: calc(var(--ps-x) + 24px + var(--s3)); } /* where the marks sit, and where the titles start */
.ps-stage + .ps-stage { margin-top: var(--s1); }
.ps-stage-h { display: flex; align-items: baseline; gap: var(--s2) var(--s3); margin: var(--s3) 0 var(--s1); padding: 0 calc(var(--ps-x) + 6px + var(--s3)) 0 var(--ps-indent);
  font-size: 13px; font-weight: 600; color: var(--ink-2); } /* its count lines up with the steps' tags, left of their chevrons */
.ps > .ps-stage:first-child > .ps-stage-h { margin-top: 0; }
.ps-count { margin-left: auto; font-size: 12.5px; font-weight: 400; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ps-list { position: relative; list-style: none; margin: 0; padding: 0; }
.ps-list::before { content: ""; position: absolute; left: calc(var(--ps-x) + 11.25px); top: 20px; bottom: 20px; width: 1.5px; background: var(--line); }
.ps-step { position: relative; --ps-bg: var(--panel); }
/* one line: mark, title, tag, chevron */
.ps-step > details > summary { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto auto; align-items: center; gap: var(--s3);
  min-height: 40px; padding: var(--s1) var(--ps-x); border-radius: var(--r-sm); background: var(--ps-bg); color: var(--ink-2); font-size: 14px; font-weight: 400; }
.ps-step > details > summary:hover { --ps-bg: var(--panel-2); }
.ps-step > details > summary::after { color: var(--muted); }
.ps-step > details > summary:focus-visible { outline-offset: -2px; }
.ps-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-step > details[open] > summary .ps-title { white-space: normal; }
.ps-tag { font-size: 12.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ps-tag:empty { display: none; }
.ps-step.done .ps-title, .ps-step.skipped .ps-title { color: var(--muted); }
.ps-step.now { --ps-bg: color-mix(in srgb, var(--accent) 8%, var(--panel)); }
.ps-step.now > details > summary:hover { --ps-bg: color-mix(in srgb, var(--accent) 13%, var(--panel)); }
.ps-step.now .ps-title { color: var(--ink); font-weight: 600; }
.ps-mark { position: relative; z-index: 1; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--panel);
  color: var(--muted); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; box-shadow: inset 0 0 0 1.5px var(--field-line), 0 0 0 3px var(--ps-bg, var(--panel)); }
.ps-mark svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ps-step.done .ps-mark { background: var(--ok-bg); color: var(--ok); box-shadow: 0 0 0 3px var(--ps-bg, var(--panel)); }
.ps-step.skipped .ps-mark { background: var(--line-2); box-shadow: 0 0 0 3px var(--ps-bg); }
.ps-step.skipped .ps-mark::before { content: ""; width: 9px; height: 1.5px; background: var(--muted); }
.ps-step.now .ps-mark { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 3px var(--ps-bg); }
.ps-step.now.waiting .ps-mark { background: var(--warn); }
.ps-step.now.others .ps-mark { background: var(--info); } /* waiting on someone outside HR */
.ps-step.now.error .ps-mark { background: var(--bad); }
.ps-step.now.running .ps-mark::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; animation: ps-pulse 2s ease-out infinite; }
@keyframes ps-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }
.ps-step.halted .ps-mark { color: var(--bad); box-shadow: inset 0 0 0 1.5px var(--bad), 0 0 0 3px var(--ps-bg); }
/* a stage that is through: its name quieter, with a small check before it (its steps stay in view, first to last) */
.ps-stage.through > .ps-stage-h { color: var(--muted); font-weight: 500; }
.ps-done { display: inline-grid; place-items: center; align-self: center; width: 16px; height: 16px; margin-left: -28px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); }
.ps-done svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
/* a step's detail: under its title, a soft panel */
.ps-body { display: grid; gap: var(--s3); margin: var(--s1) var(--ps-x) var(--s3) var(--ps-indent); padding: var(--s3) var(--s4); background: var(--panel-2);
  border: 1px solid var(--line-2); border-radius: var(--r-md); font-size: 13.5px; color: var(--ink-2); }
.ps-body p { margin: 0; max-width: 75ch; }
.ps-act { color: var(--ink); }
.ps-facts { display: grid; gap: var(--s2); margin: 0; }
.ps-facts > div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: var(--s3); align-items: baseline; }
.ps-facts dt { font-size: 12.5px; color: var(--muted); }
.ps-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.ps-facts dd .chips { margin: 0; }
.ps-facts dd > span:not(.chips, .st, .muted) + span:not(.st, .muted)::before { content: "·"; margin: 0 var(--s2); color: var(--muted); }
.ps-facts .st { margin-left: var(--s1); }
.ps-lbl { margin: 0 0 var(--s1); font-size: 12.5px; font-weight: 600; color: var(--muted); }
.ps-files ul { margin: 0; padding-left: 18px; display: grid; gap: 2px; }
.ps-did > summary { width: fit-content; min-height: 28px; font-size: 13px; }
.ps-did .out { margin-top: var(--s1); background: var(--panel); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 10px 2px 3px; border-radius: 999px; background: var(--panel); color: var(--ink-2); white-space: nowrap; box-shadow: 0 0 0 1px var(--line) inset; }
.chip:not(.agent) { padding-left: 10px; }
.chip.agent { background: color-mix(in srgb, var(--c) 9%, var(--panel)); color: var(--ink); font-weight: 600; box-shadow: none; }
.chips .sep { color: var(--muted); font-size: 12px; }
.out { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r-md); box-shadow: none;
  padding: var(--s3) var(--s4); margin-top: var(--s2); display: grid; gap: var(--s3); font-size: 13px; }
.out h5 { margin: 0 0 2px; font-size: 12px; font-weight: 600; color: var(--muted); }
.out ul { margin: 0; padding-left: 18px; }
.link { color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.kv-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s2) var(--s4); margin: 0 0 var(--s1); font-size: 13px; }
.kv-list dt { font-size: 12px; color: var(--muted); }
.kv-list dd { margin: 0; overflow-wrap: anywhere; }
pre.facts { margin: 0; white-space: pre-wrap; word-break: break-word; max-height: 240px; overflow: auto;
  background: var(--panel-2); border-radius: var(--r-sm); padding: var(--s3); font-size: 12px; }

/* records card: underline tabs over documents, emails, A2A messages and case data */
.records .card-head { margin-bottom: var(--s2); }
.subtabs { display: flex; gap: var(--s1); margin: 0 0 var(--s4); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs button { flex: none; border: 0; background: none; border-radius: 0; min-height: 40px; padding: 0 var(--s3); color: var(--ink-2);
  font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; box-shadow: inset 0 -2px 0 transparent; }
.subtabs button:hover { color: var(--ink); background: none; }
.subtabs button.on { color: var(--ink); background: none; font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.subtabs .n { color: var(--muted); font-weight: 400; margin-left: 2px; }
.feed.flat { max-height: none; overflow: visible; padding: 0; }
.rec-more > summary { margin: var(--s1) var(--s4); width: fit-content; }
.rec-more[open] > summary { margin-bottom: 0; }
.rec-more > .list, .rec-more > .feed { border-top: 1px solid var(--line-2); }
.data-sec + .data-sec { margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--line-2); }
.data-sec h5 { margin: 0 0 var(--s2); font-size: 13px; font-weight: 600; color: var(--muted); }
.data-sec ul { margin: 0; padding-left: 18px; font-size: 14px; }

/* people's action card: inside a case ("Needs you") and on People's actions */
.action { padding: var(--s5); margin: var(--s3) 0; }
.case-detail .action { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.action-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s3); font-size: 13px; color: var(--muted); }
.action-kind { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.case-detail .action-kind { color: var(--warn); }
.action :is(h3, h4) { margin: var(--s2) 0; font-size: 17px; font-weight: 600; line-height: 1.35; }
.action p { margin: 0 0 var(--s3); }
.action .why { color: var(--ink-2); max-width: 70ch; }
.action .trail { font-size: 13px; color: var(--ink-2); }
.action .summary { color: var(--ink-2); max-width: 70ch; }
.action details { margin-top: var(--s2); }
.doc { padding: var(--s1) 0; }
.doc-body { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--panel); border-radius: var(--r-md); padding: 12px 14px; max-height: 320px; overflow: auto; font-size: 14px; box-shadow: 0 0 0 1px var(--line) inset; }
/* a document with Open and Download beside its title; what it says, opened, has the full width below */
.doc-row { position: relative; }
.doc-row > .doc > summary { margin-right: 160px; }
.doc-links { position: absolute; top: 0; right: 0; display: flex; gap: var(--s2); padding-top: calc(var(--s1) + 2px); } /* level with the title */
.doc-links a.btn { text-decoration: none; min-height: 28px; padding: 0 10px; }
/* an email draft: a preview first, the editor one click away */
.draft { margin-top: var(--s3); background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-md); }
.draft > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--s4); padding: var(--s3) var(--s4); min-height: 0; color: var(--ink); font-weight: 400; }
.draft > summary::after { display: none; }
.d-to, .d-subj, .d-body { grid-column: 1; }
.d-to { font-size: 12px; color: var(--muted); }
.d-subj { font-weight: 600; }
.d-body { font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.d-edit { grid-column: 2; grid-row: 1 / span 3; align-self: center; color: var(--accent); font-size: 13px; font-weight: 500; }
.draft[open] .d-body, .draft[open] .d-subj, .draft[open] .when-closed, .draft:not([open]) .when-open { display: none; }
.draft-edit { display: grid; gap: var(--s3); padding: 0 var(--s4) var(--s4); }
.draft-edit label { display: grid; gap: var(--s1); font-size: 13px; color: var(--ink-2); }
.draft-edit input { font-weight: 600; }
/* An HR form on a card: one box per item, side by side where there is room */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: var(--s3) var(--s4); margin-top: var(--s3); }
.fld { display: grid; grid-template-rows: 1fr auto auto; gap: var(--s1); min-width: 0; font-size: 13px; color: var(--ink-2); } /* a label on two lines leaves the boxes in a row lined up */
.fld :is(input:not([type=checkbox]), select) { width: 100%; min-width: 0; }
.fld output { padding: 7px 0; font-size: 15px; font-weight: 600; color: var(--ink); }
.fld.wide, .form-summary { grid-column: 1 / -1; }
.fld .req { font-weight: 400; color: var(--muted); }
.fld-err { font-size: 12.5px; color: var(--bad); }
.fld-hint { font-size: 12.5px; color: var(--muted); }
.fld-err:empty { display: none; }
.fld.bad :is(input, select, textarea) { border-color: var(--bad); }
.fld textarea { min-height: 72px; }
.fld.check { grid-template: none / auto 1fr; align-items: start; column-gap: var(--s2); font-size: 14px; color: var(--ink); }
.fld.check input { margin-top: 3px; }
.fld.check .fld-err { grid-column: 2; }
.checks-set { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin: 0; padding: 0; border: 0; }
.checks-set legend { margin-bottom: var(--s2); padding: 0; }
.checks-set .check { display: inline-flex; align-items: center; gap: var(--s2); min-height: 32px; font-size: 14px; color: var(--ink); }
.form-summary h5 { margin: 0 0 var(--s2); font-size: 13px; color: var(--ink-2); }
.action .form-error { color: var(--bad); }
.draft textarea { min-height: 220px; }
.action .row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--line-2); }
.action .row input[type=text] { flex: 1 1 100%; min-width: 0; }
.action .row .btn.danger { margin-left: auto; } /* the destructive action sits apart; DOM and tab order unchanged */
/* ---------- people's actions: Sarah's status, filter chips, groups ---------- */
.sarah-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4);
  padding: var(--s3) var(--s4); margin-bottom: var(--s4); color: var(--ink-2); font-size: 14px; }
.filters { display: flex; flex-wrap: wrap; gap: var(--s2); }
.filters button { min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--panel);
  color: var(--ink-2); font-size: 13px; font-weight: 500; cursor: pointer; }
.filters button:hover { border-color: var(--field-line); }
.filters button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); font-weight: 600; }
.filters .n { margin-left: 4px; color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.group { margin-top: var(--s6); }
#inbox > .group:first-child, #approvals > .group:first-child { margin-top: var(--s5); }
.group-title { margin: 0 0 var(--s3); font-size: 14px; font-weight: 600; color: var(--ink-2); }
.group-title .n { letter-spacing: 0; font-weight: 500; }
.group-items { display: grid; gap: var(--s4); align-items: start; }
.group-items .action { margin: 0; padding: var(--s4) var(--s5); }
.group .action-kind { display: none; }
.action > :is(h3, h4):first-child { margin-top: 0; }
/* critical issues: the bad tint on the border and the label; the card itself stays calm */
.action.critical { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.case-detail .action.critical .action-kind, .group.critical > .group-title { color: var(--bad); }
.case-detail .action.others { border-color: var(--line); } /* someone else's reply: no warning tint */
.case-detail .action.others .action-kind { color: var(--ink-2); }
.action.flash { outline: 2px solid var(--accent); outline-offset: 2px; }
/* the offer letter: its PDF in an approval card, the signature pad, the signing status */
details.pdf iframe { display: block; width: 100%; height: 70vh; min-height: 360px; margin-top: var(--s2); border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; }
.pad { margin: var(--s3) 0 0; max-width: 520px; }
.pad canvas { display: block; width: 100%; height: auto; background: #fff; border: 1px dashed var(--field-line); border-radius: var(--r-md); touch-action: none; cursor: crosshair; }
.pad-row { display: flex; gap: var(--s2); align-items: center; margin-top: var(--s2); }
.pad-row input { flex: 1; min-width: 0; }
.pad > label { display: block; margin-top: var(--s2); }
.pad > label > input { display: block; width: 100%; margin-top: 4px; }
.sign-list { margin: 0 0 var(--s3); padding-left: 20px; display: grid; gap: var(--s1); }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-top: var(--s3); }
.btn-row a.btn { text-decoration: none; }
/* Waiting on others: folded under its own quiet heading */
details.group.waiting > summary { width: fit-content; margin-bottom: var(--s2); color: var(--muted); }
details.group.waiting > summary > h3 { margin: 0; font: inherit; color: inherit; } /* the fold's title is a heading too */
details.group.waiting > .muted { margin: 0 0 var(--s3); font-size: 14px; }
/* hiring: company → one card per job → candidates as ranked rows */
.company + .company { margin-top: var(--s5); }
.company > h3 { display: flex; align-items: baseline; gap: var(--s2); margin: 0 0 var(--s2); font-size: 15px; font-weight: 600; }
.company > h3 .n { font-size: 13px; font-weight: 500; color: var(--muted); }
.job .meta { font-size: 13px; color: var(--muted); }
.job h4 { margin: var(--s1) 0 var(--s2); }
.job-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); font-size: 13px; color: var(--ink-2); }
.stepper { display: inline-flex; align-items: center; gap: var(--s2); }
.stepper .btn { width: 40px; padding: 0; font-size: 16px; }
.stepper output { min-width: 2ch; text-align: center; font-size: 15px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.cands { list-style: none; margin: var(--s3) 0 0; padding: 0; }
.cand { position: relative; /* holds its .sr-only text, or the page itself would scroll */ display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 0 var(--s3); align-items: center; padding: var(--s2) 0; }
.cand + .cand { border-top: 1px solid var(--line-2); }
.cand-score b { font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; }
.cand-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cand .sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cand-end { display: flex; align-items: center; gap: var(--s3); font-size: 13px; }
.cand .sub.earlier { color: var(--warn); white-space: normal; }
.cand > details { grid-column: 2 / -1; margin-top: 0; }
.panel-says { list-style: none; margin: var(--s1) 0 var(--s2); padding: 0; font-size: 14px; }
.panel-says li + li { margin-top: var(--s2); padding-top: var(--s2); border-top: 1px solid var(--line-2); }
.panel-says .sub { display: block; white-space: normal; }
.panel-says p { margin: 4px 0 0; }
.cand > details > summary { min-height: 28px; font-size: 13px; }
.cand > details .row { margin-top: var(--s3); padding-top: var(--s3); }
.cand > details .row input[type=text] { flex: 1 1 200px; }
.cand > details .row .btn.danger { margin-left: 0; }
.action.job.filled > summary { flex-wrap: wrap; gap: 0 var(--s2); width: auto; color: var(--ink-2); font-size: 14px; font-weight: 400; }
.action.job.filled > summary b { color: var(--ink); font-size: 15px; font-weight: 600; }
.action.job.filled[open] > summary { margin-bottom: var(--s1); }
.hire-pc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3) var(--s4); margin-top: var(--s2); font-size: 14px; }
.hire-pc h5, .hire-facts dt { margin: 0 0 2px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.hire-pc ul { margin: 0; padding-left: 18px; }
.hire-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: var(--s2) var(--s4); margin: var(--s3) 0; font-size: 14px; }
.hire-facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 800px) {
  .hire-pc { grid-template-columns: minmax(0, 1fr); }
  .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filters button { flex: none; min-height: 40px; }
  .group-items .action { padding: var(--s4); }
  /* a candidate: score and name, the facts line under it, then a full-width button */
  .cand { grid-template-columns: 44px minmax(0, 1fr); }
  .cand-end, .cand > details { grid-column: 1 / -1; }
  .cand-end { margin-top: var(--s2); }
  .cand-end .btn { flex: 1; }
}

@media (max-width: 800px) {
  /* a step's line: its title on up to two lines, who it waits on (or when it was done) under it */
  .ps-step > details > summary { grid-template-columns: 24px minmax(0, 1fr) auto; row-gap: 0; padding-block: 6px; }
  .ps-step > details > summary::after { grid-column: 3; grid-row: 1 / span 2; }
  .ps-step .ps-tag { grid-column: 2; grid-row: 2; }
  .ps-step .ps-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .ps-step > details[open] > summary .ps-title { -webkit-line-clamp: unset; }
  .ps-step > details > summary > .ps-mark { align-self: start; margin-top: 1px; }
  .ps-body { margin-left: var(--ps-x); margin-right: 0; padding: var(--s3); }
  .ps-facts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .action { padding: var(--s4); }
  .action .row .btn { flex: 1 1 auto; }
  .action .row .btn.danger { margin-left: 0; }
}

/* lists (a case's emails and documents) */
/* flat rows: the container is the card */
.list { display: flex; flex-direction: column; gap: 0; }
.row-item { display: flex; align-items: center; gap: var(--s3); min-height: 56px; padding: var(--s3) var(--s4);
  background: none; border-radius: 0; box-shadow: none; cursor: pointer; }
.row-item + .row-item { border-top: 1px solid var(--line-2); }
.row-item:hover { background: var(--panel-2); }
.row-item:focus-visible { outline-offset: -2px; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-time { font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* page frame: every tab uses the whole width, lined up with the header (no empty margins on a wide screen) */
.page { flex: 1; overflow: auto; padding: var(--s6) var(--s5) var(--s7); }
.page h2 { margin: 0 auto var(--s1); font-size: 22px; line-height: 1.25; }
.lead { color: var(--muted); font-size: 14px; margin: 0 auto var(--s5); }
/* a page's title with a quiet count line beside it (Approvals, Tasks, Users) */
#view-approvals .page-head, #view-inbox .page > .page-head, #view-users .page-head { margin-bottom: var(--s1); }
.head-sum { font-size: 13px; font-variant-numeric: tabular-nums; }

/* ---------- Approvals: one calm card per approval, the decision along its foot ---------- */
#view-approvals .page > * { max-width: 880px; margin-inline: 0; } /* one approval under another: each is read, then decided */
.appr-list { display: grid; gap: var(--s4); }
.action.appr { margin: 0; padding: 0; overflow: hidden; }
.appr > * { padding-inline: var(--s5); }
.appr-top { display: flex; align-items: flex-start; gap: var(--s3); padding-top: var(--s5); }
.appr-what { flex: 1; min-width: 0; }
.appr .appr-what h4 { margin: 0; font-size: 16px; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.appr .appr-for { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.appr-for .link { font-weight: 600; }
.appr-when { flex: none; padding-top: 2px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.appr-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: var(--s2) var(--s4); margin: var(--s4) 0 0; font-size: 13.5px; }
.appr-facts > div { display: contents; }
.appr-facts dt { color: var(--muted); }
.appr-facts dd { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; margin: 0; color: var(--ink); }
.appr-facts dd .av { width: 20px; height: 20px; font-size: 8.5px; }
/* the sign-off ladder: who has approved (a tick), whose turn it is, who comes next */
.appr-ladder { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.appr-ladder li { display: inline-flex; align-items: center; gap: 6px; }
.appr-sep { flex: none; width: 5px; height: 5px; margin: 0 3px 0 1px; border-top: 1.5px solid var(--field-line); border-right: 1.5px solid var(--field-line); transform: rotate(45deg); }
.appr-pill { position: relative; display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 0 9px; border: 1px solid var(--line); border-radius: var(--r-pill); color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.appr-ladder li.yes .appr-pill { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.appr-ladder li.no .appr-pill { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.appr-ladder li.now .appr-pill { color: var(--ink); font-weight: 600; border-color: var(--accent); background: var(--accent-soft); }
.appr-you { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.appr .appr-sum { margin: var(--s3) 0 0; color: var(--ink-2); font-size: 14px; max-width: 72ch; }
/* the document to read: a row with Open and Download; the letter reads here too */
.appr .appr-docs { display: grid; gap: var(--s2); margin: var(--s4) 0 0; list-style: none; }
.appr-doc { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: var(--s1) var(--s3); padding: var(--s2) var(--s2) var(--s2) var(--s3);
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r-md); }
.appr-doc-ico { width: 16px; height: 16px; color: var(--muted); }
.appr-doc-name { min-width: 0; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.appr-doc-links { display: flex; gap: var(--s2); }
.appr-doc-links a.btn { min-height: 30px; padding: 0 10px; text-decoration: none; }
.appr-doc > details.pdf { grid-column: 1 / -1; margin: 0; }
.appr-doc > details.pdf > summary { width: fit-content; min-height: 28px; font-size: 13px; }
.appr-doc > .appr-doc-text { grid-column: 2 / -1; margin: 0; }
.appr-doc-text > summary { min-height: 30px; color: var(--ink); font-size: 14px; }
.appr-doc-text .doc-body { margin: var(--s1) 0 var(--s1); }
.appr .appr-sign { margin: var(--s3) 0 0; font-size: 13px; color: var(--muted); }
.appr .appr-pad { margin: var(--s4) var(--s5) 0; padding: var(--s3) var(--s4) var(--s4); border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--panel-2); }
.appr .appr-pad p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.appr-pad .pad { margin-top: var(--s2); }
.appr .ro-note { margin: var(--s4) 0 var(--s5); }
/* the decision: a note, Approve in green, Reject in red */
.appr .row.appr-act { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: var(--s5) 0 0; padding-block: var(--s3); border-top: 1px solid var(--line); background: var(--panel-2); }
.appr .row.appr-act input[type=text] { flex: 1 1 220px; min-width: 0; }
.btn.approve { background: var(--ok); border-color: var(--ok); color: #fff; font-weight: 600; }
.btn.approve:hover { background: color-mix(in srgb, var(--ok) 85%, var(--ink)); border-color: transparent; }
.btn.reject { background: var(--bad); border-color: var(--bad); color: #fff; font-weight: 600; }
.btn.reject:hover { background: color-mix(in srgb, var(--bad) 85%, var(--ink)); border-color: transparent; }
/* dark: Orbit's navy theme (html[data-theme="dark"], the default since 11 Nov 2026), no longer the computer's setting */ /* the light green and red of the dark theme carry dark text */
  :root[data-theme="dark"] .btn.approve { color: #06210f; }
  :root[data-theme="dark"] .btn.reject { color: #2b0805; }

@media (max-width: 800px) {
  .appr > * { padding-inline: var(--s4); }
  .appr .appr-pad { margin-inline: var(--s4); padding-inline: var(--s3); }
  .appr-top { padding-top: var(--s4); }
  .appr-facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .appr-facts dd + dt { margin-top: var(--s2); }
  .appr-doc { grid-template-columns: 16px minmax(0, 1fr); }
  .appr-doc-links { grid-column: 2; }
  .appr .row.appr-act .btn { flex: 1 1 auto; }
}

/* ---------- Tasks: groups of even cards under a quiet heading, the filters and counts on top ---------- */
.task-group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--s3); margin-bottom: var(--s3); padding-bottom: var(--s2); border-bottom: 1px solid var(--line); }
#inbox .task-group-head .group-title { display: inline-flex; align-items: center; gap: var(--s2); margin: 0; font-size: 15px; font-weight: 650; color: var(--ink); }
.task-group-head .group-title::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--g, var(--accent)); }
.task-group-head .group-title .n { min-width: 22px; padding: 0 7px; border-radius: var(--r-pill); background: var(--line-2); color: var(--ink-2); font-size: 12px; font-weight: 600; line-height: 20px; text-align: center; }
.task-group-head p { margin: 0; font-size: 13px; }
.task-group.critical { --g: var(--bad); } .task-group.forms { --g: var(--info); } .task-group.check { --g: var(--warn); } .task-group.chase { --g: var(--accent); } .task-group.step { --g: var(--muted); }
/* the cards: an even grid, two side by side where there is room, a form across the whole row; the buttons along each card's foot */
#inbox .group-items, #requests .group-items { display: grid; columns: auto; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: var(--s4); align-items: stretch; }
#inbox .group-items > *, #requests .group-items > * { margin: 0; }
#inbox .group-items .action, #requests .group-items .action { display: flex; flex-direction: column; padding: var(--s5); }
#inbox .action > .row, #requests .action > .row { margin-top: auto; }
#inbox .group-items .action[data-kind="form"] { grid-column: 1 / -1; }
/* a card's top line: whose process it is (opens it), then its step as a quiet tag */
#view-inbox .action-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); }
#view-inbox .action-head > .link { margin-right: auto; font-weight: 600; text-decoration: none; }
#view-inbox .action-head > .link:hover { text-decoration: underline; }
#view-inbox .action-head > span:not([class]) { padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r-pill); font-size: 12px; line-height: 20px; color: var(--ink-2); white-space: nowrap; }
#view-inbox .action :is(h3, h4) { margin: var(--s2) 0 var(--s1); font-size: 16px; font-weight: 650; }
#requests .action-kind { display: none; }
#view-inbox .action h5 { margin: var(--s2) 0 var(--s1); font-size: 16px; font-weight: 650; }
/* the filters: an employee and the kinds of work, for all three sections */
.task-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); margin-bottom: var(--s2); }
.task-who select { max-width: min(260px, 60vw); }
.task-tools .filters { flex: 1 1 360px; min-width: 0; }
/* the three sections: Needs you, With the agents, Waiting on others, each under a heading with its count */
.tsec { margin-top: var(--s6); }
.tsec:first-child { margin-top: var(--s4); }
.tsec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--s3); margin-bottom: var(--s2); }
.tsec-head h3 { display: inline-flex; align-items: center; gap: var(--s2); margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.01em; }
.tsec-n { min-width: 24px; padding: 0 8px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 650; line-height: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.tsec[data-sec="agents"] .tsec-n { background: var(--info-bg); color: var(--info); }
.tsec[data-sec="others"] .tsec-n { background: var(--line-2); color: var(--ink-2); }
.tsec-head p { margin: 0; font-size: 13px; }
.tsec-body > .task-group { margin-top: var(--s4); }
#inbox .tsec-body > .task-group:first-child { margin-top: var(--s3); }
.tsec-empty { margin-top: var(--s3); }
.tsec-empty b { font-weight: 500; color: var(--ink-2); }
.t-pointer { margin: var(--s3) 0 0; font-size: 14px; }
.t-pointer .link { font-weight: 600; }
/* With the agents: one row per piece of live work, under what kind it is */
.card.work-card { margin-top: var(--s3); padding: 0; overflow: hidden; }
.work-group + .work-group { border-top: 1px solid var(--line); }
.work-h { display: flex; align-items: baseline; gap: var(--s2); margin: 0; padding: var(--s3) var(--s5) var(--s1); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.work-h .n { color: var(--muted); font-weight: 500; }
.work-list { margin: 0; padding: 0 0 var(--s1); list-style: none; }
.work-row { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; align-items: center; gap: var(--s1) var(--s4); padding: var(--s2) var(--s5); }
.work-row + .work-row { border-top: 1px solid var(--line-2); }
.work-main { min-width: 0; }
.work-main p { margin: 0; }
.work-title { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.work-what { font-size: 13.5px; color: var(--ink); overflow-wrap: anywhere; }
.work-sub { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.work-loading { margin: var(--s3) 0 0; }
.work-error { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin: var(--s3) 0 0; }
.work-error p { margin: 0; overflow-wrap: anywhere; }
/* done requests and what this account did: folded under the three sections */
.task-done { margin-top: var(--s7); padding-top: var(--s4); border-top: 1px solid var(--line); }
.task-done > summary { width: fit-content; color: var(--ink-2); }
.task-done > summary h3 { margin: 0; font: inherit; font-weight: 600; color: inherit; }
.task-done > summary .n { color: var(--muted); font-weight: 500; }
.task-done .lead { margin: var(--s2) 0 var(--s3); }
.done-sec + .done-sec { margin-top: var(--s5); }
.done-sec > h4 { display: flex; align-items: baseline; gap: var(--s2); margin: 0 0 var(--s3); font-size: 14px; font-weight: 600; color: var(--ink-2); }
.done-sec > h4 .n { color: var(--muted); font-weight: 500; }
.done-more > summary { margin: var(--s1) 0 var(--s3); }
@media (max-width: 800px) {
  #inbox .group-items .action, #requests .group-items .action { padding: var(--s4); }
  .task-group-head p { flex-basis: 100%; }
  .task-tools { display: grid; gap: var(--s2); }
  .task-who select { max-width: none; width: 100%; }
  .work-row { grid-template-columns: minmax(0, 1fr) auto; padding: var(--s3) var(--s4); }
  .work-row > .st { grid-column: 1 / -1; }
  .work-h { padding-inline: var(--s4); }
}

/* ---------- Communications: a card per person, each process one conversation, oldest first ---------- */
.comms-tools { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s3) var(--s4); margin-bottom: var(--s4); }
.comms-find { display: grid; gap: 4px; font-size: 13px; color: var(--ink-2); }
.comms-find input { width: min(320px, 100%); }
#commsRedirect { margin-bottom: var(--s4); }
.comms-one { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s3); margin: 0 0 var(--s4); font-size: 14px; color: var(--ink-2); }
#comms { display: grid; gap: var(--s4); }
.card.comms-person { padding: 0; overflow: hidden; }
.comms-head { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: var(--s1) var(--s3); padding: var(--s4) var(--s5); }
.comms-head h3 { margin: 0; font-size: 15px; font-weight: 650; line-height: 1.3; }
.comms-head h3 a { color: var(--ink); text-decoration: none; }
.comms-head h3 a:hover { color: var(--accent); text-decoration: underline; }
.comms-n { font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.comms-case { border-top: 1px solid var(--line-2); }
.comms-case > summary { flex-wrap: wrap; gap: 2px var(--s3); min-height: 48px; padding: var(--s2) var(--s5); color: var(--ink); }
.comms-case > summary::after { order: -1; margin-right: var(--s1); color: var(--muted); }
.comms-case > summary:hover { background: var(--panel-2); }
.comms-case > summary:focus-visible { outline-offset: -2px; }
.cc-name { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s2); font-size: 14px; font-weight: 600; }
.cc-meta { font-size: 13px; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.ci-list { margin: 0; padding: 0 0 var(--s1); list-style: none; }
.ci { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); padding: 0 var(--s5) 0 calc(var(--s5) + 4px); }
.ci::before { content: ""; position: absolute; left: calc(var(--s5) + 17px); top: 0; bottom: 0; border-left: 1px solid var(--line); } /* the conversation's thread */
.ci:first-child::before { top: 18px; } .ci:last-child::before { bottom: calc(100% - 18px); }
.ci-dir { position: relative; z-index: 1; display: grid; place-items: center; width: 26px; height: 26px; margin-top: 7px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line); }
.ci-dir svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ci-out .ci-dir { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: var(--accent-soft); }
.ci-in .ci-dir { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); background: var(--ok-bg); }
.ci-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "text end" "sub end"; gap: 2px var(--s4); min-width: 0; margin-left: var(--s2); padding: var(--s2) var(--s2);
  border: 0; border-radius: var(--r-sm); background: none; color: var(--ink); font: inherit; text-align: left; }
button.ci-main { cursor: pointer; }
button.ci-main:hover { background: var(--panel-2); }
.ci-text { grid-area: text; font-size: 14px; overflow-wrap: anywhere; }
.ci-out .ci-text { font-weight: 600; }
.ci-sub { grid-area: sub; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.ci-end { grid-area: end; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--s1) var(--s3); }
.ci-time { min-width: 96px; font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ci-parts { grid-column: 2; margin: 0 0 var(--s2) var(--s2); padding: var(--s1) var(--s3); list-style: none; border-left: 2px solid var(--line-2); font-size: 13px; color: var(--ink-2); }
.ci-parts li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 var(--s3); padding: 2px 0; }
.ci-parts time { font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cc-foot { margin: 0; padding: var(--s1) var(--s5) var(--s3) calc(var(--s5) + 40px); font-size: 13px; }
.comms-more { margin: 0; font-size: 13px; }
/* a person's Communications card, beside their process cards */
.mail-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--line-2); color: var(--ink-2); }
.mail-mark svg { width: 20px; height: 20px; }
.comms-card { align-content: space-between; text-decoration: none; color: inherit; }
.rec-link { margin: var(--s2) var(--s4); font-size: 13px; color: var(--muted); }
/* one email */
.mail-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px var(--s4); margin: 0 0 var(--s3); font-size: 14px; }
.mail-facts > div { display: contents; }
.mail-facts dt { color: var(--muted); }
.mail-facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .comms-tools { display: grid; align-items: stretch; justify-content: stretch; }
  .comms-find input { width: 100%; }
  .comms-head { grid-template-columns: 40px minmax(0, 1fr); padding: var(--s3) var(--s4); }
  .comms-n { grid-column: 2; }
  .comms-head .person-meta { white-space: normal; }
  .comms-case > summary { padding-inline: var(--s4); }
  .ci { grid-template-columns: 26px minmax(0, 1fr); padding: 0 var(--s3) 0 var(--s4); }
  .ci::before { left: calc(var(--s4) + 12px); }
  .ci-dir { width: 24px; height: 24px; }
  .ci-main { grid-template-columns: minmax(0, 1fr); grid-template-areas: "text" "sub" "end"; margin-left: var(--s1); }
  .ci-end { justify-content: space-between; margin-top: 2px; }
  .ci-time { min-width: 0; margin-left: auto; }
  .ci-parts { margin-left: var(--s1); }
  .cc-foot { padding-left: calc(var(--s4) + 32px); }
}

/* ---------- Sample cases (Approvals): made up, to try approvals; marked wherever they show ---------- */
.tag.sample { color: var(--info); background: var(--info-bg); border-color: color-mix(in srgb, var(--info) 35%, transparent); font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.proc-demo.sample { color: var(--info); }
.sample-list { margin: var(--s3) 0 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--r-md); }
.sample-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: var(--s1) var(--s3); padding: var(--s2) var(--s3); }
.sample-row + .sample-row { border-top: 1px solid var(--line-2); }
.sample-step { font-size: 12.5px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sample-main { display: grid; gap: 1px; min-width: 0; font-size: 14px; }
.sample-main .muted { font-size: 12.5px; overflow-wrap: anywhere; }
.sample-main .st { white-space: normal; }
.sample-status { margin: var(--s3) 0 0; font-size: 13px; }
@media (max-width: 640px) {
  .sample-row { grid-template-columns: 52px minmax(0, 1fr); }
  .sample-row > .btn { grid-column: 2; justify-self: start; }
}
/* who draws a mark: only its signer; an approval that waits for them says so */
.sig-note { display: block; font-size: 12.5px; color: var(--muted); }
.sig-acts { display: flex; flex-wrap: wrap; gap: var(--s2); }
.sign-wait { margin: var(--s3) 0 0; padding: var(--s2) var(--s3); border-radius: var(--r-sm); background: var(--warn-bg); color: var(--ink); font-size: 13.5px; }
.appr .sign-wait { margin-inline: var(--s5); }
@media (max-width: 800px) { .appr .sign-wait { margin-inline: var(--s4); } }

/* agents: the teams side by side, each a short list of its agents */
/* Agents: one band per team with a line of its colour, its agents as even tiles */
#agentGrid { display: grid; gap: var(--s4); }
.team { padding: var(--s4) var(--s5) var(--s5); border-top: 3px solid var(--c); }
.team-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--s1) var(--s3); margin-bottom: var(--s3); }
.team-head h3 { margin: 0; font-size: 16px; font-weight: 650; }
.team-head .muted { font-size: 13px; }
#signatures .card { margin-top: var(--s4); }
.sig-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); column-gap: var(--s6); }
.sig-list li { display: flex; align-items: center; gap: var(--s3); min-height: 48px; border-top: 1px solid var(--line-2); font-size: 14px; }
.sig-who { flex: 1; min-width: 0; }
.sig-list .when { font-size: 13px; color: var(--muted); white-space: nowrap; }
.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: var(--s3); }
.agent-card { display: flex; gap: var(--s3); align-items: flex-start; min-height: 74px; padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--panel); cursor: pointer; transition: border-color .15s, background .15s; }
.agent-card:hover { border-color: color-mix(in srgb, var(--c) 55%, var(--line)); background: color-mix(in srgb, var(--c) 5%, var(--panel)); }
.agent-text { flex: 1; min-width: 0; }
.agent-card .nm { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 14.5px; font-weight: 650; }
.agent-card .nm .tag { font-weight: 500; }
.agent-card .fn { margin-top: 2px; font-size: 12.5px; line-height: 1.4; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.agent-card .go { margin-top: 6px; font-size: 12.5px; font-weight: 600; color: var(--accent); }
.agent-card .go::after { content: " →"; }
.agent-card.vault, .agent-card.start, .agent-card.tempo { border-color: color-mix(in srgb, var(--c) 40%, var(--line)); }
/* Vault: the employee records (Agents → Vault) */
#vaultPage .page-head { margin-bottom: var(--s1); }
#vaultPage .card { margin-bottom: var(--s4); }
.vault-facts dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: var(--s4) var(--s5); margin: 0; }
.vault-facts dt { font-size: 12.5px; color: var(--muted); }
.vault-facts dd { margin: 2px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.vault-files .file-group { margin-top: var(--s4); }
.vault-files .file-group > b { display: block; margin-bottom: var(--s1); font-size: 13px; color: var(--ink-2); }
.vault-files .file-row { margin: 0; padding: 8px 0; border-top: 1px solid var(--line-2); font-size: 14px; }
.vault-files .file-row .sub { color: var(--muted); font-size: 12.5px; }
#vaultPage a.btn { text-decoration: none; }
#vaultPage .person-foot > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#vaultPage .person-foot { flex-wrap: nowrap; }
/* Tempo: the attendance HR uploads (Agents → Tempo) */
#tempoPage .page-head { margin-bottom: var(--s1); }
#tempoPage .card { margin-bottom: var(--s4); }
#tempoPage a.btn { text-decoration: none; }
.att-week { border-top: 1px solid var(--line-2); }
.att-week > summary { display: grid; gap: 2px; padding: 10px 0; cursor: pointer; font-size: 14px; }
.att-week > summary .sub, .att-weeks .file-row .sub { color: var(--muted); font-size: 12.5px; }
.att-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s1) var(--s3); }
.att-head .st { white-space: normal; }
.att-body { padding: 0 0 var(--s3); }
.att-body .file-group:first-of-type { margin-top: var(--s2); }
/* an upload: its file, then its counts, then what was left out, each on its own line at any width */
.att-uploads .file-row { flex-wrap: wrap; align-items: baseline; gap: 2px var(--s2); }
.att-uploads .file-row > * { flex: 1 1 100%; min-width: 0; overflow-wrap: anywhere; }
.att-uploads .file-row ul { margin: var(--s1) 0 0; padding-left: var(--s4); }
/* Start: choose who to hire (Agents → Start) */
#startPage .page-head { margin-bottom: var(--s1); }
#startPage .notice { margin-bottom: var(--s4); }
#startPage .cand .sub { white-space: normal; } /* the whole line: the panel, the date, nationality, location, pay */
/* Onboard a candidate (Start's page, Start a process): the candidate, the interview with a row per interviewer, the agreed offer */
.onboard .fld { display: grid; } /* inside Start a process's .form too */
.onboard > .notice { margin: 0 0 var(--s4); }
.onb-sample { max-width: 360px; }
.onb-part { margin-top: var(--s5); }
.onb-part h4 { margin: 0; padding-bottom: var(--s2); border-bottom: 1px solid var(--line-2); font-size: 15px; font-weight: 600; }
.onb-panel { min-width: 0; margin: var(--s4) 0 0; padding: 0; border: 0; }
.onb-panel legend { padding: 0; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.onb-panel > p { margin: var(--s1) 0 0; font-size: 13px; }
.onb-panel ol { margin: 0; padding: 0; list-style: none; }
.panel-row { margin-top: var(--s3); padding: var(--s3) var(--s4) var(--s4); border: 1px solid var(--line); border-radius: var(--r-md); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); font-size: 14px; }
.panel-row .form-grid { margin-top: var(--s1); }
.onboard .form-error { margin: var(--s4) 0 0; color: var(--bad); }
.action .row a.btn { text-decoration: none; }

/* Ask Orbit: one centred column; the conversation scrolls, the question box stays at the bottom */
.chat { flex: 1; display: flex; justify-content: center; min-height: 0; width: 100%; padding: 0 var(--s5); }
.chat-col { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; max-width: none; padding: var(--s5) 0 var(--s3); } /* full width (16 Nov) */
.chat-head { padding-bottom: var(--s3); border-bottom: 1px solid var(--line); }
.chat-head h2 { margin: 0; font-size: 22px; font-weight: 650; letter-spacing: -.02em; line-height: 1.25; }
.chat-head p { margin: 2px 0 0; font-size: 14px; }
.chat-log { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: var(--s5); padding: var(--s5) 2px; }
/* a question: on the right, in the accent's soft tint */
.chat-q { align-self: flex-end; max-width: min(80%, 620px); }
.chat-q-text { padding: 10px 16px; border-radius: 18px 18px 6px 18px; background: var(--accent-soft); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
/* an answer: who answered, then what they said, then its route and case */
.chat-a { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: start; gap: var(--s3); max-width: min(100%, 1200px); }
.chat-a-main { min-width: 0; }
.chat-a .chat-a-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s2); margin: 3px 0 var(--s1); font-size: 13px; color: var(--muted); }
.chat-a-who b { font-size: 14px; font-weight: 650; color: var(--ink); }
.chat-a-who time { margin-left: auto; font-size: 12px; font-variant-numeric: tabular-nums; }
.chat-a-text { padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: 6px 18px 18px 18px; background: var(--panel); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-a-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin-top: var(--s2); font-size: 12.5px; color: var(--muted); }
.chat-a-foot .btn { min-height: 30px; }
/* waiting for the answer: three soft dots */
.chat-dots { display: inline-flex; gap: 5px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 6px 18px 18px 18px; background: var(--panel); }
.chat-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: chat-dot 1.2s ease-in-out infinite; }
.chat-dots i:nth-child(2) { animation-delay: .15s; } .chat-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes chat-dot { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
/* nothing asked yet: a short welcome and the suggestions as cards */
.chat-empty { width: 100%; max-width: 640px; margin: auto; padding: var(--s6) 0; text-align: center; }
.chat-empty h3 { margin: 0 0 var(--s2); font-size: 20px; font-weight: 650; letter-spacing: -.01em; }
.chat-empty p { max-width: 500px; margin: 0 auto var(--s5); font-size: 14px; }
.chat-suggest { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--s2); text-align: left; }
.chat-sugg { min-height: 52px; padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); color: var(--ink-2); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.chat-sugg:hover { border-color: var(--field-line); background: var(--panel-2); color: var(--ink); }
/* the composer is one field-like box: the input borderless inside it, the ring on the box */
.chat .chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0 0 var(--s3); }
.chat .chips .chip { min-height: 32px; padding: var(--s1) 12px; border: 0; border-radius: var(--r-pill); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); font: inherit; font-size: 13px; white-space: normal; cursor: pointer; }
.chat .chips .chip:hover { background: var(--panel-2); color: var(--ink); }
.chat-form { display: flex; gap: var(--s2); align-items: center; padding: var(--s1); background: var(--panel); border: 1px solid var(--field-line); border-radius: var(--r-lg); }
.chat-form:focus-within { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 2px; }
.chat-form input { flex: 1; min-width: 0; border: 0; background: none; min-height: 44px; padding: 0 var(--s3); }
.chat-form input:focus-visible { outline: none; }
.chat-note { margin: var(--s2) 0 0; font-size: 12px; text-align: center; }
@media (max-width: 800px) {
  #view-chat .chat { padding: 0 var(--s4); }
  .chat-col { padding: var(--s4) 0 var(--s3); }
  .chat-q { max-width: 88%; }
  .chat-a { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .chat-a > .av { display: none; }
  .chat-empty { padding: var(--s5) 0; }
}

/* modal & toast */
dialog { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 0; background: var(--panel); color: var(--ink); width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 60px); max-height: calc(100dvh - 60px); box-shadow: var(--shadow-3); }
dialog::backdrop { background: rgba(14, 17, 23, .4); }
.modal-body { padding: var(--s5); overflow: auto; max-height: calc(100vh - 62px); max-height: calc(100dvh - 62px); }
.modal-body h3 { margin: 0 0 var(--s3); padding-right: 88px; font-size: 17px; font-weight: 600; }
.modal-x { position: absolute; top: var(--s4); right: var(--s4); }
.btn.ghost.modal-x { z-index: 1; background: var(--panel); } /* the dialog's content scrolls under it: never shows through */
.btn.ghost.modal-x:hover { background: var(--line-2); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3) var(--s4); }
.form label { display: flex; flex-direction: column; gap: var(--s1); font-size: 13px; color: var(--ink-2); }
.form .full { grid-column: 1 / -1; }
.modal-actions { display: flex; justify-content: flex-end; gap: var(--s2); margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--line-2); }
.toast:empty { padding: 0; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--panel); padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 50; max-width: 90vw; box-shadow: var(--shadow-2); }


/* ---------- map head ---------- */
.map-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s3) var(--s5); flex-wrap: wrap; }
.map-head h1 { margin: var(--s1) 0 0; font-size: 26px; line-height: 1.15; }
/* counts as a quiet line of text, not tiles */
.kpis { display: flex; gap: var(--s1) var(--s4); flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.kpis b { font-size: 15px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; margin-right: 3px; }
.kpis b.warn { color: var(--warn); }

/* ---------- orbit motion ---------- */
#gNodes .pop { transform-box: fill-box; transform-origin: center; animation: pop .7s cubic-bezier(.2, .9, .3, 1.25) both; animation-delay: calc(var(--i) * 20ms + 150ms); }
.node.ping .body { animation: ping .8s ease-out; }
@keyframes pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
@keyframes ping { 30% { transform: scale(1.14); } } /* from and back to the disc's own scale, hovered or not: it swells into its ring */
body.paused *, body.paused *::before, body.paused *::after { animation-play-state: paused !important; }

/* ---------- smaller screens ---------- */
/* short desktop screens (1280x720): tighter chrome and one scrolling row of step chips, so the orbit keeps its room */
@media (max-height: 820px) and (min-width: 1101px) {
  .map-wrap { gap: var(--s3); padding-top: var(--s4); padding-bottom: var(--s4); }
  .map-head h1 { font-size: 22px; }
  .strip { padding: var(--s3) var(--s4); gap: var(--s2); }
  .strip-steps { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 4px 3px; margin: -4px -3px; }
  .strip-steps::-webkit-scrollbar { display: none; }
  .stepchip { flex: none; }
}
@media (max-width: 1100px) {
  #view-map.on { flex-direction: column; overflow-y: auto; }
  #view-map > * { flex: none; }
  .graph-box { flex: none; height: max(560px, 70vh); }
}
/* header: two rows, the tabs become a strip that scrolls sideways (up to 1400px: on one row the Admin's ten tabs were cut off at 1280 and 1366) */
@media (max-width: 1400px) {
  .top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 var(--s2); min-height: 0; padding: var(--s2) var(--s4) 0; }
  .sys { grid-area: 1 / 2; } /* explicit, or auto-placement drops it below the full-width tabs row */
  .tabs { grid-column: 1 / -1; overflow-x: auto; scrollbar-width: none; margin: var(--s1) calc(-1 * var(--s4)) 0; padding: 0 var(--s2); }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { flex: none; min-height: 44px; }
  .sys-sum { max-width: 240px; }
}
@media (max-width: 480px) {
  .sys-sum { max-width: 170px; }
  .sys-sum::after { display: none; }
}
@media (max-width: 800px) {
  .view.on { flex-direction: column; }
  .card { padding: var(--s4); }
  .btn, .btn.small, .seg button, details > summary, label.chk, .sys-sum { min-height: 40px; }
  .strip { max-height: none; }
  .row-item { flex-wrap: wrap; }
  .row-main { flex-basis: calc(100% - 46px); }
  .map-wrap { padding: var(--s4); }
  .office { --rc-inset-bottom: 64; }
  #view-map { overflow-y: auto; }
  #view-map > * { flex: none; }
  .graph-box { overflow: auto; border-radius: var(--r-lg); height: 68vh; flex: none; }
  #graph { min-width: 1026px; height: auto; } /* the orbit at the size it had in a 940-wide drawing: the box scrolls */
  .legend { position: static; padding: 8px 14px; }
  /* the map box scrolls sideways here, so the drawer is a sheet over the bottom of the screen and its tab stays put */
  .feed-wrap { position: fixed; top: auto; left: var(--s2); right: var(--s2); bottom: var(--s2); width: auto; height: 62vh; transform: translateY(calc(100% + 16px)); }
  .feed-tab { position: fixed; top: auto; bottom: 96px; margin-top: 0; width: 32px; height: 56px; }
  .feed-close { width: 40px; height: 40px; }
  .graph-box { margin-right: calc(32px - var(--s4)); } /* the fixed tab sits in the gutter beside the map, not on it */
  #view-map.feed-open .map-wrap { padding-bottom: calc(62vh + var(--s4)); } /* the step strip can scroll up above the open sheet */
  .map-head h1 { font-size: 22px; }
  .map-tools { gap: var(--s2); }
  label.sel { flex: 1 1 180px; min-width: 0; } label.sel select { flex: 1; max-width: none; } /* beside the map style toggle */
  .grow { display: none; }
  .map-tools > .btn, .layers { flex: 1 1 auto; } /* wrapped rows fill the width */
  .layers > summary { display: flex; }
  .stepchip { min-width: 40px; height: 40px; }
  .chat { padding: var(--s3) var(--s4) var(--s4); }
  .chat .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } /* the examples are one row that scrolls sideways */
  .chat .chips::-webkit-scrollbar { display: none; }
  .chat .chips .chip { flex: none; min-height: 40px; white-space: nowrap; }
  .page { padding: var(--s5) var(--s4) var(--s6); }
  .page h2 { font-size: 22px; }
  .form { grid-template-columns: minmax(0, 1fr); }
  input, select, textarea { font-size: 16px; min-height: 40px; }
  .action-head .link, .insp-foot .link, .strip-head .link, .action .more a.link { display: inline-flex; align-items: center; min-height: 40px; }
  .insp-head .btn { min-width: 40px; }
  .row-item { row-gap: var(--s1); }
  .row-main + * { margin-left: 46px; } /* the status and time line up under the text, not the avatar */
  .row-sub + .row-sub { white-space: normal; }
  .filters button:focus-visible, .chat .chips .chip:focus-visible { outline-offset: -3px; } /* their rows scroll, which would clip an outer ring */
  .chat-title { font-size: 22px; margin-bottom: var(--s3); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* sign-in and the account menu */
.auth { flex: 1; display: grid; place-items: center; padding: var(--s6) var(--s4); }
.auth-card { width: min(400px, 100%); display: grid; gap: var(--s3); }
.auth-title { margin: 0; font-size: 22px; font-weight: 600; }
.auth-card label, .user-add label { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.auth-card input { min-height: 44px; }
.auth-card .btn { min-height: 44px; }
.auth-err { margin: 0; min-height: 1.2em; color: var(--bad); font-size: 13px; font-weight: 500; }
.auth-err:empty { display: none; }
.me-sum { max-width: 200px; }
#meName { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-who { margin: var(--s2) 0 2px; font-size: 14px; }
.me-scope { margin: 0 0 var(--s3); font-size: 13px; max-width: 280px; }
.menu-panel #logout { margin-bottom: var(--s2); }
/* an action someone else takes: shown, without its buttons */
.action.readonly .row, .action.readonly form, .action.readonly textarea, .action.readonly .pad, .action.readonly [data-act],
.action.readonly .draft-edit, .action.readonly .d-edit, .action.readonly .form-grid { display: none; }
.ro-note { margin: 4px 0 0; font-size: 13px; }
/* Users (Admin): the accounts in a table; Add a person opens its form above it */
#userList { position: relative; padding: 0; overflow-x: auto; }
table.users { width: 100%; border-collapse: collapse; font-size: 14px; }
table.users th[scope="col"] { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); background: var(--panel-2); color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; white-space: nowrap; }
table.users :is(td, th[scope="row"]) { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line-2); font-weight: 400; text-align: left; vertical-align: middle; }
table.users tbody tr:last-child > * { border-bottom: 0; }
table.users tbody tr:hover { background: var(--panel-2); }
.u-who { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.u-who .person-mark { flex: none; width: 34px; height: 34px; font-size: 12.5px; }
.u-id { display: grid; min-width: 0; }
.u-name { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--s2); color: var(--ink); font-weight: 600; }
.u-id code { color: var(--muted); font-size: 12.5px; }
.u-role { color: var(--ink-2); }
.u-last { color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
table.users tr.off :is(.u-name, .u-role, .u-last) { color: var(--muted); }
table.users tr.off .person-mark { background: var(--line-2); color: var(--muted); }
.st.off::before { background: var(--field-line); }
table.users td.user-acts { text-align: right; white-space: nowrap; }
.u-acts { display: inline-grid; grid-template-columns: auto 5.75rem; align-items: center; gap: var(--s2); } /* Turn off in its own column, so the rows line up */
.u-acts > :last-child { justify-self: start; }
#view-users .head-actions { align-items: center; }
.btn.ghost.danger { color: var(--bad); }
.btn.ghost.danger:hover { background: var(--bad-bg); border-color: transparent; }
.user-add { display: grid; gap: var(--s4); margin-bottom: var(--s4); }
.user-add select { width: 100%; min-width: 0; }
/* the header keeps the brand whole; the account menu sits beside the status chip on narrow screens */
.brand { flex: none; }
.tabs { min-width: 0; overflow-x: auto; scrollbar-width: none; }
@media (min-width: 1401px) and (max-width: 1500px) { .tabs button { padding: 0 var(--s2); } } /* one row again: tighter tabs, so a longer account name and two-digit counts still fit */
@media (max-width: 1400px) {
  .top { grid-template-columns: minmax(0, 1fr) auto auto; }
  .sys { grid-area: 1 / 2; }
  .me { grid-area: 1 / 3; }
  .me .menu-panel { max-width: calc(100vw - 32px); }
}
@media (max-width: 1400px) { .brand { min-width: 0; } .brand .title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }
@media (max-width: 480px) { .me-sum { max-width: 96px; } .sys-sum { max-width: 120px; } .brand .title { font-size: 17px; } } /* the name stays; the two chips shorten */
/* a setup link, shown once: what it is, until when, and Copy */
.link-box { display: grid; gap: var(--s2); margin-bottom: var(--s4); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); background: color-mix(in srgb, var(--ok) 5%, var(--panel)); }
.link-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.link-head h3 { margin: 0; font-size: 15px; font-weight: 650; }
.link-head code { color: var(--muted); font-weight: 400; }
.link-box p { margin: 0; font-size: 13.5px; }
.link-row { display: flex; gap: var(--s2); }
.link-box input { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.user-add h3 { margin: 0; font-size: 15px; font-weight: 650; }
.user-add-head p { margin: 2px 0 0; font-size: 13px; }
.user-add-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); align-items: start; gap: var(--s3) var(--s4); }
.user-add label small { font-size: 12px; font-weight: 400; color: var(--muted); }
.user-add-acts { display: flex; flex-wrap: wrap; gap: var(--s2); }

/* testing mode: every account under the sign-in form */
.auth { gap: var(--s4); align-content: center; }
.test-accounts { width: min(560px, 100%); }
.test-accounts h2 { margin: 0; font-size: 16px; font-weight: 600; }
.test-accounts p { margin: 0; }
.ta-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s2); }
.ta { width: 100%; min-height: 56px; display: grid; gap: 2px; align-content: center; justify-items: start; text-align: left; padding: 8px 12px; font: inherit;
  color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); cursor: pointer; }
.ta:hover { background: var(--panel-2); border-color: var(--field-line); }
.ta-name { font-weight: 600; font-size: 14px; }
.ta .muted { font-size: 12px; }

/* ---------- Orbit minimal: summary first, the rest one click away ---------- */
.card, .strip, .sarah-bar, .action { box-shadow: none; }
.card.calm { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); align-items: baseline; padding: var(--s4) var(--s5); }
/* People's actions: cards side by side when there is room */
.group-items { display: block; columns: 3 440px; column-gap: var(--s4); } /* up to three side by side on a wide screen */
.group-items > * { break-inside: avoid; margin: 0 0 var(--s4); }
/* the map toolbar carries the counts that matter */
.map-tools .kpis { margin-right: var(--s2); gap: var(--s1) var(--s3); }
.map-tools label.sel select { max-width: 170px; }
/* the map toolbar: every control the same height, border, radius and type size */
.map-tools { --ctl: 36px; }
.map-tools .seg { box-sizing: border-box; height: var(--ctl); padding: 3px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel-2); }
.map-tools .seg button { height: 100%; min-height: 0; padding: 0 14px; border-radius: 6px; font-size: 14px; }
.map-tools .seg button.on { box-shadow: 0 0 0 1px var(--line), var(--shadow-1); }
.map-tools label.sel { position: relative; }
.map-tools label.sel select { -webkit-appearance: none; appearance: none; box-sizing: border-box; height: var(--ctl); min-height: 0; padding: 0 34px 0 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel); color: var(--ink); font-size: 14px; font-weight: 500; line-height: 1.2; cursor: pointer; }
.map-tools label.sel select:hover { border-color: var(--field-line); }
.map-tools label.sel select:focus-visible { border-color: var(--accent); }
.map-tools label.sel::after { content: ""; position: absolute; right: 14px; top: 50%; width: 6px; height: 6px; pointer-events: none;
  border-right: 1.5px solid var(--ink-2); border-bottom: 1.5px solid var(--ink-2); transform: translateY(-70%) rotate(45deg); }
.map-tools .layers > summary.btn, .map-tools > .btn { box-sizing: border-box; height: var(--ctl); min-height: 0; font-size: 14px; }
.map-tools .layers > summary.btn { border-color: var(--line); color: var(--ink); }
@media (max-width: 800px) {
  .map-tools { --ctl: 40px; }
  .map-tools label.sel select { font-size: 16px; } /* 16px or more: phones do not zoom in on it */
}
.map-wrap { gap: var(--s3); }
/* activity feed: one line of summary per message */
.msg { padding: 10px var(--s3); gap: 10px; }
.msg .sum { -webkit-line-clamp: 1; font-size: 13px; }
.msg-meta { margin-top: 2px; }
/* inside an open process: progress and records beside compact status cards */
.pbar { margin-top: var(--s1); }
.case-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-rows: auto 1fr; grid-template-areas: "prog side" "rec side"; gap: var(--s4); align-items: start; }
.case-cols.has-now { grid-template-rows: auto auto 1fr; grid-template-areas: "now side" "prog side" "rec side"; }
.case-cols.single { grid-template-columns: minmax(0, 1fr); grid-template-areas: "prog" "rec"; }
.case-cols.single.has-now { grid-template-areas: "now" "prog" "rec"; }
.proc-now { grid-area: now; display: grid; gap: var(--s3); min-width: 0; }
.proc-now > :is(.action, .notice) { margin: 0; }
.case-cols > .progress { grid-area: prog; min-width: 0; }
.case-cols > .records { grid-area: rec; min-width: 0; }
.case-side { grid-area: side; display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.side-card { padding: var(--s4); }
.side-card .card-head { margin-bottom: var(--s2); }
.side-sub { margin: 0 0 var(--s2); font-size: 13px; color: var(--muted); }
.side-line { margin: 0 0 var(--s2); font-size: 14px; color: var(--ink-2); }
/* a checklist: who has signed, each form's state */
.checks { list-style: none; margin: 0; padding: 0; display: grid; }
.checks li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--s2); min-height: 32px; padding: 6px 0; font-size: 14px; }
.checks li + li { border-top: 1px solid var(--line-2); }
.checks li::before { content: ""; flex: none; align-self: center; width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--field-line); }
.checks li.ok::before { background: var(--ok); box-shadow: none; }
.checks li.half::before { background: linear-gradient(90deg, var(--ok) 50%, transparent 50%); box-shadow: inset 0 0 0 1.5px var(--ok); }
.checks li.bad::before { background: var(--bad); box-shadow: none; }
.checks li > span:first-of-type { flex: 1 1 140px; min-width: 0; }
.checks .when { margin-left: auto; font-size: 12.5px; color: var(--muted); }
/* files and copies, folded */
.files { margin-top: var(--s2); }
.files > summary { font-size: 13px; }
.files .n { color: var(--muted); font-weight: 400; }
.file-row { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s2); font-size: 13px; }
.file-row > span { flex: 1; color: var(--ink-2); }
.file-row a.btn { text-decoration: none; min-height: 28px; padding: 0 10px; }
.file-group { margin-top: var(--s3); font-size: 13px; }
.file-group > b { font-weight: 600; }
.file-group > .btn { margin-top: var(--s2); }
.file-list { list-style: none; margin: var(--s1) 0 0; padding: 0; font-size: 13px; }
.file-list li { display: flex; justify-content: space-between; gap: var(--s2); padding: 5px 0; }
.file-list li + li { border-top: 1px solid var(--line-2); }
.side-card .row { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }
.side-card .btn-row { margin-top: var(--s3); }
/* a team's request (Requests, and folded in the case's Team requests card), and PRO's MOHRE documents with their Upload */
.file-row.sub { margin-top: var(--s1); padding-left: var(--s4); }
.file-row .btn.upload { position: relative; min-height: 28px; padding: 0 10px; cursor: pointer; }
.file-row .btn.upload:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.file-row .btn.upload.busy { opacity: .6; pointer-events: none; }
/* a document that is in: Uploaded, in the done green with a check (still pressed to upload a newer copy) */
.file-row .btn.upload.done { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); font-weight: 600; }
.file-row .btn.upload.done:hover { background: color-mix(in srgb, var(--ok) 12%, var(--panel)); }
.file-row .btn.upload.done::before { content: ""; flex: none; width: 4px; height: 8px; margin: -2px 1px 0 0; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.pro-files .fld { margin-top: var(--s3); }
.action.request .checks { margin-top: var(--s3); }
.action.request .row input[type=text] { flex: 1 1 200px; }
.action.request .row select { flex: 0 1 180px; min-width: 0; } /* the Oracle enrollment's payroll group */
.action .decide { display: grid; gap: 4px; margin: var(--s3) 0; font-size: 13px; color: var(--muted); } /* a probation review recorded by hand: what it decides */
.action .decide select { max-width: 260px; }
.action.request.compact { margin: var(--s3) 0 0; padding: var(--s3); box-shadow: none; }
.action.request.compact :is(h3, h4) { font-size: 14px; }
.emp-file { margin-bottom: var(--s4); }
@media (max-width: 1200px) {
  .case-cols { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "prog" "side" "rec"; }
  .case-cols.has-now { grid-template-areas: "now" "prog" "side" "rec"; }
}

/* the View menu holds Pause motion with the map's toggles */
.layers .menu-panel #pauseMotion { margin: var(--s1) 0 var(--s2); }
/* Users on a phone: each person a block, their role, state and last sign-in under the name, the buttons in a row */
@media (max-width: 800px) {
  table.users, table.users tbody { display: block; }
  table.users thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.users tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px var(--s3); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line-2); }
  table.users tbody tr:last-child { border-bottom: 0; }
  table.users :is(td, th[scope="row"]) { display: block; padding: 0; border: 0; }
  table.users th[scope="row"], table.users .u-role { grid-column: 1 / -1; }
  table.users td:is(.u-role, :nth-child(3), .user-acts) { padding-left: 46px; }
  table.users td.u-role { font-size: 13px; }
  table.users td.u-last { font-size: 12.5px; text-align: right; }
  table.users td.user-acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s2); text-align: left; }
  .user-add-acts .btn { flex: 1 1 auto; }
  .u-acts { display: flex; flex-wrap: wrap; gap: var(--s2); }
}

/* ---------- Dashboard: all of Orbit at a glance. Each card in the form that suits its data; thin marks, one colour per agent team ---------- */
/* #dash holds its screen-reader text, which would otherwise stretch the whole window. The states' colours (needs a person, in
   progress, finished, rejected, stopped) are its own: in the donut's order, checked for colour blindness on the card in light and dark */
#dash { position: relative; display: grid; gap: var(--s4); --dv-wait: #c47d04; --dv-run: #3e42b6; --dv-done: #196632; --dv-bad: #bb061e; --dv-off: #878d97; }
/* dark: Orbit's navy theme (html[data-theme="dark"], the default since 11 Nov 2026), no longer the computer's setting */ :root[data-theme="dark"] #dash { --dv-run: #525dbd; --dv-done: #60a871; --dv-bad: #d73337; --dv-off: #b3b9c2; } 
#dash .st.waiting::before { background: var(--dv-wait); } #dash :is(.st.running, .st.others)::before { background: var(--dv-run); } #dash .st.error::before { background: var(--dv-bad); }
:is(.dv-sw, .dv-u).wait { background: var(--dv-wait); } :is(.dv-sw, .dv-u).run { background: var(--dv-run); } :is(.dv-sw, .dv-u).done { background: var(--dv-done); }
:is(.dv-sw, .dv-u).bad { background: var(--dv-bad); } :is(.dv-sw, .dv-u).off { background: var(--dv-off); }
.dv-updated { font-size: 13px; }
.dv-hero { position: relative; overflow: hidden; padding: var(--s5) var(--s5) var(--s4); }
.dv-hero::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; /* the seven teams' colours, the page's signature */
  background: linear-gradient(90deg, var(--dv-1) 0 14.3%, var(--dv-2) 0 28.6%, var(--dv-3) 0 42.9%, var(--dv-4) 0 57.1%, var(--dv-5) 0 71.4%, var(--dv-6) 0 85.7%, var(--dv-7) 0); }
.dv-hero-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s4) var(--s6); margin-bottom: var(--s5); }
.dv-big { display: flex; align-items: baseline; gap: var(--s3); }
.dv-big b { font-size: 64px; line-height: .9; font-weight: 700; letter-spacing: -.045em; }
.dv-big span { font-size: 17px; color: var(--ink-2); max-width: 11em; line-height: 1.3; }
.dv-hero-side { flex: 1 1 320px; min-width: 0; max-width: 560px; text-align: right; }
.dv-hero-side p { margin: 0; color: var(--ink-2); font-size: 14px; }
.dv-hero-side p b { color: var(--ink); font-size: 18px; font-weight: 650; }
.dv-hero-side .dv-tick { margin-top: var(--s2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-hero-side .dv-tick b { font-size: 13px; font-weight: 600; }
.dv-live { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--ok); vertical-align: 1px; animation: dv-pulse 2s ease-out infinite; }
@keyframes dv-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); } 80%, 100% { box-shadow: 0 0 0 9px transparent; } }
/* who Orbit is waiting on: one bar per person or team, the most first */
.dv-wait-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: var(--s2) var(--s3); padding-top: var(--s4); border-top: 1px solid var(--line-2); }
.dv-wait-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.dv-wait-head .muted { font-size: 13px; }
.dv-wait-list { columns: 2; column-gap: var(--s7); } /* two columns on a wide screen */
.dv-wait-list .dv-row { break-inside: avoid; }
.dv-row.dv-wait { grid-template-columns: minmax(0, 13em) minmax(0, 1fr) 2.6em; padding: 9px 0; font-size: 14.5px; }
.dv-wait .dv-bar { height: 16px; }
.dv-wait .dv-bar > i { height: 12px; border-radius: 2px 6px 6px 2px; background: var(--accent); } /* all of Orbit, one series: the accent (team colours are for teams) */
.dv-wait .dv-val { font-size: 16px; font-weight: 650; color: var(--ink); }
.dv-you { margin-left: 8px; padding: 1px 7px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent); font-size: 11.5px; font-weight: 600; vertical-align: 1px; }
.dv-dot { display: inline-block; flex: none; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%; vertical-align: 0; }
/* the numbers: a tile each, with a coloured edge that says what kind */
.dv-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s3); } /* six, three or two a row: never one left alone */
.dv-tile { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: var(--s4) var(--s4) var(--s4) calc(var(--s4) + 2px);
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--shadow-1); color: var(--ink-2); text-align: left; cursor: pointer; transition: border-color .15s, transform .15s; }
.dv-tile:hover { border-color: var(--field-line); transform: translateY(-1px); }
.dv-tile::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--line); }
.dv-tile.warn::before { background: var(--warn); } .dv-tile.info::before { background: var(--info); } .dv-tile.bad::before { background: var(--bad); } .dv-tile.ok::before { background: var(--ok); }
.dv-tile b { font-size: 30px; line-height: 1.15; font-weight: 650; letter-spacing: -.02em; color: var(--ink); }
.dv-tile span { font-size: 13px; }
.dv-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s4); }
.dv-grid > .card { grid-column: span 6; min-width: 0; }
.dv-grid > .dv-trips { grid-column: span 7; }
.dv-grid > .dv-procs { grid-column: span 5; }
.dv-grid > .dv-act { grid-column: 1 / -1; }
.dv-grid .card-head > .muted { font-size: 13px; }
.dv-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.dv-val { text-align: right; color: var(--ink-2); }
.dv-empty { margin: var(--s2) 0; font-size: 13.5px; }
.dv-more { margin: var(--s2) 0 0; font-size: 13px; }
/* a bar per row (Waiting on): name, bar on a hairline, number */
.dv-row { display: grid; grid-template-columns: minmax(0, 12.5em) minmax(0, 1fr) 3.2em; align-items: center; gap: var(--s3); padding: 7px 0; font-size: 13.5px; }
.dv-bar { display: flex; align-items: center; height: 12px; background: linear-gradient(var(--line-2), var(--line-2)) center / 100% 2px no-repeat; }
.dv-bar > i { display: block; height: 8px; min-width: 2px; border-radius: 1px 4px 4px 1px; }
/* a legend: swatch, words, number */
.dv-legend { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin: 0 0 var(--s3); padding: 0; list-style: none; font-size: 13px; color: var(--ink-2); }
.dv-legend li { display: inline-flex; align-items: center; gap: 7px; }
.dv-legend b { font-weight: 650; color: var(--ink); }
.dv-sw { flex: none; width: 10px; height: 10px; border-radius: 3px; }
/* a small table under a chart: its numbers, readable without hovering */
.dv-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
.dv-table :is(th, td) { padding: 7px 0 7px var(--s3); border-top: 1px solid var(--line-2); text-align: right; font-weight: 400; color: var(--ink-2); }
.dv-table thead th { padding-top: 0; border-top: 0; color: var(--muted); font-size: 12px; font-weight: 500; }
.dv-table :is(th, td):first-child { width: 46%; padding-left: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; color: var(--ink); }
.dv-table td.dv-strong { color: var(--ink); font-weight: 650; }
.dv-table thead th { white-space: nowrap; } .dv-table th.dv-wide { width: 24%; }

/* where everyone is: a ring per person, the share of their steps done */
.dv-trip { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, auto); align-items: center; gap: var(--s3); width: calc(100% + 2 * var(--s2));
  margin: 0 calc(-1 * var(--s2)); padding: 8px var(--s2); border: 0; border-radius: var(--r-md); background: none; color: inherit; text-align: left; cursor: pointer; }
.dv-trip:hover { background: var(--panel-2); }
.dv-who { display: flex; flex-direction: column; min-width: 0; }
.dv-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
.dv-who .muted { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv-trip .st { justify-self: end; max-width: 16em; overflow: hidden; text-overflow: ellipsis; }
.dv-ring { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; }
.dv-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.dv-ring circle { fill: none; stroke-width: 4; }
.dv-ring .t { stroke: var(--line); }
.dv-ring .f { stroke: var(--dv-run); stroke-linecap: round; }
.dv-ring.waiting .f { stroke: var(--dv-wait); } .dv-ring.error .f { stroke: var(--dv-bad); }
.dv-ring b { position: relative; font-size: 11px; font-weight: 650; letter-spacing: -.02em; color: var(--ink); }
.dv-ring small { font-size: 9px; font-weight: 600; color: var(--muted); }
.dv-ring.running::after { content: ""; position: absolute; inset: 0; border-radius: 50%; animation: dv-ring 2.4s ease-out infinite; } /* working now */
@keyframes dv-ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--dv-run) 45%, transparent); } 80%, 100% { box-shadow: 0 0 0 8px transparent; } }

/* processes: a dot per person in one */
.dv-units { margin: 0 calc(-1 * var(--s1)); padding: 0 var(--s1); border-radius: var(--r-sm); }
.dv-urow { display: grid; grid-template-columns: minmax(0, 12.5em) minmax(0, 1fr) 2.4em; align-items: center; gap: var(--s3); padding: 8px 0; border-top: 1px solid var(--line-2); font-size: 13.5px; }
.dv-dots { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; min-height: 14px; }
.dv-u { position: relative; flex: none; width: 12px; height: 12px; border-radius: 50%; cursor: pointer; transition: transform .12s; }
.dv-u::after { content: ""; position: absolute; inset: -4px; } /* a target bigger than the dot */
.dv-u:hover, .dv-u.dv-cur { transform: scale(1.3); box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--ink); }
.dv-none, .dv-plus { font-size: 12.5px; color: var(--muted); }
.dv-plus { margin-left: 2px; }

/* agent activity: a line over time, and a strip per team under it on the same times */
.dv-act { --dv-lab: 14.5em; --dv-valw: 3em; } /* the longest team name ("Public Relations & Admin") in full */
.dv-act-plot, .dv-hrow { display: grid; grid-template-columns: var(--dv-lab) minmax(0, 1fr) var(--dv-valw); gap: var(--s3); }
.dv-act-plot::after { content: ""; } /* the number column, empty beside the line */
.dv-yax { position: relative; font-size: 11.5px; color: var(--muted); }
.dv-yax span { position: absolute; right: 0; transform: translateY(50%); line-height: 1; }
.dv-area { position: relative; height: 150px; border-bottom: 1px solid var(--line); }
.dv-gl { position: absolute; left: 0; right: 0; height: 1px; background: var(--line-2); }
.dv-area svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.dv-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.dv-fill { fill: url(#dvWash); }
.dv-wash-top { stop-color: var(--accent); stop-opacity: .2; } .dv-wash-end { stop-color: var(--accent); stop-opacity: .02; }
.dv-cols { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); }
.dv-col { position: relative; }
.dv-col::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--ink-2); opacity: 0; }
.dv-col b { position: absolute; left: 50%; width: 10px; height: 10px; margin: 0 0 -5px -5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--panel); opacity: 0; }
.dv-col:hover::before, .dv-col.dv-cur::before { opacity: .45; }
.dv-col:hover b, .dv-col.dv-cur b { opacity: 1; }
.dv-xax { position: relative; height: 16px; margin: 6px calc(var(--dv-valw) + var(--s3)) var(--s4) calc(var(--dv-lab) + var(--s3)); font-size: 11.5px; color: var(--muted); }
.dv-xax span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.dv-xax span:first-child { transform: none; }
.dv-xax .end { right: 0; transform: none; }
.dv-heat { display: grid; gap: 4px; margin: 0 calc(-1 * var(--s1)); padding: var(--s1); border-radius: var(--r-sm); }
.dv-hrow { align-items: center; font-size: 13px; }
.dv-cells { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 2px; }
.dv-cells i { height: 16px; border-radius: 3px; background: var(--line-2); }
:is(.dv-cells, .dv-scale) i.none { background: transparent; box-shadow: inset 0 0 0 1px var(--line); } /* no message: an outline only */
.dv-cells i:hover, .dv-cells i.dv-cur { position: relative; outline: 2px solid var(--ink); outline-offset: 1px; }
.dv-scale { display: flex; align-items: center; justify-content: flex-end; gap: 3px; margin-top: var(--s3); font-size: 11.5px; color: var(--muted); }
.dv-scale i { width: 14px; height: 10px; border-radius: 2px; }
.dv-scale span { margin: 0 4px; } .dv-scale span:last-child { margin-right: 0; } .dv-scale .dv-none { margin-right: var(--s3); }

/* team requests: a donut, the number in its middle */
.dv-req-top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4) var(--s6); margin-bottom: var(--s4); }
.dv-donut { position: relative; flex: none; width: 132px; height: 132px; border-radius: 50%; }
.dv-donut svg { width: 100%; height: 100%; overflow: visible; }
.dv-donut circle { fill: none; stroke-width: 14; transition: stroke-width .12s; }
.dv-donut .track { stroke: var(--line-2); }
.dv-donut circle.wait { stroke: var(--dv-wait); } .dv-donut circle.run { stroke: var(--dv-run); } .dv-donut circle.done { stroke: var(--dv-done); } .dv-donut circle.bad { stroke: var(--dv-bad); }
.dv-donut circle[data-mark]:hover, .dv-donut circle.dv-cur { stroke-width: 19; }
.dv-donut-mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); pointer-events: none; }
.dv-donut-mid b { font-size: 28px; line-height: 1.1; font-weight: 650; letter-spacing: -.02em; color: var(--ink); }
.dv-req .dv-legend { flex: 1 1 12em; flex-direction: column; flex-wrap: nowrap; gap: 8px; margin: 0; }
.dv-req .dv-legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 3.2em; gap: 8px; }
.dv-req .dv-legend .muted { text-align: right; }

/* AI work: its numbers, one bar split by team, a row per team */
.dv-figs { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s6); margin-bottom: var(--s4); }
.dv-fig { display: flex; flex-direction: column; }
.dv-fig b { font-size: 24px; line-height: 1.2; font-weight: 650; letter-spacing: -.02em; color: var(--ink); }
.dv-fig span { font-size: 12.5px; color: var(--muted); }
.dv-share { display: flex; gap: 2px; height: 14px; margin-bottom: var(--s4); border-radius: 4px; }
.dv-share i { min-width: 3px; height: 100%; }
.dv-share i:first-child { border-radius: 4px 0 0 4px; } .dv-share i:last-child { border-radius: 0 4px 4px 0; } .dv-share i:only-child { border-radius: 4px; }
.dv-share i:hover, .dv-share i.dv-cur { position: relative; outline: 2px solid var(--ink); outline-offset: 1px; }
/* one tooltip for every mark */
.dv-tip { position: fixed; z-index: 60; max-width: 280px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--ink); color: var(--panel);
  font-size: 12.5px; line-height: 1.45; white-space: pre-line; pointer-events: none; box-shadow: var(--shadow-2); }
/* the charts draw in once, when the page first opens: bars grow, the line sweeps in, rings and the donut turn in, dots and cells fade in */
.dv-intro :is(.dv-bar > i, .dv-share) { animation: dv-grow .8s cubic-bezier(.2, .8, .2, 1) both; transform-origin: left; }
@keyframes dv-grow { from { transform: scaleX(0); } }
.dv-intro .dv-area svg { animation: dv-sweep 1s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes dv-sweep { from { clip-path: inset(0 100% 0 0); } }
.dv-intro .dv-ring svg { animation: dv-turn-ring .9s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes dv-turn-ring { from { opacity: 0; transform: rotate(-200deg); } }
.dv-intro .dv-donut svg { animation: dv-turn .9s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes dv-turn { from { opacity: 0; transform: rotate(-110deg); } }
.dv-intro :is(.dv-u, .dv-cells i) { animation: dv-fade .7s ease-out both; }
@keyframes dv-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .dv-intro *, .dv-live, .dv-ring::after { animation: none !important; } :is(.dv-tile, .dv-u, .dv-donut circle) { transition: none; } }
@media (max-width: 1100px) { .dv-grid > :is(.dv-trips, .dv-procs) { grid-column: 1 / -1; } }
@media (max-width: 900px) { .dv-wait-list { columns: 1; } }
@media (max-width: 960px) { .dv-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px) {
  .dv-grid > .card { grid-column: 1 / -1; }
  .dv-hero-side { text-align: left; }
  .dv-big b { font-size: 52px; }
}
@media (max-width: 640px) {
  .team { padding: var(--s3) var(--s4) var(--s4); }
  .agent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); } /* two tiles a row on a phone, the avatar above the name */
  .agent-card { flex-direction: column; gap: var(--s2); min-height: 0; }
  .dv-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dv-row, .dv-row.dv-wait { grid-template-columns: minmax(0, 8.5em) minmax(0, 1fr) 2.8em; }
  .dv-trip { grid-template-columns: auto minmax(0, 1fr); row-gap: 2px; }
  .dv-trip .dv-ring { grid-row: span 2; }
  .dv-trip .st { grid-column: 2; justify-self: start; }
  .dv-urow { grid-template-columns: minmax(0, 9.5em) minmax(0, 1fr) 2em; }
  /* the activity on a phone: the line and the cells take the width, each team's name and number above its cells */
  .dv-act { --dv-lab: 2.6em; --dv-valw: 0px; }
  .dv-act-plot, .dv-hrow { gap: 0 var(--s2); }
  .dv-hrow { row-gap: 3px; }
  .dv-hrow .dv-name { grid-column: 1 / 3; grid-row: 1; padding-right: 3em; }
  .dv-hrow .dv-val { grid-column: 2; grid-row: 1; justify-self: end; }
  .dv-hrow .dv-cells { grid-column: 2; grid-row: 2; }
  .dv-heat { gap: 8px; }
  .dv-xax { margin-left: calc(var(--dv-lab) + var(--s2)); margin-right: var(--s2); }
  .dv-area { height: 120px; }
  .dv-donut { width: 116px; height: 116px; }
  .dv-table :is(th, td):first-child { width: 38%; }
  .dv-table :is(th, td) { padding-left: var(--s2); }
  .dv-figs { gap: var(--s3) var(--s5); }
  .dv-fig b { font-size: 21px; }
  .dv-pct { display: none; }
}

/* ---------- Data from HR: the secure link HR uploads on, its progress by team, and the files ---------- */
#view-hrdata .page > * { max-width: 960px; margin-inline: 0; }
#view-hrdata .page-head { margin-bottom: var(--s1); }
#view-hrdata .head-actions { align-items: center; }
.card.hrd { display: grid; gap: var(--s4); margin-bottom: var(--s4); }
.hrd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s2) var(--s3); }
.hrd-id { min-width: 0; }
.hrd-head h3 { margin: 0; font-size: 16px; font-weight: 650; overflow-wrap: anywhere; }
.hrd-head p { margin: 2px 0 0; font-size: 13px; }
.hrd-addr { display: grid; gap: var(--s2); padding: var(--s3) var(--s4); border-radius: var(--r-md); border: 1px solid color-mix(in srgb, var(--ok) 40%, var(--line)); background: color-mix(in srgb, var(--ok) 5%, var(--panel)); }
.hrd-addr input { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.hrd-addr p { margin: 0; font-size: 13px; }
.hrd-prog { display: grid; gap: 6px; }
.hrd-meter { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px var(--s3); font-size: 14px; }
.hrd-meter .muted { font-size: 13px; }
.hrd-prog .mini-bar { height: 6px; border-radius: 3px; }
.hrd-secs { border-top: 1px solid var(--line-2); }
.hrd-sec { border-bottom: 1px solid var(--line-2); }
.hrd-sec > summary { min-height: 44px; gap: var(--s3); color: var(--ink); }
.hrd-sec-t { flex: 1; min-width: 0; font-weight: 600; }
.hrd-sec > summary .mini-bar { flex: none; width: 96px; }
.hrd-sec > summary .n { flex: none; min-width: 4.5em; text-align: right; font-size: 13px; }
.hrd-items { list-style: none; margin: 0 0 var(--s3); padding: 0; }
.hrd-items > li { padding: 8px 0; border-top: 1px solid var(--line-2); font-size: 14px; }
.hrd-items > li:first-child { border-top: 0; }
.hrd-item { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
.hrd-item > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.hrd-items .file-row { flex-wrap: wrap; }
.hrd-items .file-row > span { min-width: 0; overflow-wrap: anywhere; }
.hrd-items .file-row .sub { color: var(--muted); font-size: 12.5px; }
.card.hrd .btn-row { margin-top: 0; }
@media (max-width: 640px) { .hrd-sec > summary .mini-bar { display: none; } .hrd-head { flex-wrap: wrap; } }

/* ---------- My HR (public/myhr.html): an employee's own page, two columns on a wide screen, one on a phone ---------- */
.myhr .me { margin-left: auto; }
.myhr-tag { font-size: 13px; font-weight: 600; color: var(--accent); padding: 2px 10px; border-radius: var(--r-pill); background: var(--accent-soft); }
.myhr-page { max-width: 1080px; margin: 0 auto; width: 100%; }
.myhr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); align-items: start; }
.myhr-wide { grid-column: 1 / -1; }
.myhr-files, .myhr-links { list-style: none; margin: 0; padding: 0; }
.myhr-files > li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s3); padding: 10px 0; border-top: 1px solid var(--line-2); }
.myhr-files > li:first-child, .myhr-links > li:first-child { border-top: 0; padding-top: 0; }
.myhr-file { display: grid; min-width: 0; font-size: 14px; }
.myhr-file b { font-weight: 600; overflow-wrap: anywhere; }
.myhr-file .muted { font-size: 12.5px; }
.myhr-acts { display: flex; gap: var(--s2); }
.myhr-links > li { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line-2); font-size: 14px; }
.myhr-links .muted { font-size: 13px; }
.myhr-ask { display: flex; flex-direction: column; }
.myhr-ask .chat-log { max-height: 460px; min-height: 180px; padding: var(--s3) 2px; }
.myhr-ask .chat-empty { padding: var(--s4) 0; }
.myhr-hr { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; }
@media (max-width: 760px) { .myhr-grid { grid-template-columns: minmax(0, 1fr); } .myhr-page { padding-inline: var(--s4); } }

/* ---------- agents outside an account's scope (src/scope.js): shown, dimmed, with a lock; they do not open ---------- */
.agent-card.locked { cursor: default; opacity: .55; border-style: dashed; }
.agent-card.locked:hover { border-color: var(--line); background: var(--panel); }
.agent-card .lock, .insp-lock { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.lock-ico { flex: none; width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.node.locked { opacity: .38; }
.node.locked .lock-mark { display: block; }
.node .lock-mark { display: none; pointer-events: none; fill: var(--panel); stroke: var(--ink-2); stroke-width: 1.4; }
.insp-lock { margin: var(--s2) 0 0; font-size: 13px; color: var(--muted); }

/* ---------- the company filter (templates/companies.json) on Employees, Dashboard, Communications, Tasks and Approvals ---------- */
.co-filter { display: inline-flex; align-items: center; gap: var(--s2); font-size: 13px; color: var(--ink-2); }
.co-filter select { min-height: 32px; max-width: 240px; }
.co-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin: 0 0 var(--s4); }
.co-tag { color: var(--muted); }

/* ---------- Users: the Admin's Settings card; a person's Orbit access (Invite to Orbit) ---------- */
.settings-card { display: grid; gap: var(--s3); margin-bottom: var(--s4); }
.set-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--s2) var(--s4); padding-top: var(--s3); border-top: 1px solid var(--line-2); }
.set-row:first-of-type { border-top: 0; padding-top: 0; }
.set-row > div { flex: 1 1 320px; min-width: 0; }
.set-row b { font-size: 14px; }
.set-row p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.set-row code { overflow-wrap: anywhere; }
.switch { display: inline-flex; align-items: center; gap: var(--s2); min-height: 36px; font-size: 13px; font-weight: 500; cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--accent); }
.access-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4); margin: 0 0 var(--s4); }
.access-card > div { flex: 1 1 280px; min-width: 0; }
.access-card p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.access-acts { display: flex; flex-wrap: wrap; gap: var(--s2); margin-left: auto; }
.invite-form { display: grid; gap: var(--s3); }
.invite-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.invite-form small { font-weight: 400; color: var(--muted); }
.ms-btn { width: 100%; }
.auth-or { margin: 0; text-align: center; font-size: 12px; color: var(--muted); }
.settings-card { margin-top: var(--s4); }
.settings-card > h3 { margin: 0; font-size: 15px; font-weight: 600; }
.share-form { display: grid; gap: var(--s3); }
.share-row { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr) auto; gap: var(--s2) var(--s3); align-items: end; }
.share-row label { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); min-width: 0; }
.share-row input { font-family: var(--mono, ui-monospace, monospace); }
.share-check { grid-column: 1 / -1; margin: 0; font-size: 13px; }
.share-check.ok { color: var(--muted); }
.share-check.bad { color: var(--danger, #b42318); }
.share-last ul { margin: 4px 0 0; padding-left: 18px; font-size: 13px; }
@media (max-width: 640px) { .share-row { grid-template-columns: minmax(0, 1fr); } }
.u-mail { justify-self: start; padding: 0; border: 0; background: none; font: inherit; font-size: 12.5px; text-align: left; overflow-wrap: anywhere; }
.request .row .fld.inline { display: inline-grid; grid-template-rows: auto auto; gap: 2px; }

/* ---------- Employees: the Current and Cancelled tabs; a person's record and documents beside their processes ---------- */
.emp-tabs { display: flex; gap: var(--s1); margin: 0 0 var(--s4); border-bottom: 1px solid var(--line); }
.emp-tabs button { flex: none; border: 0; background: none; border-radius: 0; min-height: 40px; padding: 0 var(--s3); color: var(--ink-2); font-size: 14px; font-weight: 500; cursor: pointer; }
.emp-tabs button:hover { color: var(--ink); }
.emp-tabs button[aria-selected="true"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.emp-tabs button:focus-visible { outline-offset: -3px; }
.emp-tabs .n { margin-left: 2px; color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.emp-note { margin: 0 0 var(--s4); font-size: 13px; }
.emp-find { margin: 0 0 var(--s4); }
.person-where { display: block; font-size: 12px; color: var(--ink-2); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emp-find input { width: 100%; min-height: 40px; padding: 0 var(--s3); border: 1px solid var(--field-line); border-radius: var(--r-sm); background: var(--panel); color: var(--ink); font: inherit; font-size: 14px; }
.person-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); gap: var(--s5); align-items: start; }
.person-body.single { grid-template-columns: minmax(0, 1fr); }
.person-cards { display: grid; gap: var(--s4); align-content: start; min-width: 0; } /* their processes, then Communications and Documents */
.person-links { grid-template-columns: repeat(2, minmax(0, 1fr)); } /* Documents beside Communications, one under the other on a phone */
@media (max-width: 560px) { .person-links { grid-template-columns: minmax(0, 1fr); } }
.person-file { display: grid; gap: var(--s4); min-width: 0; }
.person-file .card { padding: var(--s4) var(--s5); }
.person-file .kv-list { grid-template-columns: minmax(0, 1fr); }
.person-file .kv-list > div { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: var(--s3); align-items: baseline; }
.kpi-jd { margin: 0 0 var(--s2); font-size: 13.5px; }
.kpi-jd-text { margin: 0 0 var(--s3); font-size: 13px; }
.kpi-state { margin: var(--s2) 0; font-size: 13px; }
.kpi-note { margin: var(--s3) 0 0; font-size: 12px; }
.kpi-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.kpi-table :is(th, td) { padding: 7px 0 7px var(--s3); border-top: 1px solid var(--line-2); text-align: left; vertical-align: top; font-weight: 400; color: var(--ink-2); }
.kpi-table :is(th, td):first-child { padding-left: 0; }
.kpi-table thead th { padding-top: 0; border-top: 0; font-size: 12px; font-weight: 500; color: var(--muted); }
.kpi-table tbody th { color: var(--ink); font-weight: 600; }
.kpi-table tbody th .muted { display: block; font-weight: 400; font-size: 12.5px; }
.kpi-table .n { text-align: right; white-space: nowrap; }
/* Missing data (Employees): the fields by team with their counts, the upload and its check, finding someone; the Missing card */
.gap-card + .gap-card { margin-top: var(--s4); }
.gap-team { margin: 0 0 var(--s4); padding: 0; border: 0; min-width: 0; }
.gap-team legend { padding: 0; margin: 0 0 var(--s1); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.gap-all { display: inline-block; margin: 0 0 var(--s1); padding: 2px 0; border: 0; background: none; font: inherit; font-size: 13px; min-height: 28px; }
.miss-rest { margin: 0; font-size: 13px; color: var(--ink-2); }
.co-details + .co-details { margin-top: var(--s4); }
.co-details .kv-list { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.co-deps { margin-top: var(--s4); }
.dep-wrap { overflow-x: auto; }
.dep-table th[scope="row"] { font-weight: 500; color: var(--ink); }
.dep-table .st { white-space: normal; }
.gap-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.gap-table :is(th, td) { padding: 6px var(--s2); border-top: 1px solid var(--line-2); text-align: left; vertical-align: top; font-weight: 400; }
.gap-table thead th { font-size: 12px; color: var(--muted); border-top: 0; }
.gap-table :is(th, td):first-child { padding-left: 0; }
.gap-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; width: 1%; }
.gap-table label { display: inline-flex; align-items: center; gap: var(--s2); min-height: 28px; cursor: pointer; }
.gap-table input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.gap-table caption { text-align: left; font-size: 13px; font-weight: 600; padding: var(--s3) 0 var(--s1); }
.gap-up, .gap-find { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); font-size: 14px; }
.gap-up input[type="file"] { max-width: 100%; font-size: 13px; }
.gap-find input[type="search"] { flex: 1 1 220px; min-height: 36px; padding: 0 var(--s3); border: 1px solid var(--field-line); border-radius: var(--r-sm); background: var(--panel); color: var(--ink); font: inherit; }
.fill-preview { margin-top: var(--s4); background: var(--panel-2); }
.gap-card .notice.info { margin-top: var(--s4); border-radius: var(--r-sm); }
.gap-people { list-style: none; margin: var(--s3) 0 0; padding: 0; font-size: 13px; }
.gap-people li { padding: var(--s2) 0; border-top: 1px solid var(--line-2); }
.gap-people .gap-of { display: block; color: var(--ink-2); margin-top: 2px; }
.gap-recent { margin-top: var(--s4); font-size: 13px; }
.gap-recent ul { margin: var(--s2) 0 0; padding-left: var(--s4); }
.miss-card h4 { margin: var(--s3) 0 var(--s1); font-size: 13px; color: var(--ink-2); }
.miss-card h4:first-of-type { margin-top: 0; }
.miss-list { margin: 0; padding-left: var(--s4); font-size: 13px; }
.miss-list li + li { margin-top: 2px; }
.kpi-form { display: grid; gap: var(--s3); }
.kpi-rows { display: grid; gap: var(--s3); }
.kpi-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 6.5em auto; align-items: end; gap: var(--s2) var(--s3); margin: 0; padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r-md); }
.kpi-row input { width: 100%; min-width: 0; }
.kpi-sum { margin: 0; font-size: 13px; color: var(--ink-2); }
.file-docs .card-head { margin-bottom: var(--s2); }
.file-proc + .file-proc { margin-top: var(--s4); }
.file-proc h4 { margin: 0 0 var(--s1); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.file-proc ul { list-style: none; margin: 0; padding: 0; }
.file-doc { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s1) var(--s3); padding: var(--s2) 0; border-top: 1px solid var(--line-2); font-size: 13.5px; }
.file-doc:first-child { border-top: 0; }
.file-doc-main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 12em; }
.file-doc-main .muted { font-size: 12px; overflow-wrap: anywhere; }
.file-doc .doc-links { position: static; padding: 0; }
/* the employee file from HR's folders: the checklist, each document's latest copy, the earlier ones folded under it */
.ef-card h4 { margin: var(--s4) 0 var(--s1); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.ef-list { list-style: none; margin: 0; padding: 0; }
.ef-row { padding: var(--s2) 0; border-top: 1px solid var(--line-2); }
.ef-row:first-child { border-top: 0; }
.ef-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); font-size: 13.5px; }
.ef-row .file-doc { border-top: 0; padding-bottom: 0; }
.ef-acts { margin-left: auto; }
.ef-earlier, .ef-family { margin-top: var(--s1); font-size: 13px; }
.ef-earlier summary, .ef-family summary { cursor: pointer; color: var(--ink-2); min-height: 32px; display: flex; align-items: center; }
.ef-earlier ul, .ef-family ul { list-style: none; margin: 0; padding: 0 0 0 var(--s3); border-left: 2px solid var(--line-2); }
.ef-family { margin-top: var(--s4); }
.ef-sort select { min-height: 36px; max-width: 100%; }
/* the profile cards on an employee's page (IDs and expiries, probation, dependants, insurance and leave, pay, personal details) */
.prof-card h4 { margin: var(--s3) 0 var(--s1); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.prof-card h4:first-of-type { margin-top: 0; }
.prof-list { list-style: none; margin: 0; padding: 0; }
.prof-list > li { padding: var(--s2) 0; border-top: 1px solid var(--line-2); }
.prof-list > li:first-child { border-top: 0; padding-top: 0; }
.prof-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s1) var(--s2); margin-bottom: var(--s1); font-size: 13.5px; }
.prof-pay { margin-bottom: var(--s2); }
.prof-pay .prof-total th, .prof-pay .prof-total td { font-weight: 600; border-top: 1px solid var(--line); }
.place-set .fld { flex: 1 1 150px; max-width: 280px; }
@media (max-width: 1000px) { .person-body { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .kpi-row { grid-template-columns: minmax(0, 1fr); } .person-file .card { padding: var(--s4); } }

/* ---------- Dashboard: the Evaluation (src/evaluation.js), in the dashboard's cards, tables and bars ---------- */
.dv-eval { display: grid; gap: var(--s4); margin-top: var(--s2); }
.dv-eval-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2) var(--s3); }
.dv-eval-head h3 { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.01em; }
.dv-eval-head .muted { font-size: 13px; }
.dv-eval .dv-grid > .card { grid-column: span 6; }
.dv-eval .dv-grid > .dv-pend { grid-column: 1 / -1; }
.dv-table.dv-tall :is(th, td) { vertical-align: top; white-space: normal; }
.dv-table.dv-tall th[scope="row"] { overflow: visible; }
.dv-table.dv-tall th[scope="row"] .muted { display: block; font-size: 12px; overflow-wrap: anywhere; }
.dv-link { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.dv-link:hover { text-decoration: underline; }
.dv-late th[scope="row"] { box-shadow: inset 3px 0 0 var(--bad); padding-left: var(--s2); }
.dv-late-tag { display: flex; justify-content: flex-end; margin-top: 2px; }
.dv-more-btn { margin-top: var(--s2); }
.dv-proc { padding: var(--s3) 0; border-top: 1px solid var(--line-2); }
.dv-proc-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s1) var(--s3); margin-bottom: var(--s2); font-size: 14px; }
.dv-proc-top .muted { font-size: 12.5px; }
.dv-split { margin-bottom: var(--s2); height: 12px; }
.dv-slow { margin: 0 0 var(--s1); font-size: 12.5px; color: var(--ink-2); }
.dv-cases { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); margin: 0; padding: 0; list-style: none; font-size: 12.5px; }
.dv-cases .dv-link { font-weight: 500; }
.dv-sub { margin: var(--s3) 0 var(--s2); font-size: 12.5px; font-weight: 600; color: var(--muted); }
.dv-delay th[scope="row"] .dv-bar { margin-top: 4px; }
.dv-active .card-head .filters button { min-height: 28px; }
.dv-steps { margin-top: var(--s3); }
.dv-table.dv-five :is(th, td):first-child { width: 34%; }
.dv-table.dv-five thead th { white-space: normal; vertical-align: bottom; }
.dv-steps td:last-child { text-align: left; }
@media (max-width: 800px) { .dv-eval .dv-grid > .card { grid-column: 1 / -1; } }

/* ---------- Group C: a warning's card in Ask Orbit (src/warnings.js), HR's warnings and calls and messages on a person's page
   (src/contact.js), and the Contact employee dialog ---------- */
.warn-slot { margin-top: var(--s3); }
.warn-card { padding: var(--s4) var(--s5); }
.warn-card .card-head { margin-bottom: var(--s3); }
.warn-card .card-head h4 { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.warn-card .notice { margin: 0 0 var(--s3); font-size: 13.5px; border-radius: var(--r-md); }
.warn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.warn-grid .fld { grid-template-rows: auto; }
.warn-grid textarea { min-height: 64px; }
.warn-grid textarea[name="body"] { min-height: 260px; font-size: 14px; }
.warn-card > .muted { margin: var(--s2) 0 0; font-size: 12.5px; }
.warn-card .kv-list { margin-bottom: var(--s2); }
.warn-card details { margin-top: var(--s3); font-size: 13.5px; }
.warn-card details > summary { cursor: pointer; color: var(--accent); }
.warn-card .btn-row .muted { font-size: 12.5px; }
.hr-card .card-head .muted { font-size: 12.5px; }
.hr-list { list-style: none; margin: 0; padding: 0; }
.hr-list > li { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--s1) var(--s3); padding: var(--s2) 0; border-top: 1px solid var(--line-2); font-size: 13.5px; }
.hr-list > li:first-child { border-top: 0; padding-top: 0; }
.hr-main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 14em; }
.hr-main b { font-weight: 600; overflow-wrap: anywhere; }
.hr-main .muted { font-size: 12px; overflow-wrap: anywhere; }
.hr-main details { margin-top: var(--s1); }
.hr-main details > summary { cursor: pointer; font-size: 12.5px; color: var(--accent); }
.hr-main .doc-body { margin-top: var(--s1); max-height: 200px; font-size: 13px; }
.hr-card details[data-key$=":askhr"] { margin-top: var(--s3); font-size: 13.5px; }
.hr-card details[data-key$=":askhr"] > summary { cursor: pointer; color: var(--accent); margin-bottom: var(--s2); }
.ct-how { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin: 0; padding: 0; border: 0; }
.ct-how legend { padding: 0; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.ct-how .check { display: inline-flex; align-items: center; gap: var(--s2); min-height: 36px; font-size: 14px; font-weight: 400; color: var(--ink); }
.ct-how input[type=radio] { width: 18px; height: 18px; accent-color: var(--accent); }
.set-more { margin-top: var(--s1); font-size: 13px; }
.set-more > summary { cursor: pointer; color: var(--accent); }
@media (max-width: 640px) { .warn-grid { grid-template-columns: minmax(0, 1fr); } .warn-card { padding: var(--s4); } }

/* ---------- the Explainer's voice (public/app.js voiceStart) ---------- */
.tour-voice { display: inline-flex; align-items: center; gap: 6px; }
.tour-voice svg { width: 16px; height: 16px; flex: none; }
.tour-voice .vo-sp { fill: currentColor; }
.tour-voice .vo-on, .tour-voice .vo-off { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.tour-voice[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.tour-voice[aria-pressed="true"] .vo-off, .tour-voice[aria-pressed="false"] .vo-on { display: none; }
.tour-say, .tour-title { border-radius: 3px; transition: background-color .2s; }
.tour-say.reading, .tour-title.reading { background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent-soft); }
@media (prefers-reduced-motion: reduce) { .tour-say, .tour-title { transition: none; } }

/* ---------- Aspire's page and T&D's request: inductions and meeting rooms (src/induction.js, src/rooms.js) ---------- */
.ind-list .ind-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) auto; gap: var(--s1) var(--s4); align-items: center; padding: var(--s3) 0; border-top: 1px solid var(--line-2); font-size: 14px; }
.ind-list .ind-row:first-of-type { border-top: 0; padding-top: 0; }
.ind-who, .ind-when { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ind-who b { font-weight: 600; overflow-wrap: anywhere; }
.ind-who .sub, .ind-when .sub { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.ind-acts { display: flex; flex-wrap: wrap; gap: var(--s2); justify-content: flex-end; }
.ind-acts a.btn { text-decoration: none; }
.ind-days .file-group:first-of-type { margin-top: 0; }
.ind-rooms ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s1); font-size: 13.5px; }
.ind-block { margin-top: var(--s3); padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel-2); font-size: 13.5px; }
.ind-block .card-head { margin-bottom: var(--s2); }
.ind-block .card-head h4 { font-size: 14px; }
.ind-block p { margin: 0 0 var(--s1); }
.ind-block .row { margin-top: var(--s2); }
.ind-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); margin: var(--s3) 0; }
.ind-form .fld { grid-template-rows: auto; }
.ind-form textarea { width: 100%; min-height: 120px; }
.ind-free { margin: 0 0 var(--s3); font-size: 13px; color: var(--ink-2); }
.ind-free ul { margin: var(--s1) 0 0; padding-left: var(--s4); }
.ind-err { color: var(--bad); font-size: 13px; margin: var(--s2) 0 0; }
.ind-err:empty { display: none; }
@media (max-width: 760px) { .ind-list .ind-row { grid-template-columns: minmax(0, 1fr); } .ind-acts { justify-content: flex-start; } .ind-form { grid-template-columns: minmax(0, 1fr); } }
.myhr-agenda-h { margin: var(--s3) 0 var(--s1); font-size: 12px; }
.myhr-agenda { margin: 0; padding-left: var(--s5); font-size: 14px; display: grid; gap: 2px; }
.myhr-acts { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }
.myhr-acts a.btn { text-decoration: none; }
.head-actions a.btn { text-decoration: none; }
.ind-voice code { overflow-wrap: anywhere; }

/* HR's part of a filed form, in the document view (app.js showHrPart): the form's own sections, as the person's link has them */
.hr-part-sec { border: 0; border-top: 1px solid var(--line); margin: var(--s4) 0 0; padding: var(--s3) 0 0; min-width: 0; }
.hr-part-sec legend { padding: 0 var(--s2) 0 0; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.hr-part .form-error:not([hidden]) { margin-top: var(--s3); }


/* ORBIT VISUAL SKIN — 2026-10-26
   Minimal presentation layer. Existing geometry, interaction and status
   indicators are preserved; decorative motion is removed. */
#view-map .graph-box:has(> #graph:not([hidden])) {
  --mm-bg: #ffffff;
  --mm-node: #4f8ea9;
  --mm-node-ink: #476577;
  --mm-disc: #ffffff;
  --mm-disc-ink: #1e2c39;
  --mm-disc-role: #586a79;
  --mm-label: #344959;
  --orbit-outline: #7c929f;
  --orbit-connection: #8194a2;
  --orbit-track: #b2c0c9;
  --orbit-core: #edf5f8;
  --orbit-core-outline: #55899f;
  --orbit-hover: #edf3f6;
  border-color: var(--line);
  border-radius: 10px;
  background: var(--mm-bg);
  box-shadow: none;
}

/* Flat surfaces and a single restrained accent establish the hierarchy. */
#view-map #graph .node .ring {
  fill: var(--mm-disc);
  stroke: var(--orbit-outline);
  stroke-width: 2.4;
  filter: none;
  transition: stroke .16s ease, fill .16s ease;
}
#view-map #graph .node .body {
  fill: var(--mm-disc);
  filter: none;
}
#view-map #graph .node.center .ring {
  fill: var(--orbit-core);
  stroke: var(--orbit-core-outline);
  stroke-width: 3;
}
#view-map #graph .node.center .body { fill: var(--orbit-core); }
#view-map #graph .node:is(.sub, .side) .ring { stroke-width: 2; }
#view-map #graph .node:is(:hover, :focus-visible) .ring {
  fill: var(--orbit-hover);
  stroke: var(--orbit-core-outline);
}
#view-map #graph .node:is(:hover, :focus-visible) .body { fill: var(--orbit-hover); }
#view-map #graph .node .ico { stroke: var(--mm-node-ink); filter: none; }
#view-map #graph .node .c-name { font-size: 31px; font-weight: 700; letter-spacing: -.025em; }
#view-map #graph .node .c-role { font-size: 16px; font-weight: 400; }
#view-map #graph .node .d-name { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
#view-map #graph .node .d-role { font-size: 14.5px; font-weight: 400; }
#view-map #graph .node .d-role.st { font-size: 12.5px; }

/* Clear hub-to-team links; quieter guides group each team's agents.
   Actual message traffic and working/thinking/waiting signals remain intact. */
#view-map #graph .net path.main {
  stroke: var(--orbit-connection);
  stroke-width: 2.2;
  stroke-dasharray: none;
  animation: none;
  filter: none;
}
#view-map #graph .net circle.orbit {
  stroke: var(--orbit-track);
  stroke-width: 1.5;
  stroke-dasharray: 2 9;
  animation: none;
  filter: none;
}

/* Keep the controls familiar and the legend easy to scan. */
#view-map:has(#graph:not([hidden])) .map-tools {
  gap: 10px 12px;
  padding: 0 0 2px;
}
#view-map:has(#graph:not([hidden])) .map-tools .seg { box-shadow: none; }
#view-map:has(#graph:not([hidden])) .map-tools #viewOrbit.on {
  color: var(--ink);
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--line);
}
#view-map:has(#graph:not([hidden])) .map-tools #mapNew {
  font-weight: 600;
  box-shadow: none;
}
#view-map .graph-box:has(> #graph:not([hidden])) > .legend {
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 40px;
  align-items: center;
  gap: 18px;
  padding: 8px 20px;
  color: var(--mm-disc-role);
  font-size: 12px;
  border-top: 1px solid var(--line);
  background: var(--mm-bg);
  box-shadow: none;
}

/* dark: Orbit's navy theme (html[data-theme="dark"], the default since 11 Nov 2026), no longer the computer's setting */
  :root[data-theme="dark"] #view-map .graph-box:has(> #graph:not([hidden])) {
    --mm-bg: #13181e;
    --mm-node: #78a9bf;
    --mm-node-ink: #bacad6;
    --mm-disc: #1d252e;
    --mm-disc-ink: #ebf0f4;
    --mm-disc-role: #a6b6c3;
    --mm-label: #c6d2dc;
    --orbit-outline: #607584;
    --orbit-connection: #617686;
    --orbit-track: #465766;
    --orbit-core: #203641;
    --orbit-core-outline: #84aec1;
    --orbit-hover: #253540;
  }

@media (max-width: 800px) {
  #view-map .graph-box:has(> #graph:not([hidden])) > .legend {
    width: auto;
    margin: 0;
    gap: 8px 14px;
    padding: 10px 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #view-map #graph .node .ring { transition: none; }
}
/* END ORBIT VISUAL SKIN */
.modal-body .form-error { color: var(--bad); }
.edit-part { margin-top: var(--s4); }
.edit-part h4 { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
#editFind { width: 100%; }
/* a candidate's full report on Start's page (public/app.js reportHtml): the choice, at a glance, then one card per part */
#startPage.reporting > :is(.page-head, .lead, [data-start-back]) { display: none; }
#startPage .cand-name { display: block; color: inherit; text-decoration: none; }
#startPage .cand-name:hover { text-decoration: underline; }
.cand-more { display: inline-block; margin-top: 2px; font-size: 13px; }
.rep { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
.rep-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--s3) var(--s5); }
.rep-top h2 { margin: 0; }
.rep-top .sub { margin-top: 2px; font-size: 14px; color: var(--muted); }
.rep-top .sub.earlier { color: var(--warn); }
.rep-decide { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); max-width: 420px; }
.rep-decide input[type=text] { flex: 1 1 100%; min-width: 0; }
.rep-nav { display: flex; flex-wrap: wrap; gap: var(--s2); }
.rep-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--s3); }
.rep-tile { padding: var(--s3) var(--s4); }
.rep-tile .t { font-size: 12.5px; color: var(--muted); }
.rep-tile .v { margin-top: 2px; font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; }
.rep-tile .v small { font-size: 13px; font-weight: 500; color: var(--muted); }
.rep-tile .s { margin-top: 2px; font-size: 13px; color: var(--ink-2); }
.rep-sec h3 { margin: 0 0 var(--s3); font-size: 15px; }
.rep-sec h5 { margin: var(--s3) 0 var(--s1); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.rep-sec > h5:first-of-type, .rep-sec .hire-pc h5 { margin-top: 0; }
.rep-sec p { margin: 0 0 var(--s2); font-size: 14px; line-height: 1.55; }
.rep-sec .hire-facts { margin: 0; }
.rep-comps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 var(--s5); margin: 0; padding: 0; }
.rep-comps li { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: 6px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.rep-comps li span:first-child::first-letter { text-transform: uppercase; }
.rate { display: inline-flex; align-items: center; gap: var(--s2); white-space: nowrap; }
.rate-bar { width: 64px; height: 6px; overflow: hidden; border-radius: var(--r-pill); background: var(--line-2); }
.rate-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.rate b { min-width: 2.5ch; font-weight: 600; font-variant-numeric: tabular-nums; }
.rep-form + .rep-form { margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--line); }
.rep-form-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2) var(--s4); margin-bottom: var(--s3); font-size: 14px; }
.rep-form-head .sub { font-size: 13px; color: var(--muted); }
.rep-verdict { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); font-size: 13.5px; }
.rep-verdict b { font-size: 17px; font-variant-numeric: tabular-nums; }
.rep-scroll { overflow-x: auto; }
.rep-factors td:nth-child(2) { font-variant-numeric: tabular-nums; }
.rep-warn { color: var(--warn); }
.rep-form .rep-doc { margin-top: var(--s3); }
.rep-doc + .rep-doc { margin-top: var(--s2); }
.rep-doc > .link { display: inline-block; margin-top: var(--s1); font-size: 13px; }
@media (max-width: 640px) {
  .rep-top { flex-direction: column; }
  .rep-decide { max-width: none; width: 100%; }
  .rep-decide .btn { flex: 1; }
}

/* The Users page: an account's level and companies, and changing them */
.u-role .link { border: 0; background: none; padding: 0; margin-left: 8px; }
.u-cos { display: block; font-size: .85em; }
.u-access { display: grid; gap: 12px; margin-bottom: 12px; }
.u-access label:not(.check) { display: grid; gap: 4px; max-width: 320px; }
.u-access fieldset { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 16px; border: 0; margin: 0; padding: 0; }
.u-access legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.u-access label.check { display: flex; align-items: center; gap: 8px; }

/* Payroll inside Orbit: Scout's page fills the space under Orbit's tabs */
#view-payroll iframe, #view-recruitment iframe, #view-care iframe { flex: 1; width: 100%; min-height: 0; border: 0; background: var(--bg); }

/* The Users page's Activity log */
.ulog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ulog-filters { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0; }
.ulog-filters label { display: grid; gap: 4px; font-size: .9em; }
.ulog-table td { vertical-align: top; }
.ulog-bad td { background: color-mix(in srgb, #d9534f 6%, transparent); }
.ulog-count { margin-top: 8px; }
.ulog-wrap { overflow-x: auto; }
.ulog-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: .9em; }
.ulog-table th { text-align: left; font-weight: 600; color: var(--muted, #667); padding: 6px 8px; border-bottom: 1px solid var(--line, #dde); }
.ulog-table td { padding: 6px 8px; border-bottom: 1px solid var(--line, #eef); }
.ulog-table td:first-child { white-space: nowrap; }

/* A termination's type, on its start dialog (with notice, or without notice after the investigation) */
.ex-type { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.ex-type legend { font-weight: 600; margin-bottom: 4px; padding: 0; }
.form .ex-type label { display: flex; flex-direction: row; gap: 8px; align-items: flex-start; font-weight: 400; }
.form .ex-type input[type="radio"] { width: auto; margin: 3px 0 0; flex: none; }
.ex-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ex-summary[hidden] { display: none; }
.ex-summary .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .ex-summary { grid-template-columns: 1fr; } }

/* ---------- the Dashboard's Workforce (public/workforce.js): the people, counted ---------- */
.wf-switch { display: flex; justify-content: flex-start; margin-bottom: var(--s4); }
#wf { display: flex; flex-direction: column; gap: var(--s4); }
.wf-grid > .card { grid-column: span 6; } /* rows: headcount + companies; mix, age, service; nationalities + IDs; grades, departments, sites; pay; the table */
.wf-grid > :is(.wf-pay, .wf-table) { grid-column: 1 / -1; }
.wf-one > .wf-trend { grid-column: 1 / -1; } /* one company: no companies card beside it */
.wf-grid > :is(.wf-mix, .wf-pyr, .wf-ten, .wf-grades, .wf-deps, .wf-sites) { grid-column: span 4; }
.wf-loading { display: flex; align-items: center; gap: var(--s3); min-height: 160px; justify-content: center; }
.wf-spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: wf-spin .8s linear infinite; }
@keyframes wf-spin { to { transform: rotate(360deg); } }
.wf-note { margin: var(--s3) 0 0; font-size: 12.5px; }
.wf-foot { margin: 0; font-size: 12.5px; text-align: center; }

/* the top: a soft wash of the accent behind the headcount, the figures beside it, what stands out under it */
.wf-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); padding: var(--s6) var(--s6) var(--s5);
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--accent) 13%, var(--panel)) 0%, var(--panel) 55%),
    radial-gradient(90% 120% at 100% 100%, color-mix(in srgb, var(--dv-7) 9%, var(--panel)) 0%, transparent 60%); }
.wf-hero::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--dv-1), var(--dv-3), var(--dv-4), var(--dv-2), var(--dv-7)); }
.wf-hero::after { content: ""; position: absolute; right: -90px; top: -90px; width: 320px; height: 320px; border-radius: 50%; pointer-events: none;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); box-shadow: 0 0 0 40px color-mix(in srgb, var(--accent) 4%, transparent), 0 0 0 80px color-mix(in srgb, var(--accent) 2.5%, transparent); }
.wf-hero-main { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(260px, 5fr) minmax(0, 8fr); gap: var(--s5) var(--s6); align-items: center; }
.wf-eyebrow { display: block; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.wf-big { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px var(--s3); margin: 6px 0 var(--s4); }
.wf-big b { font-size: 76px; line-height: .95; font-weight: 750; letter-spacing: -.05em; color: var(--ink); font-variant-numeric: tabular-nums; }
.wf-big span { font-size: 17px; color: var(--ink-2); }
.wf-split { display: flex; gap: 2px; height: 10px; max-width: 420px; margin-bottom: var(--s3); }
.wf-split i { min-width: 3px; } .wf-split i:first-child { border-radius: 5px 0 0 5px; } .wf-split i:last-child { border-radius: 0 5px 5px 0; }
.wf-split i:hover { outline: 2px solid var(--ink); outline-offset: 1px; }
.wf-split-key { margin: 0; }
.wf-all { margin-top: var(--s3); }
.wf-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); }
.wf-kpi { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: var(--s3) var(--s4); border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--panel) 78%, transparent); backdrop-filter: blur(6px); transition: transform .15s, border-color .15s; }
.wf-kpi:hover { transform: translateY(-2px); border-color: var(--field-line); }
.wf-kpi b { font-size: 26px; line-height: 1.15; font-weight: 700; letter-spacing: -.03em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-kpi b small { font-size: 15px; font-weight: 600; color: var(--muted); margin-left: 1px; }
.wf-kpi > span { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.wf-kpi > small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-meter { display: block; height: 4px; margin: 4px 0 5px; border-radius: 2px; background: var(--line-2); overflow: hidden; }
.wf-meter i { display: block; height: 100%; border-radius: 2px; }
.wf-insights { position: relative; z-index: 1; padding-top: var(--s4); border-top: 1px solid var(--line-2); }
.wf-insights h3 { margin: 0 0 var(--s3); font-size: 15px; font-weight: 600; }
.wf-insights ul { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: var(--s7); }
.wf-insights li { display: flex; gap: 10px; break-inside: avoid; padding: 5px 0; font-size: 14px; color: var(--ink-2); }
.wf-insights li > i { flex: none; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--info); }
.wf-insights li.ok > i { background: var(--ok); } .wf-insights li.warn > i { background: var(--warn); } .wf-insights li.bad > i { background: var(--bad); }

/* the headcount: a line with a wash, joiners up and leavers down under it, on the same months */
.wf-trend-say { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--s2) var(--s3); margin: -4px 0 var(--s3); }
.wf-trend-say > b { font-size: 30px; font-weight: 700; letter-spacing: -.03em; }
.wf-delta { font-size: 13.5px; font-weight: 600; } .wf-delta.up { color: var(--ok); } .wf-delta.down { color: var(--bad); }
.wf-delta .muted { font-weight: 400; }
.wf-plot { display: grid; grid-template-columns: 3.4em minmax(0, 1fr); gap: var(--s2); }
.wf-yax { position: relative; font-size: 11.5px; color: var(--muted); }
.wf-yax span { position: absolute; right: 0; transform: translateY(50%); line-height: 1; }
.wf-area { position: relative; height: 170px; border-bottom: 1px solid var(--line); }
.wf-area svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.wf-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.wf-fill { fill: url(#wfWash); }
.wf-wash-top { stop-color: var(--accent); stop-opacity: .28; } .wf-wash-end { stop-color: var(--accent); stop-opacity: .02; }
.wf-flow { position: relative; display: grid; grid-template-columns: 3.4em minmax(0, 1fr); gap: var(--s2); margin-top: var(--s2); }
.wf-flow-key { display: flex; flex-direction: column; gap: 2px; justify-content: center; font-size: 11px; color: var(--muted); }
.wf-flow-key span { display: inline-flex; align-items: center; gap: 4px; } .wf-flow-key .dv-sw { width: 8px; height: 8px; }
.wf-flow-bars { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); height: 72px; background: linear-gradient(var(--line), var(--line)) center / 100% 1px no-repeat; }
.wf-fb { position: relative; }
.wf-fb i { position: absolute; left: 22%; right: 22%; min-height: 0; }
.wf-fb .j { bottom: 50%; background: var(--dv-3); border-radius: 3px 3px 0 0; }
.wf-fb .l { top: 50%; background: var(--dv-2); border-radius: 0 0 3px 3px; }
.wf-fb:hover { background: var(--line-2); border-radius: 4px; }
.wf-xax { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); margin: 6px 0 0 calc(3.4em + var(--s2)); font-size: 11px; color: var(--muted); }
.wf-xax span { white-space: nowrap; text-align: left; overflow: visible; }

/* the companies: a button each, its bar split by payroll group */
.wf-co-list { display: flex; flex-direction: column; }
.wf-co { display: grid; grid-template-columns: minmax(0, 9.5em) minmax(0, 1fr) 4.6em; align-items: center; gap: var(--s3); width: calc(100% + 2 * var(--s2)); margin: 0 calc(-1 * var(--s2));
  padding: 6px var(--s2); border: 0; border-radius: var(--r-sm); background: none; color: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.wf-co:hover { background: var(--panel-2); }
.wf-co-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 500; }
.wf-co-bar { display: flex; gap: 2px; width: var(--w); min-width: 4px; height: 12px; }
.wf-co-bar i { min-width: 2px; } .wf-co-bar i:first-child { border-radius: 2px 0 0 2px; } .wf-co-bar i:last-child { border-radius: 0 4px 4px 0; }
.wf-co-val { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; font-weight: 650; color: var(--ink); }
.wf-co-val small { font-size: 11px; font-weight: 500; color: var(--muted); }

/* the mix: two donuts with their legends */
.wf-mix-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.wf-mix-row figure { display: flex; flex-direction: column; align-items: center; gap: var(--s3); margin: 0; }
.wf-donut { width: 128px; height: 128px; }
.wf-donut .dv-donut-mid b { font-size: 24px; }
.wf-dleg { flex-direction: column; gap: 4px; margin: 0; }
.wf-dleg li { display: grid; grid-template-columns: auto 1fr auto auto; gap: 6px; }

/* age: a pyramid */
.wf-pyr-key { display: flex; justify-content: space-between; margin-bottom: var(--s2); font-size: 12px; color: var(--muted); }
.wf-pyr-key span { display: inline-flex; align-items: center; gap: 6px; }
.wf-pyr-rows { display: flex; flex-direction: column; gap: 6px; }
.wf-pyr-row { display: grid; grid-template-columns: 2.8em minmax(0, 1fr) 6.2em minmax(0, 1fr) 2.4em; align-items: center; gap: 6px; font-size: 12.5px; border-radius: 4px; }
.wf-pyr-row:hover { background: var(--panel-2); }
.wf-pl { text-align: center; color: var(--ink-2); white-space: nowrap; }
.wf-pv { color: var(--ink-2); } .wf-pyr-row .wf-pv:first-child { text-align: right; }
.wf-pb { display: flex; height: 18px; } .wf-pb.m { justify-content: flex-end; }
.wf-pb i { display: block; min-width: 2px; height: 100%; }
.wf-pb.m i { background: var(--dv-1); border-radius: 4px 1px 1px 4px; } .wf-pb.f i { background: var(--dv-2); border-radius: 1px 4px 4px 1px; }

/* nationalities: 100 squares, and the list */
.wf-nat-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s5); align-items: start; }
.wf-waffle { display: grid; grid-template-columns: repeat(10, 16px); grid-auto-rows: 16px; gap: 3px; }
.wf-waffle i { border-radius: 4px; transition: transform .12s; }
.wf-waffle i:hover { transform: scale(1.25); box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--ink); }
.wf-nat-list { margin: 0; padding: 0; list-style: none; font-size: 13px; }
.wf-nat-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 3em; align-items: center; gap: 8px; padding: 4px 0; border-top: 1px solid var(--line-2); }
.wf-nat-list li:first-child { border-top: 0; }
.wf-nat-list b { font-weight: 650; color: var(--ink); } .wf-nat-list .n:last-child { text-align: right; }

/* columns: service, grades, pay bands */
.wf-cols { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 6px; height: 180px; padding-top: 4px; }
.wf-c { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; padding-bottom: 20px; border-radius: 6px; }
.wf-c:hover { background: var(--panel-2); }
.wf-c > b { font-size: 11.5px; font-weight: 650; color: var(--ink-2); white-space: nowrap; }
.wf-c > i { display: block; width: min(100%, 38px); min-height: 2px; border-radius: 5px 5px 1px 1px; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 80%, var(--panel)), var(--accent)); }
.wf-cl { position: absolute; bottom: 0; left: 0; right: 0; font-size: 11px; color: var(--muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-grades .wf-cols { gap: 3px; }
.wf-c.cut > i { position: relative; } /* a column cut short: a slanted break across it */
.wf-c.cut > i::after { content: ""; position: absolute; left: -3px; right: -3px; top: 26%; height: 7px; background: var(--panel); transform: skewY(-14deg); }

/* documents: a heat table, the nearer the warmer */
.wf-heat { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; font-size: 13px; margin: 0 -3px; }
.wf-heat thead th { font-size: 11.5px; font-weight: 500; color: var(--muted); text-align: center; padding: 0 0 4px; }
.wf-heat thead th:first-child, .wf-heat tbody th { text-align: left; width: 30%; }
.wf-heat tbody th { font-weight: 500; color: var(--ink); padding: 0 var(--s2) 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-h { height: 38px; text-align: center; border-radius: 7px; --c: var(--line); background: color-mix(in srgb, var(--c) calc(var(--a) * 100%), var(--panel)); }
.wf-h.bad { --c: var(--bad); } .wf-h.warn { --c: var(--warn); } .wf-h.soon { --c: color-mix(in srgb, var(--warn) 60%, var(--panel)); } .wf-h.later { --c: color-mix(in srgb, var(--info) 45%, var(--panel)); }
.wf-h.none { background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.wf-h.zero { background: var(--panel-2); }
.wf-h b { font-weight: 650; color: var(--ink); }
.wf-h.zero b { color: var(--muted); font-weight: 400; }
.wf-h:hover { box-shadow: inset 0 0 0 2px var(--ink); }

/* departments, sites, pay: bars (one series each: the accent) */
.wf-row { padding: 5px 0; }
.wf-row .dv-bar > i { background: var(--accent); }
.wf-row .dv-name .muted { font-size: 12px; }
.wf-pay-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s4) var(--s7); }
.wf-pay .wf-row { grid-template-columns: minmax(0, 9em) minmax(0, 1fr) 6.5em; }
.wf-paybar { background: linear-gradient(90deg, color-mix(in srgb, var(--dv-7) 75%, var(--panel)), var(--dv-7)) !important; }
.wf-aed { font-size: 12.5px; }
.wf-parts { height: 16px; margin-bottom: var(--s3); }
.wf-pay .wf-cols { height: 150px; }

/* the companies side by side */
.wf-scroll { overflow-x: auto; margin: 0 calc(-1 * var(--s2)); padding: 0 var(--s2); }
.wf-ctable { min-width: 980px; }
.wf-ctable td { white-space: nowrap; }
.wf-ctable :is(th, td):first-child { width: 13%; }
.wf-ctable td.wf-bad { color: var(--bad); font-weight: 650; } .wf-ctable td.wf-warn { color: var(--warn); font-weight: 650; }
.wf-ctable tbody tr:hover { background: var(--panel-2); }

/* drawing in, once per company */
.wf-intro :is(.wf-co-bar, .wf-pb.m i, .wf-pb.f i, .wf-split, .dv-bar > i, .dv-share) { animation: dv-grow .9s cubic-bezier(.2, .8, .2, 1) both; transform-origin: left; }
.wf-intro .wf-pb.m i { transform-origin: right; }
.wf-intro .wf-c > i, .wf-intro .wf-fb i { animation: wf-rise .8s cubic-bezier(.2, .8, .2, 1) both; transform-origin: bottom; }
.wf-intro .wf-fb .l { transform-origin: top; }
@keyframes wf-rise { from { transform: scaleY(0); } }
.wf-intro .wf-area svg { animation: dv-sweep 1.2s cubic-bezier(.2, .8, .2, 1) both; }
.wf-intro .wf-donut svg { animation: dv-turn .9s cubic-bezier(.2, .8, .2, 1) both; }
.wf-intro .wf-waffle i { animation: dv-fade .6s ease-out both; }
.wf-intro .wf-waffle i:nth-child(10n+1) { animation-delay: .02s; } .wf-intro .wf-waffle i:nth-child(10n+4) { animation-delay: .08s; } .wf-intro .wf-waffle i:nth-child(10n+7) { animation-delay: .14s; } .wf-intro .wf-waffle i:nth-child(10n) { animation-delay: .2s; }
.wf-intro .wf-kpi { animation: wf-up .6s cubic-bezier(.2, .8, .2, 1) both; }
.wf-intro .wf-kpi:nth-child(2) { animation-delay: .04s; } .wf-intro .wf-kpi:nth-child(3) { animation-delay: .08s; } .wf-intro .wf-kpi:nth-child(4) { animation-delay: .12s; }
.wf-intro .wf-kpi:nth-child(5) { animation-delay: .16s; } .wf-intro .wf-kpi:nth-child(6) { animation-delay: .2s; } .wf-intro .wf-kpi:nth-child(7) { animation-delay: .24s; } .wf-intro .wf-kpi:nth-child(8) { animation-delay: .28s; }
@keyframes wf-up { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .wf-intro *, .wf-spin { animation: none !important; } .wf-kpi, .wf-waffle i { transition: none; } }

@media (max-width: 1280px) { .wf-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) {
  .wf-hero-main { grid-template-columns: minmax(0, 1fr); }
  .wf-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .wf-grid > :is(.wf-trend, .wf-cos, .wf-nat, .wf-docs, .wf-mix, .wf-grades) { grid-column: 1 / -1; }
  .wf-grid > :is(.wf-pyr, .wf-ten, .wf-deps, .wf-sites) { grid-column: span 6; }
}
@media (max-width: 800px) {
  .wf-grid > .card { grid-column: 1 / -1 !important; }
  .wf-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wf-insights ul { columns: 1; }
  .wf-pay-row { grid-template-columns: minmax(0, 1fr); }
  .wf-hero { padding: var(--s5) var(--s4) var(--s4); }
  .wf-big b { font-size: 60px; }
}
@media (max-width: 640px) {
  .wf-nat-row { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .wf-nat-list { width: 100%; }
  .wf-waffle { grid-template-columns: repeat(10, 14px); grid-auto-rows: 14px; }
  .wf-xax span:nth-child(3n+2), .wf-xax span:nth-child(3n) { visibility: hidden; }
  .wf-co { grid-template-columns: minmax(0, 7em) minmax(0, 1fr) 4em; }
  .wf-heat { font-size: 12px; } .wf-heat thead th { font-size: 10.5px; }
  .wf-pyr-row { grid-template-columns: 2.4em minmax(0, 1fr) 5em minmax(0, 1fr) 2em; }
  .wf-kpi { padding: var(--s3); } .wf-kpi b { font-size: 21px; } .wf-kpi > small { white-space: normal; }
  .wf-heat tbody th { width: 26%; font-size: 12px; } .wf-h { height: 34px; }
}

/* the Dashboard's line for management (public/workforce.js wfMgmt): six figures, one row on a wide screen, three across on a laptop, two on a phone */
.mg-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s3); }
.mg-kpi { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; padding: var(--s4) var(--s4) 14px; text-align: left;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); color: var(--ink-2); font: inherit; cursor: default; }
button.mg-kpi { cursor: pointer; }
.mg-kpi .mg-l { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mg-kpi b { font-size: 30px; line-height: 1.15; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mg-kpi small { font-size: 12.5px; line-height: 1.3; }
.mg-kpi.up small { color: var(--ok); } .mg-kpi.down small { color: var(--bad); }
.mg-kpi.warn b { color: var(--warn); } .mg-kpi.bad b { color: var(--bad); }
@media (max-width: 1279px) { .mg-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .mg-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mg-kpi b { font-size: 22px; } }

/* ---- an employee's attendance on their page (app.js attCardHtml, 15 Nov 2026): a payroll month day by day ---- */
/* attendance colours (19 Nov 2026): present, leave and absent checked for colour-blind separation (dataviz validator, light and dark);
   rest days and holidays are greys told apart by their letter (W, H), no record a pale grey with a dash */
.att-card, #atPage { --att-p: #0f8f6f; --att-a: #e06a12; --att-l: #6b63c9; --att-w: #8a93a3; --att-h: #6f7a8c; --att-n: #c9ced6; }
:root[data-theme="dark"] .att-card, :root[data-theme="dark"] #atPage { --att-p: #23b08a; --att-a: #f08a3c; --att-l: #8f88e6; --att-w: #6f7889; --att-h: #8a95a8; --att-n: #3a4358; }
.att-card .card-head { gap: var(--s3); }
.att-card .card-head > :last-child { margin-left: auto; }
.att-month select { min-height: 32px; font: inherit; font-size: 13px; padding: 0 var(--s2); border: 1px solid var(--field-line); border-radius: var(--r-sm); background: var(--panel); color: var(--ink); max-width: 100%; }
.att-card .card-head { flex-wrap: wrap; }
.att-range { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s2) var(--s3); margin: 0 0 var(--s4); padding: var(--s3); border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--panel-2); }
.att-range label { display: grid; gap: 2px; font-size: 12px; color: var(--muted); }
.att-range input[type="date"] { min-height: 32px; font: inherit; font-size: 13px; padding: 0 var(--s2); border: 1px solid var(--field-line); border-radius: var(--r-sm); background: var(--panel); color: var(--ink); }
.att-range .muted { font-size: 12px; align-self: center; }
.att-err { margin: 0; font-size: 12.5px; color: var(--att-a); align-self: center; }
.att-card > .att-err { margin: 0 0 var(--s3); }
.att-day i { white-space: nowrap; }
.att-figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: var(--s2); margin-bottom: var(--s4); }
.att-fig { display: flex; flex-direction: column; padding: var(--s2) var(--s3); border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--panel-2); }
.att-fig b { font-size: 20px; line-height: 1.2; font-weight: 700; color: var(--ink); }
.att-fig span { font-size: 12px; color: var(--muted); }
.att-fig.att-p b { color: var(--att-p); } .att-fig.att-a b { color: var(--att-a); } .att-fig.att-l b { color: var(--att-l); } .att-fig.att-w b { color: var(--att-w); } .att-fig.att-n b { color: var(--muted); }
.att-week, .att-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.att-week span { font-size: 11px; color: var(--muted); text-align: center; padding-bottom: 2px; }
.att-day { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 46px; border-radius: 8px; border: 1px solid transparent;
  background: color-mix(in srgb, var(--c, var(--att-n)) 16%, var(--panel)); color: var(--ink); cursor: default; }
.att-day i { position: absolute; top: 3px; left: 6px; font-style: normal; font-size: 10.5px; color: var(--muted); }
.att-day b { font-size: 14px; font-weight: 700; color: var(--c, var(--muted)); }
.att-day small { font-size: 10px; color: var(--ink-2); line-height: 1; }
.att-day.att-p { --c: var(--att-p); } .att-day.att-a { --c: var(--att-a); } .att-day.att-l { --c: var(--att-l); } .att-day.att-w { --c: var(--att-w); } .att-day.att-h { --c: var(--att-h); } .att-day.att-n { --c: var(--att-n); }
.att-day.att-f { background: transparent; border: 1px dashed var(--line); }
.att-day.att-pad { background: transparent; }
.att-day.att-unpaid { background-image: repeating-linear-gradient(135deg, transparent 0 5px, color-mix(in srgb, var(--att-l) 18%, transparent) 5px 7px); }
.att-day.att-open { border-color: var(--att-a); box-shadow: inset 0 0 0 1px var(--att-a); }
.att-day:hover { outline: 2px solid var(--c, var(--line)); outline-offset: 1px; }
.att-key { margin: var(--s3) 0 0; font-size: 12px; }
.att-sw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; background: var(--att-n); }
.att-sw.att-p { background: var(--att-p); } .att-sw.att-a { background: var(--att-a); } .att-sw.att-l { background: var(--att-l); } .att-sw.att-w { background: var(--att-w); } .att-sw.att-h { background: var(--att-h); }
.att-sw.att-open-sw { background: transparent; box-shadow: inset 0 0 0 2px var(--att-a); }
.att-card h4 { margin-top: var(--s4); }
.att-open-list li { font-size: 13.5px; }
.att-foot { margin: var(--s3) 0 0; font-size: 12.5px; }
@media (max-width: 560px) { .att-day { min-height: 38px; } .att-day small { display: none; } }

/* ---------- User activity (public/activity.js): the Admin's log counted, as Sarah's Activity tab ---------- */
#uaPage .ua-filters { display: flex; flex-wrap: wrap; align-items: end; gap: var(--s3); padding: var(--s4); margin: 0 0 var(--s4); }
#uaPage .ua-filters label { min-width: 150px; }
#uaPage .ua-filters select, #uaPage .ua-filters input { width: 100%; }
.ua-body { container-type: inline-size; display: grid; gap: var(--s4); margin-bottom: var(--s4); }
.ua-link { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; padding: var(--s4); }
.ua-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.ua-grid > .card { min-width: 0; margin: 0; }
.ua-grid > .ua-full { grid-column: 1 / -1; }
@container (max-width: 760px) { .ua-grid { grid-template-columns: minmax(0, 1fr); } }
.ua-legend { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--ink-2); }
.ua-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ua-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
/* day by day and by hour: columns on one baseline, rounded at the top, a 2px gap between segments */
.ua-days { position: relative; padding-left: 34px; }
.ua-ymax { position: absolute; left: 0; top: 0; font-size: 11.5px; color: var(--muted); }
.ua-cols, .ua-hours { display: grid; grid-template-columns: repeat(var(--n, 24), minmax(0, 1fr)); gap: 2px; align-items: end; height: 200px; border-bottom: 1px solid var(--line); }
.ua-hours { --n: 24; height: 140px; }
.ua-col { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; position: relative; outline: none; }
.ua-stack { flex: 1; display: flex; flex-direction: column-reverse; justify-content: flex-start; gap: 2px; min-height: 0; width: 100%; max-width: 44px; margin: 0 auto; }
.ua-stack i { display: block; min-height: 0; border-radius: 0; }
.ua-stack i:last-child { border-radius: 4px 4px 0 0; }
.ua-col:hover .ua-stack, .ua-col:focus-visible .ua-stack { filter: brightness(1.2); }
.ua-col:focus-visible { box-shadow: 0 0 0 2px var(--accent); border-radius: 4px; }
.ua-x { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 4px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.ua-cols { margin-bottom: 22px; }
@container (max-width: 600px) { .ua-x.odd { display: none; } }
.ua-hours { margin-bottom: 20px; }
.ua-say { margin: 4px 0 var(--s3); font-size: 13px; }
.ua-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.ua-week > div { display: grid; justify-items: center; gap: 4px; }
.ua-week small { font-size: 11.5px; color: var(--muted); }
.ua-track.v { display: flex; align-items: flex-end; width: 100%; height: 44px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.ua-track.v i { display: block; width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; }
/* what and who: one row each, a bar on a quiet track, the number in ink */
.ua-bars, .ua-people { display: grid; gap: 6px; }
.ua-bar, .ua-person { display: grid; grid-template-columns: minmax(120px, 34%) minmax(0, 1fr) 52px; align-items: center; gap: var(--s3); width: 100%; padding: 6px 8px;
  background: none; border: 1px solid transparent; border-radius: var(--r-md); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.ua-bar:hover, .ua-person:hover, .ua-bar:focus-visible, .ua-person:focus-visible { background: var(--panel-2); border-color: var(--line); }
.ua-bar.on { border-color: var(--accent); background: var(--accent-soft); }
.ua-k { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ua-who { display: grid; min-width: 0; }
.ua-who b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ua-who small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ua-track { display: flex; gap: 2px; height: 12px; min-width: 0; }
.ua-track i { display: block; height: 100%; min-width: 2px; }
.ua-track i:first-child { border-radius: 1px 0 0 1px; } .ua-track i:last-child { border-radius: 0 4px 4px 0; }
.ua-bar b.n, .ua-person b.n { text-align: right; font-size: 14px; }
.ua-more { margin-top: var(--s2); }
.ua-quiet { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px var(--s4); }
.ua-quiet li { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.ua-quiet li > span { grid-column: 1 / -1; font-size: 12.5px; }
.ua-quiet .warn { color: var(--warn); }
.ua-tip { position: fixed; z-index: 60; max-width: 320px; padding: 6px 10px; border-radius: var(--r-sm); background: var(--ink); color: var(--panel); font-size: 12.5px; line-height: 1.35; pointer-events: none; box-shadow: var(--shadow-2); }
#userLogBox .ulog-head input { max-width: 320px; }

/* ---------- Orbit value (public/orbitvalue.js): cost, people, time saved and the KPIs ---------- */
#ovPage { container-type: inline-size; }
.ov-toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 var(--s4); }
.ov-toc a { padding: 5px 14px; border-radius: 999px; font-size: 13px; color: var(--ink-2); text-decoration: none; box-shadow: 0 0 0 1px var(--line) inset; background: var(--panel); }
.ov-toc a:hover { color: var(--ink); background: var(--hover-bg, var(--panel-2)); }
.ov-h { display: flex; align-items: center; gap: 10px; margin: 40px 0 var(--s4); font-size: 19px; font-weight: 650; scroll-margin-top: 16px; }
.ov-hn { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; font-size: 14px; font-weight: 700; color: var(--accent); background: var(--accent-soft); }
.ov-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s4); align-items: stretch; }
.ov-grid > .card { margin: 0; min-width: 0; display: flex; flex-direction: column; }
.ov-span12 { grid-column: span 12; } .ov-span6 { grid-column: span 6; }
@container (max-width: 900px) { .ov-span6 { grid-column: span 12; } }
.ov-grid .card-head { margin-bottom: var(--s4); }
.ov-grid .card-head h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.ov-sub { margin: var(--s5, 24px) 0 var(--s2); font-size: 14px; font-weight: 600; } .ov-sub .muted { font-weight: 400; font-size: 12.5px; margin-left: 6px; }
.ov-tiles .mg-kpi { padding-bottom: 32px; }
.ov-tiles .mg-kpi .ov-tag { position: absolute; right: 10px; bottom: 9px; }
.ov-tag { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; vertical-align: middle; white-space: nowrap; }
.ov-tag.m { color: var(--dv-3); background: color-mix(in srgb, var(--dv-3) 14%, transparent); }
.ov-tag.e { color: var(--dv-4); background: color-mix(in srgb, var(--dv-4) 14%, transparent); }
.ov-says { margin: var(--s4) 0 0; }
.ov-says ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; line-height: 1.55; }
.ov-sw { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: 0; }
.ov-note { font-size: 12.5px; margin: var(--s4) 0 0; line-height: 1.5; }
.ov-grid .card > .ov-note:last-child { margin-top: auto; padding-top: var(--s4); }
.ov-scroll { overflow-x: auto; }
/* figures */
.ov-figs { display: flex; flex-wrap: wrap; gap: var(--s3) 40px; margin: 0 0 var(--s4); }
.ov-fig { display: flex; flex-direction: column; gap: 2px; }
.ov-fig b { font-size: 24px; line-height: 1.15; font-weight: 700; color: var(--ink); }
.ov-fig span { font-size: 12.5px; color: var(--muted); }
.ov-figs-big .ov-fig b { font-size: 26px; }
.ov-fig b.ov-good { color: var(--ok); } .ov-fig b.ov-bad { color: var(--bad); }
.ov-legend2 { display: inline-flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--ink-2); }
.ov-legend2 i, .ov-vskey i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.ov-keys { list-style: none; margin: var(--s3) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 13px; }
.ov-keys li { display: flex; align-items: center; gap: 8px; } .ov-keys li .ov-sw { margin: 0; }
.ov-keys b { font-weight: 600; } .ov-keys .muted { font-size: 12px; }
.ov-keys-col { flex-direction: column; gap: 10px; margin: 0; }
.ov-keys-col li { display: grid; grid-template-columns: 10px 1fr auto 44px; gap: 10px; } .ov-keys-col .muted { text-align: right; }
/* tracks and bars */
.ov-track { position: relative; display: block; height: 14px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.ov-track i { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.ov-track.ov-multi { display: flex; gap: 2px; background: var(--line-2); } .ov-track.ov-multi i { border-radius: 0; } .ov-track.ov-multi i:last-child { border-radius: 0 4px 4px 0; }
.ov-hbars { display: grid; gap: 12px; }
.ov-hbar { display: grid; grid-template-columns: minmax(120px, 28%) minmax(0, 1fr) 96px; gap: 14px; align-items: center; font-size: 13.5px; border-radius: 6px; outline-offset: 4px; }
.ov-hl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-hv { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.ov-hv b { font-size: 13.5px; font-weight: 600; } .ov-hv small { font-size: 11.5px; color: var(--muted); }
.ov-split { display: flex; height: 14px; gap: 2px; border-radius: 4px; overflow: hidden; }
/* running cost */
.ov-runwrap { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: center; }
.ov-runlist { display: grid; gap: 4px; }
.ov-runrow { display: grid; grid-template-columns: minmax(200px, 38%) minmax(0, 1fr) 96px 44px; gap: 14px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.ov-runl { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-width: 0; } .ov-runl .ov-sw { margin: 0; }
.ov-runl small { flex-basis: 100%; padding-left: 18px; color: var(--muted); font-size: 12px; }
.ov-runrow > b.n, .ov-runrow > .n { text-align: right; } .ov-runrow > .muted { font-size: 12px; }
.ov-runtotal { border-bottom: 0; border-top: 1px solid var(--line); font-size: 14.5px; } .ov-runtotal .ov-runl, .ov-runmuted .ov-runl { padding-left: 18px; }
.ov-runmuted { border-bottom: 0; color: var(--ink-2); }
.ov-donut { flex: none; margin: 0 auto; }
.ov-donut svg { display: block; overflow: visible; }
.ov-donut circle[data-tip]:hover { filter: brightness(1.18); }
.ov-ring0 { stroke: var(--line); }
.ov-dbig { font-weight: 700; fill: var(--ink); }
.ov-donutwrap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 32px; align-items: center; }
/* svg charts */
.ov-chart { width: 100%; position: relative; }
.ov-svg { display: block; overflow: visible; }
.ov-gridl { stroke: var(--line-2); stroke-width: 1; }
.ov-ax { font-size: 12px; fill: var(--muted); }
.ov-axs { fill: var(--ok); font-weight: 600; }
.ov-axv { font-size: 13px; font-weight: 600; fill: var(--ink); }
.ov-axl { font-size: 12.5px; font-weight: 600; fill: var(--ink-2); }
.ov-axn { font-size: 11px; font-weight: 600; fill: var(--ink-2); }
.ov-hit { fill: transparent; } .ov-hit:hover { fill: color-mix(in srgb, var(--ink) 5%, transparent); }
.ov-wash { fill: color-mix(in srgb, var(--dv-3) 10%, transparent); }
.ov-mark { stroke: var(--ok); stroke-width: 1; }
.ov-conn { stroke: var(--muted); stroke-width: 1; opacity: .6; }
.ov-dot { stroke: var(--panel); stroke-width: 2; }
/* old way vs Orbit: one grid, every row on the same columns */
.ov-cmp { display: grid; }
.ov-cmprow { display: grid; grid-template-columns: minmax(170px, 20%) minmax(0, 1fr) minmax(0, 1fr) 120px; gap: 28px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--line-2); border-radius: 6px; outline-offset: 2px; }
.ov-cmp-role .ov-cmprow { grid-template-columns: minmax(170px, 20%) minmax(0, 1fr) 150px 190px; }
.ov-cmprow:not(.ov-cmphead):hover { background: var(--hover-bg, var(--panel-2)); }
.ov-cmphead { padding-top: 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.ov-cmphead .n { text-align: right; }
.ov-cmpl { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .ov-cmpl b { font-size: 14px; } .ov-cmpl small { font-size: 12px; color: var(--muted); }
.ov-pairbars { display: grid; grid-template-columns: minmax(0, 1fr) 72px; gap: 6px 10px; align-items: center; }
.ov-pairbars b { font-size: 12.5px; font-weight: 600; text-align: right; white-space: nowrap; }
.ov-cmp-role .ov-pairbars { grid-template-columns: minmax(0, 1fr) 80px; }
.ov-back { display: flex; flex-direction: column; align-items: flex-end; } .ov-back b { font-size: 14px; color: var(--ink); white-space: nowrap; } .ov-back small { font-size: 12px; color: var(--ok); }
.ov-cmp-role .ov-back small { color: var(--muted); }
.ov-cmptotal { border-bottom: 0; border-top: 1px solid var(--line); }
.ov-cmpsum { font-size: 13.5px; color: var(--muted); text-align: right; } .ov-cmpsum b { color: var(--ink); }
/* automation */
.ov-autotop { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); margin-bottom: var(--s5, 24px); }
.ov-autotop > div { display: flex; flex-direction: column; gap: 2px; }
.ov-autonum { display: flex; align-items: baseline; gap: 6px; } .ov-autonum .ov-sw { margin: 0; align-self: center; }
.ov-autotop b { font-size: 28px; line-height: 1.1; } .ov-autonum small { font-size: 13px; color: var(--muted); }
.ov-autotop > div > span:last-child { font-size: 12.5px; color: var(--ink-2); }
.ov-stacks { display: grid; gap: 12px; }
.ov-stackrow { display: grid; grid-template-columns: minmax(140px, 34%) minmax(0, 1fr) 48px; gap: 14px; align-items: center; font-size: 13.5px; }
.ov-stack { display: flex; gap: 2px; height: 20px; border-radius: 4px; overflow: hidden; }
.ov-stack i { display: flex; align-items: center; justify-content: center; min-width: 0; }
.ov-stack em { font-style: normal; font-size: 11px; font-weight: 700; color: #fff; }
.ov-stackrow b { text-align: right; font-size: 13.5px; }
/* tables */
.ov-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ov-table :is(th, td) { padding: 9px 8px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
.ov-table thead th { font-size: 12px; font-weight: 600; color: var(--muted); vertical-align: bottom; line-height: 1.25; }
.ov-table tbody th { font-weight: 500; }
.ov-table th small { display: block; font-weight: 400; font-size: 12px; margin-top: 2px; }
.ov-table .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ov-table .ov-total :is(th, td) { font-weight: 700; border-top: 1px solid var(--line); border-bottom: 0; }
.ov-table .dv-sw { margin-right: 6px; vertical-align: -1px; }
.ov-proc { border-top: 1px solid var(--line-2); }
.ov-proc summary { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 12px 2px; cursor: pointer; }
.ov-proc summary .muted { font-size: 12.5px; }
.ov-steps { font-size: 12.5px; min-width: 820px; }
.ov-steps tbody th { max-width: 300px; }
.ov-n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-right: 4px; border-radius: 6px; font-size: 11px; font-weight: 700; background: var(--panel-2); color: var(--ink-2); }
.ov-who { display: inline-flex; align-items: center; gap: 4px; margin: 1px 6px 1px 0; white-space: nowrap; }
.ov-who i { width: 8px; height: 8px; border-radius: 50%; }
.ov-kind { display: block; margin-top: 3px; font-size: 11px; font-weight: 600; color: var(--c); }
.ov-need { min-width: 700px; }
.ov-need tbody th { min-width: 230px; }
.ov-need thead th { white-space: normal; }
.ov-vs { width: 22%; min-width: 120px; }
.ov-vs .ov-track { height: 7px; margin: 3px 0; }
.ov-vskey { font-weight: 500; }
/* KPIs */
.ov-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s3); margin-bottom: var(--s4); }
@container (max-width: 1100px) { .ov-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@container (max-width: 820px) { .ov-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ov-kpi { display: flex; flex-direction: column; gap: 3px; padding: var(--s4); border-radius: var(--r, 12px); background: var(--panel); box-shadow: 0 0 0 1px var(--line) inset; min-width: 0; }
.ov-kpi b { font-size: 26px; line-height: 1.15; font-weight: 700; }
.ov-kpi b small { font-size: 15px; font-weight: 600; margin-left: 1px; }
.ov-kpi span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.ov-kpi small { font-size: 12px; color: var(--muted); line-height: 1.35; }
.ov-kpi.ok b { color: var(--ok); } .ov-kpi.warn b { color: var(--warn); } .ov-kpi.bad b { color: var(--bad); }
/* the assumptions */
.ov-form fieldset { border: 0; padding: 0; margin: var(--s4) 0 0; }
.ov-form legend { font-weight: 650; font-size: 14px; margin-bottom: var(--s2); }
.ov-form legend small { font-weight: 400; font-size: 12px; margin-left: 6px; }
.ov-fields input::placeholder { color: var(--muted); font-style: italic; }
.ov-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s3); }
.ov-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 500; }
.ov-fields small { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.ov-acts { display: flex; align-items: center; gap: var(--s3); margin-top: var(--s4); flex-wrap: wrap; }
.ov-foot { font-size: 12.5px; margin-top: var(--s5, 24px); }
/* the four charts (16 Nov: "less writing and more charts") */
.ov-ct { display: flex; align-items: center; gap: 10px; margin: 0 0 var(--s4); font-size: 17px; font-weight: 650; }
#ovBody > .ov-grid { margin-top: var(--s2); }
.ov-costwrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: center; }
.ov-svcs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: 13.5px; }
.ov-svcs li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 26px; gap: 10px; align-items: center; } .ov-svcs .ov-sw { margin: 0; }
.ov-svcs b { font-weight: 600; } .ov-svcs small { font-size: 11px; color: var(--muted); }
.ov-svcs .ov-miss span, .ov-svcs .ov-miss b { color: var(--muted); font-weight: 400; } .ov-svcs .ov-miss .ov-sw { opacity: .35; }
.ov-acc { display: grid; gap: 18px; margin-top: var(--s4); }
#ovPeople .ov-legend2, #ovTime .ov-legend2 { margin-bottom: var(--s2); }
.ov-accrow { display: grid; grid-template-columns: minmax(110px, 30%) minmax(0, 1fr); gap: 14px; align-items: center; font-size: 13.5px; border-radius: 6px; outline-offset: 4px; }
.ov-acc3 { display: grid; grid-template-columns: minmax(0, 1fr) 64px; gap: 4px 10px; align-items: center; }
.ov-acc3 b { font-size: 12.5px; font-weight: 600; text-align: right; }
.ov-track.ov-thin { height: 9px; }
.ov-more { margin-top: var(--s5, 24px); } .ov-more summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.ov-more[open] summary { margin-bottom: var(--s2); }
/* narrow: everything in one column, rows stack their parts */
@container (max-width: 900px) {
  .ov-runwrap, .ov-donutwrap, .ov-costwrap { grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
  .ov-accrow { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .ov-runrow { grid-template-columns: minmax(0, 1fr) 90px 40px; } .ov-runrow > .ov-track { grid-column: 1 / -1; grid-row: 2; }
  .ov-cmprow, .ov-cmp-role .ov-cmprow { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; }
  .ov-cmprow > :nth-child(2), .ov-cmprow > :nth-child(3) { grid-column: 1 / -1; }
  .ov-cmp-role .ov-cmprow > :nth-child(3) { grid-column: auto; }
  .ov-cmphead { display: none; }
  .ov-cmprow [data-h]::before { content: attr(data-h); display: block; margin-bottom: 6px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
  .ov-cmp:not(.ov-cmp-role) .ov-cmprow > :nth-child(4) { grid-row: 1; grid-column: 2; }
  .ov-cmp-role .ov-cmprow > :nth-child(3) { grid-row: 1; grid-column: 2; }
  .ov-cmp-role .ov-cmprow > :nth-child(4) { grid-column: 1 / -1; align-items: flex-start; flex-direction: row; gap: 8px; }
  .ov-hbar { grid-template-columns: minmax(0, 1fr) 80px; gap: 6px 10px; } .ov-hbar .ov-track { grid-column: 1 / -1; grid-row: 2; }
  .ov-stackrow { grid-template-columns: minmax(0, 1fr) 44px; } .ov-stackrow > span:first-child { grid-column: 1 / -1; } .ov-stackrow .ov-stack { grid-column: 1; }
  .ov-autotop b { font-size: 22px; }
}
@media print {
  .side, header, .ov-toc, .head-actions, .ov-form .ov-acts { display: none !important; }
  #view-value { display: block !important; } #ovPage { overflow: visible !important; height: auto !important; }
  .ov-h { break-after: avoid; } .card { break-inside: avoid; }
}
.ov-accrow .ov-hl { white-space: normal; }

.aihub-logo{display:block;width:148px;height:auto;max-width:100%;flex:none;object-fit:contain}
:root[data-theme="dark"] .aihub-logo{filter:invert(1) hue-rotate(180deg)}
@media(max-width:800px){.aihub-logo{width:130px}}
@media(max-width:420px){.aihub-logo{width:105px}}
.top .brand{display:flex;align-items:center;gap:14px}
@media(max-width:420px){.top .brand{gap:8px}.top .brand .title{font-size:19px}}

/* Match AI HUB lettering to Orbit's wordmark. */
.top .brand .aihub-logo{width:84px;transform:translateY(2px)}
.top .brand{gap:10px}
@media(max-width:900px){.top .brand .aihub-logo{width:72px}}

/* the attendance card, clickable (19 Nov 2026): a figure lists its days and marks them, a day shows its details */
.att-card button.att-fig { font: inherit; text-align: left; cursor: pointer; color: inherit; }
.att-card button.att-fig:hover, .att-card button.att-fig:focus-visible { border-color: var(--accent); }
.att-card button.att-fig.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel-2)); }
.att-hint { font-size: 12px; margin: calc(-1 * var(--s2)) 0 var(--s3); }
.att-card button.att-day { font: inherit; padding: 0; cursor: pointer; }
.att-card button.att-day:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.att-day.att-dim { opacity: .28; }
.att-day.att-hl { box-shadow: 0 0 0 2px var(--c, var(--accent)); }
.att-day.att-on { outline: 2px solid var(--accent); outline-offset: 2px; }
.att-detail:empty { display: none; }
.att-detail-in { margin-top: var(--s4); padding: var(--s3) var(--s4); border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--panel-2); }
.att-detail-in .card-head { margin-bottom: var(--s2); }
.att-detail-in h4 { margin: 0; display: flex; align-items: center; gap: 8px; }
.att-dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--s2) var(--s4); margin: 0; }
.att-dl div { min-width: 0; }
.att-dl dt { font-size: 12px; color: var(--muted); }
.att-dl dd { margin: 2px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.att-daylist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 320px; overflow-y: auto; }
.att-daylist li { display: grid; grid-template-columns: minmax(110px, auto) minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: var(--s3); align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
@media (max-width: 640px) { .att-daylist li { grid-template-columns: 1fr 1fr; } }
.att-tag { font-size: 12px; color: var(--att-a); }
button.linkish { font: inherit; padding: 0; border: 0; background: none; color: var(--accent); cursor: pointer; text-align: left; }
button.linkish:hover { text-decoration: underline; }
/* the Attendance page (public/attendance.js, 19 Nov 2026) */
#atPage .at-filters { display: flex; flex-wrap: wrap; align-items: end; gap: var(--s3); padding: var(--s4); margin: 0 0 var(--s4); }
#atPage .at-filters label { min-width: 150px; display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
#atPage .at-filters .at-search { flex: 1 1 220px; }
#atPage .at-filters select, #atPage .at-filters input { width: 100%; min-height: 34px; font: inherit; font-size: 13.5px; padding: 0 var(--s2); border: 1px solid var(--field-line); border-radius: var(--r-sm); background: var(--panel); color: var(--ink); }
#atPage .at-tiles { margin-bottom: var(--s4); }
#atPage .mg-kpi.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
#atPage .at-col { border: 0; padding: 0; background: none; font: inherit; cursor: pointer; }
#atPage .at-col-off .ua-stack { opacity: .45; }
#atPage .at-note { font-size: 12.5px; margin: var(--s3) 0 0; }
#atPage .ua-days { margin-bottom: 22px; }
.at-table th .at-sort { font: inherit; font-weight: 600; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; white-space: nowrap; }
.at-table th.n, .at-table td.n { text-align: right; white-space: nowrap; }
.at-table td.at-warn { color: var(--att-a); font-weight: 600; }
.at-table td small { font-size: 11.5px; }
.at-rate { display: inline-block; width: 46px; height: 6px; margin-right: 6px; vertical-align: middle; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.at-rate i { display: block; height: 100%; background: var(--att-p); border-radius: 3px; }
@media (max-width: 640px) { #atPage .at-filters label { min-width: 0; flex: 1 1 140px; } }

/* ---- a person's page (app.js profPageHtml, 19 Nov 2026, from the user's picture): a header card, pill tabs, then the Overview:
   IDs and expiries beside the Record, tiles, HR actions, the attendance period at a glance ---- */
.prof-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s2) var(--s5); margin: 0 0 var(--s4); padding: var(--s5) var(--s6);
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 7%, var(--panel)), var(--panel) 60%); }
.person-mark.xl { width: 88px; height: 88px; font-size: 28px; box-shadow: 0 0 0 3px var(--panel), 0 0 0 4px var(--line); }
.person-mark.xl img { width: 100%; height: 100%; object-fit: cover; }
.prof-who { min-width: 0; display: grid; gap: 4px; }
.page .prof-hero h2 { margin: 0; font-size: 28px; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; overflow-wrap: anywhere; }
.prof-pos { margin: 0; font-size: 17px; color: var(--ink-2); }
.prof-status { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; font-size: 14px; }
.prof-status .st { font-size: 14px; }
.prof-sep { margin: 0 10px; color: var(--muted); }
.prof-who .person-where { font-size: 13px; color: var(--muted); }
.prof-acts { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); justify-content: flex-end; }
.prof-acts .btn { min-height: 40px; padding: 0 18px; font-size: 14.5px; }
.prof-tabs { display: flex; gap: var(--s2); margin: 0 0 var(--s4); padding: 0 0 var(--s3); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.prof-tabs::-webkit-scrollbar { display: none; }
.prof-tabs button { flex: none; min-height: 38px; padding: 0 18px; border: 0; border-radius: var(--r-md); background: none; color: var(--ink-2); font: inherit; font-size: 14.5px; font-weight: 500; cursor: pointer; }
.prof-tabs button:hover { color: var(--ink); background: var(--line-2); }
.prof-tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.prof-tabs button:focus-visible { outline-offset: 2px; }
#profPanel > #personAccess .access-card, #profPanel > div > .access-card { margin-bottom: var(--s4); }
.prof-h { margin: 0 0 var(--s3); font-size: 15px; font-weight: 600; }
.prof-procs { margin: 0 0 var(--s4); }
.prof-grid { display: grid; grid-template-columns: minmax(0, 1.95fr) minmax(300px, 1fr); gap: var(--s4); align-items: start; }
.prof-grid.single { grid-template-columns: minmax(0, 1fr); }
.prof-col { display: grid; gap: var(--s4); min-width: 0; align-content: start; }
.prof-col > .card, .prof-col > div > .card { margin: 0; }
.prof-col .card-head h3, .prof-attmini .card-head h3 { font-size: 18px; font-weight: 650; color: var(--accent); }
.prof-col .rec-card .kv-list { grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
.prof-col .rec-card .kv-list > div { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: var(--s3); align-items: baseline; }
.prof-col .rec-card dt { font-size: 13.5px; } .prof-col .rec-card dd { font-size: 14px; font-weight: 600; }
/* IDs and expiries */
.prof-table-wrap { overflow-x: auto; margin: 0 calc(-1 * var(--s2)); }
.prof-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.prof-table th, .prof-table td { padding: 10px var(--s2); text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.prof-table thead th { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.prof-table tbody th { font-weight: 400; }
.prof-table tbody th b { display: block; font-weight: 600; }
.prof-table tbody th .muted { display: block; font-size: 12px; overflow-wrap: anywhere; }
.prof-table td { white-space: nowrap; }
.prof-table .link { text-decoration: underline; text-underline-offset: 3px; }
/* the tiles */
.prof-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--s3); }
.card.prof-tile { display: flex; align-items: center; gap: var(--s3); width: 100%; margin: 0; padding: var(--s4); text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.card.prof-tile:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.prof-ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-2); }
.prof-ic svg { width: 21px; height: 21px; }
.pt-text { display: grid; min-width: 0; }
.pt-text b { font-size: 15px; font-weight: 600; }
.pt-text span { font-size: 13.5px; color: var(--ink-2); }
/* HR actions */
.prof-actions ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.prof-actions li button { display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 44px; padding: 6px var(--s3); border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--panel-2); color: var(--ink); font: inherit; font-size: 14.5px; font-weight: 500; text-align: left; cursor: pointer; }
.prof-actions li button:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 5%, var(--panel-2)); }
.prof-actions .prof-ic { width: 30px; height: 30px; border: 0; background: none; }
.prof-actions .pa-label { flex: 1; min-width: 0; }
.prof-actions .pa-note { font-size: 12.5px; color: var(--muted); }
.prof-actions .chev, .prof-tile .chev { flex: none; width: 16px; height: 16px; color: var(--muted); }
/* the attendance period at a glance */
.prof-attmini { --att-p: #0f8f6f; --att-a: #e06a12; --att-l: #6b63c9; --att-w: #8a93a3; --att-h: #6f7a8c; --att-n: #c9ced6; }
:root[data-theme="dark"] .prof-attmini { --att-p: #23b08a; --att-a: #f08a3c; --att-l: #8f88e6; --att-w: #6f7889; --att-h: #8a95a8; --att-n: #3a4358; }
.prof-attmini .card-head { margin-bottom: var(--s1); }
.pam-sum { display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s3); font-size: 14px; color: var(--ink-2); }
.pam-sum svg { width: 18px; height: 18px; }
.pam-week, .pam-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.pam-week span { font-size: 12.5px; color: var(--muted); text-align: center; padding-bottom: 4px; }
.pam-cal { width: 100%; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.pam-day { display: flex; justify-content: space-between; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 6px; font-size: 13px;
  background: color-mix(in srgb, var(--c, var(--att-n)) 14%, var(--panel-2)); }
.pam-day i { font-style: normal; color: var(--ink-2); }
.pam-day b { font-weight: 700; color: var(--c, var(--muted)); }
.pam-day.att-p { --c: var(--att-p); } .pam-day.att-a { --c: var(--att-a); } .pam-day.att-l { --c: var(--att-l); } .pam-day.att-w { --c: var(--att-w); } .pam-day.att-h { --c: var(--att-h); } .pam-day.att-n { --c: var(--att-n); }
.pam-day.att-f { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.pam-day.pad { background: transparent; }
.pam-cal:hover .pam-day:not(.pad) { filter: brightness(1.08); }
.prof-sheet { display: grid; gap: var(--s4); }
.prof-sheet > .card { margin: 0; }
@media (max-width: 1000px) { .prof-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .prof-hero { grid-template-columns: auto minmax(0, 1fr); padding: var(--s4); gap: var(--s3); }
  .person-mark.xl { width: 64px; height: 64px; font-size: 21px; }
  .page .prof-hero h2 { font-size: 21px; }
  .prof-pos { font-size: 15px; }
  .prof-acts { grid-column: 1 / -1; justify-content: flex-start; }
  .pam-day { padding: 0 5px; font-size: 11.5px; }
}
#profPanel .access-card > div:first-child { flex: 1 1 320px; }
#profPanel .access-card .access-acts { flex: none; margin-left: auto; }
#profPanel .access-card b { font-size: 16px; color: var(--accent); }
.prof-col .prof-card .kv-list { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.prof-sheet { padding-top: var(--s5); }

/* ---- a document's file in the dialog, with Download (19 Nov 2026) ---- */
dialog:has(.doc-viewer.has-file) { width: min(1040px, calc(100vw - 32px)); }
.doc-viewer .doc-acts { margin: 10px 0 12px; }
.doc-frame { display: block; width: 100%; height: min(72vh, 900px); height: min(72dvh, 900px); border: 1px solid var(--line); border-radius: var(--r-md, 10px); background: var(--bg, #f4f5f7); }
.doc-pic { display: flex; align-items: center; justify-content: center; overflow: auto; padding: 8px; }
.doc-pic img { max-width: 100%; max-height: 100%; object-fit: contain; }
.doc-nopreview { margin: 6px 0 0; }
.doc-text { margin-top: 12px; }
.doc-text .doc-body { max-height: 40vh; overflow: auto; margin-top: 8px; }
@media (max-width: 640px) { .doc-frame { height: 60vh; height: 60dvh; } }
