/* enCompliance client app -- base styles.
   Palette and type taken from the "enCompliance Client App" mockup canvas
   (Main + Dashboard artboards). Mobile-first: phone layout is the default,
   wider screens only get a centred max-width column. */
:root {
  --ink: #111318;        /* text, primary buttons, state chips */
  --ink-2: #3D4250;      /* body text on tinted panels */
  --muted: #5B6170;      /* secondary text */
  --line: #E3E5EA;       /* card borders, header rule */
  --line-2: #C9CDD6;     /* input borders */
  --ground: #F4F5F7;     /* page background */
  --surface: #FFFFFF;
  --link: #1668C0;
  --link-hover: #0F4F94;
  --warn-bg: #FFF4D6;  --warn: #8A5A00;
  --alert-bg: #FFE9E5; --alert: #B42A17;
  --info-bg: #E6F1FD;  --info: #0F4F94;
  /* Brand stripe (logo bars) */
  --b-red: #FD4F37; --b-blue: #2894EF; --b-yellow: #FFC643; --b-green: #26CB4B;
  --radius: 14px;
  --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
/* Outfit, self-hosted (SIL OFL 1.1, static/fonts/OFL.txt). One variable
   file per subset covers weights 400-700. Same unicode ranges Google serves. */
@font-face {
  font-family: 'Outfit'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('fonts/outfit-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Outfit'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('fonts/outfit-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
                 U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
                 U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font);
       font-size: 16px; line-height: 1.45; }
a { color: var(--link); } a:hover { color: var(--link-hover); }

.stripe { display: flex; height: 4px; }
.stripe span { flex: 1; }
.stripe span:nth-child(1) { background: var(--b-red); }
.stripe span:nth-child(2) { background: var(--b-blue); }
.stripe span:nth-child(3) { background: var(--b-yellow); }
.stripe span:nth-child(4) { background: var(--b-green); }

.topbar { display: flex; align-items: center; justify-content: space-between;
          padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar img { height: 30px; width: auto; display: block; }
.topbar .product { font-size: 12px; font-weight: 600; letter-spacing: .14em;
                   text-transform: uppercase; color: var(--muted); }

main.page { padding: 20px; display: flex; flex-direction: column; gap: 16px;
            max-width: 720px; margin: 0 auto; }
.eyebrow { margin: 0; font-size: 14px; color: var(--muted); }
h1 { margin: 4px 0 0; font-size: 28px; font-weight: 700; letter-spacing: -.01em; }
h2 { margin: 0; font-size: 16px; font-weight: 600; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
        padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.note { padding: 14px 16px; border-radius: 12px; background: var(--ground);
        font-size: 14px; color: var(--ink-2); }
.btn { display: flex; align-items: center; justify-content: center; min-height: 52px;
       border-radius: 12px; background: var(--ink); color: #fff; font-size: 16px;
       font-weight: 600; text-decoration: none; padding: 0 20px; }
.btn:hover { color: #fff; background: #000; }

footer.foot { padding: 20px 28px 28px; display: flex; justify-content: center; gap: 16px;
              font-size: 13px; color: var(--muted); }

.topbar .right { display: flex; align-items: center; gap: 12px; }
.linkbtn { min-height: 44px; padding: 0 14px; border: 1px solid #D5D8DF; border-radius: 22px;
           background: var(--surface); color: var(--ink); font: 600 14px var(--font); cursor: pointer; }
.linkbtn:hover { border-color: var(--ink); }
.inline { margin: 0; }

/* Sign-in / set-password: the mockup's "Sign in" artboard. White ground,
   6px stripe, centred logo, single column. */
body.auth { background: var(--surface); }
body.auth .stripe { height: 6px; }
.auth-main { padding: 64px 28px 32px; display: flex; flex-direction: column; gap: 28px;
             max-width: 440px; margin: 0 auto; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.brand img { width: 200px; height: auto; }
.brand p { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .14em;
           text-transform: uppercase; color: var(--muted); }
.heading { display: flex; flex-direction: column; gap: 6px; }
.heading h1 { margin: 0; }
.heading p { margin: 0; font-size: 15px; color: var(--muted); }
.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field input { height: 50px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 12px;
               font: 400 16px var(--font); color: var(--ink); background: var(--surface); width: 100%; }
.field input:focus { outline: 2px solid var(--link); outline-offset: 1px; border-color: var(--link); }
.hint { margin: 0; font-size: 13px; color: var(--muted); }
button.btn { border: 0; cursor: pointer; width: 100%; margin-top: 6px; font-family: var(--font); }
.msg { padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.msg.error { background: var(--alert-bg); color: var(--alert); font-weight: 600; }
.msg.ok { background: var(--info-bg); color: var(--info); font-weight: 600; }
.msg.warn { background: var(--warn-bg); color: var(--warn); font-weight: 600; }
/* The result of an action stays in view when the page lands on an anchor
   (#st-XX, #offboarding...): sticky at the top, and anchor targets stop
   below it. */
main.page > p.msg { position: sticky; top: 8px; z-index: 5; box-shadow: 0 4px 14px rgba(17, 19, 24, .12); }

/* Admin screens -- the mockup's "Admin: client users" artboard. */
.topbar .left { display: flex; align-items: center; gap: 10px; }
.badge { height: 24px; padding: 0 8px; border-radius: 6px; background: var(--ink); color: #fff;
         font-size: 12px; font-weight: 700; letter-spacing: .06em; display: inline-flex; align-items: center; }
.btn.secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); }
.btn.secondary:hover { border-color: var(--ink); color: var(--ink); background: var(--surface); }
.btn.danger { background: var(--alert); }
.btn.danger:hover { background: #8F1F10; }
.filter { display: flex; gap: 8px; align-items: flex-end; }
.filter .field { flex: 1; }
/* Every <select> in the app looks like the other inputs (Neo, 2026-10-07:
   "Notice received by" sat in .inline-form and missed the old .field rule). */
main.page select { height: 50px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 12px;
                   background: var(--surface); font: 400 16px var(--font); color: var(--ink); width: 100%; }
main.page .inline-form select { height: 48px; padding: 0 12px; }   /* = .inline-form input */
main.page select:focus { outline: 2px solid var(--link); outline-offset: 1px; border-color: var(--link); }
.filter .btn { min-height: 48px; width: auto; margin: 0; }
.field label.sub { font-size: 13px; color: var(--ink-2); }
fieldset.roles { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 8px; }
fieldset.roles legend { padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
/* Target / contracted onboarding date choice (Add states, Change group, re-add; Chat A 11/03): a box
   like the app's cards, not the browser's default fieldset; the legend floats so it sits inside. */
fieldset.date-choice { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius);
                       background: var(--surface); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
fieldset.date-choice legend { float: left; width: 100%; padding: 0; margin: 0 0 6px; font-size: 14px;
                              font-weight: 600; color: var(--ink); }
fieldset.date-choice input[type=date] { height: 48px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 12px;
                                        font: 400 16px var(--font); color: var(--ink); background: var(--surface);
                                        width: 100%; max-width: 100%; box-sizing: border-box; }
fieldset.date-choice input[type=date]:focus { outline: 2px solid var(--link); outline-offset: 1px; border-color: var(--link); }
fieldset.date-choice .hint { margin: 4px 0 0; }
.role-opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line-2);
            border-radius: 12px; cursor: pointer; }
.role-opt:has(input:checked) { border: 2px solid var(--ink); padding: 11px; }
.role-opt input { width: 20px; height: 20px; margin: 2px 0 0; flex-shrink: 0; }
.role-opt span.t { display: flex; flex-direction: column; gap: 2px; }
.role-opt b { font-size: 15px; font-weight: 600; }
.role-opt small { font-size: 13px; color: var(--muted); }
.list { padding: 4px 16px; gap: 0; }
.row { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid #EEF0F3;
       text-decoration: none; color: var(--ink); }
.row:last-child { border-bottom: 0; }
.row:hover { color: var(--ink); }
.row .who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row .who b { font-size: 15px; font-weight: 600; }
.row .who span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.row .more { width: 44px; height: 44px; border-radius: 10px; border: 1px solid #D5D8DF; flex-shrink: 0;
             display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; }
.st { font-weight: 600; }
.st-invited { color: var(--warn); }
.st-locked, .st-deactivated { color: var(--alert); }
.st-active { color: #1B7A35; }
dl.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
.actions { display: flex; flex-direction: column; gap: 10px; }
.actions form { margin: 0; }
.actions .btn { width: 100%; }
.linkbox { display: flex; flex-direction: column; gap: 8px; }
.linkbox input { height: 48px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 12px;
                 font: 400 14px var(--font); width: 100%; background: var(--ground); }
.empty { color: var(--muted); font-size: 14px; padding: 12px 0; margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* "Show password" checkbox (static/password-toggle.js). The whole label is the
   touch target: at least 44px tall, box enlarged to 20px. */
.show-pw label { display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
                 font-size: 15px; font-weight: 500; color: var(--ink-2); cursor: pointer;
                 -webkit-tap-highlight-color: transparent; }
.show-pw input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); cursor: pointer; }
.show-pw input:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.show-pw[hidden] { display: none; }

/* Companies + Our states */
.count { display: inline-flex; min-width: 28px; height: 24px; padding: 0 8px; border-radius: 12px;
         background: var(--ground); color: var(--ink); font-size: 13px; font-weight: 700;
         align-items: center; justify-content: center; }
.count.hot { background: var(--alert); color: #fff; }
.row .count { flex-shrink: 0; }
.qitem { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-bottom: 1px solid #EEF0F3; }
.qitem:last-child { border-bottom: 0; }
.qitem .who { display: flex; flex-direction: column; gap: 2px; }
.qitem .who b { font-size: 15px; font-weight: 600; }
.qitem .who span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.qitem form { margin: 0; }
.qitem .btn { width: 100%; }
.days { font-weight: 600; }
.qitem .who .days.urgent { color: var(--alert); }
details summary { min-height: 44px; display: flex; align-items: center; cursor: pointer;
                  font-size: 14px; font-weight: 600; color: var(--link); }
.cl-edit { min-height: 44px; display: flex; align-items: center; align-self: flex-start;
           font-size: 14px; font-weight: 600; color: var(--link); text-decoration: none; }
.inline-form { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 8px; }
.inline-form input, .field input[type=date] { height: 48px; padding: 0 12px; border: 1px solid var(--line-2);
                      border-radius: 12px; font: 400 16px var(--font); width: 100%; background: var(--surface); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.statepick { margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.statepick label { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 8px;
                   border: 1px solid var(--line-2); border-radius: 10px; font-weight: 600; font-size: 14px; cursor: pointer; }
.statepick label:has(input:checked) { border: 2px solid var(--ink); padding: 0 7px; }
.statepick input { width: 18px; height: 18px; margin: 0; }
.pill { display: inline-flex; height: 20px; padding: 0 8px; border-radius: 10px; font-size: 12px;
        font-weight: 700; align-items: center; vertical-align: middle; background: #EEF0F3; color: var(--ink); }
.pill-requested { background: var(--warn-bg); color: var(--warn); }
.pill-onboarding { background: var(--info-bg); color: var(--info); }
.pill-live { background: #E3F6E8; color: #1B7A35; }
.pill-offboarding { background: var(--alert-bg); color: var(--alert); }
.pill-offboarded { background: #EEF0F3; color: var(--muted); }
.role-opt.off { opacity: .45; cursor: not-allowed; }

/* Deadline colours (deadlines.py). Text is always shown with the colour.
   Yellow uses dark text: white on #FFC643 fails contrast. */
/* The chip selectors repeat under .qitem .who so the row's muted text colour
   (.qitem .who span) can never override a chip's own text colour. */
.btn.dl-neutral, .dl.dl-neutral, .qitem .who .dl.dl-neutral { background: var(--surface); color: var(--ink); border: 2px solid var(--line-2); }
.btn.dl-green,   .dl.dl-green,   .qitem .who .dl.dl-green   { background: #1B7A35; color: #fff; }
.btn.dl-yellow,  .dl.dl-yellow,  .qitem .who .dl.dl-yellow  { background: #FFC643; color: #111318; }
.btn.dl-red,     .dl.dl-red,     .qitem .who .dl.dl-red     { background: var(--alert); color: #fff; }
.btn.dl-overdue, .dl.dl-overdue, .qitem .who .dl.dl-overdue { background: #7A1608; color: #fff; }
.btn.dl-neutral:hover { border-color: var(--ink); color: var(--ink); background: var(--surface); }
.btn.dl-green:hover, .btn.dl-red:hover, .btn.dl-overdue:hover { color: #fff; filter: brightness(.92); }
.btn.dl-yellow:hover { color: #111318; filter: brightness(.95); }
.dl { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 12px;
      font-size: 12px; font-weight: 700; white-space: nowrap; }
.btn:has(.dlt) { flex-direction: column; gap: 2px; padding: 8px 16px; text-align: center; }
.btn .dlt { font-weight: 500; font-size: 14px; }

/* Admin top navigation */
.adminnav { display: flex; gap: 4px; padding: 6px 12px; background: var(--surface);
            border-bottom: 1px solid var(--line); overflow-x: auto; }
.adminnav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
              border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--muted);
              text-decoration: none; white-space: nowrap; }
.adminnav a:hover { color: var(--ink); background: var(--ground); }
.adminnav a[aria-current="page"] { color: #fff; background: var(--ink); }
.back { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; }
.radios { display: flex; flex-wrap: wrap; gap: 8px; }
.radios label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
                border: 1px solid var(--line-2); border-radius: 10px; font-weight: 600; cursor: pointer; }
.radios label:has(input:checked) { border: 2px solid var(--ink); padding: 0 11px; }
.field input[type=number] { height: 48px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 12px;
                            font: 400 16px var(--font); width: 100%; }
.facts-sm { font-size: 13px; color: var(--muted); }

/* Inline form errors (server-rendered; see admin_company_form.html) */
.field-error { margin: 2px 0 0; font-size: 14px; font-weight: 600; color: var(--alert); }
[aria-invalid="true"] { border: 2px solid var(--alert) !important; }
#form-errors ul { margin: 6px 0 0; padding-left: 18px; }
#form-errors a { color: var(--alert); }
p.inline { margin: 0; }

/* Coverage history (migration 026) */
ol.periods { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
ol.periods > li { border: 1px solid var(--line-2); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
ol.periods .sub { font-size: 13px; color: var(--muted); }
.unknown { color: var(--muted); font-style: italic; }

/* ---------------------------------------------------------------------------
   Client app shell (DESIGN_SPEC.md, artboards 2-7): header with the account
   button, fixed 5-tab bar. Staff pages do not get .has-tabs. */
.acct { position: relative; }
/* Needs-review bell (notices.py): next to the account button; count badge. */
.top-right { display: flex; align-items: center; gap: 8px; }
.bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
        border-radius: 22px; border: 1px solid #D5D8DF; background: var(--surface); color: var(--ink); }
.bell:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.bell[aria-current="page"] { border: 2px solid var(--ink); }
.bell-n { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px;
          border-radius: 10px; background: var(--alert); color: #fff; font-size: 12px; font-weight: 700; line-height: 1; }
.bell .bell-n { position: absolute; top: -4px; right: -6px; }
/* Notification rows (_notice_row.html): text | pills, Reviewed button on its own line */
.nrow { flex-wrap: wrap; align-items: flex-start; }
.nrow .lic-pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.row.nrow .who .nrow-ok { color: #1B7A35; font-weight: 600; }
.row.nrow .who .nrow-late { color: var(--alert); font-weight: 600; }
.notice-review, .notice-snooze { flex-basis: 100%; margin: 0; }
@media (max-width: 599.98px) { .nrow .who { flex-basis: 100%; } .nrow .lic-pills { order: -1; flex-basis: 100%; justify-content: flex-start; } }
.notice-review .btn { width: auto; margin-top: 0; min-height: 44px; }
.acct summary { list-style: none; width: 44px; height: 44px; border-radius: 22px; border: 1px solid #D5D8DF;
                background: var(--surface); display: flex; align-items: center; justify-content: center;
                font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; min-height: 0; }
.acct summary::-webkit-details-marker { display: none; }
.acct summary:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.acct-menu { position: absolute; right: 0; top: 52px; z-index: 20; width: 240px; padding: 14px;
             background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
             box-shadow: 0 8px 24px rgba(17, 19, 24, .12); display: flex; flex-direction: column; gap: 12px; }
.acct-menu p { margin: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.acct-menu p span { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.acct-menu .btn { min-height: 44px; margin: 0; }

body.has-tabs main.page { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
          height: calc(80px + env(safe-area-inset-bottom)); padding: 4px 6px calc(18px + env(safe-area-inset-bottom));
          background: var(--surface); border-top: 1px solid var(--line);
          display: flex; justify-content: space-around; align-items: center; }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
       min-width: 64px; min-height: 52px; font-size: 11px; font-weight: 500; color: var(--muted); text-decoration: none; }
.tab:hover { color: var(--ink); }
.tab[aria-current="page"] { color: var(--ink); font-weight: 700; }
.tab:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 8px; }
@media (min-width: 760px) and (max-width: 1023.98px) {   /* tablet: same bar, content width */
  .tabbar { padding-left: calc(50% - 360px); padding-right: calc(50% - 360px); }
}
@media (min-width: 1024px) {     /* desktop: ONE sticky bar -- logo left, tabs centred, account right */
  body.has-tabs main.page { padding-bottom: 40px; }
  .client-top { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: 1fr auto 1fr;
                align-items: center; gap: 16px; padding: 0 24px; min-height: 64px; }
  .client-top > a { justify-self: start; }
  .client-top > .top-right { justify-self: end; }
  .tabbar { position: static; height: auto; padding: 0; border: 0; background: none;
            justify-content: center; gap: 4px; }
  .tab { flex-direction: row; gap: 8px; min-height: 64px; padding: 0 14px; font-size: 15px;
         border-bottom: 3px solid transparent; }
  .tab svg { width: 20px; height: 20px; }
  .tab[aria-current="page"] { border-bottom-color: var(--ink); }
  /* clear the sticky bar (64px): messages and #st-XX jumps stop below it */
  body.has-tabs main.page > p.msg { top: 72px; }
}

/* Client screens */
.lede { margin: 4px 0 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.card h2 + .attn, .card > .attn:first-of-type { margin-top: 0; }
.attn { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 10px;
        color: var(--ink); text-decoration: none; font-size: 14px; line-height: 1.4; }
.attn:hover { color: var(--ink); }
.attn .bdg { flex-shrink: 0; min-width: 62px; height: 26px; padding: 0 8px; border-radius: 6px; color: #fff;
             font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.attn.warn { background: var(--warn-bg); } .attn.warn .bdg { background: var(--warn); }
.attn.alert { background: var(--alert-bg); } .attn.alert .bdg { background: var(--alert); }
.attn.info { background: var(--info-bg); } .attn.info .bdg { background: var(--info); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px;
        display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 26px; font-weight: 700; line-height: 1.2; }
.stat span { font-size: 12px; line-height: 1.3; color: var(--muted); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card-head a { font-size: 14px; font-weight: 500; }
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.tiles > * { height: 36px; border-radius: 8px; background: #EEF0F3; color: var(--ink); font-size: 14px; font-weight: 600;
             display: flex; align-items: center; justify-content: center; text-decoration: none; }
a.tile:hover { color: var(--ink); background: #E3E5EA; }
.tile-group { display: flex; flex-direction: column; gap: 8px; }
.tile-group h3 { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--line-2); background: var(--surface);
        color: var(--ink); font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; text-decoration: none; }
.chip:hover { color: var(--ink); border-color: var(--ink); }
.chip[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.dlrow { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--surface);
         border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.dlrow:hover { color: var(--ink); border-color: var(--line-2); }
.dlrow b { flex-grow: 1; font-size: 15px; font-weight: 600; }
.dlrow span { font-size: 13px; color: var(--muted); }
.rule { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
        display: flex; flex-direction: column; gap: 8px; }
.rule .cite { font-size: 13px; font-weight: 600; color: var(--link); overflow-wrap: anywhere; }
.rule h2 { font-size: 17px; line-height: 1.35; }
.rule p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.rule .req { display: flex; flex-direction: column; gap: 6px; }
.rule .req-list { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.5; color: var(--ink-2); overflow-wrap: anywhere; }
.rule .req-list li + li { margin-top: 4px; }
.rule .meta { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
.rule .meta a { font-weight: 500; }
.fine { margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.soon { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.soon b { font-size: 16px; font-weight: 600; }
.soon p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.st-card { padding-top: 4px; padding-bottom: 4px; }
.st-card .qitem .who b { font-size: 16px; font-weight: 700; }

/* Lease check (artboard 5) */
.notice { padding: 12px 14px; border-radius: 12px; background: var(--info-bg); color: var(--ink);
          display: flex; flex-direction: column; gap: 4px; }
.notice p { margin: 0; font-size: 14px; line-height: 1.5; }
.notice .draft { font-size: 12px; letter-spacing: .06em; color: var(--alert); }
.drop { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 16px; text-align: center;
        border: 2px dashed var(--line-2); border-radius: 12px; background: #FAFBFC; }
.drop label { font-size: 15px; font-weight: 600; }
.drop input[type=file] { max-width: 100%; font: 400 14px var(--font); }
.drop input[type=file]::file-selector-button { height: 44px; padding: 0 16px; margin-right: 10px; border-radius: 10px;
        border: 1px solid var(--ink); background: var(--surface); font: 600 15px var(--font); color: var(--ink); cursor: pointer; }
.sevs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sev { padding: 10px; border-radius: 10px; display: flex; flex-direction: column; }
.sev b { font-size: 22px; font-weight: 700; }
.sev span { font-size: 12px; }
.sev-crit { background: var(--alert-bg); } .sev-crit b { color: var(--alert); } .sev-crit span { color: #7A1D10; }
.sev-imp { background: var(--warn-bg); } .sev-imp b { color: var(--warn); } .sev-imp span { color: #6B4600; }
.sev-oth { background: #EEF0F3; } .sev-oth b { color: var(--ink); } .sev-oth span { color: var(--ink-2); }
.chiprow { display: flex; gap: 8px; align-items: center; }
.sevchip { height: 24px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 700;
           display: inline-flex; align-items: center; background: #EEF0F3; color: var(--ink-2); }
.sevchip-critical { background: var(--alert-bg); color: var(--alert); }
.sevchip-important { background: var(--warn-bg); color: var(--warn); }
.finding h3 { margin: 0; font-size: 16px; font-weight: 600; }
.finding .excerpt { font-style: italic; color: var(--muted); }
.suggest { padding: 12px; border-radius: 10px; background: var(--ground); display: flex; flex-direction: column; gap: 4px; }
.suggest span { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.suggest p { color: var(--ink); }
.snap { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-top: 1px solid #EEF0F3; }
.snap p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
/* "What the law requires" and the rules snapshot: " - " runs as a list, the Laws page formatter, at render time only */
.suggest .req-list, .snap .req-list { margin: 0; padding-left: 20px; line-height: 1.5; overflow-wrap: anywhere; }
.suggest .req-list { font-size: 14px; color: var(--ink); }
.snap .req-list { font-size: 13px; color: var(--ink-2); }
.suggest .req-list li + li, .snap .req-list li + li { margin-top: 4px; }
dl.facts code { font-size: 12px; overflow-wrap: anywhere; }

/* Password label with "Forgot password?" on the same line (Main artboard) */
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.label-row label { font-size: 14px; font-weight: 600; }
.label-row a { font-size: 14px; font-weight: 500; }
.acct-menu a.btn { min-height: 44px; margin: 0; }
a.linkbtn { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 600; }
.fine-box { display: flex; flex-direction: column; gap: 4px; }
.fine-box .draft { font-size: 12px; letter-spacing: .06em; color: var(--alert); }

/* Staff header on phones: logo + badge + Password + Sign out fit on one line
   without the product label (it is on the sign-in page and in the title). */
@media (max-width: 440px) {
  .topbar .product { display: none; }
  .topbar .linkbtn { padding: 0 12px; white-space: nowrap; }
}

/* Admin: client profile changes (old -> new) */
.facts.changes dd { overflow-wrap: anywhere; }
.facts.changes .old { color: var(--muted); text-decoration: line-through; }

/* Changes feed (artboard 3) + Home "Recent changes" */
.st-code { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 24px; padding: 0 6px;
           border-radius: 6px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; }
/* inside a list row (staff Hidden view) the row's muted span colour must not win */
.qitem .who .st-code { color: #fff; }
.chg { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
       display: flex; flex-direction: column; gap: 8px; }
.chg-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chg-type { font-size: 13px; font-weight: 600; color: var(--muted); }
.chg h2 { font-size: 17px; line-height: 1.35; overflow-wrap: anywhere; }
.chg p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); overflow-wrap: anywhere; }
.chg .meta { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
.chg .meta a { font-weight: 500; }
/* Status tones: the table is feed.TONES (one mapping; a test checks these match) */
.tone-success { background: #E3F6E8; color: #17692F; }
.tone-warning { background: #FFF4D6; color: #8A5A00; }
.tone-danger { background: #FFE9E5; color: #B42A17; }
.tone-neutral { background: #EEF0F3; color: #111318; }
.tone-info { background: #E6F1FD; color: #0F4F94; }
.pill-hidden { background: #EEF0F3; color: var(--ink); border: 1px dashed var(--line-2); }
pre.diff { margin: 8px 0 0; max-height: 360px; overflow: auto; padding: 10px; border-radius: 8px; background: #F6F7F9;
           font-size: 12px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.pager { display: flex; justify-content: space-between; gap: 12px; }
.chg-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; color: var(--ink); text-decoration: none;
           border-top: 1px solid var(--line); }
.chg-row:first-of-type { border-top: 0; }
.chg-row > span:last-child { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.chg-row > span:last-child span { font-size: 13px; color: var(--muted); }

/* Admin: pilot features */
.qitem.pilot .master { font-weight: 600; }
.qitem.pilot .master.off { color: var(--warn); }
.qitem.pilot .master.on { color: #1B7A35; }

/* Onboarding started after the contracted target */
.late { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 10px;
        background: var(--alert-bg); color: var(--alert); font-size: 12px; font-weight: 700; }

/* Staff header (Neo, 2026-10-14): one sticky bar. Phones: logo + STAFF and a
   Menu button (a checkbox, CSS only) that opens the links.
   Bug 6: EVERY menu / :checked rule lives in the phone query below, so the
   desktop layout never depends on the checkbox (open the menu narrow, widen
   the window: the desktop bar is unchanged). */
.staff-top { position: sticky; top: 0; z-index: 10; flex-wrap: wrap; }
.menu-toggle { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; }
.staff-links .adminnav { padding: 0; border: 0; overflow: visible; background: none; }   /* every width */
.staff-links .adminnav a { min-height: 44px; }
.staff-actions { display: flex; gap: 6px; }
.staff-actions .linkbtn, .staff-actions button { min-height: 44px; }
.staff-actions a.linkbtn[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }
body.has-staff main.page > p.msg { top: 72px; }
@media not all and (min-width: 1024px) {     /* phones + tablets: exactly the complement of the desktop query */
  .menu-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid #D5D8DF;
              border-radius: 22px; font-size: 15px; font-weight: 600; cursor: pointer; user-select: none; }
  .menu-toggle:focus-visible + .menu-btn { outline: 2px solid var(--link); outline-offset: 2px; }
  .menu-toggle:checked + .menu-btn { background: var(--ink); color: #fff; border-color: var(--ink); }
  /* a panel under the Menu button, right edge on the button's right edge (the bar's 20px padding) */
  .staff-links { display: none; position: absolute; top: calc(100% + 4px); right: 20px; z-index: 11;
                 width: min(260px, calc(100vw - 40px)); max-height: calc(100vh - 100px); overflow-y: auto;
                 flex-direction: column; gap: 6px; padding: 8px; box-sizing: border-box; background: var(--surface);
                 border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 24px rgba(17, 20, 26, .14); }
  .menu-toggle:checked ~ .staff-links { display: flex; }
  .staff-links .adminnav { flex-direction: column; }
  .staff-actions { flex-direction: column; }
  .staff-actions .linkbtn, .staff-actions form, .staff-actions button { width: 100%; justify-content: center; }
}
@media (min-width: 1024px) {
  .staff-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
               padding: 0 24px; min-height: 64px; }
  .menu-toggle, .menu-btn { display: none; }
  .staff-links { display: contents; }
  .staff-links .adminnav { flex-direction: row; justify-self: center; }
  .staff-actions { flex-direction: row; justify-self: end; align-items: center; }
}
@media (min-width: 1024px) and (max-width: 1279.98px) {   /* 8 staff links (Urgent, Support, 10/19): tighter at 1024 */
  .staff-top { gap: 8px; padding: 0 16px; }
  .staff-links .adminnav a { padding: 0 9px; }
}

/* Email preferences (digest stage 2): state checkboxes in compact option
   cards -- one column on phones, two from 600px, three from 1024px. */
.state-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.role-opt.state-opt { padding: 10px 12px; align-items: center; }
.role-opt.state-opt:has(input:checked) { padding: 9px 11px; }
.role-opt.state-opt input { margin: 0; }
@media (min-width: 600px) { .state-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .state-grid { grid-template-columns: 1fr 1fr 1fr; } }
.digest-status { display: flex; flex-direction: column; gap: 4px; }
.pick-all { display: flex; gap: 8px; }
/* width:auto overrides button.btn's 100%: with flex 0 0 auto (>=600px) each
   button otherwise took the whole card and "Clear all" overflowed it (Neo 10/18). */
.pick-all .btn { min-height: 44px; flex: 1; font-size: 15px; width: auto; margin-top: 0; }
@media (min-width: 600px) { .pick-all .btn { flex: 0 0 auto; } }

/* Pill tabs (Neo, 2026-10-16): Settings (Password · Email) and the company
   page's jump tabs. Current = ink fill, the same look as the staff header's
   current page and the selected filter chip. */
.pilltabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.pilltabs::-webkit-scrollbar { display: none; }
.pilltabs a { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
              border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface);
              color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.pilltabs a:hover { border-color: var(--ink); }
.pilltabs a[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }
/* Neo 11/17, Companies request tabs: long labels wrap instead of scrolling out of sight. */
.pilltabs-wrap { flex-wrap: wrap; overflow-x: visible; margin-top: 24px; }
.pilltabs-wrap a { flex: 0 1 auto; white-space: normal; text-align: left; }
.co-tabpanel { margin-top: 12px; }
.co-tabpanel[hidden] { display: none; }                 /* .card sets display; hidden must win */
/* Company page: jump tabs stick under the staff bar on phones; from 1024px
   they become a side menu beside a wider column. */
.ctabs-wrap, .ctabs-body { display: flex; flex-direction: column; gap: 16px; }
.ctabs { position: sticky; top: 69px; z-index: 4; background: var(--ground); padding: 8px 0; margin: -8px 0; }
.subhead { margin: 8px 0 0; font-size: 15px; font-weight: 600; }
@media (min-width: 1024px) {
  body.company-page main.page, body.tabs-page main.page { max-width: 960px; }
  .ctabs-wrap { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; align-items: start; }
  .ctabs { flex-direction: column; top: 88px; margin: 0; padding: 0; background: none; overflow: visible; }
  .ctabs a { border-radius: 12px; }
}
h1 + .pilltabs { margin: 12px 0 8px; }
/* Digest preview (staff): the email in a frame, the text version as-is. */
.digest-frame iframe { width: 100%; height: 900px; border: 1px solid var(--line-2); border-radius: 12px; background: #F4F5F7; }
.digest-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 400 13px/1.5 ui-monospace, Menlo, Consolas, monospace; }
.mono-break { overflow-wrap: anywhere; font-size: 12px; }

/* Licenses (L2): list rows with status pills; history lines. */
.lic-row { align-items: flex-start; }
.lic-row .who span { display: block; }
.lic-pills { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; flex-shrink: 0; max-width: 50%; }
.lic-row .who { flex: 1; min-width: 0; }
.lic-off { opacity: .6; }
.lic-company { margin: -6px 0 6px; }
.lic-add, #licenses details, #partners details { margin-top: 8px; }
.inline-act { margin-top: 12px; }
.hist-row { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid #EEF0F3;
            font-size: 14px; overflow-wrap: anywhere; }
.imp-err { color: var(--alert); }
.imp-row .who > span + span { margin-top: 2px; }
/* SE brokers page (Neo 2026-10-16): coverage filters + rows with a two-click End. */
.filters { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin: 4px 0 8px; }
.filters .field { flex: 1 1 160px; margin: 0; }
.filters select { height: 48px; padding: 0 12px; }
.cov-row { border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.cov-row .row { border-bottom: 0; }
.cov-end summary { font-size: 14px; }
.filters .btn { width: auto; flex: 0 0 auto; padding: 0 20px; height: 48px; }
/* Support tickets (support.py; Neo 2026-10-19): message thread + text boxes. */
.field textarea { padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; font: 400 16px var(--font);
                  color: var(--ink); background: var(--surface); width: 100%; min-height: 120px; resize: vertical; }
.field textarea:focus { outline: 2px solid var(--link); outline-offset: 1px; border-color: var(--link); }
.tsubject, .tk-row .who b { overflow-wrap: anywhere; }
ol.thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tmsg { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface); }
.tmsg.staff { background: var(--info-bg); border-color: transparent; }
.tmeta { margin: 0 0 4px; font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 2px 8px; }
.tmeta span { color: var(--muted); }
.tbody { margin: 0; font-size: 15px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.chips + .row { margin-top: 8px; }
/* Onboarding checklist (checklist.py; Neo 2026-10-19). */
progress.cl-progress { display: block; width: 100%; height: 10px; border: 0; border-radius: 5px; background: #EEF0F3;
                       overflow: hidden; -webkit-appearance: none; appearance: none; }
progress.cl-progress::-webkit-progress-bar { background: #EEF0F3; border-radius: 5px; }
progress.cl-progress::-webkit-progress-value { background: #1B7A35; border-radius: 5px; }
progress.cl-progress::-moz-progress-bar { background: #1B7A35; border-radius: 5px; }
.cl-count { margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.cl-progress + .btn { margin-top: 12px; }
.qitem .who .cl-desc { color: var(--ink-2); white-space: pre-line; }
.cl-desc { white-space: pre-line; }
.qitem .who .cl-note { color: var(--ink); }
.qitem .who .cl-note.bad { color: var(--alert); font-weight: 600; }
.cl-item .who b { overflow-wrap: anywhere; }
.cl-off .who b { color: var(--muted); }
.inline-form textarea { padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; font: 400 16px var(--font);
                        color: var(--ink); background: var(--surface); width: 100%; min-height: 72px; resize: vertical; }
.inline-form textarea:focus { outline: 2px solid var(--link); outline-offset: 1px; border-color: var(--link); }

/* Checklist step numbers + done boxes (Neo 10/19): "WA 3" everywhere; a box, ticked when done. */
.cl-num { display: inline-block; min-width: 3.2em; margin-right: 6px; padding: 1px 6px; border-radius: 6px;
          background: #EEF0F3; color: #111318; font-size: 12px; font-weight: 700; text-align: center; vertical-align: 1px; }
.cl-check { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px;
            margin-right: 8px; border: 2px solid #8A909C; border-radius: 5px; color: #fff; font-size: 14px;
            font-weight: 800; line-height: 1; vertical-align: -4px; }
.cl-check.on { background: #1B7A35; border-color: #1B7A35; }

/* Upload slot (templates/_upload.html, static/upload.js) */
.upload-slot { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.up-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.up-pick .up-btn { width: auto; margin: 0; flex: 1 1 140px; }
.up-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.up-input:focus-visible + .up-btn, .up-btn:focus-within { outline: 2px solid var(--link); outline-offset: 2px; }
.up-pages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.up-page { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px; border: 1px solid var(--line-2); border-radius: 10px; }
.up-thumb { width: 56px; height: 56px; flex-shrink: 0; border-radius: 6px; background: #EEF0F3; display: inline-flex;
            align-items: center; justify-content: center; font-size: 12px; font-weight: 700; overflow: hidden; }
.up-thumb img { width: 100%; height: 100%; object-fit: cover; }
.up-name { flex: 1 1 160px; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.up-error { margin: 0; color: var(--alert); font-weight: 600; font-size: 14px; }
.up-send { width: auto; align-self: flex-start; }
.file-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid #EEF0F3; }
.file-row .who { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.file-row .who span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.file-row .who b { overflow-wrap: anywhere; word-break: break-word; }
.file-row .who .up-rejected { color: var(--alert); font-weight: 600; }
.file-row .who .up-ok { color: #1B7A35; font-weight: 600; }
.file-row .up-review { flex-basis: 100%; }
/* Neo 11/17, client file rows: chips right after the name (wrap under it on a phone, never float right). */
.file-row-client .who .fr-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; color: inherit; font-size: inherit; }
.file-row-client .who .fr-name .fr-chip { font-size: 12px; overflow-wrap: normal; }      /* beat .file-row .who span */
.file-row-client .who .fr-name .tone-warning { color: #8A5A00; }
.file-row-client .who .fr-name .tone-danger { color: #B42A17; }
.file-row-client .who .fr-name .pill-live { color: #1B7A35; }
.cl-via-thanks { color: var(--muted); }
.doc-slot { padding: 12px 0; border-top: 1px solid #EEF0F3; }
.doc-slot:first-of-type { border-top: 0; }
.doc-slot h3 { margin: 0 0 4px; font-size: 16px; }
.fq-item { padding: 10px 0; border-top: 1px solid #EEF0F3; }
.fq-item .sub { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; overflow-wrap: anywhere; }
.fq-item .file-row { border-top: 0; padding-top: 4px; }
/* Staff navigation standard (Neo 10/22): tab areas (_review_layout.html) use
   the same .ctabs as Home and the company page -- a sticky strip that slides
   sideways on phones, a vertical column from 1024. Counts sit in the tab. */
.ctabs .tab-n { margin-left: 8px; font-size: 12px; font-weight: 700; opacity: .7; }
@media (min-width: 1024px) { .ctabs a { justify-content: space-between; } }
.seeall { display: block; padding: 12px 0; font-size: 14px; font-weight: 600; border-bottom: 1px solid #EEF0F3; }
/* Uploads belong to the checklist item above them (Neo 10/22): solid lines
   only BETWEEN items (.qitem border-bottom); a dotted line and a small indent
   for each file under an item, on the staff and the client checklist. */
.cl-item .file-row { border-top: 1px dotted #C3C8D0; padding: 8px 0 8px 12px; }
.cl-item .cl-files { display: flex; flex-direction: column; }

/* In-page jumps land with the target's title visible (Neo 10/22): every
   element with an id keeps clear of the sticky bars when it is scrolled to
   (#anchor links, tabs, focus on a form field). Heights measured 10/22:
   staff bar 69 px below 1024 / 64 px from 1024; client bar static on phones
   (tab bar is at the bottom), 65 px sticky from 1024; the staff jump tabs
   (.ctabs, Home + company page) add a 60 px sticky strip below 1024. */
[id] { scroll-margin-top: 12px; }
body.has-staff [id] { scroll-margin-top: 81px; }
body.has-staff.with-ctabs [id] { scroll-margin-top: 141px; }
@media (min-width: 1024px) {
  body.has-tabs [id] { scroll-margin-top: 77px; }
  body.has-staff [id], body.has-staff.with-ctabs [id] { scroll-margin-top: 76px; }
}

/* One compact filter bar (Neo 10/22, _filters.html + fbar.js). Phone: a
   "Filter (n)" button opens a bottom sheet; active filters are removable
   chips. 760+: labelled dropdowns in one row, Clear and the count. Without
   JavaScript the dropdowns show inline with "Show results". */
.fbar { display: flex; flex-direction: column; gap: 10px; }
.fbar .btn { width: auto; margin-top: 0; }
.fbar-phone { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fbar-open { min-height: 44px; padding: 0 16px; }
.fbar:not(.js) .fbar-open { display: none; }
.fbar-count { font-size: 14px; color: var(--muted); }
.fbar-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.fbar-chips a { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border-radius: 18px;
                background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; max-width: 100%;
                overflow-wrap: anywhere; }
.fbar-chips a span { font-size: 18px; line-height: 1; opacity: .8; }
.fbar-sheet { display: flex; flex-direction: column; gap: 12px; }
.fbar-head { display: none; }
.fbar-fields { display: flex; flex-direction: column; gap: 10px; }
.fbar-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fbar-field > label, .fbar-label { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
main.page .fbar-field select { width: 100%; height: 44px; padding: 0 8px 0 12px; font-size: 15px; }
.fbar-end { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fbar-end .fbar-count { display: none; }
.fbar-backdrop { display: none; }
/* Multi field (Neo 10/27): a dropdown of checkboxes. Phone: it opens in place
   inside the Filter sheet; 760+: a panel under the box. */
.vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.fbar-multi { position: relative; }
.fbar-multi > summary { list-style: none; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
                        padding: 0 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface);
                        font-size: 15px; font-weight: 400; color: var(--ink); cursor: pointer; }
.fbar-multi > summary::-webkit-details-marker { display: none; }
.fbar-multi > summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fbar-multi > summary::after { content: ''; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--muted);
                               border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-2px); }
.fbar-multi[open] > summary { border-color: var(--ink); }
.fbar-multi-panel { margin-top: 6px; padding: 8px 4px 4px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); }
.fbar-multi-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 8px 6px; }
.fbar-multi-tools a, .fbar-multi-clear { display: inline-flex; align-items: center; font-size: 14px; font-weight: 600; color: var(--link); background: none; border: 0; padding: 0; cursor: pointer; min-height: 32px; }
.fbar-multi-list { margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); max-height: 50vh; overflow-y: auto; }
.fbar-multi-list label { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 8px; font-size: 15px; cursor: pointer; border-radius: 8px; }
.fbar-multi-list label:hover { background: #F4F5F7; }
.fbar-multi-list input { width: 18px; height: 18px; margin: 0; flex: none; }
.fbar-close { width: 44px; height: 44px; border: 0; background: none; font-size: 26px; line-height: 1; color: var(--ink); cursor: pointer; }
html.fbar-lock { overflow: hidden; }
@media (max-width: 759.98px) {
  .fbar.js .fbar-sheet { display: none; }
  .fbar.js.open .fbar-sheet { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; max-height: 85vh;
                              overflow-y: auto; background: var(--surface); border-radius: 16px 16px 0 0;
                              padding: 8px 20px calc(20px + env(safe-area-inset-bottom));
                              box-shadow: 0 -8px 24px rgba(17, 19, 24, .18); }
  .fbar.js.open .fbar-backdrop { display: block; position: fixed; inset: 0; z-index: 59; background: rgba(17, 19, 24, .4); }
  .fbar.js .fbar-head { display: flex; align-items: center; gap: 12px; }
  .fbar-head b { flex: 1; font-size: 17px; }
  .fbar-head a { font-size: 14px; font-weight: 600; }
  .fbar.js .fbar-clear { display: none; }            /* "Clear all" sits in the sheet's head */
  .fbar.js .fbar-apply { width: 100%; min-height: 48px; }
}
@media (min-width: 760px) {
  .fbar-phone, .fbar-chips { display: none; }
  .fbar-sheet { flex-direction: row; align-items: flex-end; flex-wrap: wrap; gap: 12px 16px; }
  .fbar-fields { flex-direction: row; flex-wrap: wrap; gap: 12px; flex: 1 1 auto; }
  .fbar-field { flex: 1 1 130px; max-width: 240px; }     /* four fit one row of the 680 px column */
  .fbar-field.fbar-multi-field { flex: 2 1 190px; max-width: 260px; }   /* room for "3 states: AZ, TN, TX" */
  .fbar-multi-panel { position: absolute; z-index: 40; top: 100%; left: 0; width: 300px; box-shadow: 0 8px 24px rgba(17, 19, 24, .12); }
  .fbar-multi-list { grid-template-columns: 1fr; max-height: 320px; }
  .fbar-end { margin-left: auto; min-height: 28px; }
  .fbar-end .fbar-count { display: inline; }
  .fbar.js .fbar-apply { display: none; }          /* a change applies at once */
}

/* History-only state records (Neo 10/22): "Cancel application" is a
   destructive step, so its link reads as one. */
a.linkbtn.danger-link { color: var(--alert); align-self: flex-start; margin-top: 8px; }
.hist-rec .who > span { overflow-wrap: anywhere; }
.note.terms p { margin: 4px 0 0; overflow-wrap: anywhere; white-space: pre-line; }
.terms-now { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
h3.subhead { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; }
main.page .fbar-field input[type=search] { width: 100%; height: 44px; padding: 0 12px; font: 400 15px var(--font);
  border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--ink); -webkit-appearance: none; appearance: none; }
main.page .fbar-field input[type=search]:focus { outline: 2px solid var(--link); outline-offset: 1px; border-color: var(--link); }
@media (min-width: 760px) { .fbar-field.fbar-text { flex: 2 1 200px; max-width: 320px; } }
.cl-more summary { font-size: 14px; font-weight: 600; color: var(--link); cursor: pointer; }
.cl-more .cl-desc { display: block; margin-top: 4px; overflow-wrap: anywhere; }
/* Company page states (Neo 10/22): one compact row; the actions behind "Actions". */
.st-actions > summary { font-size: 14px; font-weight: 600; color: var(--link); cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.st-actions-body { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.st-actions-body .btn { align-self: flex-start; }
#st ~ .fbar, section .fbar { margin: 8px 0; }
.why { overflow-wrap: anywhere; margin: 4px 0 0; }
.earlier summary { font-size: 14px; font-weight: 600; color: var(--link); cursor: pointer; margin-top: 6px; }
/* Staff upload on a client's behalf (Neo 10/22). */
.file-row .behalf { color: var(--ink-2); overflow-wrap: anywhere; }
.staff-upload > summary { font-size: 14px; font-weight: 600; color: var(--link); cursor: pointer; }
.staff-upload .upload-slot { margin-top: 8px; }
.own-upload { overflow-wrap: anywhere; }
a.btn.add-item { align-self: flex-start; width: auto; }

/* "Back to top" (Neo 10/22, totop.js): bottom-right, thumb-reachable; above the
   client's bottom tab bar on phones; under the filter sheet (z 60). */
.totop { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 40;
         display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px;
         border-radius: 22px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600;
         text-decoration: none; box-shadow: 0 4px 14px rgba(17, 19, 24, .22); }
.totop[hidden] { display: none; }
.totop:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
body.has-tabs .totop { bottom: calc(96px + env(safe-area-inset-bottom)); }
html.fbar-lock .totop { display: none; }
main h1[tabindex="-1"]:focus { outline: none; }
@media (min-width: 1024px) {
  .totop, body.has-tabs .totop { right: 24px; bottom: 24px; }
}
body.has-staff main.page { padding-bottom: 80px; }   /* room for "Back to top" at the very end of a page */

/* Suggested queue (AI action-required suggestions, Neo 10/22 B9) */
.sg-tag { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; }
.sg-draft h3 { font-size: 15px; margin: 14px 0 4px; }
.sg-text { white-space: pre-line; margin: 0; }
.sg-draft ol, .sg-draft ul { margin: 4px 0 0; padding-left: 20px; }

/* Application gate (migration 045, Neo 10/24) */
.cl-gate { display: block; font-weight: 600; color: #8a4b00; }
.cl-gate.ok { color: #1b5e34; }

/* Company page Checklist summary (Neo 10/29): one row per place with open items;
   the row opens the full checklist filtered to it. Phone: stacked; 760+: a grid. */
.cl-sum { display: flex; flex-direction: column; }
.cl-sum-row { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 10px 0; border-bottom: 1px solid #EEF0F3;
              color: var(--ink); text-decoration: none; font-size: 14px; }
.cl-sum-row:last-child { border-bottom: 0; }
a.cl-sum-row:hover b { text-decoration: underline; }
.cl-sum-head { display: none; }
.cl-sum-k { color: var(--muted); }
.cl-gate-tag { display: inline-flex; height: 20px; padding: 0 8px; border-radius: 10px; font-size: 12px; font-weight: 600;
               background: var(--warn-bg); color: var(--warn); }
@media (min-width: 760px) {
  .cl-sum-row { grid-template-columns: minmax(0, 2.4fr) 0.7fr 1fr 1fr; gap: 12px; align-items: center; }
  .cl-sum-head { display: grid; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
  .cl-sum-k { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
/* Company page States summary (Neo 10/29): count per status, each a link to the filtered states page. */
.st-counts { list-style: none; margin: 4px 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.st-counts a { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; color: var(--ink); text-decoration: none; font-weight: 600; }

/* Two-step sign-in (mfa.py, SEC-3): setup steps, the QR code, the setup key,
   recovery codes. Mobile-first; the QR stays a fixed, scannable size. */
.mfa-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.mfa-qr { width: 200px; height: 200px; margin: 12px 0; padding: 8px; background: #fff; border: 1px solid var(--line-2); border-radius: 12px; }
.mfa-qr svg { display: block; width: 100%; height: 100%; }
.mfa-key { display: inline-block; margin-top: 4px; padding: 4px 8px; border-radius: 8px; background: #F4F5F7;
           font-size: 15px; letter-spacing: .06em; overflow-wrap: anywhere; }
.mfa-codes { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mfa-codes code { display: block; padding: 8px 10px; border-radius: 8px; background: #F4F5F7; font-size: 16px; letter-spacing: .04em; text-align: center; }
.auth-alt { margin: 0; text-align: center; }
/* Recovery-codes screen (SEC-3, Chat C spec 10/30) */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mfa-warn { background: #FFF4E0; color: #6B4A00; font-weight: 600; }
.mfa-codes-page .mfa-codes { margin: 0; }
.mfa-codes-page .mfa-codes code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.mfa-code-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mfa-code-actions form { margin: 0; display: contents; }
.mfa-code-actions .btn { width: 100%; padding-left: 8px; padding-right: 8px; }
.mfa-saved { align-items: flex-start; }
.mfa-saved input { margin-top: 2px; flex: none; }
@media print {
  .mfa-codes-page .brand, .mfa-codes-page form, .mfa-codes-page .mfa-code-actions, .foot, .totop, .topbar { display: none !important; }
  .mfa-codes-page .mfa-codes code { background: none; border: 1px solid #999; }
}

/* ------------------------------------------------------------------------
   Checklist spreadsheet view (Neo 11/03; _checklist_sheet.html). Mobile-first:
   each step is a stacked card in the sheet's colours; from 768px it is the
   firm-setup sheet's table (navy header, grey Completed column). One DOM. */
.vbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.vt { display: flex; width: 100%; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: var(--surface); }
.vt button { flex: 1; min-height: 44px; padding: 0 16px; white-space: nowrap; border: 0; background: transparent; font: 600 14px var(--font);
             color: var(--ink); cursor: pointer; }
.vt button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.vt button:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; }
.vbar .xl-btn { width: 100%; min-height: 44px; }
.sheet-name { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sh-contact { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.sh-navy { background: #1F3864; color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .04em; padding: 8px 12px; }
.sh-dl { margin: 0; display: grid; grid-template-columns: minmax(96px, 30%) 1fr; font-size: 14px; }
.sh-dl dt, .sh-dl dd { margin: 0; padding: 8px 12px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.sh-dl dt { background: #EFEFEF; font-weight: 600; }
.sh-pre { white-space: pre-line; }
.sh-app { display: flex; flex-direction: column; gap: 4px; }
table.sheet { width: 100%; border-collapse: collapse; font-size: 14px; }
table.sheet thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
table.sheet tr { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 10px; row-gap: 6px;
                 padding: 12px 0; border-top: 1px solid var(--line); }
table.sheet td { display: block; padding: 0; min-width: 0; overflow-wrap: anywhere; }
table.sheet td.sh-ck { grid-row: 1 / span 5; }
table.sheet td.sh-num { font-size: 13px; font-weight: 600; color: var(--muted); }
table.sheet td.sh-owner { font-size: 13px; color: var(--muted); }
table.sheet td.sh-ev:empty { display: none; }
.sh-box { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px;
          background: #EFEFEF; border: 1px solid var(--line-2); color: var(--ink); font: 700 18px var(--font); padding: 0; }
.sh-box.on { background: #D9EAD3; border-color: #274E13; color: #274E13; }
button.sh-box { cursor: pointer; min-width: 44px; min-height: 44px; }
button.sh-box:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.sh-chip { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 13px; font-weight: 600; line-height: 20px; white-space: nowrap; }
.sh-ns { background: #F4CCCC; color: #990000; } .sh-og { background: #FFF2CC; color: #7F6000; }
.sh-cp { background: #D9EAD3; color: #274E13; } .sh-na { background: #EEF0F3; color: #3D4250; }
.sh-sub { display: inline-block; margin-left: 8px; font-size: 12px; color: var(--muted); }
.sh-ev .cl-note { display: block; margin-bottom: 4px; }
@media (min-width: 768px) {
  body.sheet-wide main.page { max-width: 1240px; }
  .vt { width: auto; }
  .vbar .xl-btn { width: auto; }
  .sh-dl { grid-template-columns: 200px 1fr; }
  .sh-app { flex-direction: row; flex-wrap: wrap; gap: 4px 24px; }
  table.sheet thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal;
                      display: table-header-group; }
  table.sheet tr { display: table-row; padding: 0; border: 0; }
  table.sheet th { background: #1F3864; color: #fff; text-align: left; padding: 8px 10px; font-size: 13px; font-weight: 700; }
  table.sheet td { display: table-cell; padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
  table.sheet td.sh-ck { width: 64px; background: #EFEFEF; text-align: center; }
  /* Step # (Neo 11/17, U39 item 6): a fixed narrow column; the citation wraps inside it. */
  table.sheet td.sh-num, table.ss td.ss-num { width: 140px; min-width: 140px; max-width: 140px; white-space: normal; }
  table.sheet td.sh-status { width: 140px; }
  table.sheet td.sh-owner { width: 130px; font-size: 14px; color: var(--ink); }
  table.sheet td.sh-ev { width: 32%; }
  table.sheet td.sh-ev:empty { display: table-cell; }
  .sh-sub { display: block; margin: 4px 0 0; }
}

/* ------------------------------------------------------------------------
   Business setup (Neo 11/04; _business_setup.html). Mobile-first: a card per
   state (also in the 720px checklist view); a table only in the wide
   spreadsheet view from 768px. Each cell carries its own label (.bs-lab). */
.bs-wrap > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 44px; }
.bs-wrap > summary::-webkit-details-marker { display: none; }
.bs-wrap > summary::after { content: '▾'; margin-left: auto; color: var(--muted); }
.bs-wrap:not([open]) > summary::after { content: '▸'; }
.bs-wrap > summary h2 { display: flex; align-items: center; gap: 8px; }
table.bsheet { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
table.bsheet thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
table.bsheet tr { display: block; padding: 12px 0; border-top: 1px solid var(--line); }
table.bsheet th.bs-state { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; text-align: left;
                           font-size: 16px; font-weight: 600; padding: 0 0 6px; }
table.bsheet td { display: grid; grid-template-columns: minmax(110px, 40%) minmax(0, 1fr); gap: 10px; padding: 4px 0;
                  overflow-wrap: anywhere; }
table.bsheet td.bs-none { display: block; }
.bs-lab { font-size: 13px; font-weight: 600; color: var(--muted); }
.bs-val { white-space: pre-line; }
.bs-form { font-weight: 600; white-space: nowrap; }   /* 053: the E&O form link, after the text */
.bs-tbd { display: inline-block; justify-self: start; white-space: nowrap; padding: 0 8px; border-radius: 10px; background: var(--warn-bg); color: var(--warn);
          font-size: 13px; font-weight: 600; }
@media (min-width: 768px) {
  body.sheet-wide table.bsheet thead { position: static; width: auto; height: auto; overflow: visible; clip: auto;
                                       white-space: normal; display: table-header-group; }
  body.sheet-wide table.bsheet tr { display: table-row; padding: 0; border: 0; }
  body.sheet-wide table.bsheet th { background: #1F3864; color: #fff; text-align: left; padding: 8px; font-size: 12px;
                                    font-weight: 700; vertical-align: bottom; }
  body.sheet-wide table.bsheet th.bs-state { display: table-cell; background: #EFEFEF; color: var(--ink); font-size: 14px;
                                             padding: 8px; vertical-align: top; border-bottom: 1px solid var(--line); }
  body.sheet-wide table.bsheet td { display: table-cell; padding: 8px; vertical-align: top; border-bottom: 1px solid var(--line);
                                    font-size: 13px; }
  body.sheet-wide table.bsheet .bs-lab { display: none; }
}

/* "Sent another way" (Neo 11/09, 054): the small label after a step's chip, the
   client's "how" line, and the client form under the upload box. */
.cl-via { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 8px; font-size: 12px; font-weight: 600;
          line-height: 18px; color: #0b4f6c; background: #e3f1f8; white-space: nowrap; vertical-align: middle; }
.cl-via-note { display: block; color: var(--ink); overflow-wrap: anywhere; }
.lic-row .who .cl-via-note { color: var(--ink); }
details.cl-other { margin-top: 6px; }
details.cl-other > summary { cursor: pointer; font-weight: 600; }

/* Checklist queue: the step-number pill is a span inside .lic-row .who, whose
   spans are display:block -- keep it a pill (Neo 11/09 click-check). */
.lic-row .who .cl-num { display: inline-block; }

/* SE broker contact entered once (Neo 11/10, 055): the card's contact shown on
   the license form; the per-license override folded away; the list mark. */
.lic-contact .label { display: block; font-size: 14px; font-weight: 600; }
.lic-contact p { margin: 4px 0 0; overflow-wrap: anywhere; }
.lic-contact .hint { display: block; }
details.lic-override { margin: 4px 0 12px; }
details.lic-override > summary { cursor: pointer; font-weight: 600; }
.lic-differs { color: var(--warn); font-size: 13px; }

/* Whose move (Neo 11/10, hub slice 1; checklist.move). One chip per step,
   totals under each section heading. Existing tokens only. */
.move { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 2px 10px; border-radius: 999px;
        font-size: 13px; font-weight: 700; line-height: 20px; white-space: nowrap; vertical-align: middle;
        border: 1px solid transparent; }
.move::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.move-client { background: var(--warn-bg); color: var(--warn); }
.move-ours { background: var(--info-bg); color: var(--info); border-color: #B9D6F5; }
.move-done { background: #E7F7EC; color: #1B6B33; }
.move-na { background: var(--ground); color: var(--muted); }
.move-why { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 2px; white-space: normal; }
.move-totals { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.sh-status .move { display: flex; width: max-content; margin-bottom: 4px; }
/* Neo 11/13 (staff only): a step with files waiting for review, seen without opening Review. */
.move-files { background: var(--info); color: #fff; white-space: normal; }
.lic-pills .move-files, .cl-item .move-files, .cl-sum .move-files { margin-left: 4px; }

/* Reviewer verify + double check (Neo 11/10, 056): the assigned line, the
   review panel and the trail (staff only). */
.rv-assigned { margin: 6px 0; padding: 6px 10px; border-radius: 8px; background: var(--info-bg); color: var(--ink);
               font-size: 14px; overflow-wrap: anywhere; }
details.rv-panel, details.rv-trail { margin: 6px 0; }
details.rv-panel > summary, details.rv-trail > summary { cursor: pointer; font-weight: 600; }
details.rv-panel form { margin: 8px 0; }
.rv-trail ol { margin: 6px 0 0; padding-left: 20px; font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
.rv-trail li { overflow-wrap: anywhere; }

/* Firm path (Neo + Megan 11/11, 057): the tag on a step limited to one path
   while the state's path isn't set, the staff path line / prompt under a
   state heading, and an off-path step on staff pages (dimmed, no actions).
   Existing tokens only. */
.cl-path { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 8px; font-size: 12px; font-weight: 600;
           line-height: 18px; color: var(--warn); background: var(--warn-bg); white-space: normal; vertical-align: middle; }
.cl-pathtag { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 8px; font-size: 12px; font-weight: 600;
              line-height: 18px; color: var(--muted); background: var(--ground); border: 1px solid var(--line); }
.cl-pathline { margin: 2px 0 6px; font-size: 14px; color: var(--muted); }
.cl-pathset { color: var(--warn); font-weight: 600; }
.cl-offpath, .sheet tr.sh-offpath td { opacity: .55; }
.cl-offpath .who b, .sheet tr.sh-offpath .sh-step { text-decoration: line-through; text-decoration-thickness: 1px; }
.move-off { background: var(--ground); color: var(--muted); border-color: var(--line); white-space: normal; }
.sh-box.sh-off { color: var(--muted); }
.fp-pick { border: 0; margin: 0 0 8px; padding: 0; }
.fp-pick .check { display: block; margin: 6px 0 2px; }
.fp-warn { margin: 0 0 6px 26px; font-size: 13px; color: var(--warn); overflow-wrap: anywhere; }

/* Position numbering (Neo 11/12, option A): the main number is the step's
   position; staff also see its Ref, small. Existing tokens only. */
.cl-cite { margin-left: 4px; font-size: 13px; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.cl-cite a { color: var(--link, #0B57D0); }
.cl-nocite { color: var(--muted); font-weight: 400; font-style: italic; }
.sh-num .cl-cite { display: block; margin-left: 0; font-size: 12px; font-weight: 400; color: var(--muted); }
.sh-num .cl-cite > span[aria-hidden] { display: none; }
.cl-just form.inline { display: inline; }
.cl-just .linkbtn { min-height: 32px; padding: 0 12px; vertical-align: middle; }

/* SE states page (058): the SE / Not SE pill keeps its own width in the row. */
.se-row .who .pill { display: inline-block; align-self: flex-start; width: auto; }

/* ------------------------------------------------------------------------
   Checklist setup, Spreadsheet view (Neo 11/12, hub slice 2). Phone first: each
   row is a small card and the defaults (no document, not the application step,
   Always, Active) are left out; the table from 768px. One DOM. */
.ss-probs { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin: 0; }
.ss-prob { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px;
           border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none; }
.ss-prob b { background: var(--warn); color: #fff; border-radius: 999px; padding: 0 7px; font-size: 12px; line-height: 18px; }
.ss-prob.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.ss-probs .hint { margin: 0; }
.ss-line { margin: 0; font-size: 14px; color: var(--muted); }
.ss-line b { color: var(--ink); }
.ss-block.ss-problem { box-shadow: inset 4px 0 0 var(--warn); }
table.ss { width: 100%; border-collapse: collapse; font-size: 14px; }
table.ss thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
table.ss tr { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
table.ss td { display: block; padding: 0; min-width: 0; overflow-wrap: anywhere; }
table.ss td.ss-num { flex: 0 0 100%; font-size: 13px; font-weight: 600; color: var(--muted); }
table.ss td.ss-step { flex: 0 0 100%; font-weight: 600; }
table.ss td.ss-owner, table.ss td.ss-doc { font-size: 13px; color: var(--muted); }
table.ss td.ss-doc .ss-v { display: none; }
table.ss td.ss-doc.no, table.ss td.ss-app.no, table.ss td.ss-when.always, table.ss td.ss-st.on { display: none; }
table.ss td.ss-ed { flex: 1 1 auto; font-size: 12px; color: var(--muted); }
table.ss td.ss-act { margin-left: auto; }
table.ss .ss-edit { min-height: 40px; padding: 0 14px; white-space: nowrap; }
table.ss tr.ss-off td.ss-step { color: var(--muted); font-weight: 400; }
table.ss tr.editing { background: var(--info-bg); }
table.ss .cl-cite { margin-left: 6px; font-weight: 400; }
table.ss .cl-path { margin-left: 0; white-space: nowrap; }
.ss-seg { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }
.ss-appchip { display: inline-block; padding: 0 8px; border-radius: 8px; font-size: 12px; font-weight: 700; line-height: 20px;
              background: var(--info-bg); color: var(--info); white-space: nowrap; }
@media (min-width: 768px) {
  table.ss thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; display: table-header-group; }
  table.ss tr { display: table-row; padding: 0; border: 0; }
  table.ss th { background: #1F3864; color: #fff; text-align: left; padding: 8px 10px; font-size: 13px; font-weight: 700; vertical-align: bottom; }
  table.ss td { display: table-cell; padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
  table.ss td.ss-doc.no, table.ss td.ss-app.no, table.ss td.ss-when.always, table.ss td.ss-st.on { display: table-cell; }
  table.ss td.ss-doc .ss-v { display: inline; } table.ss .ss-l { display: none; }
  table.ss td.ss-num { color: var(--ink); font-size: 14px; }
  table.ss .cl-cite { display: block; margin: 2px 0 0; font-size: 12px; color: var(--muted); }
  table.ss .cl-cite > span[aria-hidden] { display: none; }
  table.ss td.ss-step { font-weight: 400; min-width: 240px; }
  table.ss td.ss-owner, table.ss td.ss-doc, table.ss td.ss-app, table.ss td.ss-ed { overflow-wrap: normal; font-size: 14px; color: var(--ink); }
  table.ss td.ss-owner { width: 112px; } table.ss td.ss-doc { width: 84px; } table.ss td.ss-app { width: 104px; }
  table.ss td.ss-when { width: 132px; } table.ss td.ss-st { width: 72px; }
  table.ss td.ss-ed { width: 124px; font-size: 13px; color: var(--muted); }
  table.ss td.ss-ed .ss-who, table.ss td.ss-ed .ss-when-d { display: block; white-space: nowrap; }
  table.ss td.ss-doc.no, table.ss td.ss-app.no, table.ss td.ss-when.always { color: var(--muted); }
  table.ss td.ss-act { width: 1%; white-space: nowrap; }
}
/* 062 (Neo 11/17): the step's own link (form, portal, commission page), apart from the citation's. */
.cl-form { align-self: flex-start; display: inline-flex; align-items: center; min-height: 32px; max-width: 100%;
           font-size: 14px; font-weight: 600; color: var(--link, #0B57D0); text-decoration: underline; overflow-wrap: anywhere; }
.sh-ev .cl-form { margin: 2px 0 4px; }
.ss-form { display: block; margin-top: 2px; }
.cl-stateinfo { margin: 0 0 6px; }
/* Quick edit: full screen on a phone, a right-hand panel from 768px (opened by ?edit=). */
.drawer-bg { position: fixed; inset: 0; background: rgba(17, 19, 24, .35); z-index: 60; }
.drawer { position: fixed; z-index: 61; background: var(--surface); display: flex; flex-direction: column; gap: 14px;
          inset: 0; padding: 20px 16px 32px; overflow-y: auto; }
.drawer h2 { margin: 0; font-size: 20px; }
.drawer .eyebrow { margin: 0 0 2px; font-size: 13px; font-weight: 600; }
.drawer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.drawer .x { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px;
             font-size: 28px; line-height: 1; color: var(--ink); text-decoration: none; }
.drawer .form { gap: 14px; }
.drawer-foot { margin: 0; }
.app-field { border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.app-field legend { font-weight: 700; padding: 0 4px; }
.app-impact p { margin: 0; font-size: 14px; }
.app-list { margin: 4px 0 0; padding-left: 18px; font-size: 14px; overflow-wrap: anywhere; }
@media (min-width: 768px) {
  .drawer { inset: 0 0 0 auto; width: 480px; padding: 24px; box-shadow: -8px 0 24px rgba(17, 19, 24, .15); }
}

/* Quick edit / full edit page in plain sections (Neo 11/12). */
.qe-scope { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--info-bg); font-size: 14px; }
.qe-sec { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.qe-sec h3 { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.qe-sec .field { margin: 0; }
.qe-radios { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.ro-line { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--surface-2, #F3F4F6); color: var(--muted); font-size: 14px; }
.ro-line b { color: var(--ink); }
.qe-div { border: 0; border-top: 1px solid var(--line-2); margin: 4px 0; width: 100%; }
.qe-deact { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: 0; }
.qe-deact .hint { margin: 0; }
.drawer h2 .cl-num, h1 .cl-num { font: inherit; background: none; padding: 0; min-width: 0; margin-right: 0; }
.drawer h2 .cl-cite, h1 .cl-cite { display: block; margin: 4px 0 0; font-size: 14px; }
.drawer h2 .cl-cite > span[aria-hidden], h1 .cl-cite > span[aria-hidden] { display: none; }
/* In a list row the citation is its own block next to the number and wraps inside it;
   .cl-eol ends the line, so the title starts on the next one at full width. */
.who > b .cl-cite { display: inline-block; max-width: calc(100% - 96px); vertical-align: top; }
.who > b .cl-eol { display: block; }
