/* WorkShield app mockup - the whole design system.
   Phone first. Tablet from 768px, desktop from 1024px.
   Brand: concept 01 "The People's Shield" from Workshield Brand Identity.pdf, logo option 1.
   Deep Blue #005C91, Bright Cyan #00D5E1, Warm Coral #FF7A59. Manrope headings, Inter body.
   Coral fails contrast behind white text, so it only ever carries ink text or no text. */

:root {
  /* brand: concept 01 */
  --brand: #005C91;
  --brand-hover: #004A75;
  --brand-soft: #E6F1F8;
  --accent: #00D5E1;
  --coral: #FF7A59;
  --coral-hover: #F2663F;
  --coral-soft: #FFEDE7;
  --ink: #000F27;
  --body: #374151;
  --muted: #6B7280;

  /* surfaces */
  --bg: #F3F5F8;
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --line: #E3E7ED;
  --line-strong: #CBD2DC;

  /* status: reserved, always paired with an icon and a label */
  --good: #0B7A6B;  --good-bg: #E6F4F1;  --good-fill: #0E9480;
  --warn: #9A5B00;  --warn-bg: #FDF3E1;  --warn-fill: #E0930F;
  --bad: #B42318;   --bad-bg: #FDECEA;   --bad-fill: #D23B2F;
  --info: #005C91;  --info-bg: #E6F1F8;  --info-fill: #8DB4D1;

  /* employer identity (not status) */
  --emp-a: #3D4BA8; --emp-a-bg: #ECEEFA;
  --emp-b: #8A4F9E; --emp-b-bg: #F4ECF7;

  --f-head: 'Manrope', 'Inter', system-ui, sans-serif;
  --f-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --r: 16px;
  --r-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .07);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .14), 0 2px 6px rgba(16, 24, 40, .06);
  --tabs-h: 68px;
  --top-h: 60px;
  --side-w: 256px;
  --ai-w: 420px;
  color-scheme: light;
}
html.is-large { font-size: 112.5%; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--body);
  font: 400 1rem/1.5 var(--f-body);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom));
}
body.has-sheet { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img, svg { display: block; }
p { margin: 0; }
h1, h2, h3 { margin: 0; color: var(--ink); font-family: var(--f-head); text-wrap: balance; }
p { text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
/* A component's own display value must never beat the hidden attribute, or a closed
   panel stays on screen as an invisible layer that swallows clicks. */
[hidden] { display: none !important; }
.ws-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ws-skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; }
.ws-skip:focus { top: 12px; }
.ws-i { flex: none; }

/* ------------------------------------------------------------------ type --- */
.ws-display { font-size: 1.85rem; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
.ws-h1 { font-size: 1.5rem; line-height: 1.2; font-weight: 700; letter-spacing: -.015em; }
.ws-h2 { font-size: 1.125rem; line-height: 1.3; font-weight: 700; }
.ws-h3 { font-size: 1rem; line-height: 1.35; font-weight: 700; margin: 20px 0 10px; }
.ws-sub { color: var(--muted); margin-top: 6px; font-size: .95rem; }
.ws-lead { font-size: 1.05rem; line-height: 1.55; color: var(--body); margin: 12px 0; }
.ws-eyebrow { font: 700 .8rem/1.3 var(--f-body); letter-spacing: .06em; text-transform: uppercase; color: var(--brand); margin-bottom: 6px; }
.ws-fine { font-size: .85rem; color: var(--muted); margin-top: 12px; display: flex; gap: 6px; align-items: flex-start; }
.ws-fine .ws-i { margin-top: 3px; }
.ws-muted { color: var(--muted); }
.ws-good { color: var(--good); }
.ws-bad { color: var(--bad); }
.ws-amt { font-weight: 700; color: var(--ink); margin-left: 4px; }
.ws-link { display: inline-flex; align-items: center; gap: 2px; color: var(--brand); font-weight: 600; font-size: .95rem; }
.ws-link:hover { color: var(--brand-hover); text-decoration: underline; }

/* ---------------------------------------------------------------- shell --- */
.ws-app { min-height: 100vh; }
.ws-side { display: none; }
.ws-top {
  position: sticky; top: 0; z-index: 30; height: var(--top-h);
  display: flex; align-items: center; gap: 8px; padding: 0 16px 0 20px;
  background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.ws-top__spacer { flex: 1; }
.ws-logo { display: inline-flex; align-items: center; gap: 8px; color: var(--brand); }
.ws-logo__mark { width: 34px; height: auto; flex: none; }
.ws-logo__word { font: 800 1.2rem/1 var(--f-head); color: var(--brand); letter-spacing: -.01em; }
.ws-askbar { display: none; }
.ws-iconbtn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--body); position: relative; }
.ws-iconbtn:hover { background: var(--surface-2); color: var(--ink); }
.ws-bell__count {
  position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--coral); color: var(--ink); font: 700 .7rem/18px var(--f-body); text-align: center;
}
.ws-avatar {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--brand); color: #fff; font: 700 .85rem/1 var(--f-body); flex: none;
}
.ws-avatar--lg { width: 64px; height: 64px; font-size: 1.3rem; }
.ws-view { outline: none; }
.ws-page { max-width: 1120px; margin: 0 auto; padding: 20px 20px 96px; }

/* bottom tabs */
.ws-tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabs-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface); border-top: 1px solid var(--line);
}
.ws-tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); font: 600 .72rem/1 var(--f-body); position: relative;
}
.ws-tab.is-active { color: var(--brand); }
.ws-tab.is-active::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand); }

/* welcome hides the chrome */
body.is-welcome { padding-bottom: 0; }
body.is-welcome .ws-app { display: block; }
body.is-welcome .ws-tabs, body.is-welcome .ws-top, body.is-welcome .ws-side, body.is-welcome .ws-fab { display: none !important; }

/* ------------------------------------------------------------- buttons --- */
.ws-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent;
  font: 600 1rem/1.2 var(--f-body); white-space: nowrap; transition: background-color .15s, transform .15s;
}
.ws-btn:active { transform: translateY(1px); }
.ws-btn--primary { background: var(--brand); color: #fff; }
.ws-btn--primary:hover { background: var(--brand-hover); }
.ws-btn--secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.ws-btn--secondary:hover { background: var(--surface-2); }
.ws-btn--ghost { color: var(--muted); }
.ws-btn--ghost:hover { color: var(--ink); background: var(--surface-2); }
.ws-btn--quiet { color: var(--brand); }
.ws-btn--sm { min-height: 40px; padding: 0 14px; font-size: .9rem; border-radius: 10px; }
.ws-btn--block { display: flex; width: 100%; }
.ws-btn[disabled] { opacity: .6; pointer-events: none; }
.ws-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* --------------------------------------------------------------- chips --- */
.ws-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px 3px 7px; border-radius: 999px;
  font: 600 .78rem/1.35 var(--f-body); white-space: nowrap;
}
.ws-chip--good { background: var(--good-bg); color: var(--good); }
.ws-chip--warn { background: var(--warn-bg); color: var(--warn); }
.ws-chip--bad  { background: var(--bad-bg);  color: var(--bad); }
.ws-chip--info { background: var(--info-bg); color: var(--info); }
.ws-chip--plain { background: var(--surface-2); color: var(--body); border: 1px solid var(--line); padding-left: 9px; }
.ws-emp {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex: none;
  font: 700 .85rem/1 var(--f-head);
}
.ws-emp--a { background: var(--emp-a-bg); color: var(--emp-a); }
.ws-emp--b { background: var(--emp-b-bg); color: var(--emp-b); }
.ws-emp--lg { width: 48px; height: 48px; font-size: 1rem; }
.ws-mark {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; flex: none;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font: 700 .8rem/1 var(--f-head); letter-spacing: .02em;
}
.ws-mark--on { background: var(--brand-soft); border-color: transparent; color: var(--brand); }

/* -------------------------------------------------------- page heading --- */
.ws-phead { margin-bottom: 20px; }
.ws-phead__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ws-phead__actions { display: flex; gap: 8px; flex: none; }
.ws-back { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 600; font-size: .95rem; margin-bottom: 12px; min-height: 32px; }

/* --------------------------------------------------------- cards, rows --- */
.ws-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.ws-card + .ws-card { margin-top: 12px; }
.ws-card--flush { padding: 0; overflow: hidden; }
.ws-sec { margin-top: 28px; }
.ws-sec__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ws-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.ws-list--plain { border: 0; box-shadow: none; border-radius: 0; margin: 8px -18px 0; }
.ws-list > .ws-card { border-radius: 0; box-shadow: none; border: 0; border-top: 1px solid var(--line); margin: 0; }
.ws-list > .ws-card:first-child { border-top: 0; }
.ws-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 14px 16px; border-top: 1px solid var(--line); min-height: 64px;
}
.ws-row:first-child { border-top: 0; }
a.ws-row:hover, button.ws-row:hover { background: var(--surface-2); }
.ws-row__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ws-row__title { color: var(--ink); font-weight: 600; line-height: 1.35; display: block; }
.ws-row__sub { color: var(--muted); font-size: .88rem; line-height: 1.45; display: block; }
.ws-row__end { flex: none; display: flex; align-items: center; gap: 8px; }
.ws-row__chev { color: var(--line-strong); }
.ws-rowicon {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: var(--brand-soft); color: var(--brand);
}
.ws-rowicon--lg { width: 48px; height: 48px; }
.ws-rowicon--good { background: var(--good-bg); color: var(--good); }
.ws-rowicon--warn { background: var(--warn-bg); color: var(--warn); }
.ws-rowicon--bad { background: var(--bad-bg); color: var(--bad); }
.ws-rowicon--info { background: var(--info-bg); color: var(--info); }

