  :root{
    --ink:#1c231f; --ink-faint:#6b756e; --surface:#fff; --bg:#f4f5f3;
    --line:#e2e5e0; --accent:#2f6f5e; --accent-ink:#fff;
  }
  *{box-sizing:border-box;}
  html,body{height:100%; margin:0;}
  body{
    font-family:'Public Sans',system-ui,sans-serif; color:var(--ink); background:var(--bg);
    display:flex; flex-direction:column;
  }
  h1,h2{font-family:'Fraunces',serif; font-weight:600; margin:0;}
  header{
    background:var(--surface); border-bottom:1px solid var(--line); padding:14px 20px;
    display:flex; align-items:center; justify-content:space-between; gap:16px; flex-shrink:0;
  }
  .brand{display:flex; align-items:center; gap:12px;}
  .brand-mark{
    width:34px; height:34px; border-radius:9px; background:var(--accent); color:var(--accent-ink);
    display:flex; align-items:center; justify-content:center; font-family:'Fraunces',serif; font-weight:600; font-size:15px;
  }
  .brand-text{display:flex; flex-direction:column; line-height:1.2;}
  .brand-text .name{font-family:'Fraunces',serif; font-weight:600; font-size:16px;}
  .brand-text .sub{font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--ink-faint);}
  .session{display:flex; align-items:center; gap:14px; font-size:14px;}
  .session .whoami{display:flex; flex-direction:column; line-height:1.25; text-align:right;}
  .session .whoami .role-line{font-weight:600;}
  .session .whoami .viewing-line{font-size:12px; color:var(--ink-faint);}
  button{
    font-family:inherit; font-size:14px; font-weight:600; border-radius:8px; cursor:pointer; border:1px solid var(--line);
    background:var(--surface); color:var(--ink); padding:8px 14px;
  }
  button.primary{background:var(--accent); border-color:var(--accent); color:var(--accent-ink); width:100%;}
  [hidden]{display:none !important;}
  /* H33 PR 4: a customer without the portal module doesn't see its tools (modules.js sets body.no-portal). */
  body.no-portal [data-module="portal"]{display:none !important;}

  /* ---- login ---- */
  #loginView{flex:1; display:flex; align-items:center; justify-content:center; padding:24px;}
  .login-card{
    background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:32px;
    width:100%; max-width:360px;
  }
  .login-card h1{font-size:22px; margin-bottom:6px;}
  .login-wrap{display:flex; align-items:center; gap:56px; width:100%; max-width:960px;}
  .login-pitch{flex:1; min-width:0;}
  .login-pitch h2{font-size:34px; line-height:1.15; margin-bottom:14px;}
  .login-pitch .pitch-lead{font-size:16px; line-height:1.55; color:var(--ink); margin:0 0 22px;}
  .pitch-points{list-style:none; padding:0; margin:0 0 24px;}
  .pitch-points li{position:relative; padding-left:22px; margin-bottom:14px; font-size:14px; line-height:1.5; color:var(--ink-faint);}
  .pitch-points li::before{content:""; position:absolute; left:0; top:6px; width:10px; height:10px; border-radius:3px; background:var(--accent);}
  .pitch-points strong{color:var(--ink); font-weight:600;}
  .pitch-contact{font-size:14px; color:var(--ink-faint); margin:0;}
  .pitch-contact a{color:var(--accent); font-weight:600;}
  .login-wrap .login-card{flex:none;}
  @media (max-width:820px){
    .login-wrap{flex-direction:column; align-items:stretch; gap:28px;}
    .login-pitch h2{font-size:26px;}
    .login-wrap .login-card{max-width:none; order:-1;} /* returning users sign in without scrolling */
  }
  .login-card p{color:var(--ink-faint); font-size:14px; margin:0 0 20px;}
  label{display:block; font-size:12px; letter-spacing:.03em; text-transform:uppercase; color:var(--ink-faint); margin-bottom:6px;}
  input{
    width:100%; padding:10px 12px; border:1px solid var(--line); border-radius:8px; font-size:15px;
    font-family:inherit; margin-bottom:16px; background:var(--bg);
  }
  #loginError{color:#b3413a; font-size:13px; min-height:18px; margin-top:6px;}

  /* ---- map view ---- */
  #mapView{flex:1; display:flex; flex-direction:column; min-height:0;}
  #portfolioStats{
    display:flex; gap:24px; padding:10px 20px; background:var(--surface); border-bottom:1px solid var(--line);
    flex-shrink:0; flex-wrap:wrap;
  }
  @media (max-width:1180px){ #portfolioStats{gap:6px 16px; padding:8px 14px;} }
  .pstat{display:flex; flex-direction:column; line-height:1.2;}
  .pstat-value{font-family:'IBM Plex Mono',ui-monospace,monospace; font-weight:600; font-size:19px;}
  .pstat-label{font-size:11px; letter-spacing:.03em; text-transform:uppercase; color:var(--ink-faint);}
  /* Vacant (2026-10-03): a stat that is also a button -- turns on the "Vacant units" filter. */
  .pstat-btn{background:none; border:0; padding:0; margin:0; text-align:left; font:inherit; color:inherit; cursor:pointer; align-items:flex-start;}
  .pstat-btn:hover .pstat-label, .pstat-btn:focus-visible .pstat-label{color:var(--accent); text-decoration:underline;}
  .pstat-btn.on .pstat-label{color:var(--accent);}
  .pstat-sub{font-size:11px; color:var(--ink-faint);}
  /* Service status chip (2026-10-07): last in the KPI strip, pushed right.
     Compact on purpose -- the strip must stay one row at 1024 px. */
  .svc-chip{margin-left:auto;}
  .svc-lights{display:flex; gap:5px; align-items:center; height:23px;}
  .svc-dot{display:inline-block; width:12px; height:12px; border-radius:50%; background:#c8cec9; box-shadow:inset 0 0 0 1px rgba(0,0,0,.12); vertical-align:-1px;}
  .svc-green{background:#2e8b57;} .svc-yellow{background:#e0b400;} .svc-orange{background:#e6761e;} .svc-red{background:#c62828;}
  .svc-chip .pstat-sub.svc-bad{color:#b3261e; font-weight:600;}
  .svc-modal-card{max-width:560px;}
  .svc-intro{font-size:13px; color:var(--ink-faint); margin:0 0 10px;}
  .svc-row{border:1px solid var(--line); border-radius:10px; padding:12px 14px; margin-bottom:10px;}
  .svc-row h4{display:flex; align-items:center; gap:8px; font-size:14px; margin:0 0 4px;}
  .svc-row .svc-level{font-weight:600;}
  .svc-row p{margin:0 0 6px; font-size:13px;}
  .svc-row ul{margin:0 0 6px; padding-left:18px; font-size:12.5px; color:var(--ink-faint);}
  .svc-row a{font-size:12.5px; color:var(--accent); font-weight:600;}
  .svc-key{font-size:12px; color:var(--ink-faint); display:flex; flex-wrap:wrap; gap:4px 10px; align-items:center; margin:4px 0 0;}
  .svc-error{font-size:13px; color:#b3261e;}
  #mapBody{flex:1; display:flex; min-height:0;}
  #sidebar{
    width:260px; flex-shrink:0; background:var(--surface); border-right:1px solid var(--line);
    overflow-y:auto; padding:16px;
  }
  #sidebar h2{font-size:14px; letter-spacing:.03em; text-transform:uppercase; color:var(--ink-faint); margin-bottom:10px;}
  .layer-toggle{display:flex; align-items:center; gap:8px; font-size:13px; margin-bottom:8px; cursor:pointer;}
  /* Floating Layers widget (top-right, under the measure-tool button) --
     reuses .measure-toolbar's card chrome but lays its checkboxes out in a
     column instead of a row, and needs a touch more breathing room. */
  .layer-toggle-panel{flex-direction:column; align-items:flex-start; padding:10px 12px;
    /* H180: layerToggle.js fitPanel() sets max-height to the room below it; the panel scrolls as one */
    overflow-y:auto; overscroll-behavior:contain; flex-wrap:nowrap;}
  .layer-toggle-panel > *{flex-shrink:0;}
  /* one scroll, not a scrolling legend inside a scrolling panel */
  .layer-toggle-panel .bf-legend{max-height:none; overflow:visible;}
  .layer-toggle-panel .layer-toggle{margin-bottom:6px;}
  .layer-toggle-panel .layer-toggle:last-child{margin-bottom:0;}
  .layer-toggle input{width:auto; margin:0;}
  #clientSection{margin-bottom:20px; padding-bottom:16px; border-bottom:1px solid var(--line);}
  #clientSelect{
    width:100%; padding:8px 10px; border:1px solid var(--line); border-radius:8px; font-size:13px;
    font-family:inherit; background:var(--bg); color:var(--ink);
  }
  .bookmark-btn{
    display:block; width:100%; text-align:left; background:var(--bg); border:1px solid var(--line);
    border-radius:8px; padding:10px 12px; margin-bottom:8px; font-size:13px; cursor:pointer;
  }
  .bookmark-btn:hover{border-color:var(--accent);}
  .bookmark-btn .b-name{display:block; font-weight:600; margin-bottom:2px;}
  .bookmark-btn .b-addr{display:block; color:#5c665f; font-size:12px;}   /* H311: 5.2:1 on the active row (was --ink-faint, 4.2:1) */
  .bookmark-btn.active{border-color:var(--accent); background:#eaf2ef;}
  .bookmark-btn.muted{opacity:.45;}
  .bookmark-btn.muted.active{opacity:.7;}
  .bookmark-btn .b-flag{display:block; margin-top:4px; font-size:11px; font-weight:600; color:#a7671e;}
  /* "All properties" (2026-10-03): back to nothing picked; set apart from the buildings below it. */
  .bookmark-btn.bookmark-all{margin-bottom:14px; border-style:dashed;}
  .bookmark-btn.bookmark-all.active{border-style:solid;}
  #floorSection{margin-bottom:20px; padding-bottom:16px; border-bottom:1px solid var(--line);}
  #floorButtons{display:flex; flex-wrap:wrap; gap:6px;}
  #floorButtons p{font-size:12px; color:var(--ink-faint); margin:0;}
  .floor-btn{
    background:var(--bg); border:1px solid var(--line); border-radius:6px; padding:6px 10px; font-size:12px;
  }
  .floor-btn.active{background:var(--accent); border-color:var(--accent); color:var(--accent-ink);}
  #workOrderSection{margin-top:20px; padding-top:16px; border-top:1px solid var(--line);}
  /* New form above the tabs and list (H136): a line below it keeps it apart from them */
  #addWorkOrderForm{margin:0 0 14px; padding:0 0 12px; border-top:0; border-bottom:1px solid var(--line);}
  #workOrderTabs{display:flex; gap:6px; margin-bottom:10px;}
  .wo-tab{background:var(--bg); border:1px solid var(--line); border-radius:6px; padding:6px 10px; font-size:12px;}
  .wo-sort{display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px; margin:0 0 10px; font-size:12px;}
  .wo-sort label{margin:0; color:var(--ink-faint);}
  .wo-sort select{width:auto; max-width:100%; min-width:0; font-size:12px; padding:5px 8px;}
  .wo-tab.active{background:var(--accent); border-color:var(--accent); color:var(--accent-ink);}
  #workOrderList p{font-size:12px; color:var(--ink-faint); margin:0;}
  .wo-item{background:var(--bg); border:1px solid var(--line); border-left:4px solid var(--line); border-radius:8px; padding:9px 11px; margin-bottom:8px;}
  /* Left-border color-codes each item by the level it's attached at,
     reusing the same hex colors as that level's map-layer labels so the
     sidebar and the map read as one consistent color language. */
  .wo-item.wo-level-structure{border-left-color:#1c2530;}
  .wo-item.wo-level-floor{border-left-color:#2c4570;}
  .wo-item.wo-level-unit{border-left-color:#1d4a3e;}
  .wo-item.wo-level-room{border-left-color:#7a4c17;}
  .wo-item .wo-top{display:flex; justify-content:space-between; align-items:center; gap:6px; font-size:12.5px; font-weight:600; margin-bottom:4px;}
  .wo-item .wo-badges{display:flex; align-items:center; gap:4px; flex-shrink:0;}
  .wo-item .wo-desc{font-size:12px; margin-bottom:4px;}
  .wo-item .wo-meta{color:var(--ink-faint); font-size:11px;}
  .wo-item .wo-vendors{font-size:11px; margin-top:4px; color:var(--accent);}
  .wo-item .wo-vendors.wo-vendors-none{color:var(--ink-faint); font-style:italic;}
  .wo-status{font-size:10px; font-weight:700; padding:2px 7px; border-radius:999px; text-transform:uppercase; white-space:nowrap;}
  .wo-status-rep{background:#fbeedd; color:#a7671e;}
  .wo-status-wip{background:#e4efec; color:#1d4a3e;}
  .wo-status-hld{background:#f3e7e1; color:#8a5a46;}
  .wo-status-cmp{background:#e3f3ea; color:#2f7d5a;}
  .wo-severity{font-size:10px; font-weight:700; padding:2px 7px; border-radius:999px; text-transform:uppercase; white-space:nowrap;}
  .wo-sev-critical{background:#fbe1df; color:#b3271f;}
  .wo-sev-high{background:#fdece0; color:#b3591b;}
  .wo-sev-medium{background:#fdf6d9; color:#8a6d00;}
  .wo-sev-low{background:#e7f0e9; color:#3f7a53;}
  .wo-actions-row{display:flex; gap:6px; margin-top:6px;}
  .wo-actions-row button{flex:1;}
  .wo-edit-btn{font-size:11px; padding:6px 8px;}
  .wo-complete-btn{
    background:var(--accent); border-color:var(--accent); color:var(--accent-ink);
    font-size:11px; padding:6px 8px;
  }
  .wo-edit-form label{font-size:11px; letter-spacing:.03em; text-transform:uppercase; color:var(--ink-faint); display:block; margin:8px 0 4px;}
  .wo-edit-form label:first-child{margin-top:0;}
  .wo-edit-form .wo-loc{display:flex; gap:6px;}
  .wo-edit-form .wo-loc select{flex:1; min-width:0;}
  .wo-edit-form .wo-loc .wo-loc-level{flex:0 0 38%;}
  .wo-edit-form input, .wo-edit-form select, .wo-edit-form textarea{
    width:100%; padding:7px 9px; border:1px solid var(--line); border-radius:6px; font-size:12.5px;
    font-family:inherit; background:var(--surface); color:var(--ink); resize:vertical;
  }
  .wo-edit-form .mini-actions{display:flex; gap:8px; justify-content:flex-end; margin-top:8px;}
  .wo-edit-form .mini-actions button{padding:6px 10px; font-size:12px;}
  .wo-edit-form .mini-error{color:#b3413a; font-size:11px; min-height:14px; margin-top:4px;}
  .section-head{display:flex; align-items:center; justify-content:space-between; margin-bottom:10px;}
  .section-head h2{margin-bottom:0;}
  .add-btn{background:var(--bg); border:1px solid var(--line); border-radius:6px; padding:4px 9px; font-size:11px; font-weight:600;}
  .mini-form{margin-top:10px; padding-top:10px; border-top:1px dashed var(--line);}
  .mini-form label{font-size:11px; letter-spacing:.03em; text-transform:uppercase; color:var(--ink-faint); display:block; margin:8px 0 4px;}
  .mini-form input, .mini-form select, .mini-form textarea{
    width:100%; padding:7px 9px; border:1px solid var(--line); border-radius:6px; font-size:12.5px;
    font-family:inherit; background:var(--bg); color:var(--ink); resize:vertical;
  }
  .mini-actions{display:flex; gap:8px; justify-content:flex-end; margin-top:8px;}
  .mini-actions button{padding:6px 10px; font-size:12px;}
  .mini-error{color:#b3413a; font-size:11px; min-height:14px; margin-top:4px;}
  .wo-loc-unknown{font-size:12px; color:#8a5a00;}
  #mepSection{margin-top:20px; padding-top:16px; border-top:1px solid var(--line);}
  .scope-label{
    font-size:11px; font-weight:600; color:var(--accent); background:var(--accent-soft, #eaf2ef);
    border-radius:6px; padding:4px 8px; margin:0 0 10px; display:inline-block;
  }
  #mepList p{font-size:12px; color:var(--ink-faint); margin:0;}
  .mep-item{background:var(--bg); border:1px solid var(--line); border-radius:8px; padding:9px 11px; margin-bottom:8px; font-size:12px;}
  .mep-item .mep-top{font-weight:600; margin-bottom:2px;}
  .mep-item .mep-meta{color:var(--ink-faint); font-size:11px;}
  .mep-item.mep-just-added{outline:2px solid var(--accent); background:var(--ok-bg);}   /* H177: the vendor just added, for a moment */
  .mep-target{font-size:12px; font-weight:600; padding:7px 9px; margin-bottom:8px; border-radius:6px; background:#e4efec; color:#1d4a3e;}
  .mep-target.mep-target-none{background:#fbeedd; color:#a7671e; font-weight:400;}
  #mapContainer{flex:1; position:relative;}
  #mapStatus{
    position:absolute; top:12px; left:12px; z-index:10; background:var(--surface); border:1px solid var(--line);
    border-radius:8px; padding:8px 12px; font-size:13px; color:var(--ink-faint);
  }
  /* ArcGIS Online not answering (H13): one plain panel over the map. */
  .outage-panel{
    position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); z-index:30;
    width:min(440px, calc(100% - 32px)); background:var(--surface); border:1px solid var(--line);
    border-left:4px solid #b3261e; border-radius:10px; padding:16px 18px; box-shadow:0 6px 24px rgba(0,0,0,.18);
  }
  .outage-panel h3{font-size:15px; margin:0 0 8px;}
  .outage-panel p{font-size:13.5px; line-height:1.45; margin:0 0 8px;}
  .outage-panel .outage-hint{color:var(--ink-faint);}
  .outage-actions{display:flex; gap:8px; margin:12px 0 10px;}
  .outage-actions button{width:auto; padding:7px 14px; font-size:13px;}
  .outage-link{font-size:12.5px; color:var(--accent); font-weight:600;}
  .outage-bar{
    position:absolute; top:12px; left:50%; transform:translateX(-50%); z-index:25;
    width:min(620px, calc(100% - 32px)); display:flex; align-items:center; gap:10px;
    background:#fdecea; color:#5f1d17; border:1px solid #f1b8b1; border-radius:8px; padding:8px 10px 8px 12px;
    font-size:13px; line-height:1.4; box-shadow:0 2px 10px rgba(0,0,0,.12);
  }
  .outage-bar .ob-text{flex:1;}
  .outage-bar .ob-btn{width:auto; padding:5px 10px; font-size:12.5px; white-space:nowrap;}
  .outage-bar .ob-close{width:auto; background:none; border:none; font-size:18px; line-height:1; padding:0 4px; cursor:pointer; color:inherit;}
  /* Sign-in notice for jobs past due (H73): amber bar; the words carry the meaning. */
  .pd-notice{
    position:absolute; top:12px; left:50%; transform:translateX(-50%); z-index:24;
    width:min(460px, calc(100% - 32px)); display:flex; align-items:center; gap:10px;
    background:#fdf0d5; color:#5b3a00; border:1px solid #e0a63a; border-radius:8px; padding:8px 10px 8px 12px;
    font-size:13px; font-weight:600; line-height:1.4; box-shadow:0 2px 10px rgba(0,0,0,.12);
  }
  .pd-notice[hidden]{display:none;}
  .pd-notice .pd-text{flex:1;}
  .pd-notice .pd-see{width:auto; padding:5px 10px; font-size:12.5px; white-space:nowrap;}
  .pd-notice .pd-close{width:auto; background:none; border:none; font-size:18px; line-height:1; padding:0 4px; cursor:pointer; color:inherit;}
  .slow-save-note{
    position:fixed; bottom:16px; left:50%; transform:translateX(-50%); z-index:1000;
    max-width:calc(100% - 32px); background:#1c231f; color:#fff; border-radius:8px; padding:9px 14px;
    font-size:13px; box-shadow:0 4px 16px rgba(0,0,0,.25);
  }
  /* The Edit Unit panel's width, in one place: the map's Measure / Layers buttons and the
     Feedback button read it to sit just left of the panel while it is open (H161, end of file). */
  :root{--rp-w:280px;}
  #editPanel{
    position:absolute; top:12px; right:12px; z-index:20; width:var(--rp-w);
    max-height:calc(100% - 24px); overflow-y:auto;
    background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:16px;
    box-shadow:0 4px 16px rgba(0,0,0,.15);
  }
  /* Pinned while a long panel scrolls, so the X is always there (same trick as .modal-head). */
  #editPanel .edit-head{
    display:flex; justify-content:space-between; align-items:center;
    position:sticky; top:-16px; z-index:2; margin:-16px -16px 4px; padding:16px 16px 8px;
    background:var(--surface); border-radius:10px 10px 0 0;
  }
  #editPanel .edit-head h3{font-size:14px;}
  #editPanel .edit-close{background:none; border:none; padding:0; font-size:18px; line-height:1; cursor:pointer; color:var(--ink-faint);}
  #editPanel label{font-size:11px; letter-spacing:.03em; text-transform:uppercase; color:var(--ink-faint); display:block; margin-bottom:4px;}
  #editPanel input, #editPanel select, #editPanel textarea{
    width:100%; padding:7px 9px; border:1px solid var(--line); border-radius:6px; font-size:13px;
    font-family:inherit; margin-bottom:10px; background:var(--bg); color:var(--ink); resize:vertical;
  }
  #editPanel input:disabled{color:var(--ink-faint);}
  .edit-actions{display:flex; gap:8px; justify-content:flex-end;}
  .edit-actions button{padding:7px 12px; font-size:13px;}
  #editUnitError{color:#b3413a; font-size:12px; min-height:16px; margin-bottom:4px;}
  #editUnitSaved{color:#2f7d5a; font-size:12px; min-height:16px; margin-bottom:4px;}
  .active-tool{background:var(--accent) !important; color:var(--accent-ink) !important;}
  .measure-toolbar{
    display:flex; gap:4px; background:var(--surface); border:1px solid var(--line); border-radius:8px;
    padding:4px; margin-bottom:6px; box-shadow:0 1px 2px rgba(0,0,0,.15);
  }
  .measure-tool-btn{background:var(--bg); border:1px solid var(--line); border-radius:6px; padding:6px 10px; font-size:12px;}

  #headerActions{display:flex; align-items:center; gap:10px;}
  /* App controls mean nothing before sign-in -- hide them until a session
     loads (main.js removes .logged-out in initMap). */
  body.logged-out #headerActions{display:none;}


  /* ---- header unit/client search ---- */
  #unitSearchWrap{position:relative;}
  #unitSearchInput{
    width:230px; padding:7px 10px; border:1px solid var(--line); border-radius:8px; font-size:12.5px;
    font-family:inherit; background:var(--bg); color:var(--ink); margin:0;
  }
  #unitSearchResults{
    position:absolute; top:calc(100% + 6px); left:0; z-index:40; width:300px; max-height:340px;
    overflow-y:auto; background:var(--surface); border:1px solid var(--line); border-radius:10px;
    box-shadow:0 8px 24px rgba(0,0,0,.14); padding:6px;
  }
  .unit-search-result{
    display:block; width:100%; text-align:left; padding:8px 10px; border-radius:6px; border:none;
    background:none; cursor:pointer; font-size:13px; font-weight:400;
  }
  .unit-search-result:hover{background:var(--bg);}
  .unit-search-result .usr-main{display:block; font-weight:600;}
  .unit-search-result .usr-sub{display:block; font-size:11px; color:var(--ink-faint); margin-top:2px;}
  .usr-empty{padding:8px 10px; font-size:12px; color:var(--ink-faint);}

  /* ---- layout guide dropdown ---- */
  #layoutGuideWrap{position:relative;}
  #layoutGuideBtn{
    display:flex; align-items:center; gap:6px; background:var(--bg); border:1px solid var(--line);
    color:#5c665f; font-size:12.5px; font-weight:600; padding:7px 12px;   /* H311: 5.4:1 (was --ink-faint, 4.4:1) */
  }
  #layoutGuideBtn:hover{border-color:var(--accent); color:var(--accent);}
  #layoutGuideBtn .caret{font-size:10px; transition:transform .15s ease;}
  #layoutGuideBtn.open .caret{transform:rotate(180deg);}
  #layoutGuidePanel{
    position:absolute; top:calc(100% + 8px); left:0; z-index:30; width:360px; max-width:calc(100vw - 40px);
    background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:18px 20px;
    box-shadow:0 8px 24px rgba(0,0,0,.14);
  }
  #layoutGuidePanel h3{font-size:14px; margin-bottom:4px;}
  #layoutGuidePanel .lg-sub{font-size:12px; color:var(--ink-faint); margin:0 0 14px;}
  .lg-chain{list-style:none; margin:0 0 16px; padding:0; border-left:2px solid var(--line); padding-left:14px;}
  .lg-chain li{position:relative; margin-bottom:12px;}
  .lg-chain li::before{
    content:""; position:absolute; left:-18px; top:5px; width:8px; height:8px; border-radius:50%;
    background:var(--accent); border:2px solid var(--surface); box-shadow:0 0 0 2px var(--accent);
  }
  .lg-chain li:last-child{margin-bottom:0;}
  .lg-term{font-weight:600; font-size:13px; display:block;}
  .lg-def{font-size:12px; color:var(--ink-faint); margin-top:2px; line-height:1.45;}
  .lg-whats-new{margin:12px 0 0; padding-top:10px; border-top:1px dashed var(--line); font-size:13px;}
  .lg-whats-new a{color:var(--accent); font-weight:600; text-decoration:none;}
  .lg-whats-new a:hover{text-decoration:underline;}
  /* The Help menu (2026-10-26): the guides, the phone page, then the tour and the map. */
  #layoutGuidePanel h3 + .lg-howto{margin-top:6px;}
  .lg-howto{list-style:none; margin:0; padding:0;}
  .lg-howto li{margin:0; border-top:1px solid var(--line);}
  .lg-howto li:first-child{border-top:0;}
  .lg-howto a{display:block; padding:6px 0; font-size:13px; color:var(--ink); text-decoration:none;}
  .lg-howto a:hover, .lg-howto a:focus-visible{color:var(--accent); text-decoration:underline;}
  .lg-all{margin:4px 0 10px; font-size:12.5px;}
  .lg-all a, .lg-field a{color:var(--accent); font-weight:600; text-decoration:none;}
  .lg-all a:hover, .lg-field a:hover{text-decoration:underline;}
  .lg-field{margin:0 0 14px; padding:8px 10px; background:var(--bg); border-radius:8px; font-size:12.5px; color:var(--ink-faint);}
  #layoutGuidePanel h3:not(:first-child){margin-top:4px;}
  /* Two columns where there's room: guides | tour, mornings, the map. */
  #layoutGuidePanel{width:640px;}
  .lg-cols{display:grid; grid-template-columns:1fr 1fr; gap:0 22px;}
  .lg-col > :last-child{margin-bottom:0;}
  @media (max-width:880px){ #layoutGuidePanel{width:360px;} .lg-cols{display:block;} }

  /* ---- reports modal ---- */
  .modal-overlay{
    position:fixed; inset:0; background:rgba(28,35,31,.4); z-index:50;
    display:flex; align-items:center; justify-content:center; padding:24px;
  }
  .modal-card{
    background:var(--surface); border-radius:14px; padding:20px 24px; width:100%; max-width:760px;
    max-height:80vh; overflow-y:auto; box-shadow:0 12px 32px rgba(0,0,0,.22);
  }
  /* The title bar (with its close button) stays pinned while a long window
     scrolls -- John: "the x scrolls away". Negative margins pull it over the
     card's padding so nothing shows through above it. */
  .modal-head{
    display:flex; justify-content:space-between; align-items:center;
    position:sticky; top:-20px; z-index:5;
    margin:-20px -24px 14px; padding:20px 24px 10px;
    background:var(--surface); border-bottom:1px solid var(--line); border-radius:14px 14px 0 0;
  }
  .modal-head h3{font-size:16px;}
  .modal-controls{display:flex; align-items:center; gap:8px; margin-bottom:14px;}
  .modal-controls label{font-size:12px; letter-spacing:.03em; text-transform:uppercase; color:var(--ink-faint); margin:0;}
  .modal-controls select{
    width:auto; padding:6px 10px; border:1px solid var(--line); border-radius:6px; font-size:13px;
    font-family:inherit; background:var(--bg); color:var(--ink);
  }

  /* ---- stacking plan modal ---- */
  .stk-card{max-width:960px;}
  .stk-modes{display:flex; gap:6px; margin-left:auto; flex-wrap:wrap;}
  .stk-modes button{font-size:12px; padding:5px 10px;}
  .stk-modes button.active{background:var(--accent); color:var(--accent-ink); border-color:var(--accent);}
  .stk-row{display:flex; align-items:stretch; gap:10px; margin-bottom:4px;}
  .stk-label{width:64px; flex:none; display:flex; align-items:center; font-size:12px; color:var(--ink-faint);}
  .stk-bar{flex:1; display:flex; gap:2px; min-width:0;}
  .stk-unit{
    min-width:0; min-height:48px; padding:6px 8px; border:none; border-radius:5px;
    display:flex; flex-direction:column; justify-content:center; align-items:flex-start; text-align:left;
    font-size:12px; font-weight:400; line-height:1.3; overflow:hidden; white-space:nowrap;
  }
  .stk-unit b, .stk-unit span{max-width:100%; overflow:hidden; text-overflow:ellipsis;}
  .stk-unit b{font-weight:600;}
  .stk-unit:hover{outline:2px solid currentColor; outline-offset:-2px;}
  .stk-legend{display:flex; gap:14px; flex-wrap:wrap; margin-top:14px; font-size:12px; color:var(--ink-faint);}
  .stk-legend > span{display:flex; align-items:center; gap:6px;}
  .stk-swatch{width:12px; height:12px; border-radius:3px; border:1px solid rgba(0,0,0,.12);}
  /* Open work orders mode (H75): the count on the unit, in the unit's own text colour. */
  .stk-count{display:inline-block; margin-left:6px; padding:0 6px; border:1.5px solid currentColor; border-radius:9px;
    font-size:11px; font-weight:700; line-height:15px; vertical-align:1px;}
  .stk-count-crit{background:#FFFFFF; color:#9E1C18; border-color:#FFFFFF;}
  .stk-legend-note{flex-basis:100%;}
  .stk-tip{margin-top:8px; min-height:18px; font-size:12px; color:var(--ink-faint); white-space:pre-line;}

  /* Header never wraps text: the brand, every button, and the signed-in
     name stay on one line. As the window narrows, the four toolbar
     buttons drop to icon-only (their title attribute shows the label on
     hover), then the search box shrinks. */
  header{flex-wrap:nowrap; min-width:0;}
  .brand, .brand-text .name, .brand-text .sub{white-space:nowrap;}
  .brand{flex-shrink:0;}
  #headerActions{flex-shrink:0;}
  #headerActions button, #logoutBtn, #layoutGuideBtn{white-space:nowrap; flex-shrink:0;}
  .hdr-btn{display:inline-flex; align-items:center; gap:6px;}
  .session{flex-shrink:0;}
  .session .whoami .role-line{white-space:nowrap; max-width:220px; overflow:hidden; text-overflow:ellipsis;}
  .session .whoami .viewing-line:empty{display:none;}
  /* Was 1500: with seven buttons the labels overflowed up to ~1800 px. */
  @media (max-width:1840px){
    .hdr-btn .hdr-label{display:none;}
    .hdr-btn{padding:8px 10px; font-size:16px;}
  }
  /* 1250 (was 1150) and the 1100 step: the Safety & Systems button
     (2026-10-02) pushed the header past the edge at 1024-1200 px. */
  @media (max-width:1250px){
    #unitSearchInput{width:150px;}
    #layoutGuideBtn .lg-long{display:none;}
    .brand-text .sub{display:none;}
    .session .whoami .role-line{max-width:140px;}
    .hdr-btn{padding:8px 7px;}   /* H276: the Work Orders on the Map button made the header one button wider */
  }
  @media (max-width:1100px){
    .hdr-btn{padding:7px 7px;}
    #unitSearchInput{width:120px;}
    .session .whoami .role-line{max-width:110px;}
  }

  /* ---- admin usage panel ---- */
  .hdr-btn[hidden]{display:none;}
  .usage-modal-card{max-width:760px;}
  .usage-updated{font-size:12px; color:var(--ink-faint); margin-right:auto;}
  #usageRefresh{font-size:12px; padding:5px 10px;}
  .usage-card{border:1px solid var(--line); border-radius:10px; padding:14px 16px; margin-bottom:12px;}
  .usage-card h4{margin:0 0 2px; font-size:14px;}
  .usage-note{margin:0 0 10px; font-size:11.5px; color:var(--ink-faint);}
  .usage-row{margin-bottom:10px;}
  .usage-row-head{display:flex; justify-content:space-between; gap:12px; font-size:13px;}
  .usage-val{font-family:'IBM Plex Mono',monospace; font-size:12px; color:var(--ink); white-space:nowrap;}
  .usage-bar{height:7px; border-radius:4px; background:var(--bg); border:1px solid var(--line); margin-top:5px; overflow:hidden;}
  .usage-fill{height:100%; border-radius:4px;}
  .usage-green{background:#2f7d5a;}
  .usage-amber{background:#d49a2a;}
  .usage-red{background:#b3413a;}
  .usage-unavailable{font-size:12px; color:#a7671e; margin:4px 0 8px;}
  .usage-link{font-size:12.5px; color:var(--accent); font-weight:600;}
  .people-scroll{overflow-x:auto;}
  .people-table{width:100%; border-collapse:collapse; font-size:12.5px;}
  .people-table th{text-align:left; font-weight:600; font-size:11px; color:var(--ink-faint); padding:4px 8px 4px 0; border-bottom:1px solid var(--line); white-space:nowrap;}
  .people-table td{padding:6px 8px 6px 0; border-bottom:1px solid var(--line); vertical-align:top;}
  .people-table td.people-num{text-align:right; font-family:'IBM Plex Mono',monospace; font-size:12px;}
  .people-table th.people-num{text-align:right;}
  .people-user{font-family:'IBM Plex Mono',monospace; font-size:11.5px; color:var(--ink-faint);}
  .people-invite{font-size:11.5px; color:#a7671e;}
  .people-picked{font-size:11.5px; color:var(--ink-faint);}   /* H198: the demo picker's answer */
  .people-story{font-size:11.5px; color:var(--ink-faint);}   /* H251: how far they got in a demo story */
  .people-never{color:var(--ink-faint);}

/* ---- building edit (god mode) ---- */
.bookmark-row{display:flex; gap:6px; align-items:stretch; margin-bottom:8px;}
.bookmark-row .bookmark-btn{margin-bottom:0; flex:1; min-width:0;}
.bookmark-edit{
  flex:none; width:32px; background:var(--bg); border:1px solid var(--line); border-radius:8px;
  font-size:14px; cursor:pointer; color:var(--ink-faint); padding:0;
}
.bookmark-edit:hover{border-color:var(--accent); color:var(--ink);}
.building-card{max-width:560px;}
.building-note{font-size:12px; color:var(--ink-faint); margin:-6px 0 12px;}
.building-form{display:grid; grid-template-columns:repeat(4, 1fr); gap:0 12px;}
.building-form .bf-field{grid-column:span 2;}
.building-form .bf-narrow{grid-column:span 1;}
.building-form .bf-wide{grid-column:1 / -1;}
.building-form label{font-size:11px; letter-spacing:.03em; text-transform:uppercase; color:var(--ink-faint); display:block; margin:8px 0 4px;}
.building-form input, .building-form textarea, .building-form select{
  width:100%; padding:7px 9px; border:1px solid var(--line); border-radius:6px; font-size:13px;
  font-family:inherit; background:var(--bg); color:var(--ink); resize:vertical;
}
.bf-saved{color:#2f7d5a; font-size:12px; min-height:14px;}
@media (max-width:520px){
  .building-form .bf-field, .building-form .bf-narrow{grid-column:1 / -1;}
}

/* ---- work order update log ---- */
.wo-updates-btn{font-size:11px; padding:6px 8px;}
.wo-updates-btn.open{border-color:var(--accent); background:#eaf2ef;}
/* Show / hide buttons (H269): Updates, Photos and Job link carry the same
   arrow as Help: down when closed, up when open. Clicking again closes. */
.wo-updates-btn::after, .wo-joblink-toggle::after, .photo-btn::after{
  content:"\25BE"; content:"\25BE" / ""; display:inline-block; margin-left:4px; font-size:10px; transition:transform .15s ease;}
.wo-updates-btn.open::after, .wo-joblink-toggle.open::after, .photo-btn.open::after{transform:rotate(180deg);}
.wo-updates{margin-top:10px; padding-top:10px; border-top:1px dashed var(--line);}
.wo-update-form textarea, .wo-complete-prompt textarea{
  width:100%; padding:7px 9px; border:1px solid var(--line); border-radius:6px; font-size:12.5px;
  font-family:inherit; background:var(--surface); color:var(--ink); resize:vertical;
}
.wo-update-row{display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:6px;}
.wo-update-row select{
  flex:1 1 200px; min-width:0; padding:6px 8px; border:1px solid var(--line); border-radius:6px;
  font-size:12px; font-family:inherit; background:var(--surface); color:var(--ink);
}
.wo-internal{font-size:12px; color:var(--ink-faint); display:flex; align-items:center; gap:4px; white-space:nowrap; cursor:pointer;}
.wo-update-row .wo-update-add{width:auto; font-size:12px; padding:6px 12px;}
.wo-timeline{list-style:none; margin:10px 0 0; padding:0 0 0 14px; border-left:2px solid var(--line);}
.wo-timeline li{position:relative; padding:0 0 10px 4px;}
.wo-timeline li::before{
  content:""; position:absolute; left:-20px; top:4px; width:10px; height:10px; border-radius:50%;
  background:var(--surface); border:2px solid var(--accent);
}
.wo-timeline li.wo-tl-origin::before{border-color:var(--ink-faint);}
.wo-tl-head{font-size:11px; color:var(--ink-faint); display:flex; align-items:center; gap:6px; flex-wrap:wrap;}
.wo-tl-status{font-size:12px; font-weight:600;}
.wo-tl-note{font-size:12.5px; white-space:pre-wrap; overflow-wrap:anywhere;}
.wo-tl-undo{margin-top:3px; padding:0; border:0; background:none; color:var(--accent); font-size:12px; font-weight:600; text-decoration:underline; cursor:pointer; width:auto;}
.wo-tl-undo:disabled{opacity:.6; cursor:default;}
.wo-tl-shared{font-size:10px; font-weight:700; text-transform:uppercase; padding:1px 6px; border-radius:999px; background:#e4efec; color:#1d4a3e;}
.wo-complete-prompt{margin-top:8px;}
.wo-complete-prompt label{font-size:11px; letter-spacing:.03em; text-transform:uppercase; color:var(--ink-faint); display:block;}
.wo-complete-prompt label textarea{margin-top:4px; text-transform:none; letter-spacing:normal;}
.wo-complete-prompt .mini-actions button{width:auto;}
.wo-update-row .wo-internal{text-transform:none; letter-spacing:normal; margin:0; font-size:12px;}
.wo-update-row .wo-internal input{width:auto; margin:0;}
.wo-complete-heading{font-size:12.5px; font-weight:700; margin-bottom:6px;}
.wo-vendor-select{
  width:100%; margin-top:6px; padding:6px 8px; border:1px solid var(--line); border-radius:6px;
  font-size:12px; font-family:inherit; background:var(--surface); color:var(--ink);
}
.wo-item .wo-vendors.wo-assigned{font-weight:600;}
/* H220: the appointment on a job's card, and its box in Updates. */
.wo-item .wo-appt-line{font-size:12px; color:#1f4e79; font-weight:600; margin-top:2px;}
.wo-item .wo-appt-line.wo-appt-past{color:#7a4c00;}
.wo-appt-box{border:1px solid var(--line, #ddd); border-radius:8px; padding:8px 10px; margin:0 0 10px; background:#f6f9fc;}
.wo-appt-head{display:flex; gap:8px; align-items:baseline; flex-wrap:wrap;}
.wo-appt-label{font-weight:700; font-size:12.5px;}
.wo-appt-now{font-size:12.5px;}
.wo-appt-hours{font-size:11.5px; color:#555; margin-top:2px;}
.wo-appt-row{display:flex; gap:6px; align-items:center; flex-wrap:wrap; margin-top:6px;}
.wo-appt-row input[type=date]{min-width:9.5em;}
.wo-appt-row input[type=time]{min-width:7em;}
.wo-appt-dash{font-size:12px; color:#555;}
.wo-appt-ask{margin-top:6px; padding:6px 8px; border-radius:6px; background:#fdf0d5; color:#4a2800; font-size:12px;}
.wo-appt-ask p{margin:0 0 6px;}
.wo-appt-ask button{margin-right:6px;}
/* Who's handling it? (H106): a Critical job no one is handling. Amber at
   first, red once it has waited an hour. The flag line says it in words too,
   so color is never the only signal. */
.wo-item.wo-unassigned{border-color:#e0a63a; border-left-color:#d99a2b; box-shadow:0 0 0 1px #e0a63a inset;}
.wo-item.wo-unassigned-late{border-color:#c0392b; border-left-color:#c0392b; box-shadow:0 0 0 1px #c0392b inset;}
.wo-unassigned-flag{display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:6px;
  margin:-2px 0 6px; padding:5px 8px; border-radius:6px; font-size:11.5px; font-weight:700;
  background:#fdf0d5; color:#7a4c00;}
.wo-unassigned-late .wo-unassigned-flag{background:#fbe1df; color:#8c2318;}
.wo-unassigned-btn{width:auto; font-size:11px; padding:3px 8px; font-weight:600;}
/* Ticklers (H73): an open job past its amber / red age. The flag line gives
   the word and the days, so color is never the only signal. A Critical job
   nobody is handling keeps its own border (above); this one only adds when
   that does not apply. */
.wo-item.wo-pastdue-amber:not(.wo-unassigned){border-color:#e0a63a; border-left-color:#d99a2b; box-shadow:0 0 0 1px #e0a63a inset;}
.wo-item.wo-pastdue-red:not(.wo-unassigned){border-color:#c0392b; border-left-color:#c0392b; box-shadow:0 0 0 1px #c0392b inset;}
.wo-late-flag{margin:-2px 0 6px; padding:5px 8px; border-radius:6px; font-size:11.5px; font-weight:700;}
.wo-late-flag.wo-late-amber{background:#fdf0d5; color:#7a4c00;}
.wo-late-flag.wo-late-red{background:#fbe1df; color:#8c2318;}
body.cb-colors .wo-item.wo-pastdue-amber:not(.wo-unassigned){border-color:#F1A340; border-left-color:#F1A340; box-shadow:0 0 0 1px #F1A340 inset;}
body.cb-colors .wo-item.wo-pastdue-red:not(.wo-unassigned){border-color:#B35806; border-left-color:#B35806; box-shadow:0 0 0 1px #B35806 inset;}
body.cb-colors .wo-late-flag.wo-late-amber{background:#FDD49E; color:#4A2800;}
body.cb-colors .wo-late-flag.wo-late-red{background:#B35806; color:#FFFFFF;}
/* Done, to confirm (H118): a tech pressed Done; waiting on the property
   manager. Blue = "your turn", unlike the amber / red of a job no one has.
   The line above the job says it in words too. */
.wo-status-dtc{background:#e1ecf8; color:#1d4f8a;}
.wo-item.wo-done-confirm{border-color:#5b8fd0; border-left-color:#3f74b8; box-shadow:0 0 0 1px #5b8fd0 inset;}
.wo-done-flag{margin:-2px 0 6px; padding:5px 8px; border-radius:6px; font-size:11.5px; font-weight:700; background:#e1ecf8; color:#173f6e;}
.wo-send-back-btn{font-size:11px; padding:6px 8px;}
.wo-send-back-textrow{display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:4px 0 6px;}   /* H131 */
.wo-send-back-textrow .wo-joblink-hint{margin:0;}
.wo-tl-vendor{background:#fdf0d5; color:#7a4c00; margin-left:4px;}
body.cb-colors .wo-tl-vendor{background:#FDD49E; color:#4A2800;}
/* Waiting for the bill (H121): closed without a final cost; said in words. */
.wo-bill-flag{display:inline-block; margin-top:4px; padding:2px 8px; border-radius:6px; font-size:11px; font-weight:700; background:#fdf0d5; color:#7a4c00;}
.wo-bill-summary{margin:0 0 8px; padding:6px 9px; border-radius:6px; font-size:12px; font-weight:600; background:#fdf0d5; color:#6b4300;}
.wo-use-estimate{width:auto; font-size:11px; padding:4px 9px; margin:4px 0 2px;}
.wo-cost-hint{font-size:11px; color:var(--ink-faint); margin:2px 0 4px;}
/* Update saved (2026-10-15): a few seconds on the card after Add update closes the panel. */
.wo-saved-flag{margin:-2px 0 6px; padding:4px 8px; border-radius:6px; font-size:11.5px; font-weight:700; background:#dff0e6; color:#1d5a3c;}
body.cb-colors .wo-saved-flag{background:#C6DBEF; color:#08306B;}
/* Paid by the Tenant (H122): amber, said in words. */
.wo-paid-flag{margin:-2px 0 6px; padding:5px 8px; border-radius:6px; font-size:11.5px; font-weight:700; background:#fdf0d5; color:#7a4c00;}
body.cb-colors .wo-bill-flag, body.cb-colors .wo-bill-summary, body.cb-colors .wo-paid-flag{background:#FDD49E; color:#4A2800;}
body.cb-colors .wo-done-flag, body.cb-colors .wo-status-dtc{background:#C6DBEF; color:#08306B;}
/* Job link for the vendor (H119): a panel under the job card. */
.wo-joblink-toggle{font-size:11px; padding:6px 8px;}
.wo-joblink-toggle.open{border-color:var(--accent); color:var(--accent);}
.wo-joblink{margin-top:8px; padding:9px 10px; border:1px solid var(--line); border-radius:8px; background:var(--surface); font-size:12px;}
.wo-joblink-heading{font-size:12.5px; font-weight:700; margin-bottom:4px;}
.wo-joblink-about{color:var(--ink-faint); margin-bottom:6px; line-height:1.4;}
.wo-joblink-status{font-weight:600; margin-bottom:6px; display:flex; flex-wrap:wrap; align-items:center; gap:6px;}
.wo-joblink-off{width:auto; font-size:11px; padding:3px 8px;}
.wo-joblink-made{margin:6px 0 8px; padding:8px; border-radius:6px; background:#eaf2ef;}
.wo-joblink-once{font-weight:700; margin-bottom:6px;}
.wo-joblink-label{display:block; font-size:11px; letter-spacing:.03em; text-transform:uppercase; color:var(--ink-faint);}
.wo-joblink-message{width:100%; margin-top:4px; font-family:inherit; font-size:12px; text-transform:none; letter-spacing:normal; box-sizing:border-box;}
.wo-joblink-url{width:100%; margin:6px 0; font-size:11.5px; box-sizing:border-box;}
.wo-joblink-send{display:flex; flex-wrap:wrap; gap:6px;}
.wo-joblink-btn{display:inline-block; width:auto; font-size:12px; padding:6px 12px; border:1px solid var(--accent); border-radius:6px;
  background:var(--accent); color:var(--accent-ink); text-decoration:none; font-weight:600; cursor:pointer;}
.wo-joblink-btn[aria-disabled="true"]{background:var(--surface); color:var(--ink-faint); border-color:var(--line); cursor:not-allowed;}
.wo-joblink-copy{background:var(--surface); color:var(--accent);}
.wo-joblink-copyline{display:flex; align-items:center; gap:6px; margin:0 0 6px;}
.wo-joblink-copylabel{flex:0 0 56px; font-size:11px; letter-spacing:.03em; text-transform:uppercase; color:var(--ink-faint);}
.wo-joblink-copybox{flex:1 1 auto; min-width:0; font-size:12px; padding:5px 7px; box-sizing:border-box;}
.wo-joblink-copyline .wo-joblink-btn{flex:0 0 auto; font-size:11.5px; padding:5px 10px;}
.wo-joblink-share{display:flex; align-items:center; gap:6px; font-size:12px; margin:0 0 4px; text-transform:none; letter-spacing:normal;}
.wo-joblink-share input{width:auto; margin:0;}
.wo-joblink-hint{font-size:11px; color:var(--ink-faint); margin:2px 0 6px;}
.wo-joblink-spotted{padding:5px 8px; border-radius:6px; background:#fdf0d5; color:#7a4c00; font-weight:700;}   /* H127 */
body.cb-colors .wo-joblink-spotted{background:#FDD49E; color:#4A2800;}
.wo-joblink-make{width:auto; font-size:12px; padding:6px 12px;}
.wo-joblink-error{color:#8c2318; font-size:11.5px; margin-top:4px;}
.wo-joblink-error:empty{display:none;}
/* Quick picks on the New work order form (H197) */
.wo-quick-picks{display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin:8px 0 2px;}
.wo-quick-picks .wo-quick-label{font-size:12px; color:var(--ink-faint); margin-right:2px;}
.wo-quick-picks button{width:auto; flex:0 0 auto; font-size:12px; padding:5px 10px; border-radius:999px; white-space:nowrap;}
.wo-quick-picks button[aria-pressed="true"]{background:var(--accent); color:var(--accent-ink); border-color:transparent;}
.wo-vendor-row{display:flex; gap:6px; align-items:center;}
.wo-vendor-row select{flex:1 1 auto; min-width:0;}
.wo-vendor-row .wo-vendor-select{margin-top:6px;}
.wo-new-vendor-btn{width:auto; flex:0 0 auto; font-size:11px; padding:6px 8px; white-space:nowrap;}
.wo-vendor-row .wo-new-vendor-btn{margin-top:6px;}
#woVendorWrap .wo-vendor-row .wo-new-vendor-btn{margin-top:0;}
/* "Who did the work?" on the closing prompt (H138) */
.wo-who-did-it-box{margin:0 0 8px;}
.wo-who-did-it-label{font-size:11px; letter-spacing:.03em; text-transform:uppercase; font-weight:600;}
.wo-who-did-it-box .wo-vendor-row .wo-vendor-select{margin-top:3px;}
.wo-who-did-it-box .wo-vendor-row .wo-new-vendor-btn{margin-top:3px;}
.wo-vendor-hint{font-size:11px; color:var(--ink-faint); margin-top:4px;}
/* "Email <vendor> the job" under a vendor pick (2026-10-26, vendorEmailBox.js). */
.wo-vendor-email{margin:6px 0 4px;}
.wo-vendor-email .wo-vendor-email-tick{display:flex; align-items:flex-start; gap:6px; font-size:13px; font-weight:500; cursor:pointer; margin:0;
  text-transform:none; letter-spacing:0; color:var(--ink);}   /* a sentence, not a form heading */
.wo-vendor-email-tick input{margin:2px 0 0; flex:0 0 auto; width:auto;}
.wo-vendor-email-note{font-size:11px; color:var(--ink-faint); margin-top:2px;}
/* The line under the job list after a save that is emailing the vendor. */
.wo-action-note{font-size:12.5px; color:var(--accent); margin:6px 0;}
#woVendorWrap.wo-who-required label#woVendorLabel{color:#8c2318; font-weight:700;}
.wo-quick-vendor{margin-top:8px; padding:8px 10px; border:1px solid var(--line); border-radius:8px; background:var(--surface);}
.wo-quick-vendor-title{font-size:12px; font-weight:700; margin-bottom:4px;}
.wo-quick-vendor label{display:block; font-size:11px; letter-spacing:.03em; text-transform:uppercase; color:var(--ink-faint); margin:6px 0 0;}
.wo-quick-vendor input, .wo-quick-vendor select{display:block; width:100%; margin-top:3px; text-transform:none; letter-spacing:normal;}
.wo-qv-where{font-size:11px; color:var(--ink-faint); margin-top:6px;}
.wo-qv-actions{display:flex; gap:6px; margin-top:6px;}
.wo-qv-actions button{width:auto; font-size:12px; padding:6px 12px;}

/* ---- reports: open work orders ---- */
.reports-card{max-width:1180px;}
.reports-controls{flex-wrap:wrap; row-gap:8px;}
.reports-controls .rpt-openwo-only{display:inline-flex; align-items:center; gap:8px;}
.reports-controls .rpt-openwo-only[hidden]{display:none;}
.reports-controls .rpt-client-filter{display:inline-flex; align-items:center; gap:8px;}
.reports-controls .rpt-client-filter[hidden]{display:none;}
.reports-actions{margin-left:auto; display:inline-flex; gap:6px;}
.reports-actions button{font-size:12px; padding:6px 10px;}
.reports-summary{font-size:12px; color:var(--ink-faint); margin:-6px 0 10px;}
.report-table{width:100%; border-collapse:collapse; font-size:12.5px;}
.report-table th, .report-table td{text-align:left; padding:7px 8px; border-bottom:1px solid var(--line); vertical-align:top;}
.report-table th{font-size:11px; text-transform:uppercase; letter-spacing:.03em; color:var(--ink-faint); font-weight:600; white-space:nowrap;}
.report-table td{white-space:normal; overflow-wrap:anywhere;}
.report-table td.rpt-tight{white-space:nowrap;}
.report-table td.rpt-last{min-width:200px; color:var(--ink-faint); font-size:12px;}
.report-table .rpt-desc{color:var(--ink-faint); font-size:11.5px;}
.report-table tr.rpt-group td{background:var(--bg); font-weight:700; font-size:12px; padding-top:12px;}
.report-table tr.rpt-old td.rpt-days{color:#b3413a; font-weight:700;}
.report-table tr.rpt-late-amber td.rpt-days{color:#8a5a00;}   /* H73: the Past due column says it in words too */
.rpt-sev-critical{color:#b3271f; font-weight:700;}
.rpt-sev-high{color:#b3591b; font-weight:600;}

/* Print only the report. */
@media print {
  body.printing-report > *:not(#reportsModal){display:none !important;}
  body.printing-report #reportsModal{position:static; background:none; padding:0; display:block;}
  body.printing-report #reportsModal .modal-card{max-width:none; max-height:none; overflow:visible; box-shadow:none; padding:0;}
  body.printing-report .edit-close, body.printing-report .reports-controls{display:none !important;}
  body.printing-report .modal-head{position:static; margin:0 0 14px; padding:0; border:none;}
  body.printing-report .report-table td.rpt-last{max-width:none;}
}

/* ---- printable history ---- */
.wo-print-row{display:flex; justify-content:flex-end; align-items:center; gap:10px; margin-top:8px;}
.wo-print-row .wo-internal{text-transform:none; letter-spacing:normal; margin:0; font-size:12px;}
.wo-print-row .wo-internal input{width:auto; margin:0;}
.wo-print-btn{font-size:12px; padding:5px 10px;}
.reports-controls .rpt-check{display:inline-flex; align-items:center; gap:4px; text-transform:none; letter-spacing:normal; font-size:12px; color:var(--ink);}
.reports-controls .rpt-check[hidden]{display:none;}
.reports-controls .rpt-check input{width:auto; margin:0;}
.report-table tr.rpt-history td{background:var(--surface); padding:2px 8px 10px 20px; border-bottom:1px solid var(--line);}
.report-table tr.rpt-history ol{margin:0; padding-left:16px; font-size:11.5px; color:var(--ink-faint);}
.report-table tr.rpt-history li{margin:2px 0;}
#printSheet{display:none;}
@media print {
  body.printing-sheet > *:not(#printSheet){display:none !important;}
  body.printing-sheet #printSheet{display:block; font-family:inherit; color:#000; font-size:12pt;}
  #printSheet .ps-brand{font-size:9pt; color:#555; letter-spacing:.04em; text-transform:uppercase;}
  #printSheet h1{font-size:18pt; margin:4pt 0 2pt;}
  #printSheet .ps-sub{font-size:12pt; margin-bottom:10pt;}
  #printSheet .ps-facts{display:grid; grid-template-columns:auto 1fr; gap:3pt 14pt; margin:0 0 12pt; font-size:10.5pt;}
  #printSheet .ps-facts dt{font-weight:700;}
  #printSheet .ps-facts dd{margin:0;}
  #printSheet h2{font-size:13pt; border-bottom:1px solid #999; padding-bottom:2pt;}
  #printSheet .ps-timeline{list-style:none; padding:0; margin:0;}
  #printSheet .ps-timeline li{padding:5pt 0; border-bottom:1px solid #ddd; break-inside:avoid;}
  #printSheet .ps-when{font-size:9.5pt; color:#444;}
  #printSheet .ps-status{font-weight:700;}
  #printSheet .ps-foot{margin-top:14pt; font-size:9pt; color:#666;}
  body.printing-report tr.rpt-history td{padding-left:14pt;}
}

/* ---- Print floor plan (H158 PR 1): the button, its options window, and the sheets ---- */
.print-floor-btn{margin-top:8px; font-size:12px; padding:6px 10px; width:auto;}
.print-floor-btn[hidden]{display:none;}
.fp-card{max-width:380px;}
.fp-what{font-weight:600; margin:0 0 10px;}
.fp-row{display:flex; align-items:center; justify-content:space-between; gap:10px; margin:8px 0;}
.fp-row label{font-size:12px; letter-spacing:.03em; text-transform:uppercase; color:var(--ink-faint); margin:0;}
.fp-row select{width:auto; min-width:170px;}
.fp-check{display:block; font-size:13px; margin:10px 0 4px; text-transform:none; letter-spacing:normal; color:var(--ink);}
.fp-check input{width:auto; margin:0 4px 0 0;}
.fp-sub{margin:2px 0 4px 22px; font-size:12px;}
.fp-pick{margin:4px 0 6px 12px; columns:2; column-gap:14px;}
.fp-pick .fp-check{margin:3px 0; font-size:12.5px; break-inside:avoid;}
.fp-show{margin:12px 0 0; font-size:12px; letter-spacing:.03em; text-transform:uppercase; color:var(--ink-faint);}
.fp-status{min-height:18px; margin-top:10px; font-size:12.5px; color:var(--ink-faint);}
#floorPrintSheets{display:none;}
@media print {
  body.printing-floor-sheet > *:not(#floorPrintSheets){display:none !important;}
  body.printing-floor-sheet{margin:0; background:#fff;}
  body.printing-floor-sheet #floorPrintSheets{display:block;}
  #floorPrintSheets .fp-page{break-after:page; page-break-after:always; overflow:hidden;}
  #floorPrintSheets .fp-page:last-child{break-after:auto; page-break-after:auto;}
  #floorPrintSheets svg{display:block; width:100%; height:auto; max-height:100vh; break-inside:avoid;}
}

/* ---- basemap switch (bottom-left of the map) ---- */
.basemap-switch{
  display:flex; background:var(--surface); border:1px solid var(--line); border-radius:8px;
  padding:3px; gap:2px; box-shadow:0 1px 3px rgba(0,0,0,.2);
}
.basemap-switch button{
  border:none; background:none; border-radius:6px; padding:5px 10px; font-size:12px;
  font-weight:600; cursor:pointer; color:var(--ink); width:auto;
}
.basemap-switch button:hover{background:var(--bg);}
.basemap-switch button.active{background:var(--accent); color:var(--accent-ink);}

  /* Brand mark: the same stacked-layers mark as layeredinsightsgis.com,
     on the website's dark ink tile so it reads on the white header. */
  .brand-mark{background:#10151A !important; color:transparent; padding:6px;}
  .brand-mark svg{width:100%; height:100%; display:block;}
  .brand-mark .mark-top{fill:#E9E4D8; stroke:#E9E4D8; stroke-width:1;}
  .brand-mark .mark-mid{stroke:#4C97A8; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round;}
  .brand-mark .mark-low{stroke:#C98A4B; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round;}

/* ---- tenant contacts (tenantContacts.js) ---- */
.tenants-card{max-width:860px;}
.tc-overview tr.tc-row{cursor:pointer;}
.tc-overview tr.tc-row:hover td, .tc-overview tr.tc-row:focus td{background:var(--bg);}
.tc-overview td.tc-name{font-weight:600;}
.tc-overview td.tc-where{color:var(--ink-faint); font-size:12px;}
.tc-overview td.tc-issues{color:#a7671e; font-weight:600;}
.tc-overview td.tc-fine{color:var(--accent);}
.tc-detail-head{display:flex; justify-content:space-between; align-items:center; margin-bottom:8px;}
.tc-back{font-size:12px; padding:5px 10px;}
.tc-tenant-name{font-family:'Fraunces',serif; font-size:18px; font-weight:600; margin:4px 0 2px;}
.tc-tenant-where{font-size:12px; color:var(--ink-faint); margin:0 0 12px;}
.tc-missing{font-size:12.5px; padding:8px 10px; margin-bottom:12px; border-radius:6px; background:#fbeedd; color:#8a5316;}
.tc-empty{font-size:13px; color:var(--ink-faint);}
.tc-list{display:grid; grid-template-columns:repeat(auto-fill, minmax(250px, 1fr)); gap:10px;}
.tc-card{background:var(--bg); border:1px solid var(--line); border-radius:10px; padding:10px 12px; font-size:12.5px; display:flex; flex-direction:column; gap:6px;}
.tc-card-top{display:flex; flex-wrap:wrap; align-items:baseline; gap:6px;}
.tc-role{font-size:10.5px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; padding:2px 7px; border-radius:999px; background:#e2e5e0; color:var(--ink);}
.tc-role-primary{background:#dcebe6; color:#1d4a3e;}
.tc-role-afterhrs{background:#f6e3d9; color:#8f3e1c;}
.tc-role-billing{background:#e3e6f3; color:#2f3b72;}
.tc-role-facil{background:#eee8d6; color:#5f5020;}
.tc-who{font-weight:700; font-size:13.5px;}
.tc-title{color:var(--ink-faint); font-size:12px;}
.tc-lines{display:flex; flex-direction:column; gap:2px;}
.tc-line .tc-k{display:inline-block; width:52px; color:var(--ink-faint); font-size:11px;}
.tc-line a{color:var(--accent); text-decoration:none; overflow-wrap:anywhere;}
.tc-line a:hover{text-decoration:underline;}
.tc-notes{color:var(--ink-faint); font-size:12px; font-style:italic;}
.tc-foot{display:flex; flex-direction:column; gap:6px; margin-top:auto; padding-top:6px; border-top:1px dashed var(--line);}
.tc-verified{font-size:11.5px;}
.tc-v-ok{color:var(--accent);}
.tc-v-stale{color:#a7671e; font-weight:600;}
.tc-unreach{color:#a7671e; font-weight:600; font-size:12.5px; margin:4px 0;}
.tc-card-unreach{border-color:#e4b27a;}
.tc-v-never{color:#b3413a; font-weight:600;}
.tc-v-record{color:var(--muted, #6b6b6b);}   /* Safety & Systems: interval Never, record only (H9) */
.tc-actions{display:flex; gap:6px; flex-wrap:wrap;}
.tc-btn{font-size:11.5px; padding:4px 9px; border-radius:6px;}
.tc-btn:disabled{opacity:.55; cursor:default;}
.tc-btn-danger{color:#b3413a;}
.tc-form{margin-top:14px;}
.tc-form h4{margin:0 0 4px; font-size:14px;}
.tc-grid{display:grid; grid-template-columns:1fr 1fr; column-gap:12px;}
.tc-grid .tc-wide{grid-column:1 / -1;}
.tc-form .tc-check{display:flex; align-items:center; gap:6px; text-transform:none; letter-spacing:normal; font-size:12.5px; color:var(--ink); margin:10px 0 4px;}
.tc-form .tc-check input{width:auto; margin:0;}
.link-btn{background:none; border:none; padding:4px 0 0; font-size:12px; font-weight:600; color:var(--accent); cursor:pointer; text-align:left;}
.link-btn:hover{text-decoration:underline;}
.link-btn.tc-link-warn{color:#a7671e;}
.mep-verify{display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:6px; padding-top:6px; border-top:1px dashed var(--line);}
.report-table td.rpt-needs{font-weight:700;}
.report-table td.rpt-needs-0{color:#b3413a;}
.report-table td.rpt-needs-1{color:#b3413a;}
.report-table td.rpt-needs-2{color:#a7671e;}
@media (max-width:560px){
  .tc-grid{grid-template-columns:1fr;}
}
#editPanel .link-btn{display:block; margin:-6px 0 10px; padding:0;}
/* Unit panel in two columns on wider screens (2026-10-05). */
#editPanel .eu-grid{display:grid; grid-template-columns:1fr; column-gap:12px;}
#editPanel .eu-wide{grid-column:1 / -1;}
#editPanel .eu-field{min-width:0;}
#editPanel .eu-field select.eu-dim{opacity:.55;}
#editPanel .eu-hints{margin:-6px 0 8px;}
/* From 700 px (a tablet held upright), not 900 (John, 2026-10-05:
   "better, at least for a computer user"). Never wider than the screen. */
@media (min-width:700px){
  :root{--rp-w:min(440px, calc(100vw - 24px));}
  #editPanel .eu-grid{grid-template-columns:1fr 1fr;}
}

/* ---- tenant health (tenantHealth.js) ---- */
.th-badge{display:inline-block; font-size:10.5px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; padding:2px 8px; border-radius:999px; white-space:nowrap;}
.th-risk{background:#FCEBEB; color:#791F1F;}
.th-watch{background:#FAEEDA; color:#633806;}
.th-good{background:#EAF3DE; color:#27500A;}
.report-table td.th-tenant{font-weight:600;}
.report-table td.th-why{font-size:12px; color:var(--ink);}
.report-table td.th-why-good{color:var(--ink-faint);}
.th-rules{font-size:11.5px; color:var(--ink-faint); margin:10px 0 0;}
.th-strip{border:1px solid var(--line); border-left-width:4px; border-radius:8px; padding:10px 12px; margin:0 0 12px; background:var(--bg);}
.th-strip-risk{border-left-color:#c0392b;}
.th-strip-watch{border-left-color:#c98a2b;}
.th-strip-good{border-left-color:#4f8a32;}
.th-strip-top{display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; font-size:12.5px;}
.th-stats{display:flex; flex-wrap:wrap; gap:6px 22px; margin-top:8px;}
.th-stat{display:flex; flex-direction:column; font-size:11px; color:var(--ink-faint);}
.th-stat b{font-size:13px; color:var(--ink); font-weight:600;}

/* ---- maintenance history report (maintenanceHistory.js) ---- */
.reports-controls .rpt-mh-only, .reports-controls .rpt-history-opts{display:inline-flex; align-items:center; gap:8px;}
.reports-controls .rpt-mh-only[hidden], .reports-controls .rpt-history-opts[hidden]{display:none;}
.mh-wrap{overflow-x:auto;}
.mh-head{margin:4px 0 14px;}
.mh-building{font-family:'Fraunces',serif; font-size:19px; font-weight:600; margin:0 0 2px;}
.mh-facts{font-size:12px; color:var(--ink-faint); margin:0 0 2px;}
.mh-section{margin:0 0 18px;}
.mh-section h5{font-size:13.5px; margin:0 0 2px; padding-bottom:4px; border-bottom:2px solid var(--line);}
.mh-note{font-size:11.5px; color:var(--ink-faint); margin:4px 0 8px;}
.mh-empty{font-size:12.5px; color:var(--ink-faint); margin:6px 0;}
.mh-group{font-size:12.5px; font-weight:700; margin:12px 0 4px; color:var(--ink);}
.mh-table{table-layout:fixed; width:100%; min-width:760px;}
.mh-table td{overflow-wrap:anywhere;}
.mh-glance td.mh-trade{font-weight:600;}
.mh-open h5{border-bottom-color:#e2b46a;}
@media print {
  body.printing-report .mh-section{break-inside:auto;}
  body.printing-report .mh-group{break-after:avoid;}
  body.printing-report .mh-table tr{break-inside:avoid;}
  body.printing-report #reportsSummary{display:none;}
}

/* ---- Building Binder (binder.js) ---- */
.bd-wrap{font-size:13px;}
.bd-section{margin:0 0 22px;}
.bd-h{font-family:'Fraunces',serif; font-size:17px; font-weight:600; margin:0 0 4px; padding-bottom:4px; border-bottom:2px solid var(--line);}
.bd-note{font-size:11.5px; color:var(--ink-faint); margin:0 0 10px;}
.bd-cover{padding:18px 20px; border:1px solid var(--line); border-radius:10px; background:var(--bg);}
.bd-kicker{font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--accent); margin:0;}
.bd-title{font-family:'Fraunces',serif; font-size:26px; font-weight:600; margin:4px 0 2px;}
.bd-addr{margin:0 0 12px; color:var(--ink-faint);}
.bd-facts{display:grid; grid-template-columns:max-content 1fr; gap:4px 18px; margin:0 0 12px;}
.bd-facts dt{font-weight:600;}
.bd-facts dd{margin:0;}
.bd-contents{font-size:12px; margin:0 0 4px;}
.bd-care{font-size:11.5px; color:#8a5316; margin:0;}
.bd-tenant{margin:0 0 14px; break-inside:avoid;}
.bd-tenant-name{font-size:14px; margin:0;}
.bd-tenant-where{font-size:12px; color:var(--ink-faint); margin:0 0 4px;}
.bd-empty{font-size:12px; color:var(--ink-faint); margin:2px 0;}
.bd-gap{font-size:12px; color:#8a5316; font-weight:600; margin:4px 0 0;}
.bd-v-ok{color:var(--accent);}
.bd-v-stale{color:#a7671e; font-weight:600;}
.bd-v-never{color:#b3413a; font-weight:600;}
.bd-stack .stk-unit{cursor:default; min-height:44px;}
.bd-stack .stk-unit:hover{outline:none;}
.stk-unit .stk-lease{font-size:10.5px; opacity:.8;}
.bd-mh .mh-section h5{font-size:14px;}

@media print {
  body.printing-report .bd-wrap{font-size:10pt;}
  body.printing-report .bd-break{break-before:page;}
  body.printing-report .bd-cover{border:none; padding:0; background:none;}
  body.printing-report .modal-card:has(#binderWrap:not([hidden])) .modal-head{display:none;}
  body.printing-report .mh-table th{white-space:normal;}
  body.printing-report .bd-stack, body.printing-report .bd-stack *{-webkit-print-color-adjust:exact; print-color-adjust:exact;}
  body.printing-report .bd-tenant, body.printing-report .bd-table tr{break-inside:avoid;}
  body.printing-report .modal-card:has(#binderWrap:not([hidden])) .reports-summary{display:none;}
}

/* The map's popup above every panel over the map (H156, popupAbove.js): while it is open the
   SDK's own layer is lifted over the overview card (15), banners (25-30) and the Edit Unit
   panel, but stays under modals (50), the guided tour (2000) and the Feedback button (2100). */
#mapContainer.popup-open .esri-ui, #mapContainer.popup-open .esri-popup{z-index:35;}

/* Name tag on mouse-over of a Building Features point (H157, hoverTag.js): above the overview card (15),
   banners and panels (25-30); below modals (50), the tour (2000) and Feedback (2100). */
.bf-hover-tag{position:absolute; z-index:34; pointer-events:none; max-width:240px; padding:4px 8px; border-radius:6px;
  background:#10151A; color:#fff; font-size:12px; line-height:1.3; box-shadow:0 3px 10px rgba(0,0,0,.28);}
.bf-hover-tag[hidden]{display:none;}
.bf-hover-name{font-weight:600;}
.bf-hover-type{font-size:11px; opacity:.8;}
@media print{ .bf-hover-tag{display:none !important;} }

/* ---- building overview card (buildingOverview.js) ---- */
.bo-card{
  position:absolute; top:12px; left:56px; z-index:15; width:min(460px, calc(100% - 80px));
  max-height:calc(100% - 24px); overflow:auto;
  background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:14px 16px;
  box-shadow:0 6px 22px rgba(0,0,0,.18); font-size:12.5px;
}
.bo-card[hidden]{display:none;}
.bo-head{display:flex; justify-content:space-between; align-items:flex-start; gap:10px; margin-bottom:8px;}
.bo-name{font-family:'Fraunces',serif; font-size:18px; font-weight:600; margin:0;}
.bo-addr{font-size:12px; color:var(--ink-faint); margin:2px 0 0;}
.bo-use{font-size:12px; color:var(--ink-faint); margin:1px 0 0;}
/* The card narrowed to the unit open in the Edit Unit panel. */
.bo-focus{font-size:12px; color:var(--accent); font-weight:600; margin:3px 0 0;}
.bo-lines{display:flex; flex-direction:column; border-top:1px solid var(--line);}
.bo-line{display:grid; grid-template-columns:12px 92px 1fr; column-gap:8px; row-gap:2px; align-items:baseline; padding:7px 0; border-bottom:1px solid var(--line);}
.bo-dot{width:9px; height:9px; border-radius:50%; background:#c8c6bd; align-self:center;}
.bo-bad .bo-dot{background:#c0392b;}
.bo-warn .bo-dot{background:#d99a2b;}
.bo-ok .bo-dot{background:#4f8a32;}
.bo-label{font-weight:700;}
.bo-clickable{cursor:pointer;}
.bo-clickable:hover .bo-text{text-decoration:underline;}
.bo-bad .bo-text{color:#8c2318;}
.bo-age-aging .bo-text{color:#a7671e; font-weight:600;}   /* H93: words only; the line stays info */
.bo-age-past .bo-text{color:#b3413a; font-weight:600;}
.bo-link{grid-column:3; justify-self:start; background:none; border:none; padding:0; font-size:11.5px; font-weight:600; color:var(--accent); cursor:pointer;}
.bo-link:hover{text-decoration:underline;}
.bo-actions{display:flex; gap:6px; flex-wrap:wrap; margin-top:10px;}
.bo-actions button{font-size:12px; padding:5px 10px;}
@media (max-width: 700px){
  .bo-card{left:8px; right:8px; width:auto; top:8px;}
}
#floorButtons p.floor-note{flex-basis:100%; font-size:12.5px; line-height:1.45; color:var(--ink); margin:6px 0 0;
  background:#eaf2ef; border-left:3px solid var(--accent); border-radius:0 6px 6px 0; padding:8px 10px;}
#floorButtons p.floor-note strong{color:var(--accent);}
/* the floor the map is drawing while "All floors" is selected */
.floor-btn.on-map{border:2px solid var(--accent); padding:5px 9px; background:#fff;}
.floor-btn.on-map::after{content:"on map"; margin-left:6px; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--accent);}
/* floors holding the selected tenant / vacant units */
.floor-btn.has-sel::before{content:"●"; margin-right:4px; color:var(--accent); font-size:9px; vertical-align:1px;}
.floor-btn.active.has-sel::before{color:var(--accent-ink);}

/* one line under the Reports menu saying what the chosen report is for */
.reports-desc{font-size:12.5px; color:var(--ink); margin:-6px 0 6px; padding:6px 10px; background:var(--bg); border-radius:6px;}
@media print { body.printing-report .reports-desc{display:none;} }
.bd-table tr.bd-vacant td{background:#f1efe8; color:#5f5e5a;}
.bd-avail{font-size:12.5px; font-weight:600; margin:8px 0 0;}
.bd-site-items{list-style:none; margin:8px 0 0; padding:0;}
.bd-site-item{display:flex; gap:12px; align-items:flex-start; justify-content:space-between; padding:6px 0; border-top:1px solid var(--line); break-inside:avoid;}
.bd-site-name{font-weight:600; font-size:13px;}
.bd-site-how{font-size:12px; color:var(--ink);}
.bd-site-photos{display:flex; gap:8px; flex:0 0 auto;}
.bd-site-photo{display:flex; flex-direction:column; align-items:center; font-size:10.5px; width:96px; text-align:center;}
.bd-site-photo img{width:96px; height:72px; object-fit:cover; border-radius:6px; border:1px solid var(--line);}
@media print { body.printing-report .bd-table tr.bd-vacant td{-webkit-print-color-adjust:exact; print-color-adjust:exact;} }
.field-hint{font-size:11px; color:var(--ink-faint); margin:-4px 0 8px;}
.field-hint-inline{font-size:11px; color:var(--ink-faint); font-weight:normal;}
.eu-movingin{color:var(--ink);}
.mep-actions{display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end;}
.mep-edit{margin-top:8px; padding-top:8px; border-top:1px dashed var(--line);}
.mep-edit .tc-check{display:flex; align-items:center; gap:6px; text-transform:none; letter-spacing:normal; font-size:12.5px; color:var(--ink); margin:8px 0 4px;}
.mep-edit .tc-check input{width:auto; margin:0;}
.tc-check label{display:inline-flex; align-items:center; gap:6px; text-transform:none; letter-spacing:normal; font-size:12.5px; color:var(--ink); margin:0;}
.tc-check{flex-wrap:wrap;}
.tc-check input.tc-date{width:auto; margin:0; padding:3px 6px; font-size:12.5px;}
.tc-name-row{display:flex; align-items:baseline; gap:10px; flex-wrap:wrap;}
.tc-rename{margin:4px 0 8px; max-width:420px;}

/* ---- building safety & systems (buildingFeatures.js) ---- */
.features-card{max-width:900px;}
.bf-bar{display:flex; justify-content:flex-end; margin:4px 0 10px;}
.bf-group{margin:0 0 16px;}
.bf-group-head{display:flex; align-items:center; gap:8px; font-size:13px; margin:0 0 8px; color:var(--ink);}
.bf-list{display:grid; grid-template-columns:repeat(auto-fill, minmax(250px, 1fr)); gap:10px;}
/* An Edit form takes the whole row of the grid, like Add does (H93 PR 2), instead of one ~250px card slot. */
.bf-list > .bf-form{grid-column:1 / -1; margin:0;}
.bf-cost-hint{font-size:12.5px; color:var(--ink); margin-top:6px; padding:5px 8px; border-left:4px solid var(--accent); border-radius:4px; background:#eaf2ef;}   /* H284: same green as the offer, lighter */
.bf-cost-hint button{background:none; border:0; padding:0; font:inherit; color:var(--accent, #1a5fb4); text-decoration:underline; cursor:pointer;}
/* H284: an OFFER, not a warning -- the portal's green action color (--accent), thick border, light green tint. Not red (past due) and not amber (What's missing). */
.bf-offer{display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin:0 0 12px; padding:12px 14px; border:3px solid var(--accent); border-radius:10px; background:#eaf2ef; font-size:14px; font-weight:600; scroll-margin:16px;}
.bf-offer .bf-offer-text{flex:1 1 220px;}
.bf-offer .bf-offer-yes{background:var(--accent); border-color:var(--accent); color:var(--accent-ink); font-weight:700;}
.bf-bought{border:0; margin:0; padding:0;}
.bf-bought legend{padding:0; font-size:12.5px; color:var(--ink);}
.bf-bought label{display:inline-flex; align-items:center; gap:4px; margin:0 12px 0 0; text-transform:none; letter-spacing:normal; font-size:12.5px;}
.bf-bought input{width:auto; margin:0;}
.wo-record-note{font-size:12px; color:var(--ink-faint); margin:6px 0 10px;}
.bf-card{background:var(--bg); border:1px solid var(--line); border-radius:10px; padding:10px 12px; font-size:12.5px; display:flex; flex-direction:column; gap:4px;}
.bf-card-top{display:flex; flex-wrap:wrap; align-items:baseline; gap:6px;}
.bf-type{font-weight:700; font-size:13px;}
.bf-pm{font-size:10.5px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; padding:2px 7px; border-radius:999px; background:#ece6f3; color:#4f3a70;}
.bf-label{font-size:13px;}
.bf-where{color:var(--ink-faint); font-size:12px;}
.bf-placed{color:var(--ink); font-size:12px; margin-top:2px;}
.bf-survey-hint{color:var(--ink-faint); font-size:12px;}
.bf-vendor, .bf-meta{font-size:12px;}
.bf-notes{color:var(--ink-faint); font-size:12px; font-style:italic;}
.bf-verified{font-size:11.5px; margin-top:4px; padding-top:6px; border-top:1px dashed var(--line);}
.bf-age{font-size:11.5px; margin-top:2px; color:var(--muted, #6b6b6b);}   /* H93: age against expected life */
.bf-age-aging{color:#a7671e; font-weight:600;}
.bf-age-past{color:#b3413a; font-weight:600;}
.bf-quick{margin:2px 0 8px;}
.bf-warn{color:#a7671e; font-weight:600; font-size:12px;}
/* Heating / cooling systems (2026-10-03): system name, the other half, open jobs */
.bf-system{font-size:12px; font-weight:600;}
.bf-pair{font-size:12px; display:flex; flex-wrap:wrap; align-items:center; gap:6px;}
.bf-pair-missing{color:#a7671e;}
.bf-pair .tc-btn{padding:1px 8px; font-size:11px;}
.bf-jobs{font-size:12px; color:var(--accent);}
/* Serves one unit (2026-10-23): the open unit, its two groups, the card's "Serves Unit 216" */
.bf-focus{display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; margin:0 0 8px; padding:8px 12px; border-radius:10px;
  background:var(--accent-soft, #eaf2ef); color:var(--accent); font-size:12.5px; font-weight:600;}
.bf-focus .tc-btn{font-weight:600;}
.bf-scope{margin:0 0 18px; padding:0 0 4px; border-bottom:1px solid var(--line);}
.bf-scope:last-of-type{border-bottom:none;}
.bf-scope-head{font-size:14px; margin:0 0 10px; color:var(--ink);}
.bf-scope-empty{color:var(--ink-faint); font-size:12.5px; margin:0 0 12px;}
.bf-serves{font-size:12px; font-weight:600; color:var(--accent);}
.bf-serves-hint{color:var(--ink-faint); font-size:11.5px; margin-top:3px;}
.wo-item .wo-equipment{font-size:11px; margin-top:4px; display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px;}
.wo-item .wo-equipment-other{color:var(--ink-faint);}
.wo-item .wo-equipment-show{font-size:11px; padding:0 6px;}
.bf-actions{display:flex; gap:6px; flex-wrap:wrap; margin-top:4px;}
.bf-missing{margin:0 0 16px; padding:10px 12px; border:1px solid #e3c787; border-left:4px solid #d99a2b; border-radius:10px; background:#fdf7e8; font-size:12.5px;}
.bf-missing-head{margin:0 0 6px; font-size:13px;}
.bf-missing-row{display:flex; align-items:center; justify-content:space-between; gap:10px; padding:5px 0; border-top:1px dashed #e3c787;}
.bf-missing-text{display:flex; flex-direction:column; gap:1px;}
.bf-missing-note{color:var(--ink-faint); font-size:11.5px;}
.bf-missing-sub{margin:8px 0 2px; font-weight:700; font-size:12px; border-top:1px dashed #e3c787; padding-top:7px;}
/* Overdue for a check = the walk-around checklist (H10): one row per item,
   Confirm / Problem found on the right; the next item to do is outlined. */
.bf-stale-row{display:flex; align-items:center; justify-content:space-between; gap:6px 10px; padding:5px 6px; margin:0 -6px; border-radius:8px; border:2px solid transparent;}
.bf-stale-text{display:flex; flex-wrap:wrap; gap:2px 10px; align-items:baseline; min-width:0;}
.bf-stale-name{font:inherit; font-weight:600; color:var(--ink); background:none; border:none; padding:0; text-align:left; cursor:pointer;}
.bf-stale-name:hover{text-decoration:underline;}
.bf-stale-type, .bf-stale-where, .bf-stale-date{color:var(--ink-faint); font-size:12px;}
.bf-walk-actions{display:flex; gap:6px; flex-shrink:0;}
.bf-walk-next{border-color:#d99a2b; background:#fff;}
.bf-walk-next .bf-walk-confirm{font-weight:700;}
.bf-walk-done .bf-stale-name{font-weight:500;}
.bf-walk-confirmed .bf-stale-date{color:var(--accent); font-weight:600;}
.bf-walk-problem .bf-stale-date{color:#a15c00; font-weight:600;}
.bf-walk-progress{font-size:12px; color:var(--ink-faint); margin:0 0 2px;}
@media (max-width:560px){ .bf-stale-row{flex-wrap:wrap;} }
.bf-form{margin:0 0 14px; padding:12px; border:1px solid var(--line); border-radius:10px; background:var(--panel, #fff);}
.bf-form h4{margin:0 0 4px; font-size:14px;}
.bf-pos{display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:12.5px; margin:12px 0 4px;}
.bf-form .tc-check{display:flex; align-items:center; gap:6px; text-transform:none; letter-spacing:normal; font-size:12.5px; color:var(--ink); margin:8px 0 2px;}
.bf-form .tc-check input[type=checkbox]{width:auto; margin:0;}
.bf-form .tc-check label{display:inline-flex; align-items:center; gap:6px; margin:0; text-transform:none; letter-spacing:normal; font-size:12.5px; color:var(--ink);}
.bf-form .tc-date{width:auto;}
/* Map marks in the legend and cards: icons.js discs (H155). */
.bf-legend{display:flex; flex-direction:column; gap:3px; margin:2px 0 6px 22px; font-size:11.5px; max-height:40vh; overflow-y:auto; padding-right:4px;}
.bf-legend-cat{font-weight:600; margin-top:4px;}
.bf-legend-row[hidden]{display:none;}
/* H194: a folding group heading: a small arrow that turns, the whole heading is the button */
.legend-fold-head{cursor:pointer; user-select:none; border-radius:4px;}
.legend-fold-head:focus-visible{outline:2px solid var(--accent, #2f6f5e); outline-offset:1px;}
.legend-fold-arrow{flex:none; width:0; height:0; border-left:4px solid transparent; border-right:4px solid transparent; border-top:6px solid currentColor; margin-right:1px;}
.legend-fold-head.folded .legend-fold-arrow{transform:rotate(-90deg);}
.bf-mark{display:block; flex:none;}
.layer-toggle-sub{margin-left:22px;}
.bf-legend-row{display:flex; align-items:center; gap:7px;}
/* Placing a feature: crosshair cursor and a banner at the top of the map. */
#mapContainer.bf-placing, #mapContainer.bf-placing .esri-view-surface{cursor:crosshair !important;}
.bf-place-banner{position:absolute; top:12px; left:50%; transform:translateX(-50%); z-index:30; background:#10151A; color:#fff; font-size:13px; padding:9px 12px 9px 14px; border-radius:8px; box-shadow:0 6px 18px rgba(0,0,0,.25); display:flex; align-items:center; gap:10px; max-width:calc(100% - 32px);}
.bf-place-banner[hidden]{display:none;}
.bf-place-banner button{font-size:12px; padding:4px 10px;}
@media (max-width:560px){
  .bf-list{grid-template-columns:1fr;}
}

  /* ---- demo banner (demo Worker only; calm blue-grey, not a warning colour) ---- */
  .demo-banner{background:#e8eef3; color:#33495a; border-bottom:1px solid #cfdae3; font-size:12px; text-align:center; padding:4px 12px;}
  .demo-banner[hidden]{display:none;}

/* Tenants overview: which building it's narrowed to (2026-10-04) */
.tc-scope{font-size:13px; color:var(--ink-faint); margin:0 0 10px; display:flex; flex-wrap:wrap; align-items:center; gap:6px;}
.tc-scope-btn{padding:2px 10px; font-size:12px;}

/* Screen size guidance (2026-10-04): the portal works on phones, but the map,
   stacking plan and reports need room. A line on the sign-in page, and on
   phone-sized screens a dismissible note once signed in. */
.login-card .pitch-device{font-size:12.5px; color:var(--ink-faint); margin:-6px 0 16px; line-height:1.4;}
.small-screen-note{display:none;}
@media (max-width:767px){
  body:not(.logged-out) .small-screen-note:not([hidden]){
    display:flex; align-items:center; justify-content:space-between; gap:10px;
    background:#fdf7e8; color:#5c4410; border-bottom:1px solid #e3c787; font-size:13px; padding:6px 12px;
  }
  .small-screen-note button{border:0; background:transparent; font-size:18px; line-height:1; padding:2px 6px; color:inherit; cursor:pointer;}
}

/* ---- window move / minimize (windowControls.js, 2026-10-04) ---- */
.modal-head{cursor:grab; touch-action:none; user-select:none; -webkit-user-select:none;}
.modal-head.win-dragging{cursor:grabbing;}
.win-btns{display:flex; align-items:center; gap:6px; margin-left:auto;}
.win-min-btn{
  font-size:18px; line-height:1; padding:6px 12px; min-width:40px; min-height:36px;
  font-weight:700; color:var(--ink);
}
.modal-overlay.win-minimized{background:transparent; pointer-events:none; padding:0;}
.modal-overlay.win-minimized .modal-card{
  pointer-events:auto; position:fixed; bottom:8px; left:8px; width:auto; max-width:min(320px, 45vw);
  max-height:none; overflow:hidden; padding:0; border-radius:10px; transform:none !important;
  box-shadow:0 6px 18px rgba(0,0,0,.25);
}
.modal-overlay.win-minimized .modal-card > :not(.modal-head){display:none !important;}
.modal-overlay.win-minimized .modal-head{
  position:static; margin:0; padding:8px 10px 8px 14px; border:0; border-radius:10px; gap:10px; cursor:pointer;
}
.modal-overlay.win-minimized .modal-head h3{font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}

/* Touch screens have no hover, so an icon-only header button gives no hint
   (John, Galaxy Tab, 2026-10-04: "forced a click to find out"). Show a short
   label under each icon whenever the device can't hover. */
@media (hover:none) and (pointer:coarse){
  .hdr-btn{flex-direction:column; gap:1px; padding:5px 8px; font-size:15px; line-height:1.1;}
  /* Short form of each label (data-short in index.html) so seven buttons fit */
  .hdr-btn .hdr-label{display:block !important; font-size:0;}
  .hdr-btn .hdr-label::after{content:attr(data-short); font-size:10.5px; font-weight:600; white-space:nowrap;}
}

/* Narrow or touch screens: the header wraps into two rows -- logo and
   sign-out on top, the tools (search, guide, buttons) on their own row --
   instead of running off the right edge (portrait tablets overflowed by
   ~180 px; John, Galaxy Tab, 2026-10-04: "crowded"). If the tools still
   don't fit, that row scrolls sideways rather than pushing the page wider. */
@media (max-width:1100px), (hover:none) and (pointer:coarse){
  header{flex-wrap:wrap; row-gap:8px; padding:10px 14px;}
  body:not(.logged-out) #headerActions{
    order:3; flex:1 1 100%; min-width:0; flex-shrink:1; gap:8px;
    overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:thin; padding-bottom:2px;
  }
  .session{margin-left:auto;}
  #unitSearchInput{width:160px;}
}

/* Building overview card: drag by its title, minimize to the title bar
   (2026-10-04). Same buttons as the windows. */
.bo-head{cursor:grab; touch-action:none; user-select:none; -webkit-user-select:none;}
.bo-head.win-dragging{cursor:grabbing;}
.bo-head .win-btns{align-self:flex-start;}
.bo-card.bo-minimized{width:auto; max-width:min(360px, calc(100% - 80px)); padding:8px 10px 8px 14px; overflow:hidden;}
.bo-card.bo-minimized .bo-head{margin:0; align-items:center; cursor:pointer;}
.bo-card.bo-minimized .bo-addr, .bo-card.bo-minimized .bo-use, .bo-card.bo-minimized .bo-focus{display:none;}
.bo-card.bo-minimized .bo-name{font-size:15px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}

/* Guided tour (tour.js, 2026-10-04): one part of the screen lit up, the rest
   dimmed, a caption beside it. Above everything, including windows. */
.tour{position:fixed; inset:0; z-index:2000;}
.tour-blocker{position:absolute; inset:0; background:transparent;}
.tour-blocker.tour-dim{background:rgba(15,20,18,.55);}
.tour-ring{position:fixed; border-radius:10px; box-shadow:0 0 0 3px var(--accent), 0 0 0 9999px rgba(15,20,18,.55); pointer-events:none;
  transition:left .25s ease, top .25s ease, width .25s ease, height .25s ease;}
.tour-ring[hidden]{display:none;}
.tour-card{position:fixed; background:var(--surface); color:var(--ink); border-radius:12px; padding:14px 16px 12px;
  box-shadow:0 10px 32px rgba(0,0,0,.3); font-size:13.5px; line-height:1.5; max-height:calc(100vh - 16px); overflow:auto;}
.tour-card h3{margin:2px 0 6px; font-size:17px;}
.tour-count{font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--ink-faint);}
.tour-body p{margin:0 0 8px;}
.tour-body ul{margin:0 0 8px; padding-left:18px;}
.tour-body li{margin:3px 0;}
.tour-actions{display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:10px;}
.tour-nav{display:flex; gap:8px;}
.tour-nav button{min-height:36px; padding:6px 14px;}
.tour-nav button.primary{width:auto;}
.tour-skip{background:none; border:none; color:var(--ink-faint); padding:6px 0; text-decoration:underline; min-height:36px;}
.tour-skip[hidden], .tour-nav button[hidden]{display:none;}
@media (prefers-reduced-motion: reduce){ .tour-ring{transition:none;} }
.lg-tour{margin:0 0 12px; padding:0 0 12px; border-bottom:1px solid var(--line); font-size:12.5px; color:var(--ink-faint);}
.lg-tour button{background:var(--accent); border-color:var(--accent); color:var(--accent-ink); font-weight:600; padding:6px 12px; margin-right:6px;}
#storyStartWrap button{margin-bottom:6px;}
.tour-body ul.tour-icons{list-style:none; padding-left:0;}
.tour-body ul.tour-icons li{display:flex; gap:4px;}
.tour-ico{flex:0 0 24px;}
#newClientUnitHint{margin:4px 0 10px;}

/* Demo story (story.js): the page stays usable, "Show me", done tick, and
   the demo welcome card. */
.tour-interactive .tour-ring{box-shadow:0 0 0 3px var(--accent), 0 0 0 9999px rgba(15,20,18,.35);}
/* What just happened (the ✓ line, and a paragraph added once a step is done):
   blue, so it reads as new against the story text (John, 2026-10-25). */
.tour-done{margin:6px 0; padding:7px 10px; border-left:3px solid #2a6db3; background:#eaf2fb; color:#1c4f86; font-weight:600; border-radius:4px;}
.tour-body .tour-new, .tour-body .tour-new p{color:#1c4f86;}
.tour-body .tour-new{margin:6px 0; padding:7px 10px; border-left:3px solid #2a6db3; background:#eaf2fb; border-radius:4px;}
.tour-body .tour-new p{margin:0; background:none; border:0; padding:0;}
.tour-done[hidden], .tour-showme[hidden]{display:none;}
/* The story text fades back once the person has clicked in the step (tour.js
   adds .tour-dimmed): the page's own faint grey (--ink-faint, #6b756e), a
   colour not opacity, so it stays readable (4.8:1 on white). The hint, the done line and anything added after
   it (.tour-after / .tour-new) keep full strength; hover and keyboard focus
   inside the text bring it back. The card's background is always --surface
   (white), so one colour serves every theme. */
.tour-body.tour-dimmed > :not(.tour-after):not(.tour-new){color:var(--ink-faint); transition:color .15s ease;}
.tour-body.tour-dimmed > :not(.tour-after):not(.tour-new) b{color:var(--ink-faint);}
.tour-body.tour-dimmed:hover > :not(.tour-after):not(.tour-new),
.tour-body.tour-dimmed:hover > :not(.tour-after):not(.tour-new) b,
.tour-body.tour-dimmed:focus-within > :not(.tour-after):not(.tour-new),
.tour-body.tour-dimmed:focus-within > :not(.tour-after):not(.tour-new) b{color:var(--ink);}
.tour-nav button.tour-showme:not(.primary){background:none; border-color:var(--accent); color:var(--accent);}
.tour-nav button[hidden]{display:none;}
.tour-nav button.tour-ready{box-shadow:0 0 0 3px rgba(47,111,94,.35);}
.demo-welcome-actions{display:flex; flex-direction:column; gap:8px; margin-top:12px;}
.demo-welcome-actions button{min-height:42px; display:flex; justify-content:space-between; align-items:center; padding:8px 14px; width:100%;}
.demo-welcome-actions button span{font-size:12px; opacity:.75; font-weight:400;}
.demo-welcome-actions .tour-skip{justify-content:center;}
#storyStartWrap:has(#storyStartBtn[hidden]){display:none;}
.tour-interactive{pointer-events:none;}
.tour-interactive .tour-card, .tour-interactive .tour-blocker:not([hidden]){pointer-events:auto;}
.tour-blocker[hidden]{display:none;}
/* Story steps (2026-10-04): the one thing to click is haloed and pulses;
   clicks elsewhere are caught by .tour-shade panels and just nudge the
   halo; the card's instruction line says what to click. */
.tour-shade{position:fixed; background:transparent; pointer-events:auto; cursor:not-allowed;}
.tour-shade[hidden]{display:none;}
.tour-ring.tour-halo{animation:tour-halo 1.6s ease-in-out infinite;}
@keyframes tour-halo{
  0%,100%{box-shadow:0 0 0 3px var(--accent), 0 0 0 9999px rgba(15,20,18,.45);}
  50%{box-shadow:0 0 0 7px rgba(47,111,94,.55), 0 0 0 9999px rgba(15,20,18,.45);}
}
/* What to do now: solid green with white text, unlike the story text above it (John, 2026-10-25). */
.tour-hint{margin:6px 0 4px; padding:9px 12px; border-radius:8px; background:var(--accent, #2f6f5e); color:#fff; font-weight:600; font-size:14px; line-height:1.4;}
.tour-hint b{color:#fff;}
.tour-hint[data-count]::before{content:attr(data-count); display:block; font-size:11px; font-weight:600; letter-spacing:.04em; text-transform:uppercase; opacity:.8; margin-bottom:2px;}
/* Something on the card just changed: a short amber flash. */
.tour-fresh{animation:tour-fresh 1.6s ease-out 1;}
@keyframes tour-fresh{0%{box-shadow:0 0 0 4px rgba(214,150,40,.85);} 100%{box-shadow:0 0 0 0 rgba(214,150,40,0);}}
.tour-hint[hidden]{display:none;}
.tour-hint.tour-nudge{animation:tour-nudge .5s ease-in-out 2;}
.tour-ring.tour-nudge{animation:tour-nudge-ring .5s ease-in-out 2;}
@keyframes tour-nudge{0%,100%{transform:none;} 25%{transform:translateX(-4px);} 75%{transform:translateX(4px);}}
@keyframes tour-nudge-ring{0%,100%{box-shadow:0 0 0 3px var(--accent), 0 0 0 9999px rgba(15,20,18,.45);} 50%{box-shadow:0 0 0 12px rgba(201,138,75,.7), 0 0 0 9999px rgba(15,20,18,.55);}}
.tour-nav button.tour-showme:not(.primary){font-size:12.5px; padding:4px 8px; min-height:30px;}
@media (prefers-reduced-motion: reduce){ .tour-ring.tour-halo, .tour-ring.tour-nudge, .tour-hint.tour-nudge, .tour-fresh{animation:none;} }
.tour-note{font-size:12px; color:#8a5a16; background:#fbf1e3; border-radius:6px; padding:3px 8px; margin:0 0 6px; display:inline-block;}
/* The tour / story card can be dragged (tour.js): grip at the top right. */
.tour-card{cursor:grab; touch-action:none;}
.tour-card.win-dragging{cursor:grabbing;}
.tour-card button, .tour-card a{cursor:pointer;}
.tour-grip{position:absolute; top:8px; right:12px; color:var(--ink-faint); font-size:14px; letter-spacing:-2px; opacity:.7; pointer-events:none;}
.tour-card{user-select:none; -webkit-user-select:none;}

/* The building overview explained (tour + story): a compact line-by-line list and the dot colors. */
.tour-body ul.tour-ov{margin:4px 0 8px; padding-left:16px; font-size:13px;}
.tour-body ul.tour-ov li{margin:2px 0;}
.tour-dot{display:inline-block; width:9px; height:9px; border-radius:50%; margin:0 4px 0 2px; vertical-align:0;}
.tour-dot-good{background:#4f8a32;} .tour-dot-warn{background:#d99a2b;} .tour-dot-bad{background:#c0392b;} .tour-dot-info{background:#c8c6bd;}
/* H248: the round ring that marks an item after Show on map (featureRing.js). Orange with a white edge so it
   shows on the aerial map; round and pulsing, unlike the story's steady rounded-square halo. */
.map-ring{position:fixed; width:46px; height:46px; margin:-23px 0 0 -23px; border-radius:50%; box-sizing:border-box; pointer-events:none; z-index:55;
  border:4px solid #ff7a1a; box-shadow:0 0 0 2px #fff, 0 0 10px 2px rgba(0,0,0,.45); animation:map-ring-pulse 1.1s ease-in-out infinite;}
@keyframes map-ring-pulse{0%,100%{transform:scale(.8); opacity:1;} 50%{transform:scale(1.3); opacity:.55;}}
@media (prefers-reduced-motion: reduce){ .map-ring{animation:none;} }
.tour-spot{position:fixed; width:36px; height:36px; border-radius:50%; pointer-events:none; z-index:1999;}

/* Money estimates (2026-10-05) */
.wo-item .wo-cost-line{font-size:11px; margin-top:4px; color:var(--ink-faint); font-variant-numeric:tabular-nums;}
.mini-error.money-check, #editUnitError.money-check, #buildingError.money-check{color:#8a5a00;}
.building-form .bf-hours{border-top:1px solid var(--line, #ddd); margin-top:12px; padding-top:8px;}
.building-form .bf-hours h4{margin:0 0 4px; font-size:13px;}
.bf-hours-mode{display:flex; gap:16px; margin:4px 0;}
.bf-hours-mode label, .bf-hours-day, .bf-hours-all{font-weight:normal; display:inline-flex; gap:3px; align-items:center;}
.bf-hours-row{border:1px solid var(--line, #ddd); border-radius:6px; padding:6px 8px; margin:6px 0; display:flex; flex-direction:column; gap:6px;}
.bf-hours-days{display:flex; gap:8px; flex-wrap:wrap; font-size:12.5px;}
.bf-hours-times{display:flex; gap:6px; align-items:center; flex-wrap:wrap; font-size:12.5px;}
.bf-hours-times input[type=time]{min-width:7em;}
.bf-hours-acts{display:flex; gap:8px; flex-wrap:wrap;}
.bf-hours-bad{color:#8c2318;}
.building-form .bf-money-head{border-top:1px solid var(--line, #ddd); margin-top:12px; padding-top:8px;}
.building-form .bf-money-head h4{margin:0 0 4px; font-size:13px;}
.wo-complete-prompt .wo-final-cost{display:block; width:100%; margin-top:4px;}
.bo-estimates{border-top:1px solid var(--line); padding:8px 0 4px; font-size:12px;}
.bo-estimates h4{margin:0 0 6px; font-size:12px; letter-spacing:.03em; text-transform:uppercase; color:var(--ink-faint); font-weight:600;}
.bo-est-table{width:100%; border-collapse:collapse;}
.bo-est-table th{text-align:left; font-weight:600; padding:3px 8px 3px 0; white-space:nowrap; vertical-align:top;}
.bo-est-table .bo-est-value{font-family:'IBM Plex Mono',ui-monospace,monospace; padding:3px 8px 3px 0; white-space:nowrap; vertical-align:top; text-align:right;}
.bo-est-table .bo-est-how{color:var(--ink-faint); font-size:11px; padding:3px 0; vertical-align:top;}
.bo-est-foot{display:flex; flex-wrap:wrap; gap:6px 12px; justify-content:space-between; align-items:center; color:var(--ink-faint); font-size:11px; margin-top:6px;}
@media (max-width:600px){ .bo-est-table .bo-est-how{display:none;} }
.unit-history{margin:4px 0 10px; padding:8px 10px; background:var(--bg); border-radius:6px; font-size:12px;}
.unit-history .uh-head{font-size:11px; letter-spacing:.03em; text-transform:uppercase; color:var(--ink-faint); margin-bottom:4px;}
.unit-history .uh-line{margin:2px 0;}
/* A draft's "Continue or discard this inspection ›" stays in one piece: it moves
   to its own line rather than breaking in two (a broken link is hard to hit,
   and the panel-overlap test's aim point fell in the gap, 2026-10-31). */
.unit-history .uh-draft a{white-space:nowrap;}
/* Inspections block: where they're done (2026-10-26), a quiet line with a link to the phone page. */
.unit-history .uh-field{margin-top:6px; font-size:12px; color:var(--ink-faint);}
.unit-history .uh-field a{color:var(--accent); font-weight:600; text-decoration:none; white-space:nowrap;}
.unit-history .uh-more{color:var(--ink-faint);}
.unit-history .uh-fill{margin:3px 0 3px 12px; font-size:13px;}
.unit-history .uh-cost{width:100px; margin:0 4px; padding:2px 6px;}
.unit-history .uh-err{color:#b3261e;}
.unit-history .uh-fix{font-size:11px; margin-left:4px;}
.unit-history .uh-fixbox{display:block; margin:3px 0 3px 12px;}
.unit-history .uh-fixbox input{margin-right:4px;}
.unit-history .uh-fixbox button{margin-right:4px;}
.building-form .bf-hist{margin:4px 0 0;}
.bo-est-foot .bo-est-stale{color:#8a5a00; flex-basis:100%;}
/* Property performance report (2026-10-05) */
.perf-table .perf-num{text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums;}
.perf-table th.perf-num{text-align:right; white-space:normal; vertical-align:bottom;}
/* Header text may wrap (the "?" made them too wide to fit, 2026-10-26); the "?" stays with the last word. */
.perf-table th .explain-btn{white-space:nowrap;}
.perf-table .perf-use{font-size:11px; color:var(--ink-faint);}
.perf-table .perf-total td{font-weight:600; border-top:2px solid var(--line);}
.bf-legend-sub{padding-left:16px; font-size:12px;}
.bf-card-top .bf-card-mark{display:inline-block; margin-right:6px; vertical-align:-6px;}

/* ---- Feedback button (feedback.js, 2026-10-06; demo only for now) ----
   Above the tour / story (z-index 2000) so it works mid-guide. */
.feedback-btn{
  position:fixed; right:16px; bottom:30px; z-index:2100;
  display:inline-flex; align-items:center; gap:6px;
  padding:9px 14px; border-radius:999px; border:1px solid var(--accent);
  background:var(--surface); color:var(--accent); font-weight:700; font-size:14px;
  box-shadow:0 6px 18px rgba(0,0,0,.18);
}
.feedback-btn:hover{background:var(--accent); color:var(--accent-ink);}
.feedback-btn[aria-expanded="true"]{background:var(--accent); color:var(--accent-ink);}
.feedback-panel{
  position:fixed; right:16px; bottom:80px; z-index:2101;
  width:min(360px, calc(100vw - 32px)); max-height:calc(100vh - 110px); overflow:auto;
  background:var(--surface); color:var(--ink); border:1px solid var(--line); border-radius:12px;
  box-shadow:0 12px 32px rgba(0,0,0,.25); padding:14px 16px 16px;
}
.feedback-head{display:flex; align-items:center; justify-content:space-between; gap:8px;}
.feedback-head h3{margin:0; font-size:17px;}
.feedback-x{border:0; background:transparent; font-size:22px; line-height:1; padding:2px 8px; color:var(--ink-faint);}
.feedback-lead{margin:6px 0 10px; font-size:14px; line-height:1.45;}
.feedback-kinds{display:flex; flex-wrap:wrap; gap:6px; margin-bottom:10px;}
.feedback-kind{font-size:13px; font-weight:600; padding:5px 10px; border-radius:999px;}
.feedback-kind[aria-pressed="true"]{background:var(--accent); color:var(--accent-ink); border-color:var(--accent);}
.feedback-label{display:block; font-size:12px; font-weight:600; color:var(--ink-faint); margin-bottom:4px;}
.feedback-panel textarea{
  width:100%; box-sizing:border-box; resize:vertical; min-height:96px;
  font:inherit; font-size:15px; padding:8px 10px; border:1px solid var(--line); border-radius:8px;
  background:var(--surface); color:var(--ink);
}
.feedback-small{margin:6px 0 0; font-size:12px; color:var(--ink-faint); line-height:1.4;}
.feedback-msg{margin-top:8px; font-size:14px; font-weight:600; color:var(--accent);}
.feedback-msg.feedback-error{color:#b3261e;}
.feedback-actions{display:flex; justify-content:flex-end; gap:8px; margin-top:12px;}
.feedback-actions button{width:auto;}
@media (max-width:600px){
  .feedback-btn{padding:8px 12px; font-size:13px; bottom:24px;}
  .feedback-panel{bottom:70px;}
}
/* H171: minimized window tabs line up along the bottom (windowControls.js publishes their height
   as --tabs-h, 0 when none). Feedback and its note box sit above the tabs, never on them. */
body:has(.win-minimized) .feedback-btn{bottom:calc(var(--tabs-h, 0px) + 12px);}
body:has(.win-minimized) .feedback-panel{bottom:calc(var(--tabs-h, 0px) + 62px);}
@media print{ .feedback-btn, .feedback-panel{display:none !important;} }

/* ---- Activity window (activityLog.js, 2026-10-06; admin only) ---- */
.activity-modal-card{max-width:760px;}
.activity-lead{margin:0 0 10px; font-size:13px; color:var(--ink-faint);}
.activity-controls{flex-wrap:wrap;}
.activity-controls input[type="search"]{flex:1 1 240px; min-width:0; font:inherit; font-size:14px; padding:7px 10px; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--ink);}
.activity-controls .activity-check{display:flex; align-items:center; gap:6px; white-space:nowrap; flex:0 0 auto; text-transform:none; letter-spacing:0; font-size:13px; color:var(--ink);}
.activity-day{margin:14px 0 6px; font-size:12px; letter-spacing:.06em; text-transform:uppercase; color:var(--ink-faint);}
.activity-list{list-style:none; margin:0; padding:0; border-top:1px solid var(--line);}
.activity-item{padding:8px 2px; border-bottom:1px solid var(--line);}
.activity-line{display:flex; gap:12px; align-items:baseline;}
.activity-time{flex:0 0 64px; font-size:12px; color:var(--ink-faint); font-variant-numeric:tabular-nums;}
.activity-text{font-size:14px; line-height:1.4;}
.activity-bldg{color:var(--ink-faint);}
.activity-details{margin:4px 0 0 76px; padding:0; list-style:none; font-size:13px; color:var(--ink-faint); line-height:1.45;}
.activity-warn .activity-text b{color:#b3261e;}
.activity-empty{color:var(--ink-faint); font-size:14px;}
.activity-foot{display:flex; justify-content:center; margin-top:10px;}
@media (max-width:600px){ .activity-details{margin-left:0;} .activity-line{flex-direction:column; gap:2px;} }

/* ---- Account set-up and Change password (account.js, 2026-10-06) ---- */
.pw-hint{font-size:13px; color:var(--ink-faint); margin:6px 0 8px; line-height:1.4;}
.login-card .pw-hint{margin:6px 0 8px;}
.pw-show{display:flex; align-items:center; gap:6px; font-size:13px; margin:0 0 12px; font-weight:400; text-transform:none; letter-spacing:0;}
.pw-show input{width:auto; margin:0;}
.pw-ok-tick{color:var(--accent); font-weight:600;}
#inviteError{color:#b3413a; font-size:14px; min-height:18px; margin-top:8px;}
.invite-signin a{font-weight:600;}
.session{position:relative;}
.session .account-btn{border:0; background:transparent; padding:0; margin:0; font:inherit; font-weight:600; color:inherit; cursor:pointer; text-align:right; display:block;}
.session .account-btn::after{content:" \25BE"; font-size:11px; color:var(--ink-faint);}
.session .account-btn:hover{text-decoration:underline;}
.account-menu{position:absolute; top:calc(100% + 6px); right:0; z-index:60; min-width:180px; background:var(--surface); border:1px solid var(--line); border-radius:10px; box-shadow:0 8px 24px rgba(0,0,0,.18); padding:6px;}
.account-menu button{display:block; width:100%; text-align:left; border:0; background:transparent; padding:8px 10px; border-radius:6px; font-weight:600;}
.account-menu button:hover, .account-menu button:focus{background:var(--bg);}
.password-modal-card{max-width:420px;}
#passwordForm label{display:block; font-size:13px; font-weight:600; margin:10px 0 4px;}
#passwordForm input[type=password], #passwordForm input[type=text]:not([hidden]){width:100%; box-sizing:border-box; font:inherit; padding:8px 10px; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--ink);}
#passwordForm .pw-show{font-weight:400; margin:4px 0 8px;}
#passwordMsg{min-height:18px; font-size:14px; margin:6px 0;}
#passwordMsg.pw-error{color:#b3413a;}
#passwordMsg.pw-ok{color:var(--accent); font-weight:600;}
.pw-actions{display:flex; justify-content:flex-end; gap:8px; margin-top:8px;}
.pw-actions button{width:auto;}

/* Header in two rows on a desktop screen (2026-10-07, John on a large
   monitor: "the current pm admin runs off the screen"). Row 1: logo,
   search, Layout Guide, and the account on the right. Row 2: the tools as a
   tab bar, with their names (Usage and Activity made the one-row header
   wider than a 1920 px screen). The tools sit in nav.hdr-tabs, which is
   display:contents everywhere else, so touch and narrow layouts above are
   unchanged. */
.hdr-tabs{display:contents;}
@media (min-width:1101px) and (hover:hover){
  header{flex-wrap:wrap; row-gap:0; padding:10px 20px 0;}
  body:not(.logged-out) #headerActions{display:contents;}
  .brand{order:0;}
  #unitSearchWrap{order:1;}
  #layoutGuideWrap{order:2;}
  .session{order:3; margin-left:auto;}
  body:not(.logged-out) .hdr-tabs{
    order:4; flex:1 1 100%; display:flex; align-items:center; gap:4px;
    margin:10px -20px 0; padding:6px 20px; border-top:1px solid var(--line);
    overflow-x:auto; scrollbar-width:thin;
  }
  .hdr-tabs .hdr-btn{padding:6px 12px; font-size:14px;}
}
@media (min-width:1180px) and (hover:hover){
  .hdr-tabs .hdr-btn .hdr-label{display:inline;}
}

/* A guide card taller than the window scrolls; its buttons stay pinned to
   the bottom of the card so Next is always in reach (John, 2026-10-08,
   1094 x 365: Next was below the bottom and the card kept jumping back up). */
.tour-card .tour-actions{position:sticky; bottom:-12px; z-index:1; background:var(--surface);
  margin-bottom:-12px; padding:0 0 12px;}

/* "How is this figured?" (H66): a small "?" next to a figure, and its note. */
.explain-btn{display:inline-flex; align-items:center; justify-content:center; width:16px; height:16px; margin-left:5px;
  padding:0; border:1px solid var(--line); border-radius:50%; background:var(--surface); color:var(--ink-faint);
  font:700 10px/1 inherit; letter-spacing:0; text-transform:none; vertical-align:1px; cursor:pointer;}
.explain-btn:hover, .explain-btn:focus-visible, .explain-btn[aria-expanded="true"]{border-color:var(--accent); color:var(--accent);}
.explain-pop{position:fixed; z-index:1500; width:min(360px, calc(100vw - 16px)); background:var(--surface); color:var(--ink);
  border:1px solid var(--line); border-radius:10px; padding:12px 14px; box-shadow:0 10px 28px rgba(0,0,0,.22);
  font-size:13px; line-height:1.5;}
.explain-pop h4{margin:0 0 6px; font-size:13.5px;}
.explain-pop p{margin:0 0 6px;}
.explain-pop p:last-child{margin-bottom:0;}
@media (hover:none) and (pointer:coarse){ .explain-btn{width:22px; height:22px; font-size:12px;} }
/* In the numbers strip the "?" must not make its label taller than the others. */
.pstat-label .explain-btn{width:13px; height:13px; margin:-3px 0 -3px 4px; font-size:9px; vertical-align:middle;}
/* Estimates panel and Property performance headers (2026-10-26): the "?"
   sits after the label; never printed. */
.bo-est-table th .explain-btn, .perf-table th .explain-btn{margin-left:4px;}
@media print{ .explain-btn, .explain-pop{display:none !important;} }

/* Entered in error (H82): its badge, and the list at the bottom of the Closed tab. */
.wo-status-err{background:#ececec; color:#5b5b5b; text-decoration:line-through;}
.wo-voided{margin-top:14px; border-top:1px solid var(--line); padding-top:8px;}
.wo-voided summary{cursor:pointer; font-weight:600; font-size:13px; color:var(--ink-faint);}
.wo-voided-item{padding:8px 10px; margin-top:6px; border:1px dashed var(--line); border-radius:8px; font-size:12.5px;}
.wo-voided-what{font-weight:600; text-decoration:line-through; color:var(--ink-faint);}
.wo-voided-desc{color:var(--ink-faint); margin-top:2px;}
.wo-voided-why{margin-top:4px;}
.wo-voided-restore{margin-top:6px; font-size:12px; padding:4px 10px;}

/* ---- Compact layout for short screens (hit list H84, 2026-10-08) ----
   John at Russ's laptop window (1150 x 526): "man working that small is
   rough" -- the demo bar, the header and the numbers strip took 192 of 526
   pixels before the map started. Turns on by itself when the window is
   short (760 px or less inside the browser: a 1366 x 768 laptop or smaller) on a mouse-and-keyboard computer, and off again
   when it's taller; big monitors and tablets don't change. The buttons it
   adds (compactLayout.js) are hidden outside it. */
.stats-more{display:none;}
#sidebarToggle{display:none;}
@media (max-height:760px) and (hover:hover) and (min-width:769px){
  /* Demo bar: one slim line. */
  .demo-banner{padding:1px 12px; font-size:11px;}

  /* Header: tighter, and on a wide-enough window back to one row with
     icon-only tool buttons (their names show on hover). */
  header{padding-top:6px; padding-bottom:6px; row-gap:6px;}
  .brand-mark{width:28px; height:28px;}
  .brand-text .sub{display:none;}
  #logoutBtn{padding:6px 12px;}
}
@media (max-height:760px) and (hover:hover) and (min-width:1101px){
  header{padding:6px 16px;}
  body:not(.logged-out) .hdr-tabs{order:3; flex:0 1 auto; margin:0; padding:0; border-top:0; gap:4px; overflow:visible;}
  .session{order:4;}
  .hdr-tabs .hdr-btn{padding:6px 9px; font-size:15px;}
  .hdr-tabs .hdr-btn .hdr-label{display:none !important;}
}
@media (max-height:760px) and (hover:hover) and (min-width:769px){
  /* Numbers strip: each figure on one line ("5 BUILDINGS"); the small
     second lines ("$4,716,600 a year", "13% vacant"...) fold away behind
     "Details", which opens them again. */
  #portfolioStats{gap:4px 14px; padding:5px 16px; align-items:center;}
  #portfolioStats:not(.stats-open) .pstat{flex-direction:row; align-items:baseline; gap:4px;}
  #portfolioStats:not(.stats-open) .pstat-value{font-size:14px;}
  #portfolioStats:not(.stats-open) .pstat-label{font-size:9.5px; letter-spacing:.02em;}
  #portfolioStats:not(.stats-open) .pstat-sub{display:none;}
  /* Folded: short labels (data-short in index.html: "Sq ft", "Open jobs",
     "Rent/mo"...) so the strip stays one line on a small laptop with the
     "?" notes still there; the Services word comes back with Details (the
     status lights stay). */
  #portfolioStats:not(.stats-open) .pstat-label[data-short]{font-size:0; letter-spacing:0;}
  #portfolioStats:not(.stats-open) .pstat-label[data-short]::before{content:attr(data-short); font-size:9.5px; letter-spacing:.02em;}
  #portfolioStats:not(.stats-open) .svc-chip .pstat-label{display:none;}
  #portfolioStats.stats-open{align-items:flex-start;}
  .svc-lights{height:16px;}
  .stats-more{display:inline-flex; align-items:center; gap:4px; margin-left:auto; padding:2px 8px; font-size:11px;
    border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--ink-faint); cursor:pointer;}
  .stats-more:hover, .stats-more:focus-visible{color:var(--accent); border-color:var(--accent);}
  .stats-more + .svc-chip{margin-left:0;}

  /* Sidebar: a tab on the map's left edge folds it away, giving the map
     the full width; the same tab brings it back. */
  #sidebar{padding:12px 14px;}
}

/* ---- Fold the sidebar on any desktop window (H170, 2026-10-20; was H84's
   compact-only tab) ----
   The tab on the map's left edge shows on every window, phone width included (H172).
   Folded, the sidebar is not hidden but shrinks to a slim rail (40 px) with
   the word "Properties" up its side, so it's clear where the list went;
   a click anywhere on the rail opens it (compactLayout.js). The map is a
   flex sibling, so it takes the freed width. Click only, no hover-to-open. */
/* Easy to find (John, 2026-10-08: "I don't see the tab"): wide and tall,
   the arrow in the accent colour on a white tab with an accent edge. */
#sidebarToggle{display:flex; align-items:center; justify-content:center; position:absolute; left:0; top:50%;
  transform:translateY(-50%); z-index:15; width:24px; height:72px; padding:0; border:1.5px solid var(--accent); border-left:0;
  border-radius:0 10px 10px 0; background:var(--surface); color:var(--accent); font-size:28px; font-weight:700; line-height:1; padding-bottom:3px;
  cursor:pointer; box-shadow:2px 0 8px rgba(0,0,0,.18);}
#sidebarToggle:hover, #sidebarToggle:focus-visible{background:var(--accent); color:var(--accent-ink);}
#mapView.sidebar-folded #sidebar{width:40px; padding:0; overflow:hidden; cursor:pointer; position:relative;}
#mapView.sidebar-folded #sidebar > *{display:none;}
#mapView.sidebar-folded #sidebar::before{content:"Properties"; position:absolute; top:14px; left:0; right:0; text-align:center;
  writing-mode:vertical-rl; font-size:12px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--ink-faint);}
#mapView.sidebar-folded #sidebar:hover{background:var(--bg);}

/* ---- Color-blind-friendly colors (H86; colorMode.js) ----
   body.cb-colors swaps red / amber / green for blue / orange with clear
   light-to-dark steps. Worse = darker orange; fine = blue. Labels and
   counts stay as they are. Stacking Plan fills are set in stackingPlan.js. */
body.cb-colors .th-risk{background:#B35806; color:#FFFFFF;}
body.cb-colors .th-watch{background:#FDD49E; color:#4A2800;}
body.cb-colors .th-good{background:#CFE3F5; color:#0B3D66;}
body.cb-colors .th-strip-risk{border-left-color:#B35806;}
body.cb-colors .th-strip-watch{border-left-color:#F1A340;}
body.cb-colors .th-strip-good{border-left-color:#2B6CB0;}
body.cb-colors .wo-sev-critical{background:#B35806; color:#FFFFFF;}
body.cb-colors .wo-sev-high{background:#FDB863; color:#3D1F00;}
body.cb-colors .wo-sev-medium{background:#FFF1C1; color:#5A4500;}
body.cb-colors .wo-sev-low{background:#DCEBF7; color:#0B3D66;}
body.cb-colors .wo-item.wo-unassigned{border-color:#F1A340; border-left-color:#F1A340; box-shadow:0 0 0 1px #F1A340 inset;}
body.cb-colors .wo-item.wo-unassigned-late{border-color:#B35806; border-left-color:#B35806; box-shadow:0 0 0 1px #B35806 inset;}
body.cb-colors .wo-unassigned-flag{background:#FDD49E; color:#4A2800;}
body.cb-colors .wo-unassigned-late .wo-unassigned-flag{background:#B35806; color:#FFFFFF;}
body.cb-colors .bo-bad .bo-dot, body.cb-colors .tour-dot-bad{background:#B35806;}
body.cb-colors .bo-warn .bo-dot, body.cb-colors .tour-dot-warn{background:#F6C04E;}
body.cb-colors .bo-ok .bo-dot, body.cb-colors .tour-dot-good{background:#2B6CB0;}
body.cb-colors .svc-green, body.cb-colors .usage-green{background:#2B6CB0;}
body.cb-colors .svc-yellow, body.cb-colors .usage-amber{background:#F6C04E;}
body.cb-colors .svc-orange{background:#E08214;}
body.cb-colors .svc-red, body.cb-colors .usage-red{background:#7F3B08;}
/* The switch: a checkbox item in the account menu, and a text button under color keys. */
.account-menu button[role="menuitemcheckbox"]::before{content:""; display:inline-block; width:14px; margin-right:4px;}
.account-menu button[role="menuitemcheckbox"][aria-checked="true"]::before{content:"\2713";}
.cb-toggle{background:none; border:0; padding:0; font-size:12px; font-weight:600; color:var(--accent); text-decoration:underline; cursor:pointer;}
/* Overview card narrowed by a filter or an open unit (H92): what's left out, and the way back. */
.bo-narrow{display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 10px; margin-top:5px; padding:5px 8px; border-radius:7px; background:var(--bg); font-size:12px; color:var(--ink-faint);}
.bo-narrow .bo-link{grid-column:auto;}
/* Vendor Contacts grouped by trade (H91). */
#mepList .mep-trade-head{font-size:11px; letter-spacing:.04em; text-transform:uppercase; color:var(--ink-faint); font-weight:700; margin:12px 0 6px; font-family:inherit;}
#mepList .mep-trade-head:first-child{margin-top:0;}
/* H256: trade headings fold their vendors away; each vendor is one line until tapped open. */
#mepList .mep-trade-toggle{all:unset; cursor:pointer; display:flex; align-items:center; gap:6px; width:100%; padding:4px 0; font:inherit; letter-spacing:inherit; text-transform:inherit; color:inherit;}
#mepList .mep-trade-toggle::before{content:"▾"; font-size:10px; width:10px;}
#mepList .mep-trade-toggle[aria-expanded="false"]::before{content:"▸";}
#mepList .mep-trade-toggle:focus-visible{outline:2px solid var(--accent); outline-offset:2px; border-radius:4px;}
#mepList .mep-item{padding:0; margin-bottom:6px;}
#mepList .mep-row{display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:4px 10px; padding:9px 11px; min-height:24px; cursor:pointer; border-radius:8px;}
#mepList .mep-row:hover{background:var(--panel, rgba(0,0,0,.03));}
#mepList .mep-row:focus-visible{outline:2px solid var(--accent); outline-offset:-2px;}
#mepList .mep-row .mep-top{margin:0; min-width:0; overflow:hidden; text-overflow:ellipsis;}
#mepList .mep-row .mep-top::before{content:"▸"; display:inline-block; width:12px; color:var(--ink-faint); font-weight:400;}
#mepList .mep-open .mep-row .mep-top::before{content:"▾";}
#mepList .mep-row .mep-place{font-weight:400; color:var(--ink-faint);}
#mepList .mep-row-bits{display:flex; flex-wrap:wrap; align-items:center; gap:4px 10px; font-size:11.5px; color:var(--ink-faint);}
#mepList .mep-phone{display:inline-block; line-height:16px; color:var(--accent); font-weight:600; text-decoration:none; padding:4px 0; white-space:nowrap;}
#mepList .mep-phone:hover{text-decoration:underline;}
#mepList .mep-phone-none{color:#a7671e; font-weight:600;}
#mepList .mep-badge{padding:1px 7px; border-radius:10px; font-size:11px; font-weight:600; white-space:nowrap;}
#mepList .mep-badge-ok{background:#e4efec; color:#1d4a3e;}
#mepList .mep-badge-none{background:#eef0ed; color:#5b6159;}
#mepList .mep-badge-warn{background:#fbeedd; color:#8a4b00;}
#mepList .mep-badge-bad{background:#f8e1de; color:#8c2318;}
body.cb-colors #mepList .mep-badge-warn{background:#FDD49E; color:#4A2800;}
body.cb-colors #mepList .mep-badge-bad{background:#B35806; color:#fff;}
#mepList .mep-confirmed{white-space:nowrap;}
#mepList .mep-detail{padding:0 11px 9px 23px;}
#mepList .mep-detail[hidden]{display:none;}
@media (max-width:480px){
  /* H256 follow-up: on a phone the vendor window lost 96px of a 390px screen
     to padding, so a long second line ("phone · COI expiring · Confirmed
     9/24/26") wrapped to a third line with wider fonts (the nightly run on
     Ubuntu 26). Less padding here, and the second line never wraps: if it
     still doesn't fit, only the Confirmed date is cut short with "…". */
  #mepModal.modal-overlay{padding:10px;}
  #mepModal .modal-card{padding:20px 14px;}
  #mepModal .modal-head{margin:-20px -14px 14px; padding:20px 14px 10px;}
  #mepList .mep-row{padding:7px 9px;}
  #mepList .mep-row-bits{gap:2px 7px; font-size:11px; flex-wrap:nowrap; min-width:0; max-width:100%;}
  #mepList .mep-row-bits > *{flex-shrink:0;}
  #mepList .mep-row-bits > .mep-confirmed{flex-shrink:1; min-width:0; overflow:hidden; text-overflow:ellipsis;}
  #mepList .mep-badge{padding:1px 5px; font-size:10.5px;}
  #mepList .mep-detail{padding:0 9px 8px 21px;}
}
/* The company's legal name (H97, LLC approved 2026-10-09): small, on the sign-in page and on printed reports only. */
.pitch-legal{font-size:11.5px; color:var(--ink-faint); margin:10px 0 0;}
.print-legal{display:none;}
@media print {
  body.printing-report .print-legal{display:block; margin:16pt 0 0; font-size:8.5pt; color:#666;}
}
/* Likely turnover cost under the lease date in the unit panel (H90). */
#editPanel .eu-turnover{color:var(--ink);}
#editPanel .eu-turnover.eu-turnover-none{color:var(--ink-faint); font-style:italic;}

.wo-add-photos{margin:2px 0 6px;}
.wo-add-photos-label{font-size:12px; letter-spacing:.03em; text-transform:uppercase; color:var(--ink-faint); font-weight:600; margin-top:6px;}
.bf-card .photo-strip{margin-top:8px;}
/* "N characters left" under a limited text box (H124, utils.js limitBox) */
.char-count{font-size:11px; color:var(--ink-faint); margin:2px 0 8px; text-align:right;}
.char-count.char-count-low{color:#7a4c00; font-weight:700;}
body.cb-colors .char-count.char-count-low{color:#4A2800;}

/* A panel open on the right of the map must have nothing drawn on it (H161). The Edit Unit panel
   (#editPanel) is the only one that opens on the right; building, Safety & Systems, tenant, work
   order and inspection windows open in the middle (.modal-overlay). While it is open the map's
   top-right buttons (Measure, Layers, and the Layers list or measuring tool under them) and the
   Feedback button move to sit just left of it, and go back when it closes. The panel stays full
   height, and scrolls when it is taller than the map. No new animation: the panel itself has none.
   The SDK corner has its own 15 px inset, so 12 px here leaves 15 px between the buttons and the panel.
   Only on a window 1040 px wide and up (H172): with the sidebar open the map is then at least 780 px, room for
   the panel (440), the buttons and an open Layers list. On a narrower window the corner stays where it is, under
   the panel, and the panel takes the map's whole width (see the end of this block). */
@media (min-width:1040px){
  #mapContainer:has(#editPanel:not([hidden])) .esri-ui-top-right{right:calc(var(--rp-w) + 12px);}
}
/* On a narrow desktop window (about 1100 px and under) the panel leaves too little room for the
   overview card (up to 460 px wide, z-index 15), which would then sit over the moved buttons. The SDK
   layer goes just above the card (16) while the panel is open, still under the panel (20). :where()
   keeps this weaker than the popup lift (35, H156) above, which must still win. */
#mapContainer:has(:where(#editPanel:not([hidden]))) .esri-ui{z-index:16;}
@media (min-width:1040px){
  body:has(#editPanel:not([hidden])) .feedback-btn{right:calc(var(--rp-w) + 28px);}
  body:has(#editPanel:not([hidden])) .feedback-panel{right:calc(var(--rp-w) + 28px);}
}
/* Narrow window (H172): nothing is moved off the map. The Edit Unit panel covers the map's width (the Layers and
   Measure buttons wait under it; close the panel to use them), and leaves room at its foot for the Feedback button. */
@media (max-width:1039px){
  #editPanel{left:12px; width:auto; padding-bottom:72px;}
}

/* ---- Layers / Measure buttons (cornerButtons.js, H172) ----
   One column, first in the corner, so the buttons stay put while a panel opens under them. The SDK gives every
   corner item a 10 px gap below; the column keeps it between the buttons and drops it after the last one. */
.map-tool-buttons{display:flex; flex-direction:column; align-items:flex-end;}
.map-tool-buttons > :last-child{margin-bottom:0;}

/* H89: Getting in -- the unit panel's ways in, a job's summary in Updates, a Tenant's visit instructions. */
.acc-box .acc-head h4{margin:0 0 2px; font-size:13px;}
.acc-hint{margin:0 0 6px;}
.acc-item{border:1px solid var(--line, #ddd); border-radius:6px; padding:6px 8px; margin:4px 0; font-size:12.5px;}
.acc-top{display:flex; gap:8px; align-items:baseline; flex-wrap:wrap;}
.acc-level{font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:#555;}
.acc-kind{font-weight:600;}
.acc-code{font-family:ui-monospace, Menlo, Consolas, monospace; font-weight:700; background:#f1f3f0; padding:0 6px; border-radius:4px;}
.acc-where, .acc-details{margin-top:2px;}
.acc-meta{margin-top:2px; font-size:11.5px; color:#555;}
.acc-due{margin-top:4px; padding:4px 6px; border-radius:4px; background:#fdf0d5; color:#4a2800; font-size:12px; font-weight:600;}
.acc-acts{display:flex; gap:6px; margin-top:4px; flex-wrap:wrap;}
.acc-btn{font-size:11.5px; padding:2px 8px;}
.acc-empty{font-size:12px; color:#555; margin:4px 0;}
.acc-form{border:1px solid var(--line, #ddd); border-radius:6px; padding:8px; margin:6px 0; display:flex; flex-direction:column; gap:6px; font-size:12.5px;}
.acc-field{display:flex; flex-direction:column; gap:2px; font-weight:600;}
.acc-field input[type=text], .acc-field select{font-weight:normal;}
.acc-change{flex-direction:row; align-items:center; gap:4px; font-weight:normal;}
.wo-visit-box{border:1px solid var(--line, #ddd); border-radius:8px; padding:8px 10px; margin:0 0 10px; background:#fbfaf6;}
.wo-visit-head{font-weight:700; font-size:12.5px; margin-bottom:4px;}
.wo-visit-flags{display:flex; gap:6px; flex-wrap:wrap; margin-bottom:4px;}
.wo-visit-flag{background:#fdf0d5; color:#4a2800; border-radius:999px; padding:1px 8px; font-size:11.5px; font-weight:600;}
.wo-visit-row{display:flex; gap:8px; align-items:baseline; flex-wrap:wrap; font-size:12px; margin:2px 0;}
.wo-visit-level{font-size:10.5px; text-transform:uppercase; letter-spacing:.04em; color:#555;}
.wo-visit-kind{font-weight:600;}
.wo-visit-code{font-family:ui-monospace, Menlo, Consolas, monospace; font-weight:700; background:#f1f3f0; padding:0 6px; border-radius:4px;}
.wo-visit-more{color:#444;}
.wo-visit-note{font-size:11px; color:#666; margin-top:4px;}
.tv-box{border:1px solid var(--line, #ddd); border-radius:8px; padding:8px 10px; margin:8px 0;}
.tv-head{margin:0 0 4px; font-size:13px;}
.tv-flags{display:flex; gap:12px; flex-wrap:wrap; margin:4px 0;}
.tv-flag{font-weight:normal; display:inline-flex; gap:4px; align-items:center; font-size:12.5px;}
.tv-note-label{display:flex; flex-direction:column; gap:2px; font-size:12px; font-weight:600; margin-top:6px;}
.tv-note{font-weight:normal;}
.tv-acts{display:flex; gap:8px; align-items:center; margin-top:6px;}
.tv-saved{font-size:12px; color:#2f6f5e;}
/* H250: the New work order form names its building; a draft left on another building says so */
.wo-draft-place{margin:0 0 10px; font-size:13px; color:var(--ink);}
.wo-draft-elsewhere{margin:0 0 12px; padding:10px 12px; border:1px solid #e3c48a; border-left:4px solid #b7791f; border-radius:8px; background:#fdf6e7; color:#5c4210; font-size:13px;}
.wo-draft-elsewhere p{margin:0 0 8px;}
.wo-draft-elsewhere-actions{display:flex; flex-wrap:wrap; gap:8px;}
.wo-draft-elsewhere-actions button{font-size:13px; padding:6px 10px;}
.wo-draft-start-over{background:var(--accent); border-color:var(--accent); color:var(--accent-ink);}
/* H198: the demo's "What kind of properties do you manage?" */
.demo-picker-list{border:0; margin:10px 0 0; padding:0; display:flex; flex-direction:column; gap:6px;}
.demo-picker-row{display:flex; gap:10px; align-items:flex-start; padding:8px 10px; margin:0; border:1px solid var(--line); border-radius:8px; cursor:pointer; text-transform:none; letter-spacing:normal; font-size:14px; color:var(--ink);}
.demo-picker-row:has(input:checked){border-color:var(--accent); background:#eaf2ef;}
.demo-picker-row input{margin-top:3px; width:18px; height:18px; flex:none;}
.demo-picker-row span{display:flex; flex-direction:column;}
.demo-picker-row small{font-size:12px; color:var(--ink-faint);}
.demo-picker-error{color:#a3341f; font-size:13px; margin:8px 0 0;}
.demo-welcome-actions button:disabled{opacity:.55; cursor:not-allowed;}
#demoPickerChangeWrap a{color:var(--accent); font-weight:600;}
/* H254: "Not known" under a Move-in date (Add tenant, the unit panel). */
.move-unknown{display:flex; align-items:center; gap:6px; margin-top:4px; text-transform:none; letter-spacing:normal; font-weight:400; font-size:12px; color:var(--ink);}
.move-unknown[hidden]{display:none;}
.move-unknown input{width:auto; margin:0;}

  /* ---- Work Orders on the Map (H276) ---- */
  .wom-card{max-width:1100px;}
  .wom-controls{display:flex; flex-wrap:wrap; gap:10px; align-items:center;}
  .wom-back{font-size:13px;}
  .wom-seg{display:inline-flex; border:1px solid var(--line, #cfcabb); border-radius:8px; overflow:hidden;}
  .wom-seg-btn{border:none; border-radius:0; padding:6px 12px; font-size:13px; background:var(--surface); color:var(--ink); cursor:pointer;}
  .wom-seg-btn + .wom-seg-btn{border-left:1px solid var(--line, #cfcabb);}
  .wom-seg-btn[aria-pressed="true"]{background:var(--accent); color:var(--accent-ink);}
  .wom-range{display:inline-flex; gap:10px; align-items:center; font-size:13px;}
  .wom-range[hidden]{display:none;}
  .wom-range input{font:inherit; padding:4px 6px; border:1px solid var(--line, #cfcabb); border-radius:6px;}
  .wom-summary{margin:10px 0 6px; font-size:14px; font-weight:600;}
  .wom-floors{display:flex; flex-wrap:wrap; gap:6px; margin:6px 0 10px;}
  .wom-floor-btn{font-size:12px; padding:5px 10px;}
  .wom-floor-btn[aria-pressed="true"]{background:var(--accent); color:var(--accent-ink); border-color:var(--accent);}
  .wom-main{display:grid; grid-template-columns:minmax(0,1.7fr) minmax(260px,1fr); gap:16px; align-items:start;}
  .wom-stack .wom-main{grid-template-columns:minmax(0,1fr);}
  .wom-draw{border:1px solid var(--line, #d8d4c6); border-radius:10px; background:#faf9f5; min-height:120px;}
  .wom-svg{display:block; width:100%; height:auto;}
  .wom-hint{padding:10px 12px; font-size:13px; color:var(--ink-faint); margin:0;}
  .wom-stack .wom-svg{max-height:300px;}
  .wom-note{margin:0 0 8px; padding:8px 10px; border-left:4px solid #8a6d00; background:#fbf3d6; color:#4a3a00; font-size:13px; font-weight:600;}
  .wom-footprint{fill:#ecebe3; stroke:#b8b5aa; stroke-width:1;}
  .wom-outline{stroke-width:3;}
  .wom-floorline{fill:none; stroke:#6b675c; stroke-width:1.5;}
  .wom-count{font-size:15px; font-weight:800;}
  .wom-count-big{font-size:34px;}
  .wom-count-sm{font-size:11px;}
  .wom-roomno{font-size:10px; font-weight:600;}
  .wom-halo{paint-order:stroke; stroke-width:3px; stroke-linejoin:round;}
  .wom-name{font-size:11px; font-weight:700; fill:#1c2530; paint-order:stroke; stroke:#fff; stroke-width:3px; stroke-linejoin:round;}
  .wom-tagtext{font-size:12px; font-weight:700;}
  .wom-leader{stroke:#7b776b; stroke-width:1.2; stroke-dasharray:3 3;}
  .wom-onmap{font-size:13px; font-weight:600; margin-left:auto;}
  /* ---- Work orders overlay on the real map (H278, docked in H280) ----
     Desktop (1000 px and wider; the map is then 740 px or more, room for the panel and the card): docked on the right of the map at its full height, about 400 px wide, the way the
     Edit Unit panel sits. Header and controls stay put; the building / job list takes the rest of the height and
     scrolls on its own. Who wins when they meet (H280): the Edit Unit panel. While it is open this panel steps aside
     (it comes back, as it was, when the Edit panel closes); the map's top-right buttons and the Feedback button move
     left of this panel the way they do for the Edit panel (1040 px and up); the building overview card is narrowed
     so it never reaches under this panel. Narrower (phones, small tablets): a bottom sheet, as in H278. */
  :root{--wom-w:min(400px, calc(100% - 24px));}
  .wom-panel{position:absolute; top:12px; right:12px; bottom:12px; z-index:14; width:var(--wom-w);
    display:flex; flex-direction:column; background:var(--surface); color:var(--ink); border:1px solid var(--line); border-radius:12px;
    box-shadow:0 6px 22px rgba(0,0,0,.22); font-size:12.5px; overflow:hidden;}
  .wom-panel[hidden]{display:none;}
  .wom-panel.wom-folded{top:auto; bottom:28px;}   /* folded: a small bar at the bottom right, the map's top-right buttons stay clear */
  .wom-panel-head{flex:none; display:flex; align-items:center; justify-content:space-between; padding:8px 10px 6px 14px; font-size:13px;}
  .wom-panel-fold{border:1px solid var(--line); background:var(--surface); color:var(--ink); border-radius:6px; width:28px; height:26px; font-size:16px; line-height:1; cursor:pointer;}
  .wom-panel-body{flex:1 1 auto; min-height:0; display:flex; flex-direction:column;}
  .wom-panel-body[hidden]{display:none;}
  .wom-panel-top{flex:none; max-height:55%; overflow:auto; padding:0 12px 8px; display:flex; flex-direction:column; gap:6px; border-bottom:1px solid var(--line);}
  .wom-panel-top > *{flex:none;}   /* the buttons have overflow:hidden; in a short panel the top scrolls instead of squeezing them to nothing */
  .wom-panel-scroll{flex:1 1 auto; min-height:0; overflow:auto; padding:8px 14px;}
  .wom-panel-scroll .wom-buildings{margin-bottom:8px;}
  .wom-panel-foot{flex:none; display:flex; gap:8px; padding:8px 14px 10px; border-top:1px solid var(--line);}
  .wom-panel-foot button{font-size:13px;}
  .wom-panel-top .wom-back{align-self:flex-start;}
  .wom-ctl{display:inline-flex; align-items:center; gap:6px; font-size:12px; color:var(--ink-faint);}
  .wom-ctl select{font:inherit; font-size:12px; color:var(--ink); padding:4px 6px; border:1px solid var(--line); border-radius:6px; background:var(--surface);}
  .wom-ctl-row{display:flex; gap:12px; align-items:center; flex-wrap:wrap;}   /* Period and Show on one row (wraps only if the panel is squeezed) */
  .wom-panel .wom-seg-btn{padding:5px 6px; font-size:12px; white-space:nowrap;}
  .wom-panel .wom-summary{margin:2px 0; font-size:13px;}
  .wom-panel .wom-floors{margin:0;}
  .wom-panel .wom-key{margin-top:0; gap:4px 6px; font-size:10.5px;}
  .wom-panel .wom-key-item{white-space:nowrap; gap:3px;}
  .wom-panel .wom-swatch{width:11px; height:11px; border-width:1.5px;}
  .wom-panel-focus{margin:0; font-size:12px; color:var(--ink-faint);}
  .wom-pick-close{font-size:12px; margin:4px 0;}
  .wom-panel .wom-jobs{max-height:none; overflow:visible;}   /* the panel's own list scrolls, not each job list inside it */
  /* The Edit Unit panel wins: this panel steps aside while it is open. */
  #mapContainer:has(#editPanel:not([hidden])) .wom-panel{display:none;}
  @media (min-width:1000px){
    /* the building overview card keeps off this panel (it is up to 460 px wide, 56 px in from the left; the map is the window less the 260 px sidebar) */
    body:has(#womPanel:not([hidden]):not(.wom-folded)):not(:has(#editPanel:not([hidden]))) .bo-card{width:auto; min-width:220px; max-width:min(460px, calc(100% - 56px - 412px - 56px));}
  }
  @media (min-width:1040px){
    #mapContainer:has(#womPanel:not([hidden]):not(.wom-folded)):not(:has(#editPanel:not([hidden]))) .esri-ui-top-right{right:calc(var(--wom-w) + 12px);}
    body:has(#womPanel:not([hidden]):not(.wom-folded)):not(:has(#editPanel:not([hidden]))) .feedback-btn{right:calc(min(400px, 100vw) + 28px);}
    body:has(#womPanel:not([hidden]):not(.wom-folded)):not(:has(#editPanel:not([hidden]))) .feedback-panel{right:calc(min(400px, 100vw) + 28px);}
  }
  /* Under 1000 px the map (window less the sidebar) is too narrow for the panel and the overview card side by side: a bottom sheet, as on a phone. */
  @media (max-width:999px){
    .wom-panel{left:8px; right:8px; width:auto; top:auto; bottom:24px; max-height:50%;}
    .wom-panel.wom-folded{bottom:24px;}
    body:has(#womPanel:not([hidden]):not(.wom-folded)) .bo-card{max-height:calc(44% - 12px);}
  }
  .wom-mark, .wom-room, .wom-point, .wom-unit[data-pick]{cursor:pointer;}
  .wom-wall{cursor:default;}
  .wom-room:hover path, .wom-room:focus path, .wom-room.wom-picked path{stroke:#111; stroke-width:3;}
  .wom-mark:hover circle, .wom-mark:focus circle, .wom-point:hover polygon, .wom-point:focus polygon{stroke:#111;}
  .wom-room:focus, .wom-mark:focus, .wom-point:focus, .wom-unit:focus{outline:none;}
  .wom-unit[data-pick]:hover, .wom-unit:focus, .wom-unit.wom-picked{stroke:#111; stroke-width:5;}
  .wom-key{display:flex; flex-wrap:wrap; gap:6px 14px; margin-top:10px; font-size:12px; color:var(--ink-faint); align-items:center;}
  .wom-key-title{font-weight:700; color:var(--ink);}
  .wom-key-item{display:inline-flex; align-items:center; gap:6px;}
  .wom-key-note{flex-basis:100%;}
  .wom-swatch{display:inline-block; width:14px; height:14px; border-radius:3px; border:2px solid #999; flex:none;}
  .wom-list-title{margin:0 0 6px; font-size:14px;}
  .wom-buildings{list-style:none; margin:0 0 12px; padding:0; display:flex; flex-direction:column; gap:4px;}
  .wom-line{display:flex; align-items:center; gap:8px; width:100%; text-align:left; padding:6px 8px; font-size:13px;}
  .wom-line[aria-pressed="true"]{outline:2px solid var(--accent);}
  .wom-line-name{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis;}
  .wom-line-n{font-weight:800; min-width:26px; text-align:right;}
  .wom-line-n-first{text-align:left;}
  .wom-jobs{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; max-height:46vh; overflow-y:auto;}
  .wom-job{border:1px solid var(--line, #d8d4c6); border-radius:8px; padding:8px 10px; font-size:13px;}
  .wom-job-top{display:flex; justify-content:space-between; gap:8px; align-items:center;}
  .wom-job-date{font-weight:700;}
  .wom-job-what{margin-top:2px;}
  .wom-job-meta{margin-top:2px; font-size:12px; color:var(--ink-faint);}
  .wom-job-open{margin-top:6px; font-size:12px; padding:4px 10px;}
  .wom-flash{animation:womflash 2.4s ease-out 1;}
  @keyframes womflash{0%,60%{box-shadow:0 0 0 4px #1f5f8f;} 100%{box-shadow:0 0 0 0 transparent;}}
  @media (max-width:760px){ .wom-main{grid-template-columns:minmax(0,1fr);} }

/* COI chip on an open job's "Assigned:" line (2026-11-03): same colors as
   the Vendor Contacts badge. */
.wo-item .wo-assigned .wo-coi-chip{display:inline-block; margin-left:6px; padding:0 7px; border-radius:10px; font-size:10.5px; font-weight:600; line-height:16px; vertical-align:1px; white-space:nowrap; cursor:help;}
.wo-item .wo-assigned .wo-coi-none{background:#fbeedd; color:#8a4b00;}
.wo-item .wo-assigned .wo-coi-warn{background:#fbeedd; color:#8a4b00;}
.wo-item .wo-assigned .wo-coi-bad{background:#f8e1de; color:#8c2318;}
body.cb-colors .wo-item .wo-assigned .wo-coi-none,
body.cb-colors .wo-item .wo-assigned .wo-coi-warn{background:#FDD49E; color:#4A2800;}
body.cb-colors .wo-item .wo-assigned .wo-coi-bad{background:#B35806; color:#fff;}

/* ---- Keyboard focus (H311 PR A, WCAG 2.4.7 / 1.4.11 / 2.4.1) ----
   One ring for everything the keyboard can land on: a 3 px dark-blue line with a 2 px white halo inside it, so it
   reads on the light portal and on dark aerial photos alike. :focus-visible, not :focus, so a mouse click
   doesn't draw it. !important because the ArcGIS theme, the browser and some older rules set their own outlines
   (or none) with more weight than a shared rule would have. Dark ring #0a2a66 is 14:1 on white. */
:root{--focus-dark:#0a2a66; --focus-light:#fff;}
:focus-visible:not(.esri-view-surface){
  outline:3px solid var(--focus-dark) !important; outline-offset:2px !important; box-shadow:0 0 0 2px var(--focus-light) !important;
}
/* The map's own buttons (zoom, Measure, Layers, the Measure bar, the basemap switch): the ring goes INSIDE them,
   because they sit flush against each other and a ring outside would be covered by the next one. */
.esri-ui .esri-widget--button:focus-visible, .esri-ui .esri-widget:focus-visible, .esri-ui .esri-interactive:focus-visible,
.measure-toolbar button:focus-visible, .basemap-switch button:focus-visible{
  outline:3px solid var(--focus-dark) !important; outline-offset:-3px !important; box-shadow:inset 0 0 0 6px var(--focus-light) !important;
}
/* The map itself takes the keyboard (arrow keys pan). Esri draws a thin 2 px brand-blue line on it, and also for a
   mouse click; here it is the same strong ring, inside the edge of the map, and only for the keyboard. */
#mapContainer .esri-view-surface:focus:not(:focus-visible)::after{outline:none;}
#mapContainer .esri-view-surface:focus-visible::after{
  outline:4px solid var(--focus-dark); outline-offset:-4px; box-shadow:inset 0 0 0 8px var(--focus-light);
}
@media (forced-colors:active){
  :focus-visible, #mapContainer .esri-view-surface:focus-visible::after{outline:3px solid Highlight !important;}
}
/* Skip links: the first stops of the Tab order, above everything, only while focused. */
.skip-links{position:fixed; top:0; left:0; z-index:100000;}
.skip-link{
  position:fixed; top:10px; left:10px; transform:translateY(-300%); padding:10px 16px; border-radius:8px;
  background:var(--surface); color:var(--focus-dark); font-size:14px; font-weight:700; text-decoration:none;
  border:2px solid var(--focus-dark);
}
.skip-link:focus{transform:none;}
body.logged-out .skip-links{display:none;}
@media print{.skip-links{display:none;}}

/* ---- Keyboard order (H311 PR B) ----
   Read by a screen reader, not drawn (the Properties list's instructions). */
.sr-only{position:absolute; width:1px; height:1px; margin:-1px; padding:0; border:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap;}
/* mapTabOrder.js puts the map's controls in front of the map surface in the page; they keep painting above it. */
.esri-view-root > .esri-ui.tab-first{z-index:1;}
/* headerOrder.js moves the account block into #headerActions on a wide window; its menu is not a header button
   (the nowrap / no-shrink rule above is for the tool buttons). */
#headerActions .account-menu button{white-space:normal;}
/* "Discard your changes?" when Esc leaves a nested view with typing in it (windowFocus.js, H311 PR C). Above every window. */
.discard-ask{position:fixed; inset:0; z-index:100001; background:rgba(28,35,31,.4); display:flex; align-items:center; justify-content:center; padding:24px;}
.discard-card{background:var(--surface); border-radius:12px; padding:18px 22px; max-width:340px; box-shadow:0 12px 32px rgba(0,0,0,.22);}
.discard-card p{margin:0 0 6px; font-weight:600; color:var(--ink);}
