/* Build Pro prototype — mobile-first, plain contractor language, big touch targets. */
:root{
  --navy:#14213d; --navy2:#1d2f57; --amber:#f5a623; --amber-d:#d98e04;
  --ink:#1c2333; --mut:#5b6478; --line:#dde2ec; --bg:#eef1f6; --card:#fff;
  --green:#1e8e4f; --green-bg:#e5f4ec; --red:#c0392b; --red-bg:#fbeae7;
  --blue:#2456a6; --blue-bg:#e7eefb; --amber-bg:#fdf1da; --radius:14px;
}
*{box-sizing:border-box; -webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0}
body{background:#d7dce6;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;color:var(--ink)}
#phone{max-width:480px;margin:0 auto;background:var(--bg);min-height:100vh;display:flex;flex-direction:column;box-shadow:0 0 32px rgba(20,33,61,.25);position:relative}
@media (min-width:520px){ #phone{border-left:1px solid #b9c1d1;border-right:1px solid #b9c1d1} }

#topbar{background:var(--navy);color:#fff;padding:14px 16px 12px;position:sticky;top:0;z-index:30}
#topbar-title{font-size:19px;font-weight:800;letter-spacing:.2px}
#topbar-company{font-size:12.5px;color:#c9d3e8;margin-top:2px}
.proto-badge{background:var(--amber);color:#231a00;font-size:10px;font-weight:800;padding:2px 6px;border-radius:6px;vertical-align:3px;letter-spacing:.6px}

main{flex:1;padding:14px 14px 96px}
h1{font-size:21px;margin:2px 0 10px}
h2{font-size:16.5px;margin:20px 0 8px}
h3{font-size:14.5px;margin:14px 0 6px}
p{line-height:1.45}
.small{font-size:12.5px;color:var(--mut)}
.mut{color:var(--mut)}
.backlink{display:inline-block;margin-bottom:10px;color:var(--blue);text-decoration:none;font-weight:600;font-size:14.5px;min-height:32px}

.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:14px;margin-bottom:12px}
.card.tappable{cursor:pointer}
.card.tappable:active{background:#f4f7fc}
.row{display:flex;align-items:center;gap:10px}
.row.between{justify-content:space-between}
.row.wrap{flex-wrap:wrap}
.grow{flex:1;min-width:0}
.title{font-weight:700;font-size:15.5px}
.sub{font-size:13px;color:var(--mut);margin-top:2px;line-height:1.4}
.money{font-weight:800;font-size:15.5px;white-space:nowrap}

.tiles{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:6px}
.tile{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:12px;text-decoration:none;color:var(--ink);display:block}
.tile .num{font-size:24px;font-weight:800}
.tile .lbl{font-size:12.5px;color:var(--mut);margin-top:1px;line-height:1.3}
.tile.alert .num{color:var(--red)}

.chip{display:inline-block;font-size:11.5px;font-weight:700;padding:3px 8px;border-radius:999px;letter-spacing:.2px;white-space:nowrap}
.chip.gray{background:#e8ebf2;color:#45506a}
.chip.blue{background:var(--blue-bg);color:var(--blue)}
.chip.green{background:var(--green-bg);color:var(--green)}
.chip.amber{background:var(--amber-bg);color:#8a5c00}
.chip.red{background:var(--red-bg);color:var(--red)}

.btn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:50px;border:0;border-radius:12px;
  background:var(--navy);color:#fff;font-size:16px;font-weight:700;cursor:pointer;padding:12px 14px;text-decoration:none;text-align:center}
.btn:active{background:var(--navy2)}
.btn.primary{background:var(--amber);color:#231a00}
.btn.primary:active{background:var(--amber-d)}
.btn.green{background:var(--green)}
.btn.ghost{background:#fff;color:var(--navy);border:1.5px solid var(--navy)}
.btn.danger-ghost{background:#fff;color:var(--red);border:1.5px solid var(--red)}
.btn.small{min-height:42px;font-size:14.5px;width:auto;padding:8px 14px;display:inline-flex}
.btn[disabled]{opacity:.45;pointer-events:none}
.btnrow{display:flex;gap:10px;margin:12px 0}
.btnrow .btn{flex:1}
.stack>*{margin-bottom:10px}

label.flabel{display:block;font-size:13px;font-weight:700;margin:12px 0 5px}
input[type=text],input[type=tel],input[type=email],input[type=number],input[type=date],textarea,select{
  width:100%;min-height:48px;border:1.5px solid var(--line);border-radius:10px;padding:11px 12px;font-size:16px;background:#fff;color:var(--ink);font-family:inherit}
textarea{min-height:74px;resize:vertical}
input:focus,textarea:focus,select:focus{outline:2px solid var(--blue);border-color:var(--blue)}

/* loop stepper — the one connected record */
.stepper{display:flex;gap:0;margin:6px 0 2px}
.step{flex:1;text-align:center;position:relative}
.step .dot{width:26px;height:26px;border-radius:50%;background:#cfd6e4;color:#fff;font-size:13px;font-weight:800;margin:0 auto;display:flex;align-items:center;justify-content:center;position:relative;z-index:2}
.step.done .dot{background:var(--green)}
.step.now .dot{background:var(--amber);color:#231a00;box-shadow:0 0 0 4px var(--amber-bg)}
.step .slbl{font-size:10.5px;color:var(--mut);margin-top:4px;font-weight:600}
.step.done .slbl{color:var(--green)}
.step::before{content:"";position:absolute;top:13px;left:-50%;width:100%;height:3px;background:#cfd6e4;z-index:1}
.step:first-child::before{display:none}
.step.done::before{background:var(--green)}

/* estimate / invoice lines */
.lgroup{margin-bottom:6px}
.lgroup h3{display:flex;justify-content:space-between;align-items:baseline}
.litem{display:flex;gap:8px;padding:9px 0;border-bottom:1px dashed var(--line)}
.litem:last-child{border-bottom:0}
.litem .grow{min-width:0}
.litem .lname{font-weight:600;font-size:14.5px}
.litem .ldesc{font-size:12.5px;color:var(--mut);line-height:1.4;margin-top:1px}
.flagbox{background:var(--red-bg);border:1px solid #eec5bf;color:#7c2418;border-radius:10px;padding:9px 11px;font-size:12.5px;line-height:1.45;margin-top:6px}
.totals{border-top:2px solid var(--line);margin-top:10px;padding-top:10px}
.totals .row{justify-content:space-between;padding:3px 0;font-size:14.5px}
.totals .grand{font-size:18px;font-weight:800}

/* customer-facing documents */
.doc{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:18px 16px}
.doc .dochead{border-bottom:3px solid var(--navy);padding-bottom:10px;margin-bottom:12px}
.doc .dochead .co{font-size:18px;font-weight:800}
.sim-banner{background:#231a00;color:var(--amber);font-weight:800;font-size:12px;letter-spacing:.8px;text-align:center;padding:8px;border-radius:10px;margin-bottom:12px}

/* checklist */
.check{display:flex;gap:11px;align-items:flex-start;padding:11px 0;border-bottom:1px solid var(--line);cursor:pointer;min-height:48px}
.check:last-child{border-bottom:0}
.check .box{flex:none;width:26px;height:26px;border-radius:8px;border:2px solid #b9c1d1;display:flex;align-items:center;justify-content:center;font-weight:900;color:#fff;margin-top:1px}
.check.done .box{background:var(--green);border-color:var(--green)}
.check.done .ctext{color:var(--mut);text-decoration:line-through}

.photos{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px}
.photos figure{margin:0}
.photos img{width:100%;height:92px;object-fit:cover;border-radius:10px;border:1px solid var(--line);display:block}
.photos figcaption{font-size:11px;color:var(--mut);margin-top:3px}

.activity{font-size:13.5px}
.activity .aItem{display:flex;gap:10px;padding:8px 0;border-bottom:1px solid var(--line)}
.activity .aItem:last-child{border-bottom:0}
.activity .aWhen{flex:none;width:74px;color:var(--mut);font-size:12px;padding-top:1px}

/* bottom tabs */
#tabbar{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:480px;background:#fff;border-top:1.5px solid var(--line);display:flex;z-index:40;padding-bottom:env(safe-area-inset-bottom)}
#tabbar a{flex:1;text-align:center;padding:8px 2px 9px;color:var(--mut);text-decoration:none;font-size:11px;font-weight:700}
#tabbar a .tab-ico{display:block;font-size:19px;line-height:1.15}
#tabbar a.on{color:var(--navy)}
#tabbar a.on .tab-ico{color:var(--amber-d)}

/* sheet (modal) */
#sheet-root:empty{display:none}
.scrim{position:fixed;inset:0;background:rgba(15,22,40,.55);z-index:60;display:flex;align-items:flex-end;justify-content:center}
.sheet{background:#fff;width:100%;max-width:480px;max-height:92vh;overflow:auto;border-radius:18px 18px 0 0;padding:18px 16px calc(18px + env(safe-area-inset-bottom))}
.sheet h2{margin-top:0}
.cardbox{border:1.5px solid var(--line);border-radius:12px;padding:12px;margin:10px 0}
.processing{text-align:center;padding:26px 0}
.spinner{width:38px;height:38px;border:4px solid var(--line);border-top-color:var(--navy);border-radius:50%;margin:0 auto 12px;animation:spin 0.8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.bigcheck{width:64px;height:64px;border-radius:50%;background:var(--green);color:#fff;font-size:34px;display:flex;align-items:center;justify-content:center;margin:8px auto 10px}

#toast{position:fixed;left:50%;transform:translateX(-50%) translateY(20px);bottom:86px;background:var(--navy);color:#fff;font-size:14px;font-weight:600;padding:10px 16px;border-radius:999px;opacity:0;pointer-events:none;transition:all .25s;z-index:80;max-width:88vw;text-align:center}
#toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

.seg{display:flex;background:#e4e8f0;border-radius:11px;padding:3px;gap:3px;margin-bottom:12px}
.seg button{flex:1;border:0;background:transparent;min-height:40px;border-radius:9px;font-size:14px;font-weight:700;color:var(--mut);cursor:pointer}
.seg button.on{background:#fff;color:var(--navy);box-shadow:0 1px 4px rgba(20,33,61,.18)}
.empty{padding:22px 10px;text-align:center;color:var(--mut);font-size:14.5px;line-height:1.5}
a.plain{color:var(--blue);font-weight:600;text-decoration:none}
/* Definition grid for entity detail cards (2026-10-16 card formatting
   pass): one fixed, quiet label column; values left-aligned against it;
   uniform row rhythm. Labels never repeat the card heading. */
.kv{display:grid;grid-template-columns:104px minmax(0,1fr);column-gap:14px;row-gap:6px;font-size:14px;line-height:1.45;align-items:baseline}
.kv .dk{color:var(--mut);font-weight:600;font-size:12.5px;letter-spacing:.02em;white-space:nowrap}
.kv .dv{min-width:0}
.card>h3:first-child{margin-top:0}

@media print{
  #tabbar,#topbar,#toast,.noprint{display:none!important}
  body{background:#fff}
  #phone{box-shadow:none;max-width:none}
  main{padding:0}
}

/* ---------- PoC v2 additions: auth, notices, share boxes, tiers ---------- */
input[type=password]{width:100%;min-height:48px;border:1.5px solid var(--line);border-radius:10px;padding:11px 12px;font-size:16px;background:#fff;color:var(--ink);font-family:inherit}
input[type=password]:focus{outline:2px solid var(--blue);border-color:var(--blue)}

#auth-root{max-width:480px;margin:0 auto;background:var(--bg);min-height:100vh;padding:30px 16px 48px;box-shadow:0 0 32px rgba(20,33,61,.25)}
.auth-brand{text-align:center;margin-bottom:18px}
.auth-brand .logo{font-size:26px;font-weight:800;color:var(--navy);letter-spacing:.2px}
.auth-card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:18px 16px}
.auth-card h1{font-size:19px;margin-top:0}
.auth-links{display:flex;justify-content:space-between;gap:10px;margin-top:14px;font-size:14px}
.auth-links a{color:var(--blue);font-weight:600;text-decoration:none;min-height:32px;display:inline-flex;align-items:center}
.form-err{color:var(--red);font-size:13.5px;line-height:1.4;margin-top:10px;white-space:pre-wrap}
.form-ok{color:var(--green);font-size:13.5px;line-height:1.4;margin-top:10px}

.notice{border:1.5px solid var(--line);background:#fff;border-radius:12px;padding:12px 14px;font-size:14px;line-height:1.5;margin-bottom:12px}
.notice.warn{background:var(--amber-bg);border-color:#ecd28f;color:#6b4e00}
.notice.err{background:var(--red-bg);border-color:#eec5bf;color:#7c2418}
.notice.ok{background:var(--green-bg);border-color:#bfe3cf;color:#14532d}
.notice b{font-weight:800}

.linkbox{display:flex;gap:8px;align-items:stretch;margin:10px 0}
.linkbox input{flex:1;min-width:0;min-height:46px;font-size:13px}
.linkbox .btn{width:auto;flex:none}
.sharelabel{font-size:12.5px;font-weight:700;color:var(--mut);letter-spacing:.3px;text-transform:uppercase}

.tier-price{display:flex;gap:8px;align-items:flex-end}
.tier-price .grow{min-width:0}
.placeholder-badge{background:var(--amber);color:#231a00;font-size:10px;font-weight:800;padding:2px 6px;border-radius:6px;letter-spacing:.5px;vertical-align:2px}
.src-chip{display:inline-block;font-size:10.5px;font-weight:800;padding:2px 7px;border-radius:999px;background:var(--blue-bg);color:var(--blue);letter-spacing:.3px;vertical-align:1px}
.dirty-note{font-size:12.5px;color:#8a5c00;font-weight:700;min-height:16px}

@media print{
  .doc{border:0;border-radius:0}
  .linkbox,.auth-links{display:none!important}
}

/* ---------- Guided Builder (Phase C): guided sequence, responsive ----------
   Screen doctrine: the Builder is a working surface, not a phone form.
   Small screens: one item at a time, steps as a horizontal rail.
   Wide screens: the shell widens, steps become a left rail, items lay out
   in two columns — the layout reorganizes, it does not just magnify. */
@media (min-width:900px){
  body.bp-wide #phone{max-width:1160px}
  body.bp-wide #tabbar{max-width:1160px}
  body.bp-wide .builder-wrap{display:grid;grid-template-columns:230px 1fr;gap:18px;align-items:start}
  body.bp-wide .builder-steps{display:block;overflow:visible;position:sticky;top:86px}
  body.bp-wide .builder-items{display:grid;grid-template-columns:1fr 1fr;gap:12px}
  body.bp-wide .builder-items .card{margin-bottom:0}
}
.builder-steps{display:flex;gap:6px;overflow-x:auto;padding-bottom:10px;margin-bottom:6px}
.bstep{flex:none;display:flex;align-items:center;gap:8px;border:1.5px solid var(--line);background:#fff;color:var(--mut);
  border-radius:999px;padding:8px 13px;font-size:13.5px;font-weight:700;cursor:pointer;white-space:nowrap;font-family:inherit}
.bstep .bstep-n{width:22px;height:22px;border-radius:50%;background:#cfd6e4;color:#fff;font-size:12px;font-weight:800;
  display:inline-flex;align-items:center;justify-content:center;flex:none}
.bstep.on{border-color:var(--navy);color:var(--navy)}
.bstep.on .bstep-n{background:var(--amber);color:#231a00}
@media (min-width:900px){
  .bstep{display:flex;width:100%;border-radius:12px;margin-bottom:6px;text-align:left}
}
.explainer{background:#f4f7fc;border:1px solid var(--line);border-radius:10px;padding:9px 12px;margin:10px 0}
.explainer summary{font-size:13px;font-weight:700;color:var(--blue);cursor:pointer;min-height:28px}
.explainer p{font-size:13px;line-height:1.5;color:var(--ink);margin:7px 0}
.builder-main .card .btn{margin-top:10px}

/* ---------- Guided Estimator (Phase C): estimate-new + workspace ----------
   Same screen doctrine as the Builder: narrow screens stack rail / main /
   summary in reading order; wide screens (body.bp-wide) run the three-zone
   grid 250px | 1fr | 340px with a sticky summary rail. */
.est-wrap{display:block}
@media (min-width:900px){
  body.bp-wide .est-wrap{display:grid;grid-template-columns:250px 1fr 340px;gap:16px;align-items:start}
  body.bp-wide .est-summary{position:sticky;top:86px}
  body.bp-wide .est-rail{position:sticky;top:86px}
}
@media (max-width:899px){
  .est-wrap>*{margin-bottom:4px}
}

/* estimate-new: job-type cards + instrument radios */
.est-type-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:10px;margin-bottom:6px}
.est-type-card{background:var(--card);border:1.5px solid var(--line);border-radius:var(--radius);padding:13px;cursor:pointer}
.est-type-card .sub{margin-top:5px}
.est-type-card.on{border-color:var(--navy);background:#f4f7fc;box-shadow:0 0 0 2px var(--amber-bg),0 2px 8px rgba(20,33,61,.14)}
.est-inst{display:flex;gap:10px;align-items:flex-start;padding:11px 0;border-bottom:1px solid var(--line);cursor:pointer}
.est-inst:last-child{border-bottom:0}
.est-inst input{width:22px;height:22px;flex:none;margin-top:2px}

/* workspace rail */
.est-sec-btn{display:flex;align-items:center;gap:9px;width:100%;text-align:left;border:1.5px solid var(--line);background:#fff;
  border-radius:11px;padding:10px 11px;margin-bottom:6px;cursor:pointer;font-family:inherit;color:var(--ink)}
.est-sec-btn.on{border-color:var(--navy);background:#f4f7fc;box-shadow:inset 3px 0 0 var(--amber)}
.est-sec-btn.est-archived{opacity:.55}
.est-sec-tools{margin:-2px 0 8px;text-align:right}
.est-jump{display:block;width:100%;text-align:left;border:0;background:transparent;color:var(--blue);font-weight:600;
  font-size:13.5px;font-family:inherit;padding:7px 4px;cursor:pointer;border-bottom:1px dashed var(--line)}
.est-jump:last-child{border-bottom:0}

/* component cards + disposition segmented control */
.est-comp{border:1.5px solid var(--line);border-radius:12px;padding:11px 12px;margin:10px 0;background:#fff}
.est-seg{display:flex;background:#e4e8f0;border-radius:11px;padding:3px;gap:3px}
.est-seg button{flex:1;border:0;background:transparent;min-height:38px;border-radius:9px;font-size:13px;font-weight:700;color:var(--mut);cursor:pointer;font-family:inherit;padding:6px 4px}
.est-seg button.on{background:#fff;color:var(--navy);box-shadow:0 1px 4px rgba(20,33,61,.18)}
.est-opt{display:flex;gap:10px;align-items:flex-start;padding:10px 0 2px;cursor:pointer}
.est-opt input{width:22px;height:22px;flex:none;margin-top:1px}
.est-price{display:grid;grid-template-columns:repeat(auto-fit,minmax(108px,1fr));gap:8px;margin-top:6px;background:#f8fafc;border:1px solid var(--line);border-radius:10px;padding:10px}
.est-price .flabel{margin:0 0 4px}
.est-price input,.est-price select{min-height:42px}

/* allowances + job-level lines */
.est-al-row{display:flex;gap:10px;align-items:center;padding:9px 0;border-bottom:1px solid var(--line)}
.est-al-row:last-of-type{border-bottom:0}
.est-form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:4px 10px}

/* summary stack + gates */
.est-total-big{font-size:23px}
.est-gate{display:flex;gap:9px;align-items:flex-start;border-radius:10px;padding:9px 11px;margin-bottom:7px;font-size:13.5px;line-height:1.4;border:1px solid var(--line)}
.est-gate .est-gate-ico{flex:none;font-size:14px;line-height:1.3}
.est-gate.block{background:var(--red-bg);border-color:#eec5bf;color:#7c2418}
.est-gate.warn{background:var(--amber-bg);border-color:#ecd28f;color:#6b4e00}
.est-gate.ok{background:var(--green-bg);border-color:#bfe3cf;color:#14532d}
.est-gate .sub{color:inherit;opacity:.85}

/* read-only (sent and beyond): freeze every control in the workspace */
.est-ro input,.est-ro textarea,.est-ro select{pointer-events:none;background:#eef1f6;color:var(--mut)}
.est-ro button{pointer-events:none;opacity:.45}
.est-ro .est-sec-btn,.est-ro .est-jump{pointer-events:auto;opacity:1}

/* ==================================================================
   SHELL RESPONSIVE REWORK (2026-10-16 — Rob's screen doctrine).
   The frame detects the screen and REORGANIZES; it never magnifies.
   Below 1024px the phone form stands exactly as built: a single
   centered column, bottom tab bar, one thing at a time. At 1024px and
   up the same shell becomes a desktop app: the tab bar turns into a
   persistent left navigation rail, the frame fills the viewport (no
   centered column, no gray gutters), and content reorganizes into
   the available width — stat tiles go four-across, card lists flow
   into multi-column grids (.list-grid), record pages split into a
   main column + side column (.detail-grid), dashboard panels pair
   up (.dash-cols). Font sizes and touch targets do not change; the
   ORGANIZATION changes. Placed last so it overrides the older
   route-based bp-wide shell widths at desktop sizes.
   ================================================================== */
.rail-brand{display:none}
@media (min-width:1024px){
  body{background:var(--bg)}
  #phone{max-width:none;margin:0;box-shadow:none;border-left:none;border-right:none}
  body.bp-wide #phone{max-width:none}
  #topbar{margin-left:232px;padding:16px 30px 14px}
  #topbar-title{display:none}
  main{margin-left:232px;padding:22px 30px 48px;max-width:1600px}
  #tabbar{left:0;top:0;bottom:0;transform:none;width:232px;max-width:232px;
    flex-direction:column;justify-content:flex-start;align-items:stretch;gap:2px;
    padding:20px 14px;background:var(--navy);border-top:none;border-right:1px solid #0c1626}
  body.bp-wide #tabbar{max-width:232px}
  #tabbar a{flex:none;display:flex;align-items:center;gap:12px;text-align:left;
    padding:11px 12px;border-radius:10px;color:#c9d3e8;font-size:14px}
  #tabbar a .tab-ico{display:inline;font-size:17px;line-height:1}
  #tabbar a.on{background:rgba(255,255,255,.13);color:#fff}
  #tabbar a.on .tab-ico{color:var(--amber)}
  .rail-brand{display:block;color:#fff;font-size:19px;font-weight:800;letter-spacing:.2px;padding:0 12px 18px}
  .tiles{grid-template-columns:repeat(4,1fr)}
  .list-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(330px,1fr));gap:12px;align-items:start}
  .list-grid .card{margin-bottom:0}
  .detail-grid{display:grid;grid-template-columns:minmax(320px,400px) minmax(0,1fr);gap:16px;align-items:start}
  .dash-cols{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start}
  .dash-cols h2{margin-top:4px}
  .photos{grid-template-columns:repeat(4,1fr)}
  .sheet{max-width:640px}
  #toast{bottom:30px}
}
@media print{
  main{margin-left:0;max-width:none}
  #topbar{margin-left:0}
}

/* ---------- Alerts bell + welcome-verification row (§A-8) ----------
   The bell exists at both shell widths: in the phone top bar, and in
   the desktop rail header (where the top-bar bell steps aside). The
   verification chip renders immediately next to the welcome button on
   the record (.welcome-row) — state where the action lives. */
.bell-btn{position:relative;background:transparent;border:0;cursor:pointer;font-family:inherit;color:inherit}
#bell-top{position:absolute;right:12px;top:10px;font-size:19px;padding:6px 8px;border-radius:10px}
.rail-bell{display:none}
.bell-badge{position:absolute;top:1px;right:1px;background:var(--red);color:#fff;font-size:10.5px;font-weight:800;
  min-width:17px;height:17px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;padding:0 4px}
.bell-badge[hidden]{display:none}
.rail-bell .bell-badge{position:static;margin-left:auto}
.welcome-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:12px}
.alert-item{display:flex;gap:10px;padding:11px 0;border-bottom:1px solid var(--line);cursor:pointer;align-items:flex-start}
.alert-item:last-child{border-bottom:0}
.alert-item .a-ico{font-size:17px;flex:none}
.alert-item.unread .a-msg{font-weight:700}
@media (min-width:1024px){
  #bell-top{display:none}
  .rail-bell{display:flex;align-items:center;gap:12px;width:100%;text-align:left;
    padding:11px 12px;border-radius:10px;color:#c9d3e8;font-size:14px;font-weight:700;margin-bottom:8px}
  .rail-bell:hover{background:rgba(255,255,255,.08)}
}

/* ---------- Standard Fancy Baseline shell additions (§A-12) ---------- */
/* Skeleton loading blocks */
.skel{background:linear-gradient(100deg,var(--line) 40%,#eef1f6 50%,var(--line) 60%);background-size:200% 100%;
  border-radius:10px;min-height:18px;margin:10px 0;animation:skelPulse 1.2s ease-in-out infinite}
.skel.tall{min-height:110px}
@keyframes skelPulse{0%{background-position:120% 0}100%{background-position:-80% 0}}
/* Global search */
.glob-wrap{position:relative}
.glob-results{position:absolute;left:0;right:0;top:calc(100% + 6px);background:#fff;border:1px solid var(--line);
  border-radius:12px;box-shadow:0 14px 34px rgba(16,24,40,.16);z-index:60;overflow:hidden}
.glob-item{display:flex;gap:10px;align-items:center;padding:9px 12px;cursor:pointer}
.glob-item:hover{background:#f4f6fb}
.glob-item .g-type{flex:none;font-size:10.5px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;
  color:var(--muted);width:64px}
.glob-item .g-label{font-weight:600;font-size:14px}
.glob-item .g-sub{font-size:12.5px;color:var(--muted)}
.glob-none{padding:10px 12px;font-size:13px;color:var(--muted)}
.glob-rail{display:none}
.glob-rail input{background:rgba(255,255,255,.09);border:1px solid rgba(255,255,255,.16);color:#eef2fb}
.glob-rail input::placeholder{color:#93a3c4}
.glob-rail .glob-results{background:#16233d;border-color:rgba(255,255,255,.14);box-shadow:0 14px 34px rgba(0,0,0,.4)}
.glob-rail .glob-item:hover{background:rgba(255,255,255,.07)}
.glob-rail .glob-item .g-label{color:#eef2fb}
.glob-rail .glob-item .g-sub,.glob-rail .glob-none{color:#93a3c4}
@media (min-width:1024px){
  .glob-rail{display:block}
  .glob-top{display:none}
}
@media (max-width:1023px){
  .glob-top{margin:8px 12px 0}
}
/* Inline field errors — plain language beside the field, never a lone box */
.field-err{color:var(--red);font-size:12.5px;font-weight:600;margin-top:5px}
[aria-invalid="true"]{border-color:var(--red) !important}
/* Picker rows (typeaheads) */
.pick-item{display:flex;gap:10px;align-items:center;padding:9px 10px;border:1px solid var(--line);
  border-radius:10px;margin-top:6px;cursor:pointer;background:#fff}
.pick-item:hover{border-color:#b9c4da}
.pick-item.on{border-color:var(--green);background:#f2fbf5}
/* Geocoder chooser */
.geo-found{border:1px solid var(--line);border-radius:10px;padding:10px;margin-top:8px;background:#f8fafc}
/* Keyboard focus is always visible */
:focus-visible{outline:2px solid #2f6fed;outline-offset:2px;border-radius:6px}