.ws-kv { margin: 0; }
.ws-kv__row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.ws-kv__row:first-child { border-top: 0; padding-top: 0; }
.ws-kv dt { color: var(--muted); font-size: .92rem; }
.ws-kv dd { margin: 0; color: var(--ink); font-weight: 500; text-align: right; display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.ws-kv__row--strong dd { font-weight: 700; }
.ws-kv__row--bad dd { color: var(--bad); font-weight: 700; }

.ws-banner {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-sm); margin: 12px 0;
  border: 1px solid transparent;
}
.ws-banner .ws-i { margin-top: 2px; }
.ws-banner__body { flex: 1; min-width: 0; }
.ws-banner__title { font-weight: 700; color: var(--ink); }
.ws-banner__text { font-size: .92rem; margin-top: 2px; }
.ws-banner > .ws-btn, .ws-banner > .ws-link { flex: none; align-self: center; }
.ws-banner--good { background: var(--good-bg); color: var(--good); }
.ws-banner--warn { background: var(--warn-bg); color: var(--warn); }
.ws-banner--bad { background: var(--bad-bg); color: var(--bad); }
.ws-banner--info { background: var(--info-bg); color: var(--info); }
.ws-banner .ws-banner__text { color: var(--body); }

.ws-empty { text-align: center; padding: 36px 20px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ws-empty__title { color: var(--ink); font-weight: 700; }
.ws-empty .ws-btn { margin-top: 10px; }

.ws-bullets { padding-left: 20px; display: grid; gap: 8px; }
.ws-bullets li::marker { color: var(--brand); }
.ws-ticks { list-style: none; display: grid; gap: 10px; margin: 20px 0 24px; }
.ws-ticks li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink); font-weight: 500; }
.ws-ticks .ws-i { color: var(--good); margin-top: 3px; }

/* ------------------------------------------------------------- layouts --- */
.ws-cols { display: grid; gap: 0 24px; }
.ws-grid2 { display: grid; gap: 12px; }
.ws-grid2 > .ws-card + .ws-card { margin-top: 0; }

/* ------------------------------------------------------------- welcome --- */
.ws-welcome { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; max-width: 480px; margin: 0 auto; padding: 24px 0; }
.ws-welcome__card { display: flex; flex-direction: column; }
.ws-welcome__card > .ws-list, .ws-welcome__card > .ws-card { margin: 20px 0; }
.ws-welcome__card > .ws-banner { margin: 0 0 20px; }
.ws-welcome__art { width: 112px; margin-bottom: 28px; }
.ws-welcome__art img { width: 100%; height: auto; }
.ws-welcome .ws-fine { justify-content: center; }
.ws-dots { display: flex; gap: 6px; justify-content: center; margin-top: 28px; }
.ws-dot { width: 8px; height: 8px; border-radius: 4px; background: var(--line-strong); transition: width .2s; }
.ws-dot.is-on { width: 24px; background: var(--coral); }

/* ---------------------------------------------------------------- home --- */
.ws-hero { display: flex; gap: 18px; align-items: center; }
.ws-hero__ring { flex: none; }
.ws-hero__title { font: 700 1.15rem/1.3 var(--f-head); color: var(--ink); }
.ws-hero__text { font-size: .92rem; margin: 6px 0 8px; }
.ws-ring__track { stroke: var(--surface-2); }
.ws-ring__val { transition: stroke-dashoffset .8s ease; }
.ws-ring--good .ws-ring__val { stroke: var(--good-fill); }
.ws-ring--warn .ws-ring__val { stroke: var(--warn-fill); }
.ws-ring--bad .ws-ring__val { stroke: var(--bad-fill); }
.ws-ring__num { font: 700 30px/1 var(--f-head); fill: var(--ink); }

.ws-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.ws-stat {
  display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); min-width: 0;
}
a.ws-stat:hover { border-color: var(--line-strong); }
.ws-stat__label { font-size: .82rem; color: var(--muted); font-weight: 500; }
.ws-stat__value { font: 700 1.3rem/1.15 var(--f-head); color: var(--ink); letter-spacing: -.01em; overflow-wrap: anywhere; }
.ws-stat__sub { font-size: .8rem; color: var(--muted); line-height: 1.35; }
.ws-stat--bad { border-left: 4px solid var(--bad-fill); }
.ws-stat--bad .ws-stat__value { color: var(--bad); }
.ws-stat--good { border-left: 4px solid var(--good-fill); }
.ws-stat--info { border-left: 4px solid var(--info-fill); }
.ws-stats--3 { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ws-stats--3 .ws-stat { padding: 12px; }
.ws-stats--3 .ws-stat__value { font-size: 1.05rem; }

.ws-empcard { display: flex; flex-direction: column; gap: 12px; }
.ws-empcard:hover { border-color: var(--line-strong); }
.ws-empcard__top { display: flex; gap: 12px; align-items: center; }
.ws-empcard__name { font-weight: 700; color: var(--ink); }
.ws-empcard__stat { font-size: .88rem; }
.ws-empcard__stat b { color: var(--ink); }
.ws-meter { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.ws-meter__fill { display: block; height: 100%; border-radius: 4px; }
.ws-meter__fill--good { background: var(--good-fill); }
.ws-meter__fill--bad { background: var(--warn-fill); }

.ws-aicard { display: flex; gap: 12px; align-items: flex-start; margin-top: 28px; background: linear-gradient(180deg, var(--brand-soft), var(--surface) 70%); }
.ws-aicard__title { font-weight: 700; color: var(--ink); }
.ws-chiprow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ws-sugg {
  display: inline-flex; align-items: center; min-height: 36px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: .85rem; font-weight: 500; text-align: left;
}
.ws-sugg:hover { border-color: var(--brand); color: var(--brand); }

/* --------------------------------------------------------------- chart --- */
.ws-chart { position: relative; }
.ws-chart svg { width: 100%; height: auto; overflow: visible; }
.ws-ch__grid { stroke: var(--line); stroke-width: 1; }
.ws-ch__base { stroke: var(--line-strong); stroke-width: 1; }
.ws-ch__ax { fill: var(--muted); font: 500 11px/1 var(--f-body); }
.ws-ch__bar { cursor: pointer; outline: none; }
.ws-ch__bar rect { transition: opacity .15s; }
.ws-ch__bar.is-dim .ws-ch__fill { opacity: .35; }
.ws-ch__fill--good { fill: var(--good-fill); }
.ws-ch__fill--warn { fill: var(--warn-fill); }
.ws-ch__fill--bad { fill: var(--bad-fill); }
.ws-ch__fill--info { fill: var(--info-fill); }
.ws-ch__fill.is-hollow { fill: var(--surface); stroke-width: 2; }
.ws-ch__fill--bad.is-hollow { stroke: var(--bad-fill); }
.ws-ch__fill--warn.is-hollow { stroke: var(--warn-fill); }
.ws-ch__fill--info.is-hollow { stroke: var(--info-fill); }
.ws-ch__ghost { fill: none; stroke: var(--bad-fill); stroke-width: 1.5; stroke-dasharray: 3 3; }
.ws-ch__bar:focus-visible .ws-ch__fill { stroke: var(--ink); stroke-width: 2; }
.ws-ch__tip {
  position: absolute; transform: translateY(-100%); max-width: 240px; padding: 8px 10px; border-radius: 8px;
  background: var(--ink); color: #fff; font-size: .8rem; line-height: 1.4; pointer-events: none; box-shadow: var(--shadow-lg); z-index: 2;
}
.ws-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: .82rem; color: var(--body); }
.ws-legend li { display: inline-flex; align-items: center; gap: 6px; }
.ws-legend__sw { width: 12px; height: 12px; border-radius: 3px; }
.ws-legend__sw--good { background: var(--good-fill); }
.ws-legend__sw--warn { background: var(--warn-fill); }
.ws-legend__sw--bad { background: var(--bad-fill); }
.ws-legend__sw--info { background: var(--info-fill); }

/* ------------------------------------------------------------- filters --- */
.ws-filters { display: flex; flex-direction: column; gap: 10px; margin: 20px 0 12px; }
.ws-seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; overflow-x: auto; max-width: 100%; }
.ws-seg__opt { padding: 8px 14px; border-radius: 9px; font-weight: 600; font-size: .88rem; color: var(--muted); white-space: nowrap; min-height: 38px; display: inline-flex; align-items: center; }
.ws-seg__opt.is-on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.ws-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ws-pill { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: .88rem; font-weight: 500; color: var(--body); background: var(--surface); min-height: 36px; display: inline-flex; align-items: center; }
.ws-pill.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* --------------------------------------------------------------- table --- */
.ws-table { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.ws-tr {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 8px;
  padding: 14px 16px; border-top: 1px solid var(--line); align-items: center;
}
.ws-tr:first-child { border-top: 0; }
a.ws-tr:hover { background: var(--surface-2); }
.ws-tr--head { display: none; }
.ws-tr__emp { grid-column: 1 / 3; grid-row: 1; display: flex; gap: 12px; align-items: center; min-width: 0; }
.ws-tr__st { grid-column: 3 / 5; grid-row: 1; justify-self: end; }
.ws-tr__num, .ws-tr__due { grid-row: 2; font-variant-numeric: tabular-nums; font-size: .9rem; color: var(--ink); }
.ws-tr__num::before, .ws-tr__due::before { content: attr(data-l); display: block; font-size: .72rem; color: var(--muted); font-weight: 500; }

/* --------------------------------------------------------------- steps --- */
.ws-steps { list-style: none; position: relative; }
.ws-step { position: relative; padding: 0 0 18px 40px; }
.ws-step::before { content: ''; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.ws-step:last-child::before { display: none; }
.ws-step__dot {
  position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line-strong); color: var(--muted);
}
.ws-step.is-done .ws-step__dot { background: var(--good-fill); border-color: var(--good-fill); color: #fff; }
.ws-step.is-done::before { background: var(--good-fill); }
.ws-step.is-cur .ws-step__dot { border-color: var(--warn-fill); color: var(--warn); background: var(--warn-bg); }
.ws-step.is-bad .ws-step__dot { background: var(--bad-fill); border-color: var(--bad-fill); color: #fff; }
.ws-step__t { font-weight: 700; color: var(--ink); line-height: 28px; }
.ws-step__d { font-size: .9rem; color: var(--muted); }

/* ------------------------------------------------------------ payslips --- */
.ws-dropzone {
  display: flex; gap: 14px; align-items: center; padding: 18px; border: 2px dashed var(--line-strong); border-radius: var(--r);
  background: var(--surface); color: var(--brand); cursor: pointer; margin-bottom: 12px;
}
.ws-dropzone:hover { border-color: var(--brand); background: var(--brand-soft); }
.ws-search { display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--muted); margin-bottom: 4px; }
.ws-search input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 12px 0; background: none; color: var(--ink); font-size: 1rem; }
.ws-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

.ws-slip { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); font-size: .92rem; }
.ws-slip__head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 2px solid var(--ink); }
.ws-slip__co { font: 700 1.05rem/1.3 var(--f-head); color: var(--ink); }
.ws-slip__tag { font: 800 .75rem/1 var(--f-body); letter-spacing: .14em; color: var(--muted); }
.ws-slip__table { width: 100%; border-collapse: collapse; margin-top: 16px; font-variant-numeric: tabular-nums; }
.ws-slip__table th { text-align: left; font-size: .75rem; color: var(--muted); font-weight: 600; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ws-slip__table td { padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--ink); vertical-align: top; }
.ws-slip__table td:nth-child(2) { color: var(--muted); padding: 9px 8px; }
.ws-slip__table th:last-child, .ws-slip__table td:last-child { text-align: right; white-space: nowrap; }
.ws-slip__table .is-sum td { font-weight: 700; }
.ws-checks { list-style: none; }
.ws-checks li { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--ink); }
.ws-checks li:first-child { border-top: 0; }
.ws-checks .is-ok .ws-i { color: var(--good); }
.ws-checks .is-bad .ws-i { color: var(--warn); }

