/* TaTasque core styles — moved VERBATIM out of public/index.html's one inline <style> (REVIEW-2.0 T1-1, track 1 slice S2; no rule changed). Linked by index.html in the same place, so the cascade order is unchanged. Copyright Rapid Surveys Pty Ltd. */
  :root { --bg:#eef1f4; --card:#fff; --ink:#1b2430; --muted:#5f6975; --line:#e2e7ec;
          --accent:#2f6df6; --accent-ink:#fff; --ok:#1f9d55; --err:#d23f3f;
          --branch:#8a94a2; --hover:#f3f6fb; --dev:#5b21b6;
          --th-notice-h:0px; --th-safe-top:env(safe-area-inset-top); }   /* the notice strip's height (core/notice.js measures it) + the notch the top bar pads for (0 while a notice carries it) */
  * { box-sizing:border-box; }
  [hidden] { display:none !important; }   /* author display:flex on .overlay was overriding the UA hidden rule → picker couldn't close */
  /* Accessibility basics (BRIEF-752): a visible keyboard focus ring — keyboard only
     (:focus-visible), so mouse clicks stay clean. White on the dark header. */
  button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
  summary:focus-visible, [tabindex]:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
  header button:focus-visible { outline-color:#fff; }
  .dest, .dest .act, .cf-check, input[type="checkbox"] { cursor:pointer; }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration:.01ms !important; animation-duration:.01ms !important;
                             animation-iteration-count:1 !important; scroll-behavior:auto !important; }
  }
  body { margin:0; background:var(--bg); color:var(--ink);
         font:16px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
         padding:0 0 env(safe-area-inset-bottom); }   /* the top bar pads for the notch itself (it's sticky) */
  header { background:var(--ink); color:#fff; padding:14px 16px; font-weight:600; }
  header small { display:block; font-weight:400; color:#9aa6b5; font-size:12px; margin-top:2px; }
  /* Auth gate */
  .authwrap { position:fixed; inset:0; top:var(--th-notice-h, 0px); z-index:100; display:flex; align-items:center; justify-content:center;
              padding:max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
              background:var(--bg); }
  .authcard { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:24px; width:100%; max-width:380px; }
  .authcard h1 { margin:0 0 4px; font-size:22px; }
  .auth-brand { display:flex; align-items:center; gap:10px; } .auth-brand img { flex:none; width:46px; height:auto; } .auth-brand .auth-word { width:auto; height:28px; } .auth-brand .auth-wordimg { height:34px; transform:translateY(3px); }   /* the original artwork + wordmark (BRIEF-1026 / 1032) */
  /* the logo in the top bar (BRIEF-1010): the cards + the name on a computer; the T icon alone on a phone */
  .tb-brand { flex:none; display:flex; align-items:center; gap:8px; margin-right:6px; color:#fff; }
  .tb-brandmark { width:31px; height:auto; display:block; } .tb-brandicon { display:none; width:28px; height:28px; }
  .tb-brandword { height:20px; width:auto; display:block; }
  .tb-brandimg { height:24px; transform:translateY(2px); }   /* R3 = 1: the drawn TaTasque mark (the q's tail below the line: the capitals sit where the old mark's did) */   /* the TaTasche wordmark (BRIEF-1032) */
  @media (max-width:767px) { .tb-brandmark, .tb-brandword { display:none; } .tb-brandicon { display:block; } .tb-brand { margin-right:2px; } }
  @media (min-width:768px) and (max-width:1023px) { .tb-brandword { display:none; } }   /* BRIEF-1206: a tablet keeps the mark, drops the wordmark (top bar room) */
  .authsub { margin:0 0 18px; color:var(--muted); font-size:14px; }
  .authcard form { display:flex; flex-direction:column; gap:12px; }
  .authtoggle { margin:16px 0 0; font-size:14px; color:var(--muted); text-align:center; }
  .authlegal { display:flex; justify-content:center; align-items:center; gap:2px; margin:8px 0 0; font-size:13px; color:var(--muted); }   /* BRIEF-1238 */
  .authlegal[hidden] { display:none; } .authlegal a { display:inline-flex; align-items:center; min-height:44px; padding:0 8px; color:var(--muted); }
  .authtoggle a { color:var(--accent); font-weight:600; text-decoration:none; }
  .pwwrap { position:relative; }
  .settings-danger { margin:14px 0 0; padding-top:10px; border-top:1px solid var(--line); text-align:right; font-size:14px; }   /* BRIEF-1205 */
  .settings-danger a { color:var(--muted); text-decoration:underline; display:inline-flex; align-items:center; min-height:44px; padding:0 4px; }
  .settings-danger a:hover, .settings-danger a:focus-visible { color:#b3261e; }
  .authterms { display:flex; align-items:center; gap:10px; min-height:44px; margin:2px 0 8px; font-size:14px; line-height:1.4; text-align:left; }   /* BRIEF-1204 sign-up terms tick */
  .authterms input { width:20px; height:20px; margin:0; flex:none; }
  .authterms[hidden] { display:none; }
  .pwwrap input { padding-right:46px; }
  .pweye { position:absolute; right:5px; top:50%; transform:translateY(-50%); width:36px; height:36px; padding:0;
           display:flex; align-items:center; justify-content:center; background:transparent; color:var(--muted);
           border:0; border-radius:8px; cursor:pointer; }
  .pweye:hover { color:var(--ink); }
  /* Project bar + modal */
  /* ── App shell: ONE compact top bar (job-intake.md §14.7) ──
     [Project ▾]  Tasks|Map  [⚙]  [Account]. Every control is 44 px tall; the project
     name is the only thing that shrinks (ellipsis), so the bar fits one line at 360 px. */
  .topbar { position:sticky; top:var(--th-notice-h, 0px); z-index:45; display:flex; align-items:center; gap:8px;   /* under the notice strip (core/notice.css), never under-lapped by it */
            min-height:calc(56px + var(--th-safe-top));
            padding:calc(6px + var(--th-safe-top)) max(8px, env(safe-area-inset-right)) 6px max(8px, env(safe-area-inset-left));
            background:var(--ink); color:#fff; font-weight:600; }
  .tb-slot { position:relative; flex:none; }
  .tb-slot.tb-proj { flex:1 1 auto; min-width:0; }
  .tb-btn { width:auto; height:44px; padding:0 12px; display:inline-flex; align-items:center; gap:6px;
            font-size:15px; font-weight:600; color:#fff; background:rgba(255,255,255,.10);
            border:1px solid rgba(255,255,255,.22); border-radius:10px; }
  .tb-btn:hover { background:rgba(255,255,255,.18); }
  .tb-projbtn { max-width:100%; min-width:0; padding:0 8px; background:transparent; border-color:transparent; font-size:16px; }
  .tb-projname { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  /* TREE1: the top bar shows the COMPANY + a "+" (New project); the project's name stays in the button for screen readers */
  .tb-slot.tb-proj { display:flex; align-items:center; gap:2px; }
  .tb-sr { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
  .tb-coplus { flex:none; background:transparent; border-color:transparent; }
  @media (min-width:768px) { .tb-projbtn.tb-co1 { cursor:default; } .tb-projbtn.tb-co1:hover { background:transparent; } .tb-projbtn.tb-co1 .tb-caret { display:none; } }
  @media (max-width:767px) { .tb-coplus { display:none; } }   /* a phone: no room — + New project sits in the projects panel's head */
  .tb-caret { flex:none; width:14px; height:14px; opacity:.8; }
  .tb-icon { width:44px; padding:0; justify-content:center; }
  .tb-icon svg { width:20px; height:20px; }
  @media (max-width:420px) { .topbar { gap:4px; } .tb-icon { width:40px; } }   /* PHONE2: 360 px — five icons + gaps left the company name 45 px ("Ac…"); 40 px icons + 4 px gaps give it ~85 */
  .tb-avatar { border-radius:50%; background:var(--accent); border-color:transparent; font-size:16px; text-transform:uppercase; }
  .tb-views { flex:none; display:inline-flex; border:1px solid rgba(255,255,255,.22); border-radius:10px; overflow:hidden; }
  .tb-seg { width:auto; height:44px; padding:0 14px; font-size:14px; font-weight:600; border-radius:0;
            background:transparent; color:#c9d1db; }
  .tb-seg + .tb-seg { border-left:1px solid rgba(255,255,255,.22); }
  body.pn-off-time #viewTime, body.pn-off-calendar #viewCal, body.pn-off-emails #viewEmails { display:none !important; }   /* BRIEF-1297: not pinned → hub only */
  .tb-seg[aria-pressed="true"] { background:#fff; color:var(--ink); }
  @media (max-width:359px) { .tb-seg { padding:0 10px; font-size:13px; } }
  /* Menus (menuButton helper) — a dropdown under its button. */
  .menu { position:absolute; top:calc(100% + 6px); left:0; z-index:60; min-width:210px; max-width:calc(100vw - 16px);
          max-height:70vh; overflow-y:auto; padding:6px; background:var(--card); color:var(--ink);
          border:1px solid var(--line); border-radius:12px; box-shadow:0 10px 30px rgba(20,28,40,.2); font-weight:400; }
  .menu.right { left:auto; right:0; }
  .menu-item { width:100%; display:flex; align-items:center; gap:8px; padding:10px 12px; text-align:left;
               font-size:15px; font-weight:500; background:transparent; color:var(--ink); border-radius:8px; }
  .menu-item:hover, .menu-item:focus { background:var(--hover); }
  .topbar .menu button:focus-visible { outline-color:var(--accent); }
  .menu-item.mi-dev, .menu-item.mi-dev .mi-label { color:var(--dev); font-weight:600; }   /* DEVMENU: the Developer entry in the avatar menu — purple (a token; dark below), also said in words */
  .menu-item.danger { color:#b3261e; }   /* 6.0:1 on the hover background (--err is 4.3 there) */
  .menu-item[role="menuitemradio"]::before { content:''; flex:none; width:16px; }
  .menu-item[aria-checked="true"]::before { content:'✓'; color:var(--accent); font-weight:700; }
  .menu-item .mi-label { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .menu-info { padding:8px 12px 10px; font-size:13px; color:var(--muted); overflow-wrap:anywhere; border-bottom:1px solid var(--line); margin-bottom:4px; }
  .menu-item .mi-sub { margin-left:auto; flex:none; font-size:12px; color:var(--muted); }
  .menu-item.mi-shared .mi-label { color:#6d5f33; font-style:italic; }   /* PROJLIST: shared in = slightly different (never colour alone: the 'from …' / Shared word) */
  .menu-item.mi-add { font-weight:600; color:var(--accent); }
  .menu-sep { height:1px; background:var(--line); margin:4px 6px; }
  /* Map VIEW: the tasks map fills the page under the bar (not a sheet). */
  #overviewSheet.mapview { position:fixed; left:0; right:0; bottom:0; top:var(--th-top, calc(56px + env(safe-area-inset-top)));   /* --th-top: the top bar's measured bottom (shared/bars) */
                           z-index:40; display:flex; background:var(--bg); }
  #overviewSheet.mapview .sheet { max-width:none; height:auto; max-height:none; flex:1 1 auto; border-radius:0; }
  /* ── Tasks view: LIST-FIRST (job-intake.md §14.7) ── toolbar (shared with Map) + cards. */
  .toolbar { display:flex; flex-direction:column; gap:8px; margin-bottom:12px; }
  .tool-row { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
  .t-edit > .fe-link-note:first-child { margin:0 0 12px; }
  .e-dest { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
  .e-destpath { flex:1 1 180px; min-width:0; padding:10px 12px; border:1px solid var(--line); border-radius:9px; background:#fbfcfd;
                overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .e-destpath.unknown { color:var(--muted); font-style:italic; }
  .msg.warn { color:#8a5300; }   /* 6.9:1 on white */
  /* Moving a task to a list with another field set: a warning to confirm first (job-intake §13). Words, not colour alone. */
  .e-movewarn { flex:1 1 100%; margin:8px 0 2px; padding:10px 12px; border:1px solid #c58a1c; border-radius:10px; background:#fff8eb; color:var(--ink); font-size:14px; }
  .e-movewarn p { margin:0 0 6px; } .e-mvh { font-weight:700; } .e-mvlist { color:#8a5300; }
  .e-mvbtns { display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; } .e-mvbtns button { width:auto; }
  @media (pointer:coarse) { .e-mvbtns button { min-height:44px; } }
  .tool-row input[type="search"] { width:auto; flex:1 1 96px; min-width:96px; min-height:44px; padding:10px 12px; font-size:15px; }
  @media (max-width:767px) { .tool-row input[type="search"] { flex-basis:100%; } }   /* BTNLOOK: the search gets its own row on a phone — not cut off; Filter · Sort · Select sit under it */
  .tool-row select { flex:none; width:auto; max-width:180px; min-height:44px; padding:10px 8px 10px 12px; font-size:15px; border:1px solid var(--btn-sec-line, var(--line));
                     border-radius:var(--btn-r, 9px); background:var(--btn-sec-bg, #fff); color:var(--ink); }
  .tool-row .btn { padding:0 12px; }   /* BTNLOOK: the toolbar row fits Filter · Sort · List/Board · Select · + New task on one line at 780 px */
  @media (min-width:768px) { #app { max-width:780px; } .tool-row input[type="search"] { flex-basis:200px; min-width:120px; } }
  .tool-btn { flex:none; }   /* the look is shared/buttons.css (.btn .btn-secondary) */
  .badge { background:var(--accent); color:#fff; border-radius:999px; font-size:12px; line-height:1.4; padding:0 7px; }
  #newTaskBtn, #newTaskBtn[hidden] { display:none !important; }   /* Gary 2026-11-05: redundant with the round + (#navPlus → New task, which also starts the pick-a-spot flow on the Map); the element stays as the mount anchor for THBoard / THTaskActions switches */
  /* Filter ▾ — ONE dialog holding every filter (job-intake.md §14.7). Popover under the
     button on desktop; bottom sheet (+ backdrop) on a phone. */
  .toolbar { position:relative; }   /* the Filter popover anchors to the whole toolbar (a wide builder never runs off-screen) */
  .filt-anchor { flex:none; }
  .filt-pop { position:absolute; top:54px; right:0; z-index:47; width:min(640px, 100%); max-height:70vh; overflow-y:auto;
              display:flex; flex-direction:column; gap:12px; padding:14px; background:var(--card); color:var(--ink);
              border:1px solid var(--line); border-radius:12px; box-shadow:0 10px 30px rgba(20,28,40,.2); }
  .filt-pop .field { margin:0; }
  .filt-pop select { width:100%; max-width:none; flex:initial; padding:10px; font-size:15px; border:1px solid var(--line); border-radius:9px; background:#fbfcfd; color:var(--ink); }
  /* Filter builder (job-intake.md §14.7): Match ALL|ANY of rows [attribute][condition][value][🗑],
     groups nest (≤3 levels). Desktop: one line per rule; phone: a stacked card per rule. */
  .fb { display:flex; flex-direction:column; gap:10px; }
  .fb-group { display:flex; flex-direction:column; gap:8px; }
  .fb-sub { border-left:3px solid var(--line); padding-left:10px; }
  .fb-ghead { display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:14px; color:var(--muted); }
  .fb-ghead .fb-del { margin-left:auto; }
  .fb-seg { display:inline-flex; border:1px solid var(--line); border-radius:8px; overflow:hidden; }
  .fb-segb { width:auto; padding:6px 12px; font-size:13px; font-weight:700; background:#fff; color:var(--ink); border-radius:0; }
  .fb-segb + .fb-segb { border-left:1px solid var(--line); }
  .fb-segb[aria-pressed="true"] { background:var(--ink); color:#fff; }
  .fb-rule { display:grid; grid-template-columns:170px 150px minmax(0,1fr) 40px; gap:8px; align-items:start;
             padding:8px; border:1px solid var(--line); border-radius:10px; background:#fbfcfd; }
  .fb-rule select, .fb-rule input { width:100%; min-width:0; padding:8px 10px; font-size:14px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--ink); }
  .fb-val { min-width:0; }
  .fb-del { width:40px; height:36px; padding:0; display:inline-flex; align-items:center; justify-content:center; background:transparent; color:#b3261e; border-radius:8px; }
  .fb-del:hover { background:#fdecec; }
  .fb-pills { display:flex; flex-wrap:wrap; gap:6px; }
  .fb-vbox { display:flex; flex-direction:column; gap:8px; min-width:0; } .fb-vbox .fb-pills { padding:8px; border:1px solid var(--line); border-radius:8px; background:#fff; }
  .fb-vsum { display:flex; justify-content:space-between; align-items:center; gap:6px; } .fb-vtxt { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .fb-vdone { width:auto; margin-left:auto; }
  .fb-pill { width:auto; display:inline-flex; align-items:center; padding:5px 10px; font-size:13px; font-weight:600;
             background:#fff; color:var(--ink); border:1px solid var(--line); border-radius:999px; }
  .fb-pill[aria-pressed="true"] { background:var(--hover); border-color:var(--ink); box-shadow:inset 0 0 0 1px var(--ink); }
  .fb-pill[aria-pressed="true"]::before { content:'✓'; font-weight:700; margin-right:5px; }
  .fb-destbtn { width:100%; min-width:0; padding:8px 10px; font-size:14px; font-weight:500; text-align:left; background:#fff; color:var(--ink);
                border:1px solid var(--line); border-radius:8px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .fb-val .dtree { margin-top:6px; background:#fff; }
  .fb-adds { display:flex; gap:8px; flex-wrap:wrap; }
  .fb-empty { margin:0; font-size:14px; color:var(--muted); }
  @media (max-width:767px) {
    .fb-rule { grid-template-columns:minmax(0,1fr) 44px; grid-template-areas:"attr del" "op op" "val val"; }
    .fb-rule .fb-attr { grid-area:attr; } .fb-rule .fb-op { grid-area:op; } .fb-rule .fb-val { grid-area:val; } .fb-rule > .fb-del { grid-area:del; }
  }
  .filt-lbl { font-size:13px; color:var(--muted); margin:0 0 6px; }
  .filt-foot { display:flex; gap:8px; justify-content:space-between; align-items:center; padding-top:4px; }
  #filtDone { width:auto; padding:10px 22px; font-size:15px; }
  .filt-backdrop { display:none; }
  /* Destination tree (job-intake.md §14.7): drill down space ▸ folder ▸ list; any level selectable. */
  .dtree { max-height:260px; overflow-y:auto; padding:4px; border:1px solid var(--line); border-radius:10px; }
  .dt-row { display:flex; align-items:center; gap:2px; min-width:0; }
  .dt-tog, .dt-sp { flex:none; width:28px; height:32px; padding:0; display:inline-flex; align-items:center; justify-content:center;
                    background:transparent; color:var(--muted); border-radius:6px; }
  .dt-tog:hover { background:var(--hover); }
  .dt-tog svg { width:14px; height:14px; transition:transform .15s; }
  .dt-tog[aria-expanded="false"] svg { transform:rotate(-90deg); }
  .dt-sel { flex:1 1 auto; min-width:0; width:auto; display:flex; align-items:center; gap:6px; padding:6px 8px; text-align:left;
            font-size:14px; font-weight:500; background:transparent; color:var(--ink); border-radius:6px; }
  .dt-sel .nm { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .dt-sel .ic { width:14px; height:14px; }
  .dt-sel:hover { background:var(--hover); }
  .dt-sel[aria-pressed="true"] { background:var(--ink); color:#fff; }
  .dt-sel[aria-pressed="true"] .ic { color:#fff; }
  @media (max-width:767px) {
    .filt-backdrop { display:block; position:fixed; inset:0; z-index:46; background:rgba(20,28,40,.45); }
    .filt-backdrop[hidden] { display:none; }
    .filt-pop { position:fixed; top:auto; left:0; right:0; bottom:0; width:auto; max-height:80vh; border-radius:16px 16px 0 0;
                padding:16px 16px calc(16px + env(safe-area-inset-bottom)); }
  }
  /* Status pill (BRIEF-757): background = the status colour; text white / ink / black,
     whichever reaches ≥ 4.5:1 (pillText computes it). Same pill everywhere a status shows. */
  .spill { display:inline-block; padding:1px 8px; border-radius:999px; font-size:12px; font-weight:700; line-height:1.6;
           letter-spacing:.02em; white-space:nowrap; vertical-align:baseline; }
  /* Status-grouped list (sort = Status). */
  .tgroup { margin-bottom:14px; }
  .tg-head { margin:0 0 8px; font-size:inherit; }
  .tg-toggle { width:100%; min-height:44px; display:flex; align-items:center; gap:8px; padding:6px 8px; text-align:left;
               background:transparent; color:var(--ink); border-radius:8px; font-size:14px; }
  .tg-toggle:hover { background:var(--hover); }
  .tg-toggle .tg-chev { flex:none; width:14px; height:14px; transition:transform .15s; }
  .tg-toggle[aria-expanded="false"] .tg-chev { transform:rotate(-90deg); }
  .tg-n { color:var(--muted); font-weight:600; }
  .tg-add { width:auto; min-height:44px; padding:8px 12px; font-size:14px; background:transparent; color:var(--accent); border:1px dashed var(--line); }
  .tg-add:hover { background:var(--hover); }
  /* Fields → Status: colours */
  .fe-colorbox { display:flex; flex-direction:column; gap:6px; margin-top:4px; padding:8px 10px; border:1px solid var(--line); border-radius:8px; }   /* own class: .fe-link is the linked-values box */
  .fe-colors { display:flex; flex-direction:column; gap:6px; margin-top:4px; }
  .fc-row { display:flex; align-items:center; justify-content:space-between; gap:8px; min-width:0; }
  .fc-row .spill { min-width:0; overflow:hidden; text-overflow:ellipsis; }
  .fc-row input[type="color"] { flex:none; width:56px; height:36px; padding:2px; border:1px solid var(--line); border-radius:8px; background:#fff; cursor:pointer; }
  .tool-count { font-size:13px; color:var(--muted); }
  .tasklist .task { position:relative; background:var(--card); }
  /* BOARDRB: a road-blocked card (list + board) — ROAD BLOCKS' call; colours as tokens */
  :root { --rb-red:#c62828; --rb-red-tint:#fdf1f1; --rb-amber:#b45f06; --rb-amber-tint:#fff7e8; }
  .task.rb-card-red, .bd-card.rb-card-red { background:var(--rb-red-tint); box-shadow:inset 4px 0 0 var(--rb-red); border-color:#f2c4c4; }
  .task.rb-card-amber, .bd-card.rb-card-amber { background:var(--rb-amber-tint); box-shadow:inset 4px 0 0 var(--rb-amber); border-color:#f1d6a8; }
  .task.rb-card-green, .bd-card.rb-card-green { background:#eef8f1; box-shadow:inset 4px 0 0 #1f7a3a; border-color:#bfe3c8; }   /* MK-1: all clear (ROAD BLOCKS' MARK_LOOK) */
  .rb-cbadge { flex:none; vertical-align:-3px; margin-right:4px; }
  .tasklist .task h3 { margin:2px 0; font-size:16px; }
  .t-open { width:auto; padding:0; text-align:left; font:inherit; font-weight:600; color:var(--ink); background:transparent; border-radius:4px; }
  .t-open::after { content:''; position:absolute; inset:0; border-radius:10px; }   /* the whole card is the target */
  .tasklist .task:hover { border-color:#c9d3de; }
  .tasklist .task .dest-tag a { position:relative; z-index:1; }                     /* the map link stays its own link */
  .tasklist .task .d { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
  /* Just created / saved: a brief flash (flashTask ≈3 s, then fades) — never a lasting outline. */
  .task.is-new { border-color:var(--accent); box-shadow:0 0 0 2px var(--accent); animation:newflash 1.6s ease-out;
                 transition:box-shadow .6s ease, border-color .6s ease; }
  .task.is-new.fading { border-color:var(--line); box-shadow:0 0 0 0 transparent; }
  @keyframes newflash { from { background:#e6eeff; } to { background:var(--card); } }
  .map-tools { padding:10px 12px 0; }
  .map-tools .toolbar { margin-bottom:8px; }
  @media (max-width:767px) { .desk-only { display:none !important; } }
  /* ── Panels: one shell. Phone = full-screen slide-up (modal); desktop = 420 px (560 px from a 1280 px window) side
     panel under the top bar with the list still visible. */
  .panel { position:fixed; z-index:48; display:flex; flex-direction:column; background:var(--card); color:var(--ink);
           transition:transform .22s ease, opacity .22s ease; }
  .panel-head { flex:none; display:flex; align-items:center; gap:8px; min-height:56px; padding:6px 8px 6px 16px; border-bottom:1px solid var(--line); }
  .panel-head h2 { flex:1; min-width:0; margin:0; font-size:17px; color:var(--ink); text-transform:none; letter-spacing:0;
                   overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  /* d-tid1 (round 24): the task's own ID — small, light grey, above the title; selectable so it can be copied */
  .tp-ttl { flex:1; min-width:0; display:flex; flex-direction:column; justify-content:center; }
  .tp-key { margin:0 0 1px; font-size:12px; line-height:1.3; color:var(--muted); font-family:ui-monospace,Menlo,monospace; user-select:text; -webkit-user-select:text; cursor:text; }
  /* QF-12 (1, Gary): on a phone the task's key, ⋯ and the buttons keep the top row and the TITLE gets its own full-width line below
     (it wraps — up to 3 lines — instead of being cut to "Foo…") */
  @media (max-width:767px) {
    #taskPanel .panel-head { flex-wrap:wrap; row-gap:0; }
    #taskPanel .panel-head .tp-ttl { display:contents; }
    #taskPanel .panel-head .tp-key { flex:1 1 auto; min-width:0; margin:0; align-self:center; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    #taskPanel .panel-head .as-mark { width:5.5rem; }   /* the save mark's fixed slot, phone-sized, so the whole key fits beside it */
    #taskPanel .panel-head h2 { order:10; flex:1 0 100%; padding:0 0 6px; white-space:normal; overflow-wrap:anywhere;
                                display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; line-clamp:3; }
  }
  .panel-x { flex:none; width:44px; height:44px; padding:0; display:inline-flex; align-items:center; justify-content:center;
             background:transparent; color:var(--ink); border-radius:10px; }
  .panel-x:hover { background:var(--hover); }
  .panel-share { flex:none; width:44px; height:44px; padding:0; display:inline-flex; align-items:center; justify-content:center; background:transparent; color:var(--ink); border-radius:10px; }   /* BRIEF-1245 */
  .panel-share:hover { background:var(--hover); }
  .panel-body { flex:1 1 auto; overflow-y:auto; padding:16px 16px 0; }
  .panel-foot { position:sticky; bottom:0; display:flex; align-items:center; gap:12px; margin:8px -16px 0; padding:12px 16px;
                background:var(--card); border-top:1px solid var(--line); }
  .panel-foot button { flex:1; }
  .panel-foot .another { flex:none; margin:0; font-size:14px; color:var(--ink); }
  .panel-foot .t-del { flex:none; }   /* look: shared/buttons.css (.btn-danger) */
  @media (max-width:767px) {
    .panel { inset:0; padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom); transform:translateY(100%); }
    .panel.open { transform:none; }
    html.th-under .panel.th-sheet-phone { padding-top:0; }   /* BRIEF-1307: under the top bar, which carries the safe area … */
    html.th-above .panel.th-sheet-phone { padding-bottom:0; }   /* … and above the view bar, which carries the bottom one */
  }
  /* BRIEF-1260: the panel's width = --pw (set by the grip when the person chose one; else 420, 560 from 1280 — Gary C2) */
  :root { --pw-def:420px; }
  @media (min-width:1280px) { :root { --pw-def:560px; } }
  @media (min-width:768px) {
    .panel { top:var(--th-top, calc(56px + env(safe-area-inset-top))); right:0; bottom:0; width:var(--pw, var(--pw-def)); border-left:1px solid var(--line);
             box-shadow:-8px 0 24px rgba(20,28,40,.12); transform:translateX(24px); opacity:0; }
    .panel.open { transform:none; opacity:1; }
    body.panel-open #app { margin-right:calc(var(--pw, var(--pw-def)) + 16px); }
    body.panel-open #overviewSheet.mapview { right:var(--pw, var(--pw-def)); }   /* the map stays visible beside the panel */
    .panel-grip { position:absolute; top:0; bottom:0; left:-6px; width:12px; z-index:2; cursor:col-resize; touch-action:none; background:transparent; }
    .panel-grip::after { content:''; position:absolute; top:50%; left:4px; width:4px; height:44px; margin-top:-22px; border-radius:2px; background:var(--line); opacity:0; transition:opacity .15s; }
    .panel-grip.pg-right { left:auto; right:-6px; }   /* the folder tree's grip: on its right edge (public/shared/edge-resize.js) */
    .panel:hover .panel-grip::after, .nv-panel:hover .panel-grip::after, .panel-grip:focus-visible::after, .panel-grip.pg-on::after { opacity:1; background:var(--accent); }
    .panel-grip:focus-visible { outline:2px solid var(--accent); outline-offset:-2px; }
    body.pg-dragging, body.pg-dragging * { cursor:col-resize !important; user-select:none !important; }
    body.pg-dragging .panel, body.pg-dragging .nv-panel { transition:none; }
  }
  @media (max-width:767px) { .panel-grip { display:none; } }
  .nv-panel.nv-page .panel-grip { display:none; }   /* the phone's tree page: no grip */
  @media (prefers-reduced-motion: reduce) { .panel-grip::after { transition:none; } }
  /* BRIEF-1260 (Gary): on a wide panel, short fields side by side — long ones (text boxes, multi-pick lists) keep the whole row */
  .panel-body { container-type:inline-size; }
  @container (min-width: 520px) {
    .t-edit .e-cf, .t-edit .fl-body { display:grid; grid-template-columns:1fr 1fr; column-gap:16px; align-items:start; }
    .t-edit .e-cf > *, .t-edit .fl-body > * { min-width:0; }
    .t-edit .e-cf > :not(.field), .t-edit .fl-body > :not(.field),
    .t-edit .e-cf > .field:has(textarea, select[multiple], .asg-box, .cl-field, .fl-box, .tph, .t-files),
    .t-edit .fl-body > .field:has(textarea, select[multiple], .asg-box, .cl-field, .tph, .t-files) { grid-column:1 / -1; }
  }
  /* Floating "+ New task" — phone only, bottom-right in thumb reach, clear of the safe areas. */
  .fab { position:fixed; z-index:44; right:calc(16px + env(safe-area-inset-right)); bottom:calc(16px + env(safe-area-inset-bottom));
         width:56px; height:56px; padding:0; border-radius:50%; display:inline-flex; align-items:center; justify-content:center;
         box-shadow:0 6px 18px rgba(20,28,40,.3); }
  @media (min-width:768px) { .fab { display:none !important; } }
  html.th-kbd .fab { display:none !important; }   /* the phone's keyboard is up (shared/bars/bars.js): the ＋ steps aside */
  @media (max-width:767px) { .tasklist { padding-bottom:72px; } }   /* last card never sits under the FAB */
  .overlay.center { align-items:center; }
  .tp-bar { position:fixed; z-index:47; left:0; right:0; top:var(--th-top, 56px); display:flex; align-items:center; gap:10px; padding:8px max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));
             background:var(--accent); color:#fff; font-weight:600; box-shadow:0 2px 8px rgba(20,28,40,.18); }   /* THNav.pickTask (ROUND 42) */
  .tp-bar .tp-t { flex:1; min-width:0; }
  .tp-bar .tp-x { flex:none; width:auto; min-height:40px; padding:0 14px; background:#fff; color:var(--ink); border:0; }
  body.tp-on #app { padding-top:52px; }
  .modalcard { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:22px; width:100%; max-width:400px; margin:16px; }
  .modalcard h2 { margin:0 0 6px; font-size:18px; color:var(--ink); text-transform:none; letter-spacing:0; }
  .modalcard p.hint { margin:0 0 14px; font-size:13px; color:var(--muted); }
  .modalcard input { margin:0 0 14px; }
  .modalbtns { display:flex; gap:10px; }
  .modalbtns button { flex:1; }
  .modalbtns .ghost { background:var(--bg); color:var(--ink); border:1px solid var(--line); }
  /* Delete project (Gary CQ4): everything goes — the kinds listed, what an earlier ruling keeps, the typed name */
  .pd-card { max-width:460px; max-height:calc(100vh - 32px); overflow-y:auto; }
  .pd-card .pd-lead { margin:0 0 10px; font-size:14px; color:var(--ink); font-weight:600; }
  .pd-card .pd-sub { margin:0 0 4px; font-size:13px; color:var(--muted); }
  .pd-list { margin:0 0 12px; padding-left:18px; font-size:13px; color:var(--ink); line-height:1.45; }
  .pd-list li { margin:0 0 2px; overflow-wrap:anywhere; }
  .pd-list .pd-wait { color:var(--muted); list-style:none; margin-left:-18px; }
  .pd-card .pd-backup { margin:0 0 10px; }
  .pd-rec { margin:0 0 12px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:var(--bg); font-size:13px; color:var(--ink); line-height:1.45; }
  .pd-rec a { font-weight:600; color:var(--accent); }
  .pd-rec .pd-det { color:var(--muted); }
  .pd-f { display:block; font-size:13px; color:var(--ink); }
  .pd-f span { display:block; margin:0 0 4px; font-weight:600; }
  .pd-f input { width:100%; box-sizing:border-box; margin:0 0 10px; }
  .pd-f input[aria-invalid="true"] { border-color:var(--err); }
  .modalbtns .pd-danger { background:var(--err); color:#fff; }
  .modalbtns .pd-danger:disabled { opacity:.5; cursor:not-allowed; }
  @media (pointer: coarse) { .pd-card button, .pd-f input { min-height:44px; } }
  /* Field-builder */
  .fieldnew { display:flex; gap:8px; margin:10px 0 4px; }
  .fieldnew input { flex:1; min-width:0; margin:0; }
  .fieldnew select { width:auto; flex:0 0 auto; min-width:120px; margin:0; }
  .fieldnew button { width:auto; flex:0 0 auto; padding:10px 14px; }
  .fielditem { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:11px 0; border-top:1px solid var(--line); }
  .fielditem .fi-main { flex:1; min-width:140px; display:flex; flex-direction:column; gap:4px; }
  .fielditem:has(.fe-save) > .fi-main { flex-basis:100%; }   /* editing: the editor gets the full row; Save / Cancel wrap below */
  .fielditem .fi-name { font-weight:600; font-size:15px; }
  .fielditem .fi-type { font-size:12px; color:var(--muted); }
  .fielditem .fi-usage { font-size:12px; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }   /* one extra line at most */
  .fi-usage .fi-unused { color:var(--muted); font-style:italic; } .fi-usage .fi-used { font-weight:600; }
  .fu-filter { display:flex; width:fit-content; max-width:100%; margin:6px 0 4px; border:1px solid var(--line); border-radius:8px; overflow:hidden; } .fu-filter .fu-n { font-weight:400; opacity:.8; }
  .fe-typelab { display:flex; align-items:center; gap:8px; font-size:13px; margin:6px 0 0; } .fe-typelab select { width:auto; padding:6px 8px; }
  .cf-lock { display:inline-flex; align-items:center; margin-left:6px; color:var(--muted); vertical-align:-1px; } .cf-lock svg { display:block; }   /* FIELD VISIBILITY (Gary 2026-11-04): the lock beside a field only some people see */
  .fe-vis { margin:8px 0 0; } .fe-vis-lab { display:block; } .fe-vis-lab select { width:100%; max-width:420px; } .fe-vis-lists { margin:8px 0 0; padding:10px 12px; border:1px solid var(--line); border-radius:9px; background:var(--card); } .fe-vis-lists[hidden] { display:none; } .fe-vis-title { display:block; font-size:13px; font-weight:600; margin:10px 0 4px; } .fe-vis-lists > .fe-link-note { margin:0 0 4px; }   /* FIELD VISIBILITY: Who can see this field */
  .fe-hidero { display:flex; align-items:center; gap:8px; font-size:13px; margin:6px 0 0; } .fe-hidero input { width:auto; margin:0; } .fe-hidero .fe-link-note { margin:0; }   /* READ-ONLY (Gary 2026-11-04): the "Hide from read-only" tick */
  .fe-nameerr { margin:4px 0 0; }
  .fielditem input, .fielditem select { margin:0; }
  .fielditem button { width:auto; flex:0 0 auto; padding:7px 10px; font-size:13px; font-weight:500;
                      background:#fff; color:var(--muted); border:1px solid var(--line); border-radius:8px; }
  .fielditem button:hover:not(:disabled) { color:var(--ink); background:var(--hover); }
  .fielditem .fi-del { color:var(--err); background:transparent; border-color:transparent; }
  .fielditem .fi-del:hover:not(:disabled) { background:#fdecec; color:var(--err); }
  /* Linked values panel (job-intake §15 C) */
  .sle { display:flex; flex-direction:column; gap:6px; }
  .sle-row { display:flex; align-items:center; gap:6px; padding:6px 8px; border:1px solid var(--line); border-radius:8px; }
  .sle-n { width:18px; font-size:12px; color:var(--muted); font-variant-numeric:tabular-nums; }
  .sle-v { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; }
  .sle-v em { font-style:normal; font-size:11px; color:var(--accent); margin-left:6px; text-transform:uppercase; letter-spacing:.04em; }
  .sle-row button { width:auto; flex:0 0 auto; padding:4px 9px; font-size:13px; background:#fff; color:var(--muted); border:1px solid var(--line); border-radius:6px; margin:0; }
  .sle-row button:disabled { opacity:.35; }
  .sle-add { display:flex; gap:6px; }
  .sle-add input { margin:0; flex:1; }
  .sle-add button { width:auto; flex:0 0 auto; padding:8px 14px; margin:0; }
  .sle-link { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
  .se-status-item .fi-main { gap:6px; }
  .se-status-opts { padding:8px 10px; font-size:14px; margin:0; }
  .se-status { display:flex; flex-direction:column; gap:6px; margin:8px 0; }
  .se-status-lbl { font-size:12px; font-weight:600; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
  .se-status-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
  .fe-link { display:flex; flex-direction:column; gap:6px; margin-top:4px; padding:8px 10px; border:1px solid var(--line); border-radius:8px; }
  .fe-link-head { display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:12px; font-weight:600; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
  .fe-link-note { margin:0; font-size:12px; color:var(--muted); }
  /* BRIEF-1243: the task's Status + Priority pickers lead Details; the line (destination · created) follows, wrapping under them on a phone */
  .t-top { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; margin:0 0 12px; }
  .t-picks { display:flex; flex-wrap:wrap; align-items:center; gap:8px; min-width:0; }
  .t-picks .field { margin:0; min-width:0; }
  .t-picks .field > label { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
  .t-picks .sp-btn { min-height:44px; }
  .t-top > .fe-link-note { flex:1 1 220px; min-width:0; overflow-wrap:anywhere; }
  .t-ro .t-picks { display:none; }   /* a viewer: the badges on the line instead */
  .fe-map { display:flex; flex-direction:column; gap:6px; }
  .fe-map-row { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:center; gap:8px; font-size:14px; }
  .fe-map-row span:first-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .fe-map-row .fe-arrow { font-size:12px; color:var(--muted); }
  .fe-map-row { grid-template-columns:minmax(0,1fr) auto minmax(0,2fr); align-items:start; }
  .fe-means { display:flex; flex-wrap:wrap; gap:6px; }
  .fe-mean-chip { display:inline-flex; align-items:center; gap:4px; padding:3px 8px; border:1px solid var(--line); border-radius:999px; font-size:13px; cursor:pointer; }
  .fe-mean-chip input { width:auto; margin:0; }
  .fielditem button:disabled { opacity:.3; cursor:default; }
  /* compact inline inputs inside list rows / editor */
  .se-opts, .tb-text, .tb-attr { padding:8px 10px; font-size:14px; }
  .tb-attr { width:100%; border:1px solid var(--line); border-radius:9px; background:#fbfcfd; color:var(--ink); }
  .se-add-sel, #fieldType, #fieldQualityStd { border:1px solid var(--line); border-radius:9px; background:#fbfcfd; color:var(--ink); padding:10px; font-size:15px; }
  #fieldQualityStd { width:100%; min-height:44px; }   /* QUALITY S5: "Which standard?" full width under its label, like the options box */
  /* Fields modal */
  .fields-card { max-width:520px; max-height:88vh; overflow-y:auto; }
  .fields-card h2 { margin-bottom:2px; }
  .ftabs { display:flex; gap:0; margin:12px 0 10px; box-shadow:inset 0 -1px 0 var(--line); overflow-x:auto; overflow-y:hidden; scrollbar-width:none; }   /* four tabs on a phone: the row scrolls sideways, the chosen tab is brought into view */
  .ftabs::-webkit-scrollbar { display:none; }
  .ftabs [role=tab] { flex:none; }
  .ftabs [role=tab]:focus-visible { outline-offset:-3px; }
  .ftabs [role=tab] { width:auto; min-height:44px; margin:0; padding:8px 12px; white-space:nowrap; background:none; color:var(--muted); border:0; border-bottom:2px solid transparent; border-radius:0; font-weight:600; font-size:15px; }
  .ftabs [role=tab][aria-selected="true"] { color:var(--ink); border-bottom-color:var(--accent); }
  .req-mark { color:var(--err); font-weight:700; } .req-sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
  .wf-out { display:inline-block; margin-left:6px; padding:0 6px; border-radius:9px; border:1px solid #c98a00; background:#fff6e0; color:#7a4f00; font-size:11px; font-weight:600; vertical-align:middle; }   /* BRIEF-1268 W2 */
  .wf-outmsg { background:#fff6e0; color:#7a4f00; }
  .fielditem.fi-off .fi-name, .fielditem.fi-off .fi-type { color:var(--muted); }   /* QUALITY S5: Quality is off for the company */
  .req-needed, .need-mark { display:inline-block; margin-left:6px; padding:0 6px; border-radius:9px; border:1px solid var(--line); font-size:11px; font-weight:600; color:var(--muted); vertical-align:1px; }
  .se-req { margin:0 4px 0 0; font-size:13px; color:var(--muted); min-height:36px; } .se-req input { width:auto; }
  @media (pointer: coarse) { .se-req { min-height:44px; } }
  .fa-pick { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:8px 0 6px; } .fa-pick label { margin:0; width:100%; } .fa-pick select { flex:1 1 180px; width:auto; padding:10px; font-size:15px; border:1px solid var(--line); border-radius:9px; background:#fbfcfd; color:var(--ink); } .fa-pick button { width:auto; }
  @media (pointer: coarse) { .fa-pick select, .fa-pick button { min-height:44px; } }
  @media (max-width:400px) { .ftabs [role=tab] { padding:8px 9px; font-size:14px; } }
  .proj-co { margin:0 0 12px; } .proj-co select { width:100%; padding:10px; font-size:15px; border:1px solid var(--line); border-radius:9px; background:#fbfcfd; color:var(--ink); }
  .proj-conew { width:auto; background:none; border:0; padding:6px 0; color:var(--accent); font-weight:600; }
  .proj-conewrow { display:flex; gap:6px; margin-top:6px; } .proj-conewrow input { margin:0; flex:1; min-width:0; } .proj-conewrow button { width:auto; }
  @media (max-width:1023px) { #viewEmails { display:none !important; } }   /* BRIEF-1251 UI-S1 (Gary Q25): Emails in the top bar from 1024 px; More on phones, the Project menu on tablets */
  @media (min-width:1024px) and (max-width:1199px) { body.em-on .tb-brandword { display:none; } }   /* the Emails segment needs the room: the mark stays, the wordmark goes (as 1206 on tablets) */
  .em-slot { max-width:1100px; margin:0 auto; padding:12px 16px 24px; } .em-slot[hidden] { display:none; }
  .em-switch { margin:4px 0 12px; }   /* phone: Stock is in the project menu (the top bar is full) */
  .stock-slot { max-width:780px; margin:0 auto; }
  .fb-head { margin-top:4px; } #fieldsList .fg-body > .fielditem:first-child { border-top:0; }
  .gen-field { margin-bottom:12px; } .gen-field .gen-help { margin:4px 0 0; } .gen-field .gen-err { margin:4px 0 0; }
  .gen-field input, .gen-field select { margin:0; font-family:inherit; }
  .gen-field select { width:100%; padding:12px; font-size:16px; border:1px solid var(--line); border-radius:9px; background:#fbfcfd; color:var(--ink); }
  .gen-field label { margin-top:10px; } #generalBody .fields-h3 { margin-bottom:0; } #generalBody .fields-h3:first-child { border-top:0; padding-top:0; margin-top:6px; }
  #generalMsg { margin:0 0 12px; } .gen-field [aria-invalid="true"] { border-color:var(--err); }
  .gen-days { display:flex; flex-wrap:wrap; gap:6px; } .gen-days .chip { min-width:48px; min-height:44px; }
  .gen-days .chip[aria-pressed="true"] { background:var(--accent); border-color:var(--accent); color:#fff; }
  .gen-days .chip:disabled { opacity:.75; cursor:default; }
  .gen-days[aria-invalid="true"] { outline:1px solid var(--err); outline-offset:3px; border-radius:8px; }
  /* Members (job-intake §16) */
  .mem-card { max-width:600px; } .mem-more #membersList, .mem-more #inviteBox, .mem-more #pendingBox, .mem-more #formerBox { display:none !important; } .mem-you { color:var(--muted); font-weight:400; }
  .mem-email { font-size:12px; color:var(--muted); overflow-wrap:anywhere; }   /* BRIEF-1179 */
  .cfg-banner { position:fixed; left:50%; transform:translateX(-50%); top:calc(var(--th-notice-h, 0px) + 8px + env(safe-area-inset-top)); z-index:70; display:flex; align-items:center; gap:8px; max-width:calc(100vw - 24px); padding:8px 10px 8px 14px; background:var(--card); border:1px solid var(--line); border-radius:12px; box-shadow:0 8px 24px rgba(20,28,40,.18); font-size:14px; }
  .cfg-banner .chip, .cfg-banner .ghost { width:auto; min-height:40px; }   /* BRIEF-1203 */
  .gs-first { margin-top:10px; padding:12px 14px; border:1px dashed var(--line); border-radius:10px; display:grid; gap:8px; } .gs-first .chip { width:auto; justify-self:start; min-height:44px; }   /* BRIEF-1200 */
  .mem-row { flex-wrap:wrap; } .mem-ctl { display:grid; grid-template-columns:max-content minmax(0, 16em); align-items:center; gap:6px 10px; }   /* PHONE2: Level / Group / Order each with its visible label */
  .mem-ctl select, .mem-ctl input { width:100%; min-height:40px; margin:0; padding:8px; font-size:14px; border:1px solid var(--line); border-radius:9px; background:#fbfcfd; color:var(--ink); } .mem-ctl .mem-order { width:6em; } .mem-ctl .mem-remove { grid-column:1 / -1; justify-self:start; width:auto; }
  .mem-lab { margin:0; font-size:13px; font-weight:600; color:var(--muted); }
  .mem-err { flex-basis:100%; margin:4px 0 0; }
  .mem-sec { margin-top:6px; } .mem-invite { display:flex; flex-wrap:wrap; align-items:flex-end; gap:8px; } .mem-invite .field { margin:0; flex:1 1 160px; } .mem-invite input, .mem-invite select { margin:0; }
  .mem-invite select { width:100%; padding:12px; font-size:16px; border:1px solid var(--line); border-radius:9px; background:#fbfcfd; color:var(--ink); }
  .mem-invite .field { position:relative; } .mem-matches { position:absolute; left:0; right:0; min-width:220px; top:100%; z-index:5; margin-top:2px; background:var(--bg); border:1px solid var(--line); border-radius:9px; box-shadow:0 6px 18px rgba(0,0,0,.18); max-height:260px; overflow:auto; }
  .mem-invite .mem-match { display:flex; flex-direction:column; align-items:flex-start; gap:1px; width:100%; padding:9px 12px; border:0; border-bottom:1px solid var(--line); background:transparent; color:var(--ink); text-align:left; cursor:pointer; } .mem-match:last-child { border-bottom:0; } .mem-match:hover, .mem-match:focus-visible { background:var(--line); }
  .mem-match .mm-n { font-size:15px; } .mem-match .mm-e { font-size:12px; opacity:.7; }
  .mem-invite button { width:auto; } .mem-done { margin-top:10px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:var(--bg); }
  .mem-done p { margin:0 0 8px; } .mem-done input { margin:8px 0; font-size:13px; }
  .mem-foot { margin-top:14px; } .danger-text { color:var(--err) !important; }
  .invite-banner { margin:0 0 16px; padding:10px 12px; border-radius:10px; background:#eef4ff; border:1px solid #c9d8f5; color:var(--ink); font-size:14px; } .invite-banner.bad { background:#fdf2f2; border-color:#f3c6c6; }
  /* under panels, pickers and modals (43 < .fab 44 < .panel 48 < .overlay 50): it never covers what you are doing */
  .toast { position:fixed; left:50%; transform:translateX(-50%); bottom:calc(20px + env(safe-area-inset-bottom)); z-index:43; max-width:min(560px, calc(100vw - 32px)); display:flex; align-items:center; gap:10px;
           padding:10px 12px 10px 16px; border-radius:12px; background:var(--ink); color:#fff; font-size:14px; box-shadow:0 6px 20px rgba(20,28,40,.3); }
  @media (max-width:767px) { .toast { bottom:calc(88px + env(safe-area-inset-bottom)); } }   /* clear of the floating + */
  .toast[hidden] { display:none; } .toast { pointer-events:none; } .toast button { pointer-events:auto; }   /* taps pass through to what is underneath */
  .name-nudge { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:0 0 10px; padding:8px 10px 8px 12px; border:1px solid var(--line); border-radius:10px; background:var(--card); font-size:14px; color:var(--muted); }
  .name-nudge[hidden] { display:none; } .name-nudge .linkbtn { width:auto; background:none; border:0; padding:4px; color:var(--accent); font-weight:600; } .name-nudge .toast-x { color:var(--muted); margin-left:auto; } .toast .linkbtn { color:#fff; text-decoration:underline; width:auto; background:none; border:0; padding:4px; font-weight:600; }
  .toast-x { width:auto; background:none; border:0; color:#fff; padding:4px 6px; font-size:14px; }
  @media (pointer: coarse) { .toast-x, .toast .linkbtn, .mem-ctl select, .mem-ctl input, .mem-ctl button { min-height:44px; min-width:44px; } }
  /* list settings (job-intake §23): a small table; a row's cells stack on a phone */
  .gen-list { display:flex; flex-direction:column; gap:6px; } .gen-lhead, .gen-lrow { display:flex; gap:6px; align-items:flex-start; }
  .gen-lhead span { flex:1 1 0; font-size:12px; font-weight:700; color:var(--muted); } .gen-lhead span:last-child, .gen-lrow .gen-lrm { flex:0 0 36px; }
  .gen-lcell { flex:1 1 0; min-width:0; display:flex; flex-direction:column; gap:2px; } .gen-lcell input[type=text], .gen-lcell input[type=date] { margin:0; padding:9px; font-size:15px; }
  .gen-lhead small { display:block; font-weight:400; } .gen-c-boolean, .gen-c-colour { flex:0 0 56px !important; align-items:center; text-align:center; } .gen-lcell input[type=checkbox] { width:22px; height:22px; margin:9px 0; } .gen-lcell input[type=color] { width:44px; height:38px; padding:2px; margin:0; border:1px solid var(--line); border-radius:8px; background:#fff; }
  .gen-lcap { display:none; font-size:12px; font-weight:700; color:var(--muted); } .gen-lhint { display:none; font-size:12px; color:var(--muted); } .gen-lerr { margin:0; font-size:13px; }
  .gen-lrm { width:36px; height:38px; padding:0; background:transparent; color:var(--muted); border:1px solid var(--line); } .gen-lrm:hover { color:var(--err); }
  .gen-ladd { align-self:flex-start; } .gen-lnone { margin:0; }
  .gen-ltab { width:100%; border-collapse:collapse; font-size:14px; } .gen-ltab th { text-align:left; font-size:12px; color:var(--muted); padding:4px 6px; } .gen-ltab td { padding:6px; border-top:1px solid var(--line); overflow-wrap:anywhere; }
  .gen-sw { display:inline-block; width:12px; height:12px; border-radius:3px; margin-right:6px; vertical-align:-1px; border:1px solid rgba(0,0,0,.2); }
  @media (max-width:600px) { .gen-lhead { display:none; } .gen-lrow { flex-wrap:wrap; padding:8px; border:1px solid var(--line); border-radius:10px; }
    .gen-lcell { flex:1 1 100%; } .gen-lcell.gen-c-boolean, .gen-lcell.gen-c-colour { flex:1 1 40% !important; flex-direction:row; justify-content:space-between; } .gen-lcap, .gen-lhint { display:block; } .gen-lrow .gen-lrm { margin-left:auto; } }
  .gen-lchk { min-width:38px; min-height:38px; justify-content:center; margin:0; }
  @media (pointer: coarse) { .gen-lrow .gen-lrm { width:44px; height:44px; flex:0 0 44px; } .gen-lchk { min-width:44px; min-height:44px; } .gen-lcell input[type=checkbox] { width:26px; height:26px; } }
  .gen-reset { width:auto; margin:6px 0 0; padding:4px 0; background:none; border:0; color:var(--accent); font-size:13px; font-weight:600; text-align:left; }
  .gen-reset:hover { text-decoration:underline; }
  @media (pointer: coarse) { .gen-reset { min-height:44px; padding:0 4px 0 0; } }
  .gen-ro { padding:9px 12px; border:1px dashed var(--line); border-radius:8px; color:var(--muted); font-size:14px; overflow-wrap:anywhere; }
  .fields-h3 { margin:22px 0 2px; font-size:12px; font-weight:700; color:var(--muted);
               text-transform:uppercase; letter-spacing:.6px; padding-top:16px; border-top:1px solid var(--line); }
  .fields-card > .fields-h3:first-of-type { border-top:0; padding-top:4px; margin-top:10px; }
  .fields-card .hint { margin:2px 0 8px; }
  /* Setting editor = soft panel; title builder = white sub-card */
  .setting-editor { background:var(--bg); border:1px solid var(--line); border-radius:12px; padding:14px; margin-top:6px; }
  .setting-editor .se-name { margin:0 0 12px; background:#fff; font-weight:600; }
  .setting-editor .se-members { margin:0; }
  .setting-editor .se-members .fielditem:first-child { border-top:0; padding-top:2px; }
  .setting-editor .fieldnew { margin:10px 0 0; }
  .setting-editor .modalbtns { margin-top:14px; }
  /* FULL-SCREEN Fields (Gary, SHERIFF GO): a computer gets the whole space between the bars; < 1024 px unchanged */
  /* a field GROUP = a box in the Details form's look (form-layout.css .fl-box / .fl-head / .fl-body); only what the Fields head needs differs */
  #fieldsList { --fl-edge: var(--branch, #8a94a2); }   /* the Details form sets this on its .fl-boxes container */
  #fieldsList .fg-box { margin:12px 0 0; overflow:visible; }   /* visible: a field's editor (colours, lookups) is never clipped */
  #fieldsList .fg-box > .fg-head.fl-head { margin:0; padding:0 8px 0 10px; border-bottom:0; border-radius:11px 11px 0 0; cursor:default; }
  #fieldsList .fg-box:has(> .fg-body[hidden]) > .fg-head.fl-head { border-radius:11px; }
  #fieldsList .fg-box .fg-toggle { color:var(--ink); font-size:15px; font-weight:600; letter-spacing:0; text-transform:none; }
  #fieldsList .fg-box .fg-n { font-size:12px; font-weight:400; color:var(--muted); }
  #fieldsList .fg-box > .fg-body.fl-body { padding:2px 14px 4px; }
  #settingsList { --fl-edge: var(--branch, #8a94a2); }   /* d-panes: the workflows = ONE box in the Details form's look, as the Fields tab's groups */
  #settingsList .se-box { margin:4px 0 0; } #settingsList .se-box > .fl-head { font-size:15px; font-weight:600; color:var(--ink); cursor:default; border-radius:11px 11px 0 0; }
  #settingsList .se-box > .fl-head:hover { background:transparent; } #settingsList .se-box > .fl-body { padding:2px 14px 4px; } #settingsList .se-box .fg-n { font-size:12px; font-weight:400; color:var(--muted); }
  .se-ep-empty { margin:6px 0 0; padding:18px; border:1px dashed var(--line); border-radius:12px; color:var(--muted); font-size:14px; }
  @media (min-width:1024px) {
    #fieldsModal.overlay > .fields-card { width:calc(100% - 32px); max-width:none; height:calc(100% - 32px); max-height:calc(100% - 32px); margin:16px; box-sizing:border-box; overflow-x:hidden; display:flex; flex-direction:column; }
    #fieldsModal .fields-card > .modalbtns { margin-top:auto; padding-top:12px; }   /* Close sits at the foot of the full-height shell */
    #fieldsModal .fields-card > .ftabs { flex:none; }   /* d-panes: a tall tab (a workflow's form) never squeezes the tab row to 0 (overflow-y:hidden + flex shrink) */
    #fieldsModal .fieldnew { max-width:720px; }
    #settingsList.se-2pane { display:grid; grid-template-columns:minmax(320px, 400px) minmax(0, 1fr); gap:28px; align-items:start; }
    #settingsList.se-2pane .se-lp, #settingsList.se-2pane .se-ep { min-width:0; }
    #settingsList.se-2pane .setting-editor { margin-top:6px; }
    #settingsList .fielditem.se-cur { box-shadow:inset 3px 0 0 var(--accent); padding-left:10px; background:color-mix(in srgb, var(--accent) 6%, transparent); }
  }
  .se-sec { border-top:1px solid var(--line); } .se-sec:first-of-type { margin-top:4px; }   /* REPLY-1295 W1-a: folded sections */
  .se-sh { display:flex; align-items:center; gap:10px; width:100%; min-height:48px; margin:0; padding:8px 2px; background:transparent; color:var(--ink); border:0; border-radius:0; text-align:left; font-size:14px; font-weight:400; cursor:pointer; }
  .se-sh:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
  .se-st { flex:none; font-weight:700; min-width:92px; }
  .se-ss { flex:1; min-width:0; color:var(--muted); font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .se-chev { flex:none; width:16px; height:16px; color:var(--muted); transition:transform .15s ease; }
  .se-sh[aria-expanded="true"] .se-chev { transform:rotate(180deg); }
  .se-sh[aria-expanded="true"] .se-ss { white-space:normal; }
  .se-sb { padding:2px 0 12px; }
  .se-rbtext { margin:0 0 8px; font-size:13px; color:var(--muted); }
  .lv-rows { display:grid; gap:8px; margin:4px 0 8px; }   /* REPLY-1295 W1-b */
  .lv-what { margin:0 0 6px; font-size:13px; color:var(--ink); }
  .lv-row { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; padding:6px 0; border-top:1px solid var(--line); }
  .lv-row:first-child { border-top:0; }
  .lv-st { font-weight:700; min-width:96px; }
  .lv-means { color:var(--muted); font-size:13px; }
  .lv-sels { display:flex; flex-wrap:wrap; gap:6px; flex:1 1 180px; min-width:0; }
  .lv-sel { width:auto; min-width:150px; max-width:100%; min-height:40px; }
  .lv-also { font-size:13px; color:var(--accent) !important; }
  #lvCfgBar { width:min(480px, calc(100vw - 24px)); } #lvCfgBar > span { flex:1; min-width:0; }   /* "Fields changed — reload": the words get a row on a phone */
  .lv-also-in { flex-basis:100%; font-size:12px; color:var(--muted); }
  @media (max-width:520px) { .se-sh { flex-wrap:wrap; row-gap:2px; } .se-st { flex:1; min-width:0; } .se-chev { order:2; } .se-ss { order:3; flex-basis:100%; white-space:normal; } }   /* a phone: the summary gets its own line */
  @media (prefers-reduced-motion: reduce) { .se-chev { transition:none; } }
  .tb { background:#fff; border:1px solid var(--line); border-radius:10px; padding:12px; margin-bottom:14px; }
  .tb .tb-parts .fielditem:first-child { border-top:0; padding-top:2px; }
  .tb .empty { margin:2px 0 0; }
  .mini-label { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; color:var(--muted); margin-bottom:8px; }
  .tb-preview { margin:10px 0; font-size:14px; color:var(--muted); }
  .tb-preview .tb-prev { color:var(--ink); font-weight:600; }
  .tb-actions { display:flex; gap:8px; align-items:center; }
  /* MADE FROM (NOTE-FX FX2): the one-line box that replaced the Title builder's parts */
  .mf-wrap { position:relative; }
  .mf-line { min-height:44px; max-height:160px; resize:none; overflow:auto; line-height:1.4; }
  .mf-line[aria-invalid="true"] { border-color:#b3261e; }
  .mf-sug { position:absolute; left:0; right:0; top:100%; z-index:30; margin:4px 0 0; padding:4px; list-style:none; background:#fff; border:1px solid var(--line); border-radius:10px; box-shadow:0 8px 24px rgba(0,0,0,.14); max-height:240px; overflow:auto; }
  .mf-sug[hidden] { display:none; }
  .mf-opt { padding:10px 12px; min-height:40px; border-radius:7px; cursor:pointer; font-size:15px; color:var(--ink); display:flex; align-items:center; }
  .mf-opt:hover, .mf-opt.on { background:var(--hover); }
  .mf-prev { margin:10px 0 4px; font-size:14px; color:var(--muted); }
  .mf-prev .mf-prev-t { color:var(--ink); font-weight:600; overflow-wrap:anywhere; }
  .mf-err { margin:8px 0 0; font-size:14px; color:#b3261e; }
  .mf-err[hidden], .mf-prev[hidden] { display:none; }
  .mf-hint { margin:8px 0 6px; font-size:13px; color:var(--muted); }
  .mf-fill { margin-top:6px; }
  .mf .mf-fill-go, .mf .mf-fill-no { min-height:44px; color:var(--accent); margin-left:0; }   /* (.linkbtn below is red + pushed right: a fill is not a delete) */
  .mf-fill-box { margin:6px 0 0; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:var(--bg); }
  .mf-fill-box[hidden] { display:none; }
  .mf-fill-t { display:block; font-size:14px; color:var(--ink); overflow-wrap:anywhere; }
  .mf-fill-bad { color:#b3261e; }
  .mf-fill-act { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:8px; }
  .mf-fill-act .mf-fill-do { width:auto; margin:0; min-height:44px; padding:6px 12px; }
  .chip { width:auto; flex:0 0 auto; padding:8px 12px; font-size:13px; font-weight:600;
          background:#fff; color:var(--ink); border:1px solid var(--line); border-radius:8px; }
  .chip:hover { background:var(--hover); }
  .linkbtn { width:auto; flex:0 0 auto; padding:8px 4px; font-size:13px; font-weight:600;
             background:transparent; color:var(--err); border:0; margin-left:auto; }
  #customFields .field select[multiple] { min-height:78px; }
  .cf-check { display:flex; align-items:center; gap:8px; }
  .cf-check input { width:auto; }
  main { max-width:640px; margin:0 auto; padding:16px; }
  /* By level (job-intake §16): what may not be done is not offered */
  body.th-nowrite #newTaskBtn, body.th-nowrite .fab, body.th-nowrite .tg-add { display:none !important; }
  .fields-ronote { display:none; } body.th-nofields .fields-ronote { display:block; }
  .fields-h2 { display:flex; align-items:center; gap:6px; } .fields-lead { margin-top:-4px; }   /* BRIEF-1291 F1 */
  .fields-help { position:relative; display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; margin:-10px 0; border-radius:50%; text-decoration:none; color:var(--accent); font-size:15px; font-weight:700; }
  .fields-help::before { content:''; position:absolute; inset:9px; border:1.5px solid var(--accent); border-radius:50%; }
  .fields-help:hover::before { border-width:2px; } .fields-help:focus-visible { outline:2px solid var(--accent); outline-offset:-2px; }
  .fg-sub { font-weight:400; color:var(--muted); font-size:12px; text-transform:none; letter-spacing:0; }
  body.th-nofields #fieldsModal .fieldnew, body.th-nofields #fieldsModal #fieldOptionsWrap, body.th-nofields #fieldsModal #settingNewRow,
  body.th-nofields #fieldsModal .fi-move, body.th-nofields #fieldsModal .fi-eye, body.th-nofields #fieldsModal .fi-grp, body.th-nofields #fieldsModal .fg-tools, body.th-nofields #fieldsModal .fg-new { display:none !important; }
  .t-files:empty { display:none; }   /* the Files slot until EMAIL's module draws (BRIEF-1071) */
  .t-ro [inert] { opacity:.85; } .t-ronote { margin:0 0 10px; font-size:13px; }
  .t-ro .e-destchange, .t-ro .e-destclear, .t-ro .asg-add, .t-ro .asg-x, .t-ro .e-map, .t-ro .e-addrpin { display:none !important; }   /* nothing that looks tappable */
  #sessionGuard { position:fixed; inset:0; z-index:9999; background:var(--bg); display:flex; align-items:center; justify-content:center; padding:24px; }
  #sessionGuard[hidden] { display:none; } #sessionGuard p { max-width:420px; margin:0; text-align:center; font-size:17px; font-weight:600; color:var(--ink); }
  .noproj { text-align:center; padding:56px 16px; }
  .noproj h2 { margin:0 0 6px; font-size:19px; color:var(--ink); text-transform:none; letter-spacing:0; }
  .noproj .hint { margin:0 0 20px; color:var(--muted); font-size:14px; }
  .noproj button { width:auto; min-height:44px; padding:12px 22px; }
  body.th-noproj .fab { display:none !important; }   /* nothing to add a task to */
  .card { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:16px; margin-bottom:16px; }
  label { display:block; font-size:13px; color:var(--muted); margin:0 0 4px; }
  input, textarea { width:100%; padding:12px; font-size:16px; border:1px solid var(--line);
                    border-radius:9px; background:#fbfcfd; color:var(--ink); }
  textarea { min-height:80px; resize:vertical; }
  /* BRIEF-1209 (layout kind 3, grows with need): a task's Description grows with its text — up to most of the screen on a computer, 60% on a
     phone — then scrolls inside. Height set by growText(); no manual resize handle (it would fight the growing). */
  textarea.grow { resize:none; overflow-y:hidden; max-height:60dvh; }
  textarea.grow.grow-cap { overflow-y:auto; }
  @media (min-width:768px) { textarea.grow { max-height:calc(100dvh - 56px - 180px); } }
  .field { margin-bottom:14px; }
  button { width:100%; padding:14px; font-size:16px; font-weight:600; border:0; border-radius:10px;
           background:var(--accent); color:var(--accent-ink); cursor:pointer; }
  button:disabled { opacity:.55; cursor:default; }
  /* Destination trigger — a two-slot control: label + (chevron | clear ×) */
  .dest { width:100%; text-align:left; background:#fbfcfd; color:var(--ink); font-weight:400;
          border:1px solid var(--line); padding:0; display:flex; align-items:stretch; overflow:hidden; }
  .dest .lbl { flex:1; min-width:0; padding:12px; display:flex; align-items:center; gap:8px;
               white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .dest .lbl.ph { color:var(--muted); }
  .dest .act { flex:0 0 auto; width:44px; display:flex; align-items:center; justify-content:center;
               color:var(--muted); border-left:1px solid var(--line); background:transparent; }
  .dest .act.clear { color:var(--err); font-size:20px; }
  .msg { margin:12px 0 0; font-size:14px; }
  .msg.fld-err { margin:4px 0 0; font-size:13px; } [data-fld-err] { border-color:var(--err) !important; }
  .msg.ok { color:var(--ok); } .msg.err { color:var(--err); }
  h2 { font-size:14px; color:var(--muted); text-transform:uppercase; letter-spacing:.5px; margin:0 0 10px; }
  .task { border:1px solid var(--line); border-radius:10px; padding:12px; margin-bottom:10px; }
  .task .t { font-weight:600; margin:2px 0; }
  .task .d { color:var(--muted); font-size:14px; white-space:pre-wrap; }
  .task .meta { font-size:12px; color:var(--muted); margin-top:6px; display:flex; align-items:center; gap:8px; }
  /* Assignees (§18): chips + a searchable list; initials avatars on task rows. */
  .asg-box { display:flex; flex-wrap:wrap; align-items:center; gap:6px; min-height:44px; padding:6px; border:1px solid var(--line); border-radius:9px; background:#fbfcfd; }
  .asg-chip { display:inline-flex; align-items:center; gap:2px; padding:2px 2px 2px 10px; font-size:14px; background:var(--hover); border:1px solid var(--line); border-radius:999px; }
  .asg-x { width:30px; height:30px; padding:0; display:inline-flex; align-items:center; justify-content:center; font-size:13px; background:transparent; color:var(--muted); border-radius:50%; }
  .asg-x:hover { background:#fdecec; color:#b3261e; }
  .asg-pop { margin-top:6px; padding:8px; background:var(--card); border:1px solid var(--line); border-radius:10px; }
  .asg-list { max-height:220px; overflow-y:auto; margin-top:6px; }
  .asg-opt { padding:10px 12px; border-radius:8px; cursor:pointer; }
  .asg-opt[aria-selected="true"], .asg-opt:hover { background:var(--hover); }
  .asg-note { margin:6px 0 0; }
  .avs { display:inline-flex; margin-left:auto; flex:none; }
  .av { width:26px; height:26px; margin-left:-6px; display:inline-flex; align-items:center; justify-content:center; font-size:11px; font-weight:700;
        color:#fff; border:2px solid var(--card); border-radius:50%; }
  .av:first-child { margin-left:0; }
  .av.more { background:var(--hover); color:var(--ink); }
  .task .dest-tag { font-size:12px; color:var(--accent); margin-top:4px; }
  /* Task card actions + inline edit (edit/delete propagate via the ntrENTRE wire) */
  .task .t-actions { display:flex; gap:8px; margin-top:10px; }
  .task .t-actions button { width:auto; flex:0 0 auto; padding:7px 12px; font-size:13px; font-weight:500;
                            background:#fff; color:var(--muted); border:1px solid var(--line); border-radius:8px; }
  .task .t-actions button:hover:not(:disabled) { color:var(--ink); background:var(--hover); }
  .task .t-actions .t-del { color:var(--err); background:transparent; border-color:transparent; margin-left:auto; }
  .task .t-actions .t-del:hover:not(:disabled) { background:#fdecec; color:var(--err); }
  .task .t-actions .t-save { background:var(--accent); color:var(--accent-ink); border-color:var(--accent); }
  .task .t-actions .t-save:hover:not(:disabled) { background:var(--accent); color:var(--accent-ink); opacity:.9; }
  .task .t-edit { margin-top:10px; }
  .task .t-edit .field { margin-bottom:10px; }
  .task .t-edit label { display:block; font-size:13px; color:var(--muted); margin-bottom:4px; }
  .task .t-edit .cf-check { display:flex; align-items:center; gap:8px; color:var(--ink); }
  .task .t-edit .cf-check input { width:auto; }
  /* DETAILSLOOK (Gary 2026-11-04): ONE look for a task's custom-field controls (editFieldInput and the New-task form's renderCustomFields add .cf-ctl). Labels 13px semi-bold in the body ink;
     dropdowns match the text boxes (same height / border / radius / padding / font) with a chevron; choose-several = chips (accent when picked);
     tick = 20px with the whole row tappable. Colours are the theme tokens only. Scoped to .cf-ctl: other forms are untouched. */
  :is(.t-edit, #customFields) .field.cf-ctl > label:not(.cf-check) { font-size:13px; font-weight:600; color:var(--ink); margin:0 0 6px; }
  :is(.t-edit, #customFields) .cf-ctl select:not([hidden]) { width:100%; min-height:46px; padding:12px 40px 12px 12px; font-size:16px; color:var(--ink);
    border:1px solid var(--line); border-radius:9px; background-color:#fbfcfd; -webkit-appearance:none; appearance:none; cursor:pointer;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235f6975' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat:no-repeat; background-position:right 14px center; background-size:12px 8px; }
  :is(.t-edit, #customFields) .cf-ctl select:disabled { opacity:.6; cursor:default; }
  :is(.t-edit, #customFields) .cf-ctl input:not([type="checkbox"]), :is(.t-edit, #customFields) .cf-ctl textarea { min-height:46px; }
  :is(.t-edit, #customFields) .cf-ctl textarea { min-height:80px; }
  .cf-sum { display:flex; align-items:center; gap:10px; width:100%; min-height:46px; padding:8px 12px; text-align:left; font-size:14px; font-weight:400; color:var(--ink);
    background:#fbfcfd; border:1px solid var(--line); border-radius:9px; }
  button.cf-sum { cursor:pointer; }
  button.cf-sum:hover { background:var(--hover); }
  .cf-sum:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
  div.cf-sum { background:transparent; border-color:transparent; padding-left:0; }
  .cf-pills { flex:1; min-width:0; display:flex; flex-wrap:wrap; gap:6px; }
  .cf-pill { max-width:100%; padding:4px 12px; font-size:14px; font-weight:600; line-height:1.3; overflow-wrap:anywhere; background:var(--accent); color:var(--accent-ink); border-radius:999px; }
  .cf-none { color:var(--muted); font-size:15px; }
  .cf-chev { flex:0 0 12px; width:12px; height:8px; background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235f6975' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center; }
  .cf-open .cf-chev { transform:rotate(180deg); }
  .cf-chips { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; padding:10px; border:1px solid var(--line); border-radius:9px; background:var(--card); }
  .cf-chip { width:auto; max-width:100%; min-height:40px; padding:8px 14px; font-size:14px; font-weight:500; line-height:1.3; text-align:left; white-space:normal; overflow-wrap:anywhere;
    background:#fbfcfd; color:var(--ink); border:1px solid var(--line); border-radius:999px; }
  .cf-chip:hover { background:var(--hover); }
  .cf-chip[aria-pressed="true"] { background:var(--accent); color:var(--accent-ink); border-color:var(--accent); font-weight:600; }
  .cf-chip:focus-visible, .cf-done:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
  .cf-done { width:auto; min-height:40px; margin-left:auto; padding:8px 18px; font-size:14px; font-weight:600; }
  @media (pointer:coarse) { .cf-chip, .cf-done { min-height:44px; } }
  :is(.t-edit, #customFields) .cf-ctl .cf-check { min-height:44px; gap:12px; font-size:15px; font-weight:500; color:var(--ink); cursor:pointer; margin:0; }
  :is(.t-edit, #customFields) .cf-ctl .cf-check input { width:20px; height:20px; flex:0 0 20px; margin:0; accent-color:var(--accent); }
  .empty { color:var(--muted); font-size:14px; }
  /* Picker bottom-sheet */
  .overlay { position:fixed; inset:0; bottom:var(--th-kb, 0px); background:rgba(20,28,40,.45); display:flex; align-items:flex-end; z-index:50; }
  #mapSheet.map-over { z-index:60; }   /* the location picker opened from the note sheet sits above it (BRIEF-1178) */
  .sheet { background:var(--card); width:100%; max-width:640px; margin:0 auto; border-radius:16px 16px 0 0;
           height:72vh; max-height:72vh; display:flex; flex-direction:column; padding-bottom:env(safe-area-inset-bottom); }   /* bottom sheets clear the home bar */
  .sheet .top { display:flex; align-items:center; gap:10px; padding:14px 16px 10px; }
  .sheet .top .crumb { flex:1; font-size:15px; font-weight:600; }
  .sheet .top .x { width:auto; padding:6px 12px; font-size:14px; background:var(--bg); color:var(--ink); border:1px solid var(--line); border-radius:8px; }
  .sheet .search { padding:0 16px 10px; }
  .sheet .search input { padding:10px 12px; }
  .sheet .hint { padding:0 16px 10px; font-size:12px; color:var(--muted); }
  .sheet .nodes { flex:1 1 auto; overflow-y:auto; padding:4px 8px 12px; border-top:1px solid var(--line); }
  /* icons */
  .ic { flex:0 0 auto; width:16px; height:16px; color:var(--branch); }
  .leaf .ic { color:var(--accent); }
  /* rows */
  .row { display:flex; align-items:center; gap:9px; padding:9px 10px; border-radius:9px; }
  .leaf { cursor:pointer; color:var(--ink); font-weight:500; }
  .leaf:active, .leaf:hover { background:var(--hover); }
  .leaf .pick { margin-left:auto; font-size:12px; color:var(--accent); font-weight:600; }
  .leaf.clearrow { color:var(--muted); font-weight:400; }
  .leaf.clearrow .ic { color:var(--muted); }
  /* collapsible branch */
  details.node { margin:0; }
  details.node > summary { list-style:none; display:flex; align-items:center; gap:9px; padding:9px 10px;
                           border-radius:9px; cursor:pointer; color:var(--branch); font-size:13px;
                           font-weight:600; text-transform:uppercase; letter-spacing:.3px; }
  details.node > summary::-webkit-details-marker { display:none; }
  details.node > summary:hover { background:var(--hover); }
  details.node > summary .nm { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-transform:none; letter-spacing:0; color:var(--ink); font-weight:600; }
  details.node > summary .chev { flex:0 0 auto; width:14px; height:14px; color:var(--muted); transition:transform .12s; }
  details.node[open] > summary .chev { transform:rotate(90deg); }
  .kids { margin-left:14px; border-left:1px solid var(--line); padding-left:4px; }
  .hide { display:none !important; }
  .noresult { color:var(--muted); font-size:14px; padding:16px 10px; }
  /* Location field */
  .locrow { display:flex; flex-wrap:wrap; gap:8px; }
  .btn.e-addrpin { margin:6px 0 0; } .e-addrmsg { margin:4px 0 0; }   /* .btn.… : shared/buttons.css's `.btn { margin:0 }` loads after this file and was removing the gap under the box (phonecheck) */   /* the task ADDRESS (§31): a quiet secondary under the box */
  @media (pointer: coarse) { .e-addrpin { min-height:44px; } }
  .locrow input { flex:1 1 140px; min-width:0; font-family:ui-monospace,Menlo,monospace; font-size:15px; }
  .btn.e-gomap { margin:0; flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:48px; font-weight:600; white-space:nowrap; }   /* GOTOMAP / UIFIX2: a clear secondary button (map-pin + words) on the Lat, Long row; ≥44px tap target */
  @media (max-width:767px) { .btn.e-gomap { flex:1 0 100%; } }   /* phone: directly below the field, full width */
  .e-gomap .ic { width:18px; height:18px; }
  .iconbtn { flex:0 0 auto; width:48px; padding:0; display:flex; align-items:center; justify-content:center;
             background:#fbfcfd; color:var(--accent); border:1px solid var(--line); }
  .iconbtn .ic { width:20px; height:20px; }
  /* Map picker */
  .mapsheet { height:82vh; max-height:82vh; }
  .ovsheet { height:92vh; max-height:92vh; }
  .mapwrap { position:relative; flex:1 1 auto; }
  /* Each map is its own stacking context: Leaflet's panes/controls (z 400–1000) stay INSIDE it, so every app
     overlay (Filter, menus, panels, FAB, the pick-location sheet) sits above the map. */
  #map, #omap { position:absolute; inset:0; background:#dfe4ea; isolation:isolate; z-index:0; }
  .task-pin { background:none; border:0; filter:drop-shadow(0 2px 2px rgba(20,28,40,.35)); }
  .pop-open { display:flex; flex-direction:column; align-items:flex-start; gap:2px; width:100%; min-height:44px; padding:6px 8px; margin:0 0 4px;
              text-align:left; font:inherit; font-size:13px; background:transparent; color:var(--ink); border-radius:8px; border:1px solid var(--line); }
  .pop-open:hover { background:var(--hover); }
  .pop-open .pk, .pop-open .pt, .pop-open .ps { display:block; }
  .leaflet-popup-content .pk { font:11px ui-monospace,Menlo,monospace; color:var(--accent); }
  .leaflet-popup-content .pt { font-weight:600; margin:2px 0; }
  .leaflet-popup-content .ps { font-size:12px; color:var(--muted); }
  .leaflet-popup-content .pclock { color:var(--ink); font-weight:600; }
  .pclocks { margin-top:2px; } .pclocks span, .th-clocktip span { display:block; }
  .pclocks .pwho { color:var(--ink); }
  .th-clocktip { padding:6px 10px; font-size:12px; line-height:1.45; color:var(--ink); text-align:left; }
  .th-clocktip .pclock { font-weight:700; }
  /* sized to its content, up to a limit; each line is its own block and wraps only past that limit */
  .th-clocktip { width:max-content; max-width:min(360px, calc(100vw - 32px)); white-space:normal; overflow-wrap:anywhere; }
  .th-clocktip.leaflet-tooltip-top::before { margin-left:calc(-6px - var(--tip-shift, 0px)); }   /* arrow stays on the pin when the box is nudged in from an edge */
  .th-clocktip .ptitle { font-weight:700; }
  .th-clocktip .pclock { margin-top:3px; }
  .plines { margin-top:2px; } .plines span { display:block; color:var(--ink); }
  /* Fields: the "show on hover" eye (slash = off) + the group labels */
  .fielditem .fi-eye { width:36px; height:32px; padding:0; display:inline-flex; align-items:center; justify-content:center; color:var(--muted); }
  .fielditem .fi-eye[aria-pressed="true"] { color:var(--accent); border-color:var(--accent); }
  .fielditem .fi-eye[aria-pressed="true"] .fi-eye-off { display:none; }
  .fi-group { margin:10px 0 0; padding-top:8px; }
  .pop-slot:empty { display:none; }
  .pop-slot { margin:0 0 6px; }
  .leaflet-popup-content .pa { font-size:12px; }
  .filterbar { display:flex; flex-wrap:wrap; gap:8px; align-items:center; padding:10px 12px; border-top:1px solid var(--line); }
  .filterbar select, .filterbar input { width:auto; flex:1 1 130px; min-width:0; padding:8px 10px; font-size:14px;
                                        border:1px solid var(--line); border-radius:8px; background:#fbfcfd; color:var(--ink); }
  .filterbar .fclear { flex:0 0 auto; padding:8px 12px; font-size:13px; font-weight:600;
                       background:var(--bg); color:var(--ink); border:1px solid var(--line); }
  .filterbar .fcount { flex-basis:100%; font-size:12px; color:var(--muted); }
  .centerpin { position:absolute; left:50%; top:50%; transform:translate(-50%,-100%);
               pointer-events:none; z-index:650; color:var(--accent);   /* inside the map: above pins, under its controls */
               filter:drop-shadow(0 2px 3px rgba(0,0,0,.4)); }
  .centerpin svg { width:34px; height:34px; }
  .centerdot { position:absolute; left:50%; top:50%; width:6px; height:6px; margin:-3px 0 0 -3px;
               border-radius:50%; background:rgba(20,28,40,.75); pointer-events:none; z-index:651; }
  /* New task from the Map = location first (§19): the pick bar under the main map. */
  .pickbar { display:grid; grid-template-columns:auto minmax(0, 1fr); gap:6px 8px; padding:8px 12px calc(8px + env(safe-area-inset-bottom));
             border-top:1px solid var(--line); background:var(--card); }
  .pickbar .pick-hint { grid-column:1 / -1; margin:0; font-size:13px; line-height:1.3; color:var(--muted); }
  .pickbar button { min-height:44px; padding:10px 14px; }
  .pickbar button.ghost { width:auto; font-size:14px; background:var(--bg); color:var(--ink); border:1px solid var(--line); }
  /* "You are here": a blue dot (white rim) + a faint accuracy ring; pale when accuracy is poor. */
  .th-here span { display:block; width:18px; height:18px; border-radius:50%; background:#2f6df6; border:3px solid #fff; box-shadow:0 0 0 1px rgba(20,28,40,.35), 0 1px 4px rgba(20,28,40,.4); }
  .th-here.poor span { background:#9bb8fb; }
  /* "My location" — a map control on the main map (keeps the zoom). */
  .mapnote { position:absolute; left:50%; top:10px; transform:translateX(-50%); z-index:1; max-width:calc(100% - 120px); padding:6px 12px;
             font-size:13px; line-height:1.3; text-align:center; color:#fff; background:rgba(20,28,40,.88); border-radius:8px; }
  body.picking #omapEmpty { display:none; }
  .mapbar { display:flex; gap:10px; padding:12px 16px; border-top:1px solid var(--line);
            padding-bottom:calc(12px + env(safe-area-inset-bottom)); }
  .mapbar button.ghost { background:var(--bg); color:var(--ink); border:1px solid var(--line); }
  .mapcoord { position:absolute; left:0; right:0; bottom:0; z-index:500; text-align:center;
              font:12px ui-monospace,Menlo,monospace; color:#fff; background:rgba(20,28,40,.6);
              padding:5px; }
  /* Touch targets (BRIEF-753): on touch screens every tappable control is ≥ 44×44 px and
     ≥ 8 px from its neighbour. Fine pointers (desktop) keep the dense layout above. Kept
     LAST so it wins over the rules it grows. */
  @media (pointer: coarse) {
    .fielditem button, .sle-row button, .sle-add button, .chip, .linkbtn, .menu-item, .tool-btn, #newTaskBtn, #filtDone,
    .filterbar .fclear, .sheet .top .x, .task .t-actions button,
    .fieldnew button {
      min-height:44px; min-width:44px; display:inline-flex; align-items:center; justify-content:center; }
    .pweye { width:44px; height:44px; right:2px; }
    .t-open { min-height:44px; display:flex; align-items:center; }   /* the card itself is the real target */
    .iconbtn, .dest .act { min-height:44px; min-width:48px; }
    .dest { min-height:44px; }
    /* Rows you tap (picker lists + branches) and checkbox labels grow to 44 px tall. Full-width
       list rows may touch — each is a full 44 px target. */
    .row, details.node > summary { min-height:44px; }
    .cf-check, .fe-mean-chip { min-height:44px; }
    .fe-mean-chip { padding:3px 12px; }
    input[type="checkbox"] { width:22px; height:22px; }
    .filterbar select, .filterbar input { min-height:44px; }
    /* Text links (auth screens): pad the hit area, not the layout. */
    .authtoggle a { display:inline-block; padding:12px 4px; margin:-12px -4px; }
    /* ≥ 8 px between neighbouring targets. */
    .sle, .sle-row, .sle-add, .sle-link, .fe-means, .se-status-row, .tb-actions, .task .t-actions { gap:8px; }
    .fielditem .fi-main, .se-status-item .fi-main, .fe-link, .fe-colorbox, .fe-colors, .fe-map, .se-status { gap:8px; }
    .fc-row input[type="color"] { width:56px; min-height:44px; }
    .dt-tog, .dt-sp { width:44px; height:44px; }
    .dt-sel { min-height:44px; }
    .fb-segb, .fb-pill, .fb-destbtn, .fb-rule select, .fb-rule input { min-height:44px; }
    .fb-del { width:44px; height:44px; }
    .fielditem .fi-eye { width:44px; height:44px; }
    .asg-x { width:44px; height:44px; } .asg-opt { min-height:44px; display:flex; align-items:center; }
    .fe-link-head > span { display:inline-flex; flex-wrap:wrap; gap:8px; }
    .modalbtns { margin-top:12px; }
    #f .title-row { margin-bottom:8px; }   /* Auto-build tick ↔ Title input */
    /* Form fields: text inputs, selects and textareas are tap targets too. */
    input:not([type="checkbox"]):not([type="radio"]), select, textarea { min-height:44px; }
    .task .dest-tag a { display:inline-block; padding:14px 0; margin:-14px 0; }   /* map link: bigger hit area, same layout */
  }

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --dev:#c4b5fd; } }   /* DEVMENU: purple that reads on dark */
:root[data-theme="dark"] { --dev:#c4b5fd; }
/* pstatus: the person status pill (lib/person_status.js words) — same look on Company People, the person page, Project People and Members */
.pst-pill { display:inline-block; padding:0 7px; border:1px solid var(--line); border-radius:9px; font-size:11px; font-weight:600; color:var(--muted); background:var(--bg); vertical-align:middle; white-space:normal; }
.pst-pill.pst-joined { color:var(--accent); border-color:var(--accent); }
.pst-pill.pst-invited { color:var(--text); }
.pst-pill.pst-expired { color:#e0594f; border-color:#e0594f; }
.pst-where { display:block; font-size:12px; color:var(--muted); margin-top:2px; }
.pst-pill.pst-can_view { color:var(--text); border-style:dashed; }   /* pinvite: can already view without an invite */
.pst-late { color:#e0594f; font-weight:600; }   /* pinvite: an expired invite's "expired" */
.inv-chg { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:6px; }
.inv-chg input { flex:1 1 200px; min-width:0; }
.pva-top { margin-left:auto; }

/* BUILT-IN TINTS (Gary 2026-11-10): the Companies / People package fields keep one light colour each wherever they appear (request-form builder, road-block recipient picker). Ink on tint >= 4.5:1. */
:root { --tint-builtin-company:#fbf0d9; --tint-builtin-company-edge:#e3c98a; --tint-builtin-company-ink:#6b4300;
        --tint-builtin-people:#e2f0f3; --tint-builtin-people-edge:#9fcbd5; --tint-builtin-people-ink:#0b4f5c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --tint-builtin-company:#3a3118; --tint-builtin-company-edge:#6d5a24; --tint-builtin-company-ink:#f0d58f;
        --tint-builtin-people:#16343b; --tint-builtin-people-edge:#2f6370; --tint-builtin-people-ink:#a5dbe6; } }
:root[data-theme="dark"] { --tint-builtin-company:#3a3118; --tint-builtin-company-edge:#6d5a24; --tint-builtin-company-ink:#f0d58f;
        --tint-builtin-people:#16343b; --tint-builtin-people-edge:#2f6370; --tint-builtin-people-ink:#a5dbe6; }