.ws-upopts { display: grid; gap: 10px; }
.ws-upopt {
  display: flex; gap: 14px; align-items: center; padding: 16px; border: 1px solid var(--line-strong); border-radius: 14px;
  cursor: pointer; text-align: left; color: var(--brand); background: var(--surface); width: 100%;
}
.ws-upopt:hover, .ws-upopt:focus-within { border-color: var(--brand); background: var(--brand-soft); }
.ws-upopt b { display: block; color: var(--ink); }
.ws-reading { text-align: center; padding: 12px 0; }
.ws-reading__doc { position: relative; width: 96px; height: 120px; margin: 0 auto 14px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; overflow: hidden; }
.ws-reading__scan { position: absolute; left: 0; right: 0; height: 3px; background: var(--accent); top: 0; animation: ws-scan 1.1s ease-in-out infinite alternate; }
@keyframes ws-scan { to { top: calc(100% - 3px); } }
.ws-reading__steps { list-style: none; display: grid; gap: 8px; margin: 16px auto 0; max-width: 300px; text-align: left; }
.ws-reading__steps li { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .92rem; }
.ws-reading__steps li.is-done { color: var(--ink); }
.ws-reading__steps li.is-done .ws-i { color: var(--good); }

/* ----------------------------------------------------------- pay check --- */
.ws-rates { width: 100%; border-collapse: collapse; margin: 12px 0 4px; font-variant-numeric: tabular-nums; font-size: .92rem; }
.ws-rates th { text-align: left; font-size: .75rem; color: var(--muted); font-weight: 600; padding: 8px 6px 8px 0; border-bottom: 1px solid var(--line); }
.ws-rates td { padding: 10px 6px 10px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.ws-rates td:last-child { text-align: right; padding-right: 0; }
.ws-hbars { display: grid; gap: 10px; }
.ws-hbar { display: grid; grid-template-columns: 76px 1fr 72px; gap: 10px; align-items: center; font-size: .85rem; }
.ws-hbar__label { color: var(--muted); white-space: nowrap; }
.ws-hbar__track { height: 12px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.ws-hbar__fill { display: block; height: 100%; background: var(--warn-fill); border-radius: 0 6px 6px 0; }
.ws-hbar__fill--good { background: var(--good-fill); }
.ws-hbar__val { text-align: right; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- forms --- */
.ws-form { display: grid; gap: 16px; }
.ws-field { display: grid; gap: 6px; }
.ws-field label, .ws-fieldset legend { font-weight: 600; color: var(--ink); font-size: .92rem; }
.ws-field input, .ws-field select, .ws-field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--ink); font-size: 1rem;
}
.ws-field textarea { line-height: 1.5; resize: vertical; }
.ws-field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }
.ws-field input:focus, .ws-field select:focus, .ws-field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.ws-field2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ws-fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.ws-fieldset legend { margin-bottom: 8px; padding: 0; }
.ws-radio, .ws-check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; color: var(--ink); min-height: 32px; }
.ws-radio input, .ws-check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.ws-check--row { padding: 14px 16px; border-top: 1px solid var(--line); margin: 0; }
.ws-check--row:first-child { border-top: 0; }
.ws-check--row b { display: block; }
.ws-out { display: block; padding: 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: .95rem; }
.ws-out .ws-btn { margin-top: 12px; }
.ws-fsec { padding-top: 4px; }
.ws-fsec + .ws-fsec { border-top: 1px solid var(--line); padding-top: 4px; }
.ws-fsec .ws-h3 { display: flex; align-items: center; gap: 10px; }
.ws-fsec__n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: .82rem; }

/* toggles */
.ws-toggle { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-top: 1px solid var(--line); cursor: pointer; position: relative; }
.ws-toggle:first-child { border-top: 0; }
.ws-toggle__text { flex: 1; min-width: 0; }
.ws-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ws-toggle__ui { width: 48px; height: 28px; border-radius: 14px; background: var(--line-strong); position: relative; flex: none; transition: background-color .15s; }
.ws-toggle__ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.ws-toggle input:checked + .ws-toggle__ui { background: var(--brand); }
.ws-toggle input:checked + .ws-toggle__ui::after { transform: translateX(20px); }
.ws-toggle input:focus-visible + .ws-toggle__ui { outline: 3px solid var(--accent); outline-offset: 2px; }

/* --------------------------------------------------------------- issues --- */
.ws-owed { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: flex-end; justify-content: space-between; }
.ws-owed__num { font: 700 2.2rem/1 var(--f-head); color: var(--ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ws-owed__split { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 0; }
.ws-owed__split dt { font-size: .8rem; color: var(--muted); }
.ws-owed__split dd { margin: 0; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ----------------------------------------------------------------- help --- */
.ws-guide { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.ws-guide .ws-btn { margin-top: 10px; }
.ws-routes { display: grid; gap: 10px; }
.ws-routes > .ws-card + .ws-card { margin-top: 0; }
.ws-route { display: flex; gap: 14px; align-items: center; }
.ws-route:hover { border-color: var(--brand); }
.ws-route__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ws-route__num { font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--brand); }
.ws-route__title { font: 700 1.05rem/1.3 var(--f-head); color: var(--ink); display: block; }
.ws-route__meta { font-size: .82rem; color: var(--good); font-weight: 600; margin-top: 2px; }
.ws-anon { background: var(--surface-2); border-style: dashed; }
.ws-firm { display: grid; gap: 10px; }
.ws-firm__top { display: flex; gap: 12px; align-items: center; }
.ws-firm__top > div { flex: 1; }
.ws-firm__rate { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--ink); font-size: .9rem; }
.ws-firm__rate .ws-i { color: var(--warn-fill); }
.ws-firm .ws-btn { justify-self: start; }
.ws-wait { display: flex; gap: 12px; align-items: center; color: var(--brand); margin-top: 28px; }
.ws-done { text-align: center; display: grid; gap: 12px; justify-items: center; padding: 8px 0; }
.ws-done > .ws-i { color: var(--good); }
.ws-done .ws-btn { width: 100%; }
.ws-spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--brand-soft); border-top-color: var(--brand); animation: ws-spin .8s linear infinite; }
@keyframes ws-spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------- connections --- */
.ws-conngrid { display: grid; gap: 10px; }
.ws-conn {
  display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
}
.ws-conn:hover { border-color: var(--line-strong); }
.ws-conn.is-on { border-color: #BFE3DB; }
.ws-conn__body { flex: 1; min-width: 0; }
.ws-connhead { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.ws-oauth { display: grid; gap: 14px; }
.ws-oauth__bar { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 700; color: var(--ink); }
.ws-oauth__bar .ws-muted { margin-left: auto; font-weight: 500; font-size: .85rem; }
.ws-oauth__bar .ws-mark { width: 32px; height: 32px; border-radius: 8px; }

.ws-moregrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ws-moreitem {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
  padding: 16px 8px; min-height: 96px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); color: var(--brand);
  font-size: .85rem; font-weight: 600;
}
.ws-moreitem span:not(.ws-count) { color: var(--ink); }
.ws-moreitem .ws-count { position: absolute; top: 8px; right: 8px; }
.ws-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--coral); color: var(--ink); font: 700 .72rem/1 var(--f-body); margin-left: auto; }

/* -------------------------------------------------------------- records --- */
.ws-gantt { --g-label: 110px; position: relative; display: grid; gap: 10px; overflow: hidden; }
.ws-gantt__row { display: grid; grid-template-columns: var(--g-label) 1fr; gap: 10px; align-items: center; }
.ws-gantt__label { font-size: .82rem; color: var(--ink); font-weight: 600; line-height: 1.25; }
.ws-gantt__track { position: relative; height: 24px; background: var(--surface-2); border-radius: 6px; }
.ws-gantt__years { height: 18px; background: none; }
.ws-gantt__years span { position: absolute; top: 0; font-size: .72rem; color: var(--muted); transform: translateX(-50%); }
.ws-gantt__years span:first-child { transform: none; }
.ws-gantt__years span:last-child { transform: translateX(-100%); }
.ws-gantt__bar { position: absolute; top: 0; bottom: 0; border-radius: 6px; display: flex; align-items: center; overflow: hidden; }
.ws-gantt__bar i { font-style: normal; font-size: .72rem; font-weight: 700; color: #fff; padding-left: 8px; white-space: nowrap; }
.ws-gantt__bar--0 { background: #6F7F95; }
.ws-gantt__bar--1 { background: var(--emp-a); }
.ws-gantt__bar--2 { background: var(--emp-b); }
.ws-gantt__bar--fund { background: #8A97A8; }
.ws-gantt__bar--fund2 { background: var(--brand); border-left: 2px solid var(--surface); }
.ws-gantt__overlay { position: absolute; top: 18px; bottom: 18px; left: calc(18px + var(--g-label) + 10px); right: 18px; pointer-events: none; }
.ws-gantt__today { position: absolute; top: 0; bottom: -4px; width: 2px; background: var(--ink); }
.ws-gantt__today i { position: absolute; bottom: -16px; left: 50%; transform: translateX(-50%); font: 700 .68rem/1 var(--f-body); font-style: normal; color: var(--ink); white-space: nowrap; }
.ws-gantt { padding-bottom: 30px; }

.ws-tl { list-style: none; }
.ws-tl__item { position: relative; padding: 0 0 22px 44px; }
.ws-tl__item::before { content: ''; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: var(--line); }
.ws-tl__item:last-child::before { display: none; }
.ws-tl__dot { position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.ws-tl__item--warn .ws-tl__dot { background: var(--warn-bg); color: var(--warn); }
.ws-tl__item--good .ws-tl__dot { background: var(--good-bg); color: var(--good); }
.ws-tl__item--info .ws-tl__dot { background: var(--ink); color: var(--accent); }
.ws-tl__date { font-size: .8rem; color: var(--muted); font-weight: 600; line-height: 32px; }
.ws-tl__note { font-size: .88rem; margin-top: 6px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }

.ws-tpl { display: flex; gap: 14px; align-items: flex-start; }
.ws-tpl:hover, .ws-guidecard:hover { border-color: var(--brand); }
.ws-tpl > span:last-child { display: flex; flex-direction: column; gap: 4px; }
.ws-guidecard { display: flex; flex-direction: column; gap: 6px; }
.ws-guidecard__tag { align-self: flex-start; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--brand); background: var(--brand-soft); padding: 3px 8px; border-radius: 6px; }

.ws-doc { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; font-size: .92rem; }
.ws-doc p + p { margin-top: 10px; }
.ws-doc__head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 3px solid var(--brand); }
.ws-doc__brand { font: 700 .8rem/1 var(--f-head); color: var(--brand); letter-spacing: .08em; text-transform: uppercase; }
.ws-doc__title { font: 700 1.15rem/1.3 var(--f-head); color: var(--ink); margin-top: 6px; }
.ws-doc__code { display: flex; flex-direction: column; font-size: .75rem; color: var(--muted); text-align: right; }
.ws-doc__code b { font: 700 .95rem/1.4 ui-monospace, 'SF Mono', Consolas, monospace; color: var(--ink); }
.ws-doc__scroll { overflow-x: auto; margin: 0 -4px; }
.ws-doc__table { width: 100%; min-width: 440px; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .85rem; }
.ws-doc__table th { text-align: left; color: var(--muted); font-weight: 600; font-size: .75rem; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line-strong); }
.ws-doc__table td { padding: 7px 8px 7px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.ws-doc__foot { margin-top: 18px !important; padding-top: 12px; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); }

.ws-article { max-width: 680px; }
.ws-article p { font-size: 1.02rem; line-height: 1.65; margin-top: 12px; }
.ws-article .ws-h2 { margin-top: 28px; }
.ws-article .ws-aicard p { margin-top: 0; font-size: .9rem; }

.ws-note { position: relative; align-items: flex-start; }
.ws-note.is-unread { background: #FAFCFE; }
.ws-note.is-unread .ws-row__title { font-weight: 700; }
.ws-note__when { font-size: .78rem; color: var(--muted); margin-top: 4px; display: block; }
.ws-unread { width: 10px; height: 10px; border-radius: 50%; background: var(--coral); flex: none; margin-top: 8px; }

.ws-profile { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.ws-profile > div { flex: 1; min-width: 180px; }

/* ------------------------------------------------------------ AI panel --- */
.ws-fab {
  position: fixed; right: 16px; bottom: calc(var(--tabs-h) + 16px + env(safe-area-inset-bottom)); z-index: 45;
  display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 20px 0 16px; border-radius: 26px;
  background: var(--coral); color: var(--ink); font-weight: 700; box-shadow: var(--shadow-lg);
}
.ws-fab .ws-i { color: var(--ink); }
.ws-fab:hover { background: var(--coral-hover); }
body.has-ai .ws-fab { display: none; }
.ws-ai {
  position: fixed; inset: 0; z-index: 60; background: var(--surface); display: flex; flex-direction: column;
  transform: translateY(24px); opacity: 0; transition: transform .22s ease, opacity .22s ease;
}
.ws-ai.is-open { transform: none; opacity: 1; }
.ws-ai__head { display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 16px; border-bottom: 1px solid var(--line); padding-top: calc(10px + env(safe-area-inset-top)); }
.ws-ai__mark { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--ink); color: var(--accent); flex: none; }
.ws-ai__titles { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ws-ai__titles strong { color: var(--ink); font-family: var(--f-head); }
.ws-ai__titles span { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-ai__log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; background: var(--bg); }
.ws-ai__chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px 0; scrollbar-width: none; }
.ws-ai__chips .ws-sugg { flex: none; white-space: nowrap; }
.ws-ai__form { display: flex; gap: 6px; align-items: center; padding: 10px 12px 6px 16px; }
.ws-ai__form input { flex: 1; min-width: 0; min-height: 48px; padding: 0 16px; border-radius: 24px; border: 1px solid var(--line-strong); background: var(--surface-2); font-size: 1rem; }
.ws-ai__form input:focus { outline: none; border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 3px var(--brand-soft); }
.ws-ai__form .ws-iconbtn.is-on { color: var(--bad); background: var(--bad-bg); }
.ws-send { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--brand); color: #fff; flex: none; }
.ws-send:hover { background: var(--brand-hover); }
.ws-ai__foot { font-size: .75rem; color: var(--muted); text-align: center; padding: 0 16px calc(10px + env(safe-area-inset-bottom)); }

.ws-msg { display: flex; gap: 8px; align-items: flex-start; max-width: 100%; }
.ws-msg--me { justify-content: flex-end; }
.ws-msg__av { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--ink); color: var(--accent); flex: none; margin-top: 2px; }
.ws-msg__body { padding: 12px 14px; border-radius: 16px; font-size: .95rem; line-height: 1.5; max-width: 88%; min-width: 0; }
.ws-msg--ai .ws-msg__body { background: var(--surface); border: 1px solid var(--line); border-top-left-radius: 4px; color: var(--body); }
.ws-msg--me .ws-msg__body { background: var(--brand); color: #fff; border-top-right-radius: 4px; }
.ws-msg__body p + p, .ws-msg__body p + .ws-msg__card, .ws-msg__card + p, .ws-msg__body ol + p, .ws-msg__quote + p { margin-top: 8px; }
.ws-msg__body b { color: var(--ink); }
.ws-msg__card { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: .88rem; }
.ws-msg__card .ws-kv__row { padding: 6px 0; }
.ws-msg__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ws-msg__ol, .ws-msg__ul { padding-left: 20px; margin-top: 8px; display: grid; gap: 4px; }
.ws-msg__quote { margin: 8px 0 0; padding: 10px 12px; border-left: 3px solid var(--brand); background: var(--surface-2); border-radius: 0 8px 8px 0; font-size: .88rem; }
.ws-dots3 { display: inline-flex; gap: 4px; padding: 4px 0; }
.ws-dots3 i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: ws-bounce 1s infinite ease-in-out; }
.ws-dots3 i:nth-child(2) { animation-delay: .15s; }
.ws-dots3 i:nth-child(3) { animation-delay: .3s; }
@keyframes ws-bounce { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* --------------------------------------------------------- sheet, toast --- */
.ws-scrim { position: fixed; inset: 0; z-index: 70; background: rgba(0, 15, 39, .45); opacity: 0; transition: opacity .2s; }
.ws-scrim.is-open { opacity: 1; }
.ws-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 71; max-height: 92vh; display: flex; flex-direction: column;
  background: var(--surface); border-radius: 20px 20px 0 0; box-shadow: var(--shadow-lg);
  transform: translateY(100%); transition: transform .22s ease;
}
.ws-sheet.is-open { transform: none; }
.ws-sheet__grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 8px auto 0; }
.ws-sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 20px; }
.ws-sheet__body { overflow-y: auto; padding: 4px 20px calc(24px + env(safe-area-inset-bottom)); }
.ws-toast {
  position: fixed; left: 50%; bottom: calc(var(--tabs-h) + 84px); z-index: 90; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  display: flex; gap: 10px; align-items: center; width: max-content; max-width: calc(100vw - 40px);
  padding: 12px 16px; border-radius: 12px; background: var(--ink); color: #fff; font-size: .92rem; box-shadow: var(--shadow-lg);
  transition: opacity .2s, transform .2s;
}
.ws-toast .ws-i { color: var(--accent); }
.ws-toast--bad .ws-i { color: #FF9B91; }
.ws-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* guided tour */
.ws-spot { position: fixed; z-index: 95; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(0, 15, 39, .6); pointer-events: none; transition: all .25s ease; }
.ws-tip { position: fixed; z-index: 96; background: var(--surface); border-radius: 14px; padding: 16px; box-shadow: var(--shadow-lg); }
.ws-tip__step { font-size: .75rem; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .05em; }
.ws-tip__title { font: 700 1.05rem/1.3 var(--f-head); color: var(--ink); margin-top: 4px; }
.ws-tip__text { font-size: .92rem; margin-top: 4px; }
.ws-tip__actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }

/* ================================================================ tablet === */
@media (min-width: 768px) {
  .ws-page { padding: 28px 28px 110px; }
  .ws-h1 { font-size: 1.75rem; }
  .ws-display { font-size: 2.2rem; }
  .ws-stats { grid-template-columns: repeat(4, 1fr); }
  .ws-stats--3 { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .ws-stats--3 .ws-stat { padding: 14px; }
  .ws-stats--3 .ws-stat__value { font-size: 1.3rem; }
  .ws-grid2, .ws-conngrid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .ws-routes { grid-template-columns: 1fr 1fr; }
  .ws-filters { flex-direction: row; align-items: center; justify-content: space-between; }
  .ws-filters .ws-pills { margin: 0; }
  .ws-moregrid { grid-template-columns: repeat(4, 1fr); }
  .ws-gantt { --g-label: 150px; }
  .ws-hbar { grid-template-columns: 110px 1fr 80px; }
  .ws-sheet {
    left: 50%; right: auto; bottom: auto; top: 50%; width: min(560px, calc(100vw - 48px)); max-height: 86vh;
    border-radius: 20px; transform: translate(-50%, -46%); opacity: 0; transition: transform .2s ease, opacity .2s ease;
  }
  .ws-sheet.is-open { transform: translate(-50%, -50%); opacity: 1; }
  .ws-sheet--wide { width: min(760px, calc(100vw - 48px)); }
  .ws-sheet__grip { display: none; }
  .ws-sheet__head { padding: 14px 12px 8px 24px; }
  .ws-sheet__body { padding: 4px 24px 24px; }
  .ws-ai { inset: auto 16px calc(var(--tabs-h) + 16px) auto; width: 400px; height: min(640px, calc(100vh - var(--tabs-h) - 32px)); border-radius: 20px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); overflow: hidden; }
  .ws-ai__head { padding-top: 10px; }
  .ws-ai__foot { padding-bottom: 10px; }
  .ws-tr { grid-template-columns: 1.6fr 1fr 1fr 1fr .8fr 1.15fr; grid-template-areas: none; padding: 12px 16px; }
  .ws-tr > * { grid-row: auto !important; grid-column: auto !important; }
  .ws-tr__num::before, .ws-tr__due::before { display: none; }
  .ws-tr--head { display: grid; background: var(--surface-2); font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 10px 16px; }
  .ws-tr__num { text-align: right; padding-right: 12px; }
  .ws-tr--head span:nth-child(2), .ws-tr--head span:nth-child(3), .ws-tr--head span:nth-child(4) { text-align: right; padding-right: 12px; }
  .ws-tr__st { justify-self: end; }
  .ws-tr--head span:last-child { text-align: right; }
}

/* =============================================================== desktop === */
@media (min-width: 1024px) {
  body { padding-bottom: 0; }
  .ws-tabs { display: none; }
  .ws-app { display: grid; grid-template-columns: var(--side-w) 1fr; }
  .ws-side {
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
    background: var(--surface); border-right: 1px solid var(--line); padding: 20px 14px;
  }
  .ws-side > .ws-logo { padding: 4px 10px 20px; }
  .ws-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
  .ws-nav__group { font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 18px 12px 6px; }
  .ws-nav__link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--body); font-weight: 500; font-size: .95rem; min-height: 42px; }
  .ws-nav__link:hover { background: var(--surface-2); color: var(--ink); }
  .ws-nav__link.is-active { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
  .ws-side__foot { border-top: 1px solid var(--line); padding: 14px 4px 0; margin-top: 14px; }
  .ws-me { display: flex; gap: 10px; align-items: center; padding: 6px; border-radius: 10px; }
  .ws-me:hover { background: var(--surface-2); }
  .ws-me__text { display: flex; flex-direction: column; min-width: 0; }
  .ws-me__name { font-weight: 700; color: var(--ink); font-size: .92rem; }
  .ws-me__sub { font-size: .8rem; color: var(--muted); }
  .ws-side__note { font-size: .75rem; color: var(--muted); padding: 10px 6px 0; }
  .ws-top { padding: 0 28px; height: 68px; }
  .ws-logo--top, .ws-avatar--top { display: none; }
  .ws-askbar {
    display: flex; align-items: center; gap: 10px; width: min(520px, 50vw); height: 44px; padding: 0 12px 0 14px; border-radius: 12px;
    background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-size: .95rem; text-align: left;
  }
  .ws-askbar:hover { border-color: var(--line-strong); color: var(--ink); }
  .ws-askbar .ws-i { color: var(--brand); }
  .ws-askbar span { flex: 1; }
  .ws-askbar kbd { font: 600 .72rem/1 var(--f-body); padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--surface); }
  .ws-page { padding: 32px 36px 64px; }
  .ws-cols { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
  .ws-cols > div > .ws-sec:first-child, .ws-cols > div > .ws-card:first-child { margin-top: 28px; }
  .ws-page--home .ws-hero { padding: 24px 28px; }
  .ws-fab { bottom: 24px; right: 24px; }
  .ws-ai { top: 0; right: 0; bottom: 0; left: auto; width: var(--ai-w); height: auto; border-radius: 0; border: 0; border-left: 1px solid var(--line); transform: translateX(24px); }
  .ws-ai.is-open { transform: none; }
  .ws-toast { bottom: 28px; }
  .ws-page--welcome { padding: 0 24px; }
}
@media (min-width: 1360px) {
  body.has-ai .ws-app { margin-right: var(--ai-w); }
}

/* ---------------------------------------------------------- small phones --- */
@media (max-width: 400px) {
  .ws-hero { flex-direction: column; align-items: flex-start; }
  .ws-stats--3 .ws-stat__sub { display: none; }
  .ws-phead__row { flex-wrap: wrap; }
  .ws-field2 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* =====================================================================
   Polish pass (Sep 25): lighter surfaces, fewer lines, one focused Home.
   Placed last so it refines the base rules above without rewriting them.
   ===================================================================== */
:root {
  --bg: #F2F5F9;
  --line: #E9EDF2;
  --r: 18px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 20px rgba(15, 23, 42, .05);
  --coral-ink: #B23A1B;
}
.ws-card, .ws-list, .ws-table, .ws-stat, .ws-conn, .ws-slip { border-color: transparent; }
.ws-row, .ws-tr, .ws-checks li, .ws-toggle, .ws-check--row { border-top-color: #EEF1F5; }
.ws-h1 { letter-spacing: -.025em; }
.ws-h2 { letter-spacing: -.01em; }
.ws-sub { font-size: .95rem; }
.ws-phead { margin-bottom: 24px; }
.ws-rowicon { border-radius: 12px; }
.ws-chip { font-weight: 600; }
.ws-btn--primary { box-shadow: 0 1px 2px rgba(15, 23, 42, .12); }

/* bottom tabs: floating, icon sits in a soft pill when active */
.ws-tabs { background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.6) blur(14px); border-top: 1px solid rgba(15, 23, 42, .06); }
.ws-tab.is-active::before { display: none; }
.ws-tab .ws-i { padding: 4px 14px; border-radius: 14px; box-sizing: content-box; transition: background-color .2s; }
.ws-tab.is-active .ws-i { background: var(--brand-soft); }
.ws-tab { font-size: .7rem; gap: 2px; }

/* the AI button: round and quiet on phones, labelled on desktop */
.ws-fab { height: 56px; width: 56px; padding: 0; justify-content: center; border-radius: 50%; }
.ws-fab span { display: none; }
.ws-fab .ws-i { width: 24px; height: 24px; }

/* ------------------------------------------------------------- home --- */
.ws-greet { margin: 4px 0 18px; }
.ws-greet__date { font-size: .85rem; color: var(--muted); font-weight: 500; }
.ws-greet__hi { font: 700 1.6rem/1.2 var(--f-head); color: var(--ink); letter-spacing: -.025em; margin-top: 2px; }

.ws-hero2 {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: 28px; padding: 26px 22px 22px; color: #fff;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(0, 213, 225, .28) 0%, rgba(0, 213, 225, 0) 60%),
    linear-gradient(155deg, #005C91 0%, #00466F 55%, #003454 100%);
  box-shadow: 0 20px 40px -20px rgba(15, 23, 42, .45);
}
.ws-hero2__mark { position: absolute; z-index: -1; right: -46px; top: -34px; width: 230px; height: auto; opacity: .09; filter: brightness(0) invert(1); pointer-events: none; }
.ws-hero2__eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.ws-hero2__label { font: 600 1.1rem/1.3 var(--f-head); color: rgba(255, 255, 255, .92); margin-top: 10px; }
.ws-hero2__num { font: 700 clamp(2.75rem, 13vw, 4rem)/1 var(--f-head); letter-spacing: -.035em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.ws-hero2__text { font-size: .95rem; line-height: 1.5; color: rgba(255, 255, 255, .82); margin-top: 10px; max-width: 34ch; }
.ws-hero2__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.ws-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px;
  border-radius: 14px; background: var(--coral); color: var(--ink); font-weight: 700; font-size: .98rem;
  transition: background-color .15s, transform .15s;
}
.ws-cta:hover { background: var(--coral-hover); }
.ws-cta:active { transform: translateY(1px); }
.ws-cta--ghost { background: rgba(255, 255, 255, .12); color: #fff; }
.ws-cta--ghost:hover { background: rgba(255, 255, 255, .2); }
.ws-hero2 :focus-visible { outline-color: #fff; }
.ws-hero2__paydays { margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .14); }
.ws-hero2__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: .8rem; color: rgba(255, 255, 255, .72); }
.ws-hero2__row span:first-child { color: #fff; font-weight: 600; }
.ws-segs { display: flex; gap: 4px; margin-top: 12px; }
.ws-segdot { flex: 1; height: 26px; border-radius: 6px; transition: transform .15s; min-width: 6px; }
.ws-segdot:hover { transform: translateY(-3px); }
.ws-segdot--ok { background: var(--accent); }
.ws-segdot--bad { background: var(--coral); }
.ws-segdot--wait { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45); }

.ws-jobs { display: grid; gap: 10px; margin-top: 12px; }
.ws-job { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); transition: transform .15s; }
.ws-job:hover { transform: translateY(-1px); }
.ws-job__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ws-job__name { font-weight: 600; color: var(--ink); font-size: .95rem; }
.ws-job__state { display: inline-flex; align-items: center; gap: 5px; font-size: .82rem; font-weight: 600; }
.ws-job__state--good { color: var(--good); }
.ws-job__state--bad { color: var(--bad); }
.ws-job__chev { color: var(--line-strong); }

.ws-block { margin-top: 28px; }
.ws-block__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ws-todo { background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.ws-todo__item { display: flex; align-items: center; gap: 14px; padding: 16px; transition: background-color .15s; }
.ws-todo__item + .ws-todo__item { border-top: 1px solid #EEF1F5; }
.ws-todo__item:hover { background: var(--surface-2); }
.ws-todo__icon { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--coral-soft); color: var(--coral-ink); flex: none; }
.ws-todo__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ws-todo__title { font-weight: 600; color: var(--ink); font-size: .95rem; }
.ws-todo__sub { font-size: .82rem; color: var(--muted); }
.ws-todo__sub b { color: var(--brand); font-weight: 600; }
.ws-todo__amt { font: 700 1rem/1 var(--f-head); color: var(--ink); font-variant-numeric: tabular-nums; }

.ws-soon { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ws-soon__card { display: flex; flex-direction: column; gap: 4px; padding: 16px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); min-width: 0; }
.ws-soon__card--now { background: #FFF5F1; box-shadow: inset 0 0 0 1px #FFDCCF; }
.ws-soon__when { font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.ws-soon__card--now .ws-soon__when { color: var(--coral-ink); }
.ws-soon__big { font: 700 1.35rem/1.15 var(--f-head); color: var(--ink); letter-spacing: -.02em; }
.ws-soon__sub { font-size: .8rem; color: var(--muted); line-height: 1.4; }

@media (prefers-reduced-motion: no-preference) {
  .ws-rise { animation: ws-rise .55s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--d, 0) * 70ms); }
  @keyframes ws-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}

@media (min-width: 560px) {
  .ws-jobs { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) {
  .ws-hero2 { padding: 32px 32px 26px; }
  .ws-hero2__mark { width: 300px; right: -40px; top: -50px; }
}
@media (min-width: 1024px) {
  .ws-top { background: rgba(242, 245, 249, .85); border-bottom-color: transparent; }
  .ws-side { border-right-color: #EEF1F5; }
  .ws-fab { width: auto; padding: 0 22px 0 18px; border-radius: 28px; }
  .ws-fab span { display: inline; }
  .ws-page--home { max-width: 1160px; }
  .ws-greet__hi { font-size: 2rem; }
  .ws-home { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .ws-home__side > .ws-block:first-child { margin-top: 0; }
  .ws-hero2 { padding: 38px 38px 30px; }
  .ws-hero2__num { font-size: 4.25rem; }
}

/* Connection cards in a multi-column grid: logo and status on top, text full width
   underneath, so the description is never squeezed beside the chip. */
@media (min-width: 768px) {
  .ws-conngrid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
  .ws-conn {
    display: grid; grid-template-columns: auto 1fr; grid-template-areas: "mark chip" "body body";
    align-items: center; align-content: start; gap: 12px; padding: 16px;
  }
  .ws-conn > .ws-mark { grid-area: mark; }
  .ws-conn > .ws-chip { grid-area: chip; justify-self: end; }
  .ws-conn > .ws-conn__body { grid-area: body; display: flex; flex-direction: column; gap: 3px; }
}

/* =====================================================================
   Sign in, and the employer space (Sep 25)
   ===================================================================== */
.ws-roles { display: grid; gap: 12px; margin-top: 22px; }
.ws-role {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 18px 16px; border-radius: 18px;
  background: var(--surface); box-shadow: var(--shadow); border: 1.5px solid transparent; transition: border-color .15s, transform .15s;
}
.ws-role:hover { border-color: var(--brand); transform: translateY(-1px); }
.ws-role.is-soon { opacity: .72; }
.ws-role.is-soon:hover { border-color: transparent; transform: none; }
.ws-role__icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); flex: none; }
.ws-role__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ws-role__title { font: 700 1.05rem/1.3 var(--f-head); color: var(--ink); }
.ws-role__sub { font-size: .88rem; color: var(--muted); }
.ws-or { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted); font-size: .85rem; }
.ws-or::before, .ws-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.ws-avatar--biz, .ws-emp--staff { background: var(--emp-b-bg); color: var(--emp-b); }
.ws-avatar--biz { background: var(--ink); color: #fff; }
.ws-todo__icon--done { background: var(--good-bg); color: var(--good); }
.ws-todo--done .ws-todo__title { color: var(--muted); }
.ws-costcard { margin-top: 16px; background: #FFF5F1; box-shadow: inset 0 0 0 1px #FFDCCF; }
.ws-costcard .ws-eyebrow { color: var(--coral-ink); }
.ws-calcout__big { font: 700 2.4rem/1.05 var(--f-head); letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.ws-calcout .ws-kv { margin-top: 16px; }
.ws-calcout { margin-top: 0; }
.ws-minirows { margin-top: 12px; border-top: 1px solid #EEF1F5; }
.ws-minirow { display: grid; grid-template-columns: 1fr .7fr 1fr auto; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid #EEF1F5; font-size: .88rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.ws-minirow:hover { background: var(--surface-2); }
.ws-payline { align-items: center; }
.ws-payline > span:nth-child(2) { flex: 1; }
.ws-payline__amt { font: 700 1rem/1 var(--f-head); color: var(--ink); font-variant-numeric: tabular-nums; }
.ws-paysum { margin: 4px 0 0; }
.ws-thread { display: flex; flex-direction: column; gap: 12px; }
.ws-bubble { max-width: 88%; padding: 14px 16px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.ws-bubble--staff { align-self: flex-start; border-top-left-radius: 6px; }
.ws-bubble--me { align-self: flex-end; background: var(--brand); color: #fff; border-top-right-radius: 6px; }
.ws-bubble__meta { font-size: .75rem; font-weight: 600; opacity: .7; margin-bottom: 4px; }
.ws-bubble__text { font-size: .95rem; line-height: 1.55; }
.ws-reply { margin-top: 24px; }
.ws-tpl { text-align: left; width: 100%; }

@media (min-width: 768px) {
  .ws-tr--staff { grid-template-columns: 1.8fr .9fr 1fr 1fr 1.1fr; }
}
@media (min-width: 1024px) {
}

/* =====================================================================
   Sign in, v2 (Sep 25). Phone: illustrated top + white sheet over it.
   Desktop: the art becomes a side panel and the sheet a card.
   ===================================================================== */
.ws-auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--surface); }
.ws-auth__top {
  position: relative; overflow: hidden; isolation: isolate; color: #fff;
  padding: calc(20px + env(safe-area-inset-top)) 24px 56px; min-height: 46vh;
  display: flex; flex-direction: column;
  background: radial-gradient(80% 70% at 85% 10%, rgba(0, 213, 225, .45) 0%, rgba(0, 213, 225, 0) 60%),
              radial-gradient(70% 60% at 0% 100%, rgba(255, 122, 89, .22) 0%, rgba(255, 122, 89, 0) 60%),
              linear-gradient(160deg, #0071B0 0%, #005C91 45%, #003A5E 100%);
}
.ws-auth__top--short { min-height: 38vh; }
.ws-auth__logo { display: flex; align-items: center; gap: 8px; font: 800 1.1rem/1 var(--f-head); }
.ws-auth__logo img { background: #fff; border-radius: 10px; padding: 4px; }
.ws-auth__headline { font: 700 1.55rem/1.2 var(--f-head); letter-spacing: -.02em; margin-top: 22px; max-width: 15ch; text-wrap: balance; }
.ws-auth__pitch { display: none; }

/* the illustration: shield in rings, two floating cards and a pill */
.ws-art { position: relative; flex: 1; min-height: 190px; margin-top: 8px; display: grid; place-items: center; }
.ws-auth__top--short .ws-art { min-height: 120px; margin-top: 0; }
.ws-art__ring { position: absolute; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .16); }
.ws-art__ring--1 { width: 170px; height: 170px; }
.ws-art__ring--2 { width: 260px; height: 260px; border-style: dashed; border-color: rgba(255, 255, 255, .12); }
.ws-art__shield { position: relative; width: 96px; height: 96px; border-radius: 28px; background: #fff; display: grid; place-items: center; box-shadow: 0 18px 36px -12px rgba(0, 20, 40, .45); }
.ws-art__shield img { width: 62px; height: auto; }
.ws-art__card {
  position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border-radius: 16px;
  background: #fff; color: var(--ink); box-shadow: 0 14px 30px -12px rgba(0, 20, 40, .45);
}
.ws-art__card--a { left: 2%; top: 12%; transform: rotate(-5deg); }
.ws-art__card--b { right: 2%; bottom: 14%; transform: rotate(4deg); }
.ws-art__ico { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); }
.ws-art__ico--good { background: var(--good-bg); color: var(--good); }
.ws-art__txt { display: flex; flex-direction: column; line-height: 1.2; }
.ws-art__txt small { font-size: .7rem; color: var(--muted); font-weight: 500; }
.ws-art__txt b { font: 700 .95rem/1.2 var(--f-head); font-variant-numeric: tabular-nums; }
.ws-art__pill { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 7px 12px; border-radius: 999px; background: var(--coral); color: var(--ink); font-size: .78rem; font-weight: 700; }
.ws-auth__top--short .ws-art__ring--2, .ws-auth__top--short .ws-art__pill { display: none; }
.ws-auth__top--short .ws-art__shield { width: 72px; height: 72px; border-radius: 22px; }
.ws-auth__top--short .ws-art__shield img { width: 46px; }
.ws-auth__top--short .ws-art__ring--1 { width: 124px; height: 124px; }
.ws-auth__top--short .ws-art__card--a { top: 4%; }
.ws-auth__top--short .ws-art__card--b { bottom: 2%; }
@media (prefers-reduced-motion: no-preference) {
  .ws-art__card--a { animation: ws-float-a 6s ease-in-out infinite; }
  .ws-art__card--b { animation: ws-float-b 7s ease-in-out infinite; }
  @keyframes ws-float-a { 0%, 100% { transform: rotate(-5deg) translateY(0); } 50% { transform: rotate(-5deg) translateY(-6px); } }
  @keyframes ws-float-b { 0%, 100% { transform: rotate(4deg) translateY(0); } 50% { transform: rotate(4deg) translateY(6px); } }
}

/* the sheet */
.ws-auth__sheet { position: relative; z-index: 1; flex: 1; margin-top: -32px; background: var(--surface); border-radius: 32px 32px 0 0; padding: 30px 24px calc(28px + env(safe-area-inset-bottom)); }
.ws-auth__inner { max-width: 420px; margin: 0 auto; }
.ws-auth__brand { text-align: center; font: 800 .8rem/1 var(--f-head); letter-spacing: .28em; text-transform: uppercase; color: var(--brand); margin-bottom: 10px; }
.ws-auth__h { text-align: center; font: 700 1.6rem/1.2 var(--f-head); letter-spacing: -.025em; color: var(--ink); text-wrap: balance; }
.ws-auth__sub { text-align: center; color: var(--muted); margin-top: 8px; font-size: .95rem; }
.ws-auth__sub .ws-link { font-size: inherit; }
.ws-auth .ws-roles { margin-top: 22px; gap: 10px; }
.ws-auth .ws-role { padding: 14px; background: var(--surface-2); box-shadow: none; border: 1.5px solid var(--line); border-radius: 16px; }
.ws-auth .ws-role:hover { border-color: var(--brand); background: var(--surface); }
.ws-auth .ws-role__icon { width: 44px; height: 44px; border-radius: 13px; }
.ws-auth__foot { text-align: center; margin-top: 22px; }
.ws-auth__foot .ws-link { font-size: .9rem; gap: 6px; }
.ws-auth__form { display: grid; gap: 12px; margin-top: 24px; }
.ws-inp { position: relative; display: block; }
.ws-inp .ws-i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.ws-inp input { width: 100%; min-height: 54px; padding: 0 16px 0 46px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface-2); font-size: 1rem; color: var(--ink); }
.ws-inp input:focus { outline: none; border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 3px var(--brand-soft); }
.ws-auth__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .9rem; }
.ws-auth__row .ws-check { min-height: 0; align-items: center; }
.ws-auth__row .ws-check input { margin: 0; }
.ws-auth__row .ws-link { font-size: .9rem; }
.ws-auth__go { min-height: 54px; border-radius: 14px; margin-top: 6px; font-size: 1.02rem; }
.ws-auth .ws-or { margin: 22px 0 14px; }
.ws-auth__sso { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ws-ssobtn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; color: var(--ink); }
.ws-ssobtn:hover { border-color: var(--brand); }
.ws-ssobtn__mark { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); font: 800 .65rem/1 var(--f-head); }
.ws-auth__demo { justify-content: center; margin-top: 14px; }

@media (min-width: 768px) {
  .ws-auth__top { min-height: 44vh; padding: 32px 40px 64px; }
  .ws-auth__headline { font-size: 2rem; }
  .ws-art { min-height: 240px; }
}
@media (min-width: 1024px) {
  .ws-auth { flex-direction: row; background: var(--bg); }
  .ws-auth__top, .ws-auth__top--short { flex: 0 0 50%; min-height: 100vh; padding: 44px 56px; }
  .ws-auth__headline { display: none; }
  .ws-art, .ws-auth__top--short .ws-art { min-height: 340px; margin: 24px 0; }
  .ws-auth__top--short .ws-art__ring--2 { display: block; }
  .ws-auth__top--short .ws-art__pill { display: inline-flex; }
  .ws-art__ring--1, .ws-auth__top--short .ws-art__ring--1 { width: 230px; height: 230px; }
  .ws-art__ring--2 { width: 360px; height: 360px; }
  .ws-art__shield, .ws-auth__top--short .ws-art__shield { width: 128px; height: 128px; border-radius: 36px; }
  .ws-art__shield img, .ws-auth__top--short .ws-art__shield img { width: 84px; }
  .ws-art__card--a, .ws-auth__top--short .ws-art__card--a { left: 8%; top: 10%; }
  .ws-art__card--b, .ws-auth__top--short .ws-art__card--b { right: 8%; bottom: 16%; }
  .ws-auth__pitch { display: block; }
  .ws-auth__kicker { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
  .ws-auth__big { font: 700 2.4rem/1.15 var(--f-head); letter-spacing: -.025em; margin-top: 10px; max-width: 16ch; text-wrap: balance; }
  .ws-auth__points { list-style: none; display: grid; gap: 12px; margin-top: 22px; }
  .ws-auth__points li { display: flex; gap: 10px; align-items: flex-start; color: rgba(255, 255, 255, .88); }
  .ws-auth__points .ws-i { color: var(--accent); margin-top: 3px; }
  .ws-auth__sheet { flex: 1; margin: 0; border-radius: 0; background: transparent; display: flex; align-items: center; justify-content: center; padding: 48px; }
  .ws-auth__inner { width: 100%; max-width: 460px; background: var(--surface); border-radius: 28px; padding: 40px 36px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 24px 48px -24px rgba(15, 23, 42, .22); }
  .ws-auth__h { font-size: 1.9rem; }
}

/* Sign in is full-bleed: no page padding or max width around it. */
.ws-page--login { max-width: none; padding: 0; }

/* Measured fixes (Sep 25): cards clear of the shield at every width, no sideways scroll. */
@media (max-width: 767px) {
  .ws-art__card--a { left: 0; top: 0; }
  .ws-art__card--b { right: 0; bottom: 0; }
  .ws-art__pill { display: none; }
  .ws-auth__top--short { min-height: 0; padding-bottom: 60px; }
  .ws-auth__top--short .ws-art { min-height: 96px; margin-top: 18px; }
  .ws-auth__top--short .ws-art__card { display: none; }
}
@media (min-width: 1024px) {
  .ws-art__card--a, .ws-auth__top--short .ws-art__card--a { left: 4%; top: 0; }
  .ws-art__card--b, .ws-auth__top--short .ws-art__card--b { right: 4%; bottom: 4%; }
  .ws-auth__top, .ws-auth__top--short { padding-top: 36px; padding-bottom: 36px; }
}
.ws-profile .ws-row__sub { overflow-wrap: anywhere; }
.ws-profile > div { min-width: 0; }

/* Sign in, desktop rework (Sep 25, Aditya: scrolls on small desktops, looks loose on big ones).
   The page is exactly one screen tall. The art is a fixed-size composition, not stretched over
   the panel, so the cards always sit next to the shield. The pitch lives on the left only. */
.ws-only-d { display: none; }
.ws-auth__legal { display: none; }
@media (min-width: 1024px) {
  .ws-only-m { display: none; }
  .ws-only-d { display: inline; }
  .ws-auth { height: 100vh; min-height: 560px; overflow: hidden; }
  .ws-auth__top, .ws-auth__top--short {
    flex: 0 0 min(50%, 760px); min-height: 0; height: 100%;
    display: grid; grid-template-rows: auto 1fr auto; gap: 16px; padding: clamp(24px, 4vh, 44px) clamp(32px, 4vw, 64px);
  }
  .ws-art, .ws-auth__top--short .ws-art {
    align-self: center; justify-self: center; width: min(440px, 100%); height: clamp(220px, 38vh, 330px); min-height: 0; margin: 0; flex: none;
  }
  .ws-art__ring--1, .ws-auth__top--short .ws-art__ring--1 { width: clamp(150px, 26vh, 220px); height: clamp(150px, 26vh, 220px); }
  .ws-art__ring--2 { width: clamp(220px, 38vh, 330px); height: clamp(220px, 38vh, 330px); }
  .ws-art__shield, .ws-auth__top--short .ws-art__shield { width: clamp(88px, 14vh, 120px); height: clamp(88px, 14vh, 120px); border-radius: 30%; }
  .ws-art__shield img, .ws-auth__top--short .ws-art__shield img { width: 64%; }
  .ws-art__card--a, .ws-auth__top--short .ws-art__card--a { left: 0; top: 8%; bottom: auto; right: auto; }
  .ws-art__card--b, .ws-auth__top--short .ws-art__card--b { right: 0; bottom: 14%; top: auto; left: auto; }
  .ws-art__pill, .ws-auth__top--short .ws-art__pill { display: inline-flex; bottom: 0; }
  .ws-auth__top--short .ws-art__card { display: flex; }
  .ws-auth__big { font-size: clamp(1.8rem, 2.4vw + .4rem, 2.6rem); max-width: 17ch; }
  .ws-auth__points { gap: 10px; margin-top: 18px; font-size: .95rem; }
  .ws-auth__sheet { position: relative; height: 100%; overflow-y: auto; flex-direction: column; gap: 20px; padding: 32px 48px; }
  .ws-auth__inner { max-width: 440px; padding: clamp(28px, 4.5vh, 44px) 40px; }
  .ws-auth__brand { display: none; }
  .ws-auth__legal { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--muted); }
  .ws-auth__h { font-size: 1.85rem; }
  .ws-auth .ws-roles { margin-top: 26px; }
}
@media (min-width: 1024px) and (max-height: 760px) {
  .ws-auth__points { display: none; }
  .ws-auth__inner { padding-top: 26px; padding-bottom: 26px; }
  .ws-auth__form { margin-top: 18px; gap: 10px; }
  .ws-auth .ws-or { margin: 16px 0 12px; }
}
@media (min-width: 1600px) {
  .ws-auth__inner { max-width: 480px; }
  .ws-auth__h { font-size: 2.1rem; }
}
@media (min-width: 1024px) {
  .ws-art__card--a, .ws-auth__top--short .ws-art__card--a { top: 0; }
  .ws-art__card--b, .ws-auth__top--short .ws-art__card--b { bottom: 0; }
  .ws-art__pill, .ws-auth__top--short .ws-art__pill { left: auto; right: 0; top: 4%; bottom: auto; transform: none; }
}

/* =====================================================================
   Lawyer and WorkShield team spaces (Sep 25)
   ===================================================================== */
.ws-avatar--law { background: #0B7A6B; color: #fff; }
.ws-avatar--admin { background: var(--coral); color: var(--ink); }
.ws-todo__icon--brand { background: var(--brand-soft); color: var(--brand); }
.ws-hero2__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .14); }
.ws-hero2__stats span { display: flex; flex-direction: column; font-size: .78rem; color: rgba(255, 255, 255, .72); }
.ws-hero2__stats b { font: 700 1.25rem/1.2 var(--f-head); color: #fff; font-variant-numeric: tabular-nums; }

.ws-cases { display: grid; gap: 12px; }
.ws-case { display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); border: 1.5px solid transparent; transition: border-color .15s, transform .15s; }
.ws-case:hover { border-color: var(--brand); transform: translateY(-1px); }
.ws-case__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.ws-case__ind { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.ws-case__title { font: 700 1.05rem/1.3 var(--f-head); color: var(--ink); }
.ws-case__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.ws-tag { font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--body); }
.ws-case__foot { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; font-size: .82rem; color: var(--muted); padding-top: 10px; border-top: 1px solid #EEF1F5; }
.ws-case__foot b { font: 700 1.1rem/1 var(--f-head); color: var(--ink); margin-right: auto; }

.ws-lanes { display: grid; gap: 16px; }
.ws-lane { background: var(--surface-2); border-radius: 18px; padding: 12px; }
.ws-lane__head { display: flex; align-items: center; gap: 8px; font-size: .9rem; margin: 2px 4px 10px; }
.ws-lane__dot { width: 10px; height: 10px; border-radius: 50%; }
.ws-lane__dot--info { background: var(--info-fill); }
.ws-lane__dot--good { background: var(--good-fill); }
.ws-lane__dot--plain { background: var(--line-strong); }
.ws-lane__n { margin-left: auto; font-size: .8rem; color: var(--muted); font-weight: 600; }
.ws-lane__empty { font-size: .85rem; color: var(--muted); padding: 8px 4px; }
.ws-mcard { display: flex; flex-direction: column; gap: 6px; padding: 14px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); margin-bottom: 8px; }
.ws-mcard:hover { box-shadow: inset 0 0 0 1.5px var(--brand), var(--shadow); }
.ws-mcard__title { font-weight: 700; color: var(--ink); }
.ws-mcard__foot { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; color: var(--muted); }
.ws-mcard__foot b { font: 700 1rem/1 var(--f-head); color: var(--ink); }
.ws-mcard__foot span { display: inline-flex; align-items: center; gap: 4px; }

.ws-dispute { background: #FFF5F1; box-shadow: inset 0 0 0 1px #FFDCCF; }
.ws-dispute .ws-eyebrow { color: var(--coral-ink); }
.ws-dispute .ws-route__title { margin: 2px 0 6px; }

.ws-ch__fill--s1 { fill: var(--brand); }
.ws-ch__fill--s2 { fill: #0E9480; }
.ws-legend__sw--s1 { background: var(--brand); }
.ws-legend__sw--s2 { background: #0E9480; }
.ws-hbar__fill--brand { background: var(--brand); }
.ws-hbar--wide { grid-template-columns: 90px 1fr 64px; }

@media (min-width: 768px) {
  .ws-cases { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
  .ws-lanes { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
  .ws-tr--case { grid-template-columns: 2.4fr .9fr 1.4fr 1.1fr; }
  .ws-hero2__stats { grid-template-columns: repeat(4, 1fr); }
}

/* =====================================================================
   Story mode (Sep 25): a narrator card plus a ring on the part that matters.
   ===================================================================== */
.ws-storybtn {
  display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 14px; padding: 14px 16px; text-align: left;
  border-radius: 16px; background: var(--ink); color: #fff; transition: transform .15s;
}
.ws-storybtn:hover { transform: translateY(-1px); }
.ws-storybtn b { display: block; font: 700 1rem/1.3 var(--f-head); }
.ws-storybtn > span:last-child > span { font-size: .82rem; color: rgba(255, 255, 255, .7); }
.ws-storybtn__play { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--coral); color: var(--ink); flex: none; }

.ws-story {
  position: fixed; z-index: 98; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  padding: 0 18px 16px; border-radius: 22px; background: #0B1B33; color: #fff; overflow: hidden;
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, .5);
}
.ws-story__bar { height: 4px; margin: 0 -18px 14px; background: rgba(255, 255, 255, .12); }
.ws-story__bar span { display: block; height: 100%; background: var(--coral); transition: width .3s ease; }
.ws-story__head { display: flex; align-items: center; gap: 10px; }
.ws-story__head .ws-avatar { width: 36px; height: 36px; font-size: .78rem; }
.ws-story__who { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: .78rem; color: rgba(255, 255, 255, .7); }
.ws-story__who b { font: 700 .95rem/1.2 var(--f-head); color: #fff; }
.ws-story .ws-iconbtn { color: rgba(255, 255, 255, .8); width: 40px; height: 40px; }
.ws-story .ws-iconbtn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.ws-story__title { font: 700 1.15rem/1.3 var(--f-head); margin-top: 12px; }
.ws-story__text { font-size: .92rem; line-height: 1.5; color: rgba(255, 255, 255, .85); margin-top: 6px; }
.ws-story__actions { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.ws-story__n { margin-right: auto; font-size: .8rem; color: rgba(255, 255, 255, .6); font-variant-numeric: tabular-nums; }
.ws-story .ws-btn--ghost { color: rgba(255, 255, 255, .8); }
.ws-story .ws-btn--ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.ws-story .ws-btn--primary { background: var(--coral); color: var(--ink); }
.ws-story .ws-btn--primary:hover { background: var(--coral-hover); }
.ws-story :focus-visible { outline-color: var(--accent); }
.ws-story-ring {
  position: fixed; z-index: 97; pointer-events: none; border-radius: 16px; border: 3px solid var(--coral);
  transition: top .3s ease, left .3s ease, width .3s ease, height .3s ease;
}
@media (prefers-reduced-motion: no-preference) {
  .ws-story-ring { animation: ws-ring 1.8s ease-in-out infinite; }
  @keyframes ws-ring { 0%, 100% { border-color: var(--coral); } 50% { border-color: rgba(255, 122, 89, .45); } }
}
body.is-story .ws-fab, body.is-story .ws-tabs { display: none !important; }
body.is-story { padding-bottom: 300px; }
body.is-story .ws-toast { bottom: auto; top: 20px; }
@media (min-width: 1024px) {
  .ws-story { left: auto; right: 24px; bottom: 24px; width: 400px; }
  body.is-story { padding-bottom: 0; }
  body.is-story .ws-page { padding-bottom: 320px; }
}

/* Paid-late paydays are settled: amber, not the coral used for open problems. */
.ws-segdot--settled { background: #F6B85A; }

/* Story pause and resume (Sep 25). */
.ws-story__pause { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .1); color: #fff; font-size: .82rem; font-weight: 600; }
.ws-story__pause:hover { background: rgba(255, 255, 255, .18); }
.ws-storypill {
  position: fixed; z-index: 96; left: 12px; bottom: calc(var(--tabs-h) + 14px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 2px; max-width: calc(100vw - 96px); padding: 4px; border-radius: 999px;
  background: #0B1B33; color: #fff; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .5);
}
.ws-storypill__go { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px 12px 6px 6px; border-radius: 999px; text-align: left; color: #fff; }
.ws-storypill__go:hover { background: rgba(255, 255, 255, .08); }
.ws-storypill__play { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--coral); color: var(--ink); flex: none; }
.ws-storypill__txt { display: flex; flex-direction: column; min-width: 0; font-size: .75rem; color: rgba(255, 255, 255, .7); line-height: 1.3; }
.ws-storypill__txt b { font-size: .88rem; color: #fff; }
.ws-storypill__txt span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-storypill__x { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: rgba(255, 255, 255, .7); flex: none; }
.ws-storypill__x:hover { background: rgba(255, 255, 255, .1); color: #fff; }
body.is-welcome .ws-storypill { bottom: calc(16px + env(safe-area-inset-bottom)); }
@media (min-width: 1024px) {
  .ws-storypill { left: calc(var(--side-w) + 24px); bottom: 24px; max-width: 420px; }
  body.is-welcome .ws-storypill { left: 24px; }
}
