/* Renobach — design tokens + calibrated sizes (shared). Sizes px@390 (design_language §6). Grammar: ui_screens.md. */
:root{
  --amber:#F0A422; --amber-d:#D18A0A; --amber-pale:#FBF2DE;
  --charcoal:#2B2624; --ink:#3B3531; --gray:#8F887F;
  --line:#E9E5DF; --bg:#FAF7F3; --paper:#FFFFFF; --green:#1F7A4D; --red:#C03B22;
  --radius:12px; --radius-btn:11px;
  --shadow:0 1px 2px rgba(43,38,36,.05), 0 4px 12px rgba(43,38,36,.06);
  --shadow-up:0 -2px 12px rgba(43,38,36,.08);
  --bar-h:60px; --field-h:46px; --mic-d:46px; --row-h:52px; --row-h2:72px;
  --nav-icon:24px; --ctx-row:48px; --primary-h:44px; --total-fz:26px;
  --fz-screen:21px; --fz-section:16px; --fz-row:16px; --fz-sub:14px; --fz-help:12px;
  --safe-bottom:env(safe-area-inset-bottom,0px);
  --safe-top:env(safe-area-inset-top,0px);
  --stg-h:26px;
}
/* root touch-fix (D-068): UI text is not selectable; long-press never invokes the native
   text-selection/callout that competed with our menus. Data values opt back in via .selectable. */
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent;
  -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;}
/* D-068ו: DATA values opt back into selection/copy (names, numbers, IBANs, dates, card values,
   row titles/subs) — shared so it's not per-screen. UI chrome (labels/buttons/headers) stays none. */
input,textarea,[contenteditable],.selectable,.selectable *,
.cf-v,.num,.row-title,.row-sub,.csheet-t,.tx-ttl,.cr-desc,.cr-meta{
  -webkit-user-select:text;user-select:text;-webkit-touch-callout:default;}
html,body{margin:0;padding:0;height:100%;}
body{font-family:'Heebo','Segoe UI',Arial,sans-serif;background:var(--bg);color:var(--ink);
  direction:rtl;text-align:right;-webkit-font-smoothing:antialiased;font-size:var(--fz-row);line-height:1.35;}
button,a{font-family:inherit;-webkit-tap-highlight-color:transparent;}
a{color:inherit;}
.material-symbols-outlined{font-family:'Material Symbols Outlined';font-weight:normal;font-style:normal;
  font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;
  direction:ltr;-webkit-font-feature-settings:'liga';font-feature-settings:'liga';
  font-variation-settings:'FILL' 0,'wght' 300,'GRAD' 0,'opsz' 24;}
.num,.ltr{direction:ltr;unicode-bidi:isolate;font-variant-numeric:tabular-nums;}

/* our own press effect (subtle dim on the whole element) */
.press:active{filter:brightness(.96);}
.row:active,.qitem:active,.navitem:active,.am-item:active,.iban:active{background:rgba(43,38,36,.045);}

/* ---- app shell ---- */
/* safe-area top inset (D-1c): the WebView can render edge-to-edge under the Android status bar
   (Android 15 forces this). Pad the non-scrolling shell so the status-bar zone stays clear on
   EVERY screen even while .scroll scrolls; box-sizing:border-box keeps content inside 100dvh.
   Resolves to 0 when the native status bar already insets the WebView (no double padding). */
.app{max-width:430px;margin:0 auto;height:100vh;height:100dvh;display:flex;flex-direction:column;background:var(--bg);position:relative;overflow:hidden;padding-top:var(--safe-top);}
.scroll{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;}
/* staging banner (D-1d-#4) — first flex child of .app, so it sits below the --safe-top inset and
   above .scroll (no fixed positioning / z-index). Injected by data.js ONLY when APP_ENV==="staging";
   absent entirely from the prod DOM. content flows below it; bottom nav unaffected. */
.stg-banner{flex:0 0 auto;height:var(--stg-h);display:flex;align-items:center;justify-content:center;
  background:var(--amber);color:var(--charcoal);font-size:var(--fz-help);font-weight:700;letter-spacing:.01em;}

/* ---- header ---- */
.head{background:var(--bg);padding:9px 16px 8px;}
.util{display:flex;align-items:center;gap:10px;}
.r-mark{width:30px;height:30px;flex:0 0 auto;border-radius:7px;mix-blend-mode:multiply;} /* white box in the asset → blends into the warm bg (D2) */
.crumb{flex:1;min-width:0;font-size:var(--fz-help);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.crumb a{color:var(--amber-d);text-decoration:none;} .crumb .sep{color:var(--gray);margin:0 5px;} .crumb .here{color:var(--gray);}
.date{font-size:var(--fz-help);color:var(--gray);flex:0 0 auto;}
.head-icon{width:30px;height:30px;flex:0 0 auto;color:var(--charcoal);background:none;border:none;cursor:pointer;padding:0;display:grid;place-items:center;}
.head-icon .material-symbols-outlined{font-size:24px;}
.kicker{font-size:var(--fz-help);font-weight:700;color:var(--amber-d);margin-top:7px;letter-spacing:.2px;} /* entity screen: type kicker over the big name (D-068) */
.kicker + .title{margin-top:1px;}
.title{font-size:var(--fz-screen);font-weight:900;color:var(--charcoal);margin:7px 0 1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.subt{font-size:var(--fz-sub);color:var(--ink);opacity:.78;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.subt-total{font-size:var(--fz-screen);font-weight:900;color:var(--charcoal);opacity:1;} /* payments total = screen weight */
.statusline{font-size:var(--fz-help);color:var(--gray);margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.statusline .dot{color:var(--amber-d);}

/* view toggle (offer): עברית | Deutsch — lives at the left end of the "סעיפי ההצעה" section row (D-068) */
.section-h .toggle{margin-inline-start:auto;}
.toggle{display:inline-flex;border:1px solid var(--line);border-radius:999px;background:var(--paper);padding:2px;}
.toggle button{border:none;background:none;font-size:var(--fz-help);padding:5px 14px;border-radius:999px;color:var(--gray);cursor:pointer;}
.toggle button[aria-pressed="true"]{background:var(--amber-pale);color:var(--charcoal);font-weight:700;}
/* client view (Deutsch): German becomes the primary line text + ALL internal knowledge hidden (D-069) */
body.client-view .internal{display:none !important;}
body.client-view .row-2{display:none;}

/* ---- brand stripe: below header, sticks on scroll. Charcoal block at the inline start. ---- */
.stripe{position:sticky;top:0;z-index:40;height:13px;background:var(--amber);border-bottom:2px solid var(--charcoal);}
.stripe::before{content:"";position:absolute;top:0;left:0;height:13px;width:50px;background:var(--charcoal);
  clip-path: polygon(0 0, 85% 0, 100% 100%, 0 100%); /* FINAL per Dudi 12.06 — do not change */}

/* ---- content ---- */
.content{padding:8px 16px 20px;}
.toolbar{display:flex;justify-content:flex-start;padding:4px 0 2px;}
.section-h{font-size:var(--fz-section);font-weight:900;color:var(--charcoal);margin:12px 0 8px;display:flex;align-items:center;gap:8px;}
.section-h::before{content:"";width:14px;height:14px;background:var(--amber);transform:skewX(-20deg);border-radius:1px;flex:0 0 auto;}

.card{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden;}
.row{padding:0 13px;border-bottom:1px solid var(--line);}
.row:last-child{border-bottom:none;}
.row-1{display:flex;align-items:center;gap:8px;min-height:var(--row-h);cursor:pointer;}
.row-title{font-size:var(--fz-row);font-weight:700;color:var(--ink);flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.row-amt{font-size:var(--fz-row);font-weight:700;color:var(--charcoal);flex:0 0 auto;border-bottom:1px dashed var(--gray);padding-bottom:1px;cursor:text;}
.row-amt.changed{color:var(--amber-d);}
.row-2{display:flex;align-items:center;gap:8px;padding-bottom:9px;margin-top:-2px;}
.row-sub{font-size:var(--fz-sub);color:var(--gray);flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.row-expand{max-height:0;overflow:hidden;transition:max-height .22s ease;}
.row.open .row-expand{max-height:240px;overflow-y:auto;}
.row-de{font-size:var(--fz-sub);color:var(--ink);padding:8px 0 12px;line-height:1.5;border-top:1px dashed var(--line);}
.row-edit{display:none;padding:6px 0 12px;border-top:1px dashed var(--line);}
.row.editing .row-edit{display:block;} .row.editing .row-1,.row.editing .row-2{display:none;}
.row-edit label{display:block;font-size:var(--fz-help);color:var(--gray);margin:6px 0 3px;}
.row-edit input,.row-edit textarea{width:100%;border:1px solid var(--line);border-radius:8px;padding:8px 10px;font:inherit;font-size:var(--fz-sub);background:var(--bg);}
.row-edit .erow{display:flex;gap:8px;margin-top:10px;}
.taskform{display:none;padding:8px 13px 12px;background:var(--bg);border-top:1px dashed var(--line);}
.taskform.on{display:block;}
.taskform input{width:100%;margin-top:5px;border:1px solid var(--line);border-radius:8px;padding:8px 10px;font:inherit;font-size:var(--fz-sub);background:var(--paper);}
.amt-input{width:90px;font:inherit;font-weight:700;text-align:left;border:1px solid var(--amber);border-radius:8px;padding:2px 6px;direction:ltr;}
@keyframes flash{0%{background:var(--amber-pale);}100%{background:transparent;}}
.flash{animation:flash 1s ease;}

.fold{margin-top:14px;background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);}
.fold-h{display:flex;align-items:center;gap:8px;padding:12px 13px;cursor:pointer;font-weight:700;font-size:var(--fz-sub);color:var(--charcoal);}
.fold-h .chev{margin-inline-start:auto;color:var(--gray);transition:transform .2s;}
.fold.open .fold-h .chev{transform:rotate(180deg);}
.fold-body{max-height:0;overflow:hidden;transition:max-height .25s ease;}
.fold.open .fold-body{max-height:380px;overflow-y:auto;}
.fold-body .inner{padding:0 13px 12px;}
.vorb-edit{width:100%;border:1px solid var(--line);border-radius:8px;padding:10px;font:inherit;font-size:var(--fz-sub);background:var(--bg);min-height:120px;direction:ltr;text-align:left;line-height:1.55;}
.selfnote{margin-top:12px;}
.selfnote .openbtn{background:none;border:1px dashed var(--line);border-radius:var(--radius);width:100%;text-align:start;padding:10px 13px;color:var(--gray);font:inherit;font-size:var(--fz-sub);cursor:pointer;}
.selfnote .editor{display:none;background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:10px;}
.selfnote.on .editor{display:block;} .selfnote.on .openbtn{display:none;}
.selfnote textarea{width:100%;border:1px solid var(--line);border-radius:8px;padding:8px 10px;font:inherit;font-size:var(--fz-sub);background:var(--bg);min-height:54px;}
.selfnote .saved{font-size:var(--fz-help);color:var(--gray);margin-top:6px;}

/* ---- buttons ---- */
.btn{font:inherit;cursor:pointer;border-radius:var(--radius-btn);border:1px solid transparent;display:inline-flex;align-items:center;justify-content:center;gap:7px;}
.btn .material-symbols-outlined{font-size:20px;}
.btn-primary{background:var(--amber);color:var(--charcoal);font-weight:800;height:var(--primary-h);padding:0 18px;border:none;}
.btn-primary:hover{background:var(--amber-d);}
.btn-secondary{background:transparent;color:var(--charcoal);border:1px solid var(--charcoal);height:var(--primary-h);padding:0 16px;font-weight:700;}
.btn-tertiary{background:none;border:none;color:var(--amber-d);font-weight:700;padding:6px 4px;cursor:pointer;display:inline-flex;align-items:center;gap:6px;}
.btn-tertiary .material-symbols-outlined{font-size:18px;}
/* #4 PART 3 (completes D-171): archive = ONE neutral (gray) token everywhere it appears (footer toggle +
   long-press menu) — it is reversible, not destructive. Accent (amber) is reserved for +הוסף/primary,
   danger (red) for מחק. */
.btn-tertiary.neutral,.btn-tertiary.neutral .material-symbols-outlined{color:var(--gray);}
.ctx button.neutral,.ctx button.neutral .material-symbols-outlined{color:var(--gray);}
.btn-sm{height:38px;padding:0 14px;}

/* a11y (ui_screens §7): keep calibrated icon sizes, extend the TOUCH TARGET to ≥44px via a
   transparent ::after — the pixel stays small (real-app calibration), the tap area is accessible */
.head-icon,.fb-btn{position:relative;}
.head-icon::after,.fb-btn::after{content:"";position:absolute;top:50%;left:50%;width:44px;height:44px;transform:translate(-50%,-50%);}
.btn-sm,.btn-tertiary{position:relative;}
.btn-sm::after,.btn-tertiary::after{content:"";position:absolute;left:0;right:0;top:50%;transform:translateY(-50%);height:44px;}

/* ---- BOTTOM ASSEMBLY ---- */
.bottom{flex:0 0 auto;background:var(--paper);box-shadow:var(--shadow-up);z-index:50;padding-bottom:var(--safe-bottom);}
/* keyboard open = writing mode: hide bottom bars EXCEPT the bar that holds the focused field (root fix
   B, D-071): "the field being edited lives in a bottom bar — and the keyboard-open rule hid its own
   field's focus." The .kb-keep bar is exempt and pinned above the keyboard (menu.js pinBottom). */
body.kb-open .nav{display:none;}
body.kb-open .summary:not(.kb-keep){display:none;}
/* record/type strips: identical height + structure, only the content swaps (pair rule, D-068) */
.recstrip{display:none;align-items:center;gap:10px;padding:8px 14px;border-top:1px solid var(--line);min-height:62px;}
.recstrip.on{display:flex;}
.recstrip .reddot{width:11px;height:11px;border-radius:50%;background:var(--red);animation:pulse 1s infinite;flex:0 0 auto;}
@keyframes pulse{50%{opacity:.3;}}
.recstrip .timer{font-size:var(--fz-sub);font-weight:700;direction:ltr;flex:0 0 auto;}
.recstrip .ctxlabel{font-size:var(--fz-help);color:var(--gray);flex:0 0 auto;}
.recstrip .wave{flex:1;height:22px;border-radius:3px;background:repeating-linear-gradient(90deg,var(--amber) 0 2px,transparent 2px 5px);opacity:.7;-webkit-mask:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent);}
.recstrip .kbfield{flex:1;height:var(--field-h);border:1px solid var(--line);border-radius:999px;background:var(--bg);padding:0 14px;font:inherit;}
.recstrip .rbtn{background:none;border:none;cursor:pointer;font-weight:700;font-size:var(--fz-help);padding:5px 7px;color:var(--charcoal);flex:0 0 auto;}
.recstrip .rbtn.cancel{color:var(--gray);} .recstrip .rbtn.finish{color:var(--green);}

.summary{display:flex;align-items:center;gap:12px;padding:9px 14px;border-top:1px solid var(--charcoal);}
.summary .lbl{font-size:var(--fz-sub);color:var(--gray);font-weight:700;flex:0 0 auto;}
.summary .total{font-size:var(--total-fz);font-weight:900;color:var(--charcoal);cursor:pointer;border-bottom:1px dashed var(--gray);padding-bottom:1px;}
.summary .total small{font-size:13px;font-weight:700;color:var(--gray);}
.summary .grow{flex:1;}
.total-input{width:120px;font:inherit;font-weight:900;font-size:var(--total-fz);text-align:left;direction:ltr;border:1px solid var(--amber);border-radius:8px;padding:0 6px;}

/* nav: 4 places (links) + actions button at the edge */
.nav{display:flex;align-items:stretch;height:var(--bar-h);border-top:1px solid var(--line);background:var(--paper);}
.nav .items{display:flex;flex:1;}
.navitem{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;background:none;border:none;cursor:pointer;color:var(--gray);font-size:11px;padding:4px 0;text-decoration:none;}
.navitem .ic{width:34px;height:24px;display:grid;place-items:center;border-radius:999px;}
.navitem .material-symbols-outlined{font-size:24px;}
.navitem.active{color:var(--charcoal);font-weight:700;}
.navitem.active .ic{background:var(--amber-pale);}
.actionzone{display:flex;align-items:center;padding:0 10px;border-inline-start:1px solid var(--line);}
.actions-btn{width:var(--mic-d);height:var(--mic-d);border-radius:50%;background:var(--amber);border:none;cursor:pointer;display:grid;place-items:center;color:var(--charcoal);}
.actions-btn:hover{background:var(--amber-d);}
.actions-btn .material-symbols-outlined{font-size:26px;}

/* actions quick menu (popover above the actions button) */
.am-back{position:fixed;inset:0;z-index:70;display:none;} .am-back.on{display:block;}
.actions-menu{position:fixed;z-index:71;background:var(--paper);border:1px solid var(--line);border-radius:14px;box-shadow:0 8px 30px rgba(43,38,36,.22);overflow:hidden;display:none;min-width:180px;}
.actions-menu.on{display:block;}
.am-item{display:flex;align-items:center;gap:12px;width:100%;height:var(--ctx-row);background:none;border:none;font:inherit;font-size:var(--fz-sub);color:var(--ink);padding:0 14px;cursor:pointer;text-align:right;}
.am-item .material-symbols-outlined{font-size:22px;color:var(--gray);}

/* ---- queue items (payments) ---- */
.qitem{position:relative;background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:12px 13px;margin-bottom:10px;overflow:hidden;}
.qitem.urgent{border-inline-start:4px solid var(--red);} /* red side bar (B2) */
.qitem .top{display:flex;align-items:flex-start;gap:8px;}
.qitem .name{font-size:var(--fz-row);font-weight:700;color:var(--ink);flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.qitem .amt{font-size:18px;font-weight:900;color:var(--charcoal);flex:0 0 auto;}
.qitem .meta{font-size:var(--fz-sub);color:var(--gray);margin-top:2px;}
.qitem .due{font-weight:700;} .qitem .due.urgent{color:var(--red);}
.qitem .acts{display:flex;align-items:center;gap:10px;margin-top:12px;}
.qitem .acts .grow{flex:1;}
.empty{text-align:center;color:var(--gray);padding:40px 16px;}
.empty .big{font-size:18px;font-weight:800;color:var(--green);margin-bottom:6px;}
.empty .material-symbols-outlined{font-size:46px;color:var(--green);margin-bottom:6px;}

/* paid group (collapsed) */
.paidgroup{margin-top:6px;}
.paidgroup .ph{display:flex;align-items:center;gap:8px;background:var(--bg);border:1px solid var(--line);border-radius:var(--radius);padding:11px 13px;cursor:pointer;color:var(--ink);font-size:var(--fz-sub);font-weight:700;}
.paidgroup .ph .material-symbols-outlined{font-size:20px;color:var(--green);}
.paidgroup .ph .cnt{margin-inline-start:auto;color:var(--gray);font-weight:700;}
.paidgroup .pbody{display:none;padding:8px 2px 0;}
.paidgroup.open .pbody{display:block;}
/* [#1-STG queue STAGE 2] payment-cut furniture (ui_screens §8): the top total (screen-title weight) + the pay-sheet amount */
.cut-total{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;padding:8px 4px 12px;border-bottom:1px solid var(--line);margin-bottom:10px;}
.cut-total .ct-lbl{font-size:var(--fz-sub);color:var(--gray);font-weight:700;}
.cut-total .ct-num{font-size:var(--fz-screen);font-weight:900;color:var(--charcoal);}
.cut-total .ct-num .cur{font-size:14px;color:var(--gray);font-weight:800;margin-inline-end:2px;}
.cut-total .ct-cnt{font-size:var(--fz-help);color:var(--gray);font-weight:700;margin-inline-start:auto;}
.pay-amt{font-size:30px;font-weight:900;color:var(--charcoal);text-align:center;margin:6px 0 2px;}
.pay-amt .cur{font-size:14px;color:var(--gray);font-weight:800;}
.paidrow{display:flex;align-items:center;gap:8px;padding:9px 11px;border-bottom:1px solid var(--line);font-size:var(--fz-sub);}
.paidrow .grow{flex:1;} .paidrow .st{color:var(--gray);font-size:var(--fz-help);}

/* ---- context menu (long-press) ---- */
.ctx-back{position:fixed;inset:0;z-index:90;display:none;} .ctx{position:fixed;z-index:91;background:var(--paper);border:1px solid var(--line);border-radius:14px;box-shadow:0 8px 30px rgba(43,38,36,.22);min-width:210px;overflow:hidden;display:none;}
.ctx button{display:flex;align-items:center;gap:12px;width:100%;height:var(--ctx-row);background:none;border:none;font:inherit;font-size:var(--fz-sub);color:var(--ink);padding:0 14px;cursor:pointer;text-align:right;}
.ctx button:hover{background:var(--bg);} .ctx button.danger{color:var(--red);}
.ctx .material-symbols-outlined{font-size:20px;color:var(--gray);} .ctx button.danger .material-symbols-outlined{color:var(--red);}

/* ---- inline contextual search (D-068): glass opens a filter field under the header on the
   SAME page; the live list filters in place; a "בכל המערכת" section below holds global hits.
   Replaces the old full-screen overlay — search never throws the user off the page. ---- */
.filterbar{display:none;padding:8px 16px 4px;background:var(--bg);position:sticky;top:13px;z-index:35;}
.filterbar.on{display:block;}
.filterbar .fb-in{display:flex;align-items:center;gap:8px;background:var(--paper);border:1px solid var(--amber);border-radius:999px;padding:3px 6px 3px 14px;box-shadow:var(--shadow);}
.filterbar .fb-in .material-symbols-outlined{font-size:20px;color:var(--gray);flex:0 0 auto;}
.filterbar input{flex:1;border:none;background:none;font:inherit;height:38px;outline:none;min-width:0;}
.filterbar .fb-btn{background:none;border:none;color:var(--gray);cursor:pointer;display:grid;place-items:center;padding:6px;flex:0 0 auto;}
.global-results{margin-top:16px;}
.global-results h4{font-size:var(--fz-help);color:var(--gray);font-weight:700;margin:0 0 6px;display:flex;align-items:center;gap:6px;}
.global-results h4 .material-symbols-outlined{font-size:16px;}
.global-results .gr{padding:11px 2px;border-bottom:1px solid var(--line);font-size:var(--fz-sub);color:var(--ink);cursor:pointer;}
.global-results .gr small{color:var(--gray);}
.global-results .gr-group{font-size:var(--fz-help);font-weight:800;color:var(--charcoal);margin:8px 0 2px;}
.global-results .gr-tag{font-size:10px;font-weight:800;background:var(--line);color:var(--gray);border-radius:999px;padding:1px 7px;vertical-align:1px;}
/* search mic = honest "בקרוב" until transcription exists (P-A / no-deception): icon kept, dimmed; click toasts בקרוב (rec.js) */
.filterbar .fb-btn[aria-label="חיפוש קולי"]{opacity:.4;}
/* project code = shared talk-about-it identifier beside the address title (small, gray, LTR-isolated) */
.row-code{font-size:var(--fz-help);color:var(--gray);font-weight:600;margin-inline-start:6px;direction:ltr;unicode-bidi:isolate;}
.no-match{color:var(--gray);font-size:var(--fz-sub);padding:14px 2px;text-align:center;}
/* brand wordmark = image/SVG beside the R, NEVER font-styled text (D-082) */
.tmenu .mh .wordmark{height:16px;width:auto;display:block;}  /* C/D-088: line-height-sized, ~201px — beside the R, not full-width */
.tmenu .mh .r-mark{width:24px;height:24px;border-radius:6px;flex:0 0 auto;mix-blend-mode:multiply;}
/* generic CRUD template rows (D-082) */
.addrow{display:flex;align-items:center;gap:8px;width:100%;background:none;border:1px dashed var(--line);border-radius:var(--radius);padding:12px 13px;margin-top:10px;color:var(--amber-d);font:inherit;font-weight:700;font-size:var(--fz-sub);cursor:pointer;}
.addrow .material-symbols-outlined{font-size:20px;}
.crudrow .row-1 .ic-lead{flex:0 0 auto;display:grid;place-items:center;color:var(--gray);}
.crudrow .row-1 .ic-lead .material-symbols-outlined{font-size:20px;}
.crudrow .bv{margin-inline-start:auto;flex:0 0 auto;}
.crudrow .row-edit{display:none;padding:6px 0 12px;border-top:1px dashed var(--line);}
.crudrow.editing .row-edit{display:block;} .crudrow.editing .row-1,.crudrow.editing .row-2{display:none;}
.crudrow .row-edit label{display:block;font-size:var(--fz-help);color:var(--gray);margin:6px 0 3px;}
.crudrow .row-edit input{width:100%;border:1px solid var(--line);border-radius:8px;padding:8px 10px;font:inherit;font-size:var(--fz-sub);background:var(--bg);}
.crudrow .row-edit .erow{display:flex;gap:8px;margin-top:10px;}
/* deadline chip in action rows (D-078 §A6) */
.ddl{font-size:var(--fz-help);font-weight:700;color:var(--gray);flex:0 0 auto;}
.ddl.due{color:var(--red);}
/* project-card stuck alert row floats to top (D-078 #9) */
.pc-alert{display:flex;align-items:center;gap:8px;background:var(--amber-pale);border:1px solid var(--amber);border-radius:var(--radius);padding:10px 13px;margin:10px 0 2px;font-size:var(--fz-sub);cursor:pointer;}
.pc-alert .material-symbols-outlined{color:var(--amber-d);font-size:20px;flex:0 0 auto;}
.pc-alert .grow{flex:1;} .pc-alert .go{color:var(--amber-d);font-weight:800;font-size:var(--fz-help);}

/* ---- toast / tip ---- */
.toast{position:fixed;left:50%;transform:translateX(-50%);bottom:96px;z-index:97;background:var(--charcoal);color:#fff;font-size:var(--fz-sub);padding:10px 16px;border-radius:999px;box-shadow:var(--shadow);opacity:0;pointer-events:none;transition:opacity .2s;display:flex;align-items:center;gap:12px;max-width:88%;}
.toast.on{opacity:1;} .toast .undo{color:var(--amber);font-weight:700;cursor:pointer;pointer-events:auto;}
.tip{position:fixed;z-index:96;background:var(--charcoal);color:#fff;font-size:var(--fz-help);line-height:1.45;padding:9px 12px;border-radius:10px;max-width:240px;display:none;box-shadow:var(--shadow);}
.tip.on{display:block;}

/* ---- modals: share sheet, payment QR ---- */
.modal-back{position:fixed;inset:0;background:rgba(43,38,36,.45);z-index:98;display:none;align-items:flex-end;justify-content:center;}
.modal-back.on{display:flex;}
.sheet{background:var(--paper);width:100%;max-width:430px;border-radius:18px 18px 0 0;padding:16px;box-shadow:0 -8px 30px rgba(0,0,0,.2);max-height:92vh;overflow-y:auto;padding-bottom:calc(16px + var(--safe-bottom));}
.sheet h3{margin:2px 0 12px;font-size:var(--fz-section);font-weight:900;color:var(--charcoal);display:flex;align-items:center;gap:8px;}
.sheet h3 .grow{flex:1;}
/* full scrollable PDF preview (D-068): all lines + Vorbehalte + totals, not a summary */
.pdf-mock{background:var(--bg);border:1px solid var(--line);border-radius:10px;padding:16px;margin-bottom:14px;max-height:300px;overflow-y:auto;-webkit-overflow-scrolling:touch;}
.pdf-mock .pdfhead{display:flex;align-items:center;gap:8px;border-bottom:2px solid var(--amber);padding-bottom:8px;margin-bottom:10px;}
.pdf-mock .pdfhead img{width:26px;height:26px;}
.pdf-mock .pl{display:flex;justify-content:space-between;gap:10px;font-size:var(--fz-help);color:var(--ink);padding:5px 0;border-bottom:1px solid var(--line);}
.pdf-mock .pl:last-child{border-bottom:none;}
.pdf-mock .pl .ltr{direction:ltr;text-align:left;}
.pdf-mock .pvorb{margin-top:12px;padding-top:10px;border-top:1px dashed var(--gray);font-size:var(--fz-help);color:var(--ink);line-height:1.5;white-space:pre-wrap;direction:ltr;text-align:left;}
.pdf-mock .pvorb b{display:block;margin-bottom:4px;color:var(--charcoal);}
.share-targets{display:flex;flex-direction:column;gap:9px;}
.share-ch{display:flex;align-items:center;gap:12px;width:100%;border:1px solid var(--line);border-radius:12px;background:var(--paper);padding:11px 13px;cursor:pointer;font:inherit;font-size:var(--fz-sub);font-weight:700;color:var(--ink);}
.share-ch .ico{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;color:#fff;flex:0 0 auto;}
.share-ch .ico .material-symbols-outlined{font-size:22px;}
.share-ch small{display:block;font-weight:400;color:var(--gray);font-size:var(--fz-help);}
.share-more{text-align:center;margin-top:10px;}

/* payment QR sheet */
.qr-wrap{display:flex;flex-direction:column;align-items:center;gap:12px;}
.qr-box{width:210px;height:210px;background:#fff;border:1px solid var(--line);border-radius:12px;display:grid;place-items:center;padding:12px;}
.qr-box svg{width:100%;height:100%;}
.qr-amt{font-size:24px;font-weight:900;color:var(--charcoal);}
.qr-amt small{font-size:13px;color:var(--gray);font-weight:700;}
.qr-iban{display:flex;align-items:center;gap:8px;width:100%;background:var(--bg);border:1px solid var(--line);border-radius:10px;padding:10px 12px;}
.qr-iban .v{flex:1;font-size:var(--fz-sub);color:var(--ink);}
.qr-hint{font-size:var(--fz-help);color:var(--gray);text-align:center;}

/* ---- top menu (D-071): hamburger beside search; slide-in panel; groups in section-bar style ---- */
.menu-back{position:fixed;inset:0;background:rgba(43,38,36,.35);z-index:120;display:none;}
.menu-back.on{display:block;}
.tmenu{position:fixed;top:0;bottom:0;inset-inline-start:0;width:300px;max-width:85vw;background:var(--paper);z-index:121;
  box-shadow:0 0 30px rgba(0,0,0,.25);transform:translateX(100%);transition:transform .22s ease;overflow-y:auto;padding:calc(12px + var(--safe-top)) 0 calc(24px + var(--safe-bottom));}
.tmenu.on{transform:none;}
.tmenu .mh{display:flex;align-items:center;justify-content:flex-start;gap:8px;padding:8px 16px 12px;border-bottom:1px solid var(--line);}
.tmenu .mh img{width:28px;height:28px;border-radius:6px;}
.tmenu .mh b{font-size:var(--fz-sub);}
.tmenu .mgrp{padding:12px 16px 4px;}
.tmenu .mgrp h5{font-size:var(--fz-help);font-weight:900;color:var(--charcoal);margin:0 0 2px;display:flex;align-items:center;gap:8px;}
.tmenu .mgrp h5::before{content:"";width:11px;height:11px;background:var(--amber);transform:skewX(-20deg);border-radius:1px;}
.mrow{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;background:none;border:none;font:inherit;
  font-size:var(--fz-sub);color:var(--ink);padding:0 4px;cursor:pointer;text-align:right;border-bottom:1px solid var(--line);}
.mgrp .mrow:last-child{border-bottom:none;}
.mrow .material-symbols-outlined{font-size:19px;color:var(--gray);}
.mrow .cnt{margin-inline-start:auto;color:var(--gray);font-size:var(--fz-help);}
/* topographic stability: unauthorized row = disabled grey, never removed (ui_screens §3ב) */
.mrow.disabled{color:var(--gray);opacity:.45;cursor:default;}
.view-seg{display:flex;border:1px solid var(--line);border-radius:999px;padding:2px;margin:8px 0 4px;background:var(--bg);}
.view-seg button{flex:1;border:none;background:none;font:inherit;font-size:var(--fz-help);padding:6px 0;border-radius:999px;color:var(--gray);cursor:pointer;}
.view-seg button.on{background:var(--amber-pale);color:var(--charcoal);font-weight:700;}
.view-chip{font-size:var(--fz-help);background:var(--amber-pale);color:var(--charcoal);border-radius:999px;padding:3px 10px;font-weight:700;flex:0 0 auto;display:none;}
.view-chip.on{display:inline-block;}

/* ---- project card: status chain + entity blocks (D-071) ---- */
.chain{display:flex;margin:10px 0 2px;cursor:pointer;overflow-x:auto;padding:2px 0 6px;}
.chain .st{flex:1;min-width:46px;display:flex;flex-direction:column;align-items:center;gap:5px;position:relative;font-size:10px;color:var(--gray);white-space:nowrap;}
.chain .st .dot{width:12px;height:12px;border-radius:50%;background:var(--paper);border:2px solid var(--line);z-index:1;box-sizing:border-box;}
.chain .st.done .dot{background:var(--green);border-color:var(--green);}
.chain .st.cur .dot{background:var(--amber);border-color:var(--amber-d);}
.chain .st.cur{color:var(--charcoal);font-weight:800;}
.chain .st::before{content:"";position:absolute;top:5px;inset-inline-start:-50%;width:100%;height:2px;background:var(--line);}
.chain .st:first-child::before{display:none;}
.chain .st.done::before,.chain .st.cur::before{background:var(--green);}
/* mobile (#32): the 6-stage chain with long copy is unreadable at ~380px — show only the CURRENT
   stage's label, others compact to dots. ≥560px (tablet/desktop) keeps the full horizontal chain. */
@media(max-width:559px){
  .chain .st:not(.cur) .lbl{display:none;}
  .chain .st.cur{flex:2.4;}
  .chain .st.cur .lbl{font-size:11px;}
}
.hist-row{display:flex;align-items:center;gap:10px;padding:10px 2px;border-bottom:1px solid var(--line);font-size:var(--fz-sub);}
.hist-row:last-child{border-bottom:none;}
.hist-row .d{color:var(--gray);font-size:var(--fz-help);min-width:46px;flex:0 0 auto;}
/* status sheet rows (#32): tappable stage + date + chevron; cancel row separated by a divider */
.st-row{display:flex;align-items:center;gap:10px;padding:11px 4px;border-bottom:1px solid var(--line);cursor:pointer;font-size:var(--fz-sub);}
.st-row:active{background:rgba(43,38,36,.045);}
.st-row .d{color:var(--gray);font-size:var(--fz-help);min-width:42px;flex:0 0 auto;}
.st-row .st-l{flex:1;min-width:0;}
.st-row .st-go{margin-inline-start:auto;color:var(--gray);flex:0 0 auto;}
.st-row.cur{font-weight:800;color:var(--charcoal);} .st-row.cur .st-go{color:var(--amber-d);}
.st-row.danger .st-l,.st-row.danger .material-symbols-outlined{color:var(--red);}
.st-div{height:0;border-top:1px solid var(--line);margin:8px 0 2px;}
.nextstep{margin:10px 0 2px;}
.nextstep .btn{width:100%;}
.blk{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);margin-top:12px;overflow:hidden;}
.blk .bh{display:flex;align-items:center;gap:8px;padding:10px 13px;font-weight:900;font-size:var(--fz-sub);color:var(--charcoal);border-bottom:1px solid var(--line);}
.blk .bh .material-symbols-outlined{font-size:18px;color:var(--gray);}
.blk .bh .grow{flex:1;}
.brow{display:flex;align-items:center;gap:8px;padding:0 13px;min-height:44px;border-bottom:1px solid var(--line);font-size:var(--fz-sub);cursor:pointer;}
.brow:last-child{border-bottom:none;}
.brow .bv{margin-inline-start:auto;color:var(--charcoal);font-weight:700;flex:0 0 auto;white-space:nowrap;}
.brow .bsub{color:var(--gray);font-size:var(--fz-help);}
/* #4 PARTS 4/5: the row's title (first span) truncates; the meta (bsub) and the date (bv) NEVER wrap —
   the date is locked visible at the inline-end, the meta stays on one line. Desktop + mobile. */
.brow>span:first-child{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.brow .bsub{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.brow .rtag{font-size:var(--fz-help);font-weight:700;border-radius:999px;padding:1px 8px;} /* status pill in a block row (e.g. "בוטלה"); colour from .tag-grey/.tag-green/etc. (#28) */
.pc-two{display:block;}
.pc-aside{display:block;}   /* F3/D-145: aside now carries identity-facts + collapsed tier → must stack on mobile (was display:none); .week timeline keeps its own mobile-hide rule */
@media(min-width:900px){ .pc-two{display:grid;grid-template-columns:300px 1fr;gap:20px;align-items:start;} .pc-aside{display:block;position:sticky;top:90px;order:0;} #blocks{order:1;} }   /* #5 item1: aside RIGHT in RTL (300px track = inline-start = right), middle (#blocks) LEFT (1fr) */
.pc-aside .week{margin-top:12px;}   /* #5 item4: timeline gets the standard inter-block gap (scoped to the card aside, not index home-two) */

/* ---- translation is content, not display (D-073): foreign-language content carries a
   translation line, saved on the record. client-view hides translations + internals. ---- */
.trans-line{font-size:var(--fz-sub);color:var(--ink);opacity:.85;}
.trans-line .ai-tag{font-size:10px;color:var(--gray);margin-inline-start:6px;}
body.client-view .trans-line,body.client-view .internal{display:none;}
/* recording wave: live randomized bars (D4) */
.wave{display:flex;align-items:center;gap:2px;flex:1;height:26px;overflow:hidden;}
.wave .wbar{width:3px;border-radius:2px;background:var(--amber);height:20%;transition:height .12s ease;flex:0 0 auto;}
.rbtn.icon{display:grid;place-items:center;padding:5px;}
.rbtn.icon .material-symbols-outlined{font-size:22px;}
/* full-context viewer sheet (queue row tap, D-073): invoice / source views over fixture data */
.viewer .vrow{display:flex;gap:10px;padding:9px 0;border-bottom:1px solid var(--line);font-size:var(--fz-sub);}
.viewer .vrow:last-child{border-bottom:none;}
.viewer .vrow b{min-width:86px;color:var(--gray);font-weight:700;font-size:var(--fz-help);flex:0 0 auto;}
.viewer .vdoc{background:var(--bg);border:1px solid var(--line);border-radius:10px;padding:12px;margin-bottom:12px;}
/* projects cuts-control strip */
.cutsbar{display:flex;align-items:center;gap:8px;padding:4px 0 6px;flex-wrap:wrap;}
.cutsbar .lbl{font-size:var(--fz-help);color:var(--gray);}
.showclosed{display:inline-flex;align-items:center;gap:5px;font-size:var(--fz-help);color:var(--gray);cursor:pointer;border:none;background:none;padding:4px;}
.showclosed .material-symbols-outlined{font-size:16px;}
.showclosed.on{color:var(--charcoal);font-weight:700;}

/* ---- offer states + version diff (D-071) ---- */
body.state-sent .row-amt,body.state-approved .row-amt{border-bottom:none;cursor:default;}
body.state-sent .summary .total,body.state-approved .summary .total{border-bottom:none;cursor:default;}
.verbar{display:flex;align-items:center;gap:8px;padding:2px 0 0;}
.diff-banner{background:var(--amber-pale);border:1px solid var(--amber);border-radius:10px;padding:9px 12px;font-size:var(--fz-sub);margin:8px 0 10px;display:flex;align-items:center;gap:10px;}
.diff-banner .grow{flex:1;}
.row.diff-removed .row-title,.row.diff-removed .row-sub{text-decoration:line-through;color:var(--gray);}
.row.diff-removed .row-amt{color:var(--gray);border-bottom:none;text-decoration:line-through;}
.row.diff-changed{background:var(--amber-pale);}
.diff-oldnew{font-size:var(--fz-help);color:var(--gray);flex:0 0 auto;}
.diff-tag{font-size:10px;font-weight:800;border-radius:999px;padding:2px 8px;flex:0 0 auto;}
.diff-tag.rem{background:var(--line);color:var(--gray);}
.diff-tag.add{background:var(--green);color:#fff;}

/* ---- projects list: status word = colored word + dot (design_language §4.13) ---- */
.row.urgent{border-inline-start:4px solid var(--red);}
.stdot{display:inline-flex;align-items:center;gap:5px;font-size:var(--fz-help);font-weight:700;flex:0 0 auto;border-radius:999px;padding:1px 9px;background:var(--bg);}   /* #27 — lifecycle reads as a clean chip too (keeps its urgency colour via st-*) */
.stdot::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor;}
.st-grey{color:var(--gray);} .st-amber{color:var(--amber-d);} .st-green{color:var(--green);} .st-red{color:var(--red);}

/* ---- Dudi-mode: Aging dashboard "מה תקוע" (D-077) — same shell as Moishi-mode, content differs ---- */
.aging-head{margin:4px 0 6px;}
.stuck-total{font-size:34px;font-weight:900;color:var(--red);letter-spacing:-.5px;line-height:1.1;}
.stuck-total small{font-size:14px;color:var(--gray);font-weight:700;}
.stuck-subs{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:9px;}
.stuck-sub{border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:11px 12px;text-decoration:none;color:var(--charcoal);background:var(--paper);display:block;}
.stuck-sub .lbl{font-size:var(--fz-help);color:var(--gray);}
.stuck-sub b{font-size:20px;font-weight:900;display:block;margin-top:2px;}
.stuck-sub b small{font-size:12px;color:var(--gray);font-weight:700;}
.stuck-sub.severe{border-inline-start:4px solid var(--red);}
.stuck-sub.severe b{color:var(--red);}
.agerow{padding:0 13px;border-bottom:1px solid var(--line);cursor:pointer;}
.agerow:last-child{border-bottom:none;}
.agerow.sev3{border-inline-start:4px solid var(--red);}
.agerow.sev2{border-inline-start:4px solid var(--amber);}
.agerow.sev1{border-inline-start:4px solid var(--line);}
.agerow .ar1{display:flex;align-items:center;gap:8px;min-height:var(--row-h);}
.agerow .ar-title{font-size:var(--fz-row);font-weight:700;color:var(--ink);flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.agerow .ar-amt{font-size:var(--fz-row);font-weight:900;color:var(--charcoal);flex:0 0 auto;}
.agerow .ar2{display:flex;align-items:center;gap:8px;padding-bottom:9px;margin-top:-2px;}
.agerow .ar-why{font-size:var(--fz-sub);color:var(--gray);flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.agerow .ar-act{font-size:var(--fz-help);font-weight:800;color:var(--amber-d);flex:0 0 auto;}
.age-side h4{margin:0 0 8px;font-size:var(--fz-help);color:var(--gray);font-weight:700;}
.age-side .asrow{display:flex;justify-content:space-between;gap:8px;padding:8px 0;border-bottom:1px solid var(--line);font-size:var(--fz-sub);}
.age-side .asrow:last-child{border-bottom:none;} .age-side .asrow b{font-weight:900;}

/* ---- home: stat tiles + action rows + week panel (D-070) ---- */
.tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin:6px 0 2px;}
.tile{border-radius:var(--radius);padding:11px 12px;display:flex;flex-direction:column;gap:1px;text-decoration:none;border:1px solid var(--line);box-shadow:var(--shadow);min-height:78px;cursor:pointer;}
.tile .t-top{font-size:19px;font-weight:900;letter-spacing:-.2px;}
.tile .t-top small{font-size:12px;font-weight:700;opacity:.75;}
.tile .t-lbl{font-size:var(--fz-help);line-height:1.25;margin-top:auto;}
.tile-amber{background:var(--amber);border-color:var(--amber-d);color:var(--charcoal);}
.tile-charcoal{background:var(--charcoal);border-color:var(--charcoal);color:#fff;}
.tile-paper{background:var(--paper);color:var(--charcoal);}
.tile-paper .t-lbl,.tile-amber .t-lbl{color:inherit;opacity:.8;} .tile-charcoal .t-lbl{opacity:.75;}
.trow .row-1 .btn{flex:0 0 auto;}
.trow.urgent{border-inline-start:4px solid var(--red);} /* urgency at item level (ui_screens §5), not sub-line text */
.week{display:none;}
.week .wk-card{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:14px;}
.week h4{margin:0 0 8px;font-size:var(--fz-help);color:var(--gray);font-weight:700;}
.week .wrow{display:flex;justify-content:space-between;gap:8px;padding:8px 0;border-bottom:1px solid var(--line);font-size:var(--fz-sub);}
.week .wrow:last-child{border-bottom:none;} .week .wrow b{font-weight:900;}
.home-two{display:block;}
@media(min-width:900px){ .home-two{display:grid;grid-template-columns:1fr 300px;gap:20px;align-items:start;} .week{display:block;position:sticky;top:90px;} }

/* ✓-then-disappear feedback (ui_screens §4, וילאן §11.3): check overlay, item leaves after ~800ms */
.okwrap{position:relative;}
.okmark{position:absolute;inset:0;display:grid;place-items:center;background:rgba(255,255,255,.88);border-radius:inherit;color:var(--green);z-index:5;}
.okmark .material-symbols-outlined{font-size:40px;}
@keyframes okleave{to{opacity:0;transform:translateY(-5px);}}
.ok-leave{animation:okleave .25s ease .55s forwards;}

/* nav badge = "ממתין להכרעת-מוישי" בלבד (ui_screens §3, וילאן §17.3) */
.navitem{position:relative;}
.nbadge{position:absolute;top:3px;inset-inline-start:50%;margin-inline-start:6px;background:var(--amber);color:var(--charcoal);font-size:10px;font-weight:800;min-width:16px;height:16px;border-radius:999px;display:grid;place-items:center;padding:0 4px;line-height:1;}

/* intake queue parts: source tag, transcript (original+translation), extracted fields, photo thumb */
.qitem .src{font-size:var(--fz-help);color:var(--gray);display:inline-flex;align-items:center;gap:4px;flex:0 0 auto;}
.qitem .src .material-symbols-outlined{font-size:16px;}
.transcript{background:var(--bg);border:1px solid var(--line);border-radius:10px;padding:9px 11px;margin-top:9px;font-size:var(--fz-sub);}
.transcript .orig{color:var(--gray);font-size:var(--fz-help);direction:ltr;text-align:left;}
.transcript .trans{color:var(--ink);margin-top:3px;}
.xfields{margin-top:9px;font-size:var(--fz-sub);}
.xfields .xf{display:flex;gap:8px;padding:4px 0;}
.xfields .xf b{color:var(--gray);font-weight:700;font-size:var(--fz-help);min-width:52px;}
.pthumb{width:74px;height:74px;border-radius:10px;background:var(--bg);border:1px solid var(--line);display:grid;place-items:center;color:var(--gray);flex:0 0 auto;}
.pthumb .material-symbols-outlined{font-size:30px;}
.qrowflex{display:flex;gap:11px;margin-top:9px;align-items:center;}

/* ---- shared loading skeleton + error states (ui_screens §1: 4 מצבים) — used by offer + payments via states.js ---- */
.sk-card{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:14px;margin-bottom:10px;}
.sk-line{height:12px;border-radius:6px;margin:7px 0;background:linear-gradient(90deg,var(--line) 25%,#F3EFE9 37%,var(--line) 63%);background-size:400% 100%;animation:sk 1.2s ease infinite;}
.sk-line.w40{width:40%;} .sk-line.w60{width:60%;} .sk-line.w80{width:80%;}
.sk-row{display:flex;gap:10px;margin-top:14px;}
.sk-pill{height:34px;flex:1;border-radius:var(--radius-btn);background:linear-gradient(90deg,var(--line) 25%,#F3EFE9 37%,var(--line) 63%);background-size:400% 100%;animation:sk 1.2s ease infinite;}
@keyframes sk{0%{background-position:100% 0;}100%{background-position:0 0;}}
.state-error{text-align:center;color:var(--ink);padding:48px 24px;display:flex;flex-direction:column;align-items:center;gap:6px;}
.state-error .material-symbols-outlined{font-size:46px;color:var(--red);}
.state-error h3{margin:4px 0 0;font-size:var(--fz-section);font-weight:900;color:var(--charcoal);}
.state-error p{margin:0 0 10px;font-size:var(--fz-sub);color:var(--gray);max-width:280px;line-height:1.5;}

/* ---- "בקרוב" complementary hint (D-137): a small dimmed marker appended to a control that
   keeps its OWN icon+label; never replaces them. The control itself is dimmed/disabled separately. ---- */
.soon{font-size:11px;font-weight:600;opacity:.8;margin-inline-start:5px;white-space:nowrap;}
/* ---- placeholder (home/intake "בקרוב") ---- */
.placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:var(--gray);padding:60px 24px;min-height:55vh;}
.placeholder .material-symbols-outlined{font-size:56px;color:var(--amber);margin-bottom:12px;}
.placeholder h2{font-size:var(--fz-screen);font-weight:900;color:var(--charcoal);margin:0 0 6px;}
.placeholder p{margin:0;font-size:var(--fz-sub);}

/* ---- desktop ---- */
@media(min-width:900px){
  .app{max-width:1180px;height:100vh;}
  /* 4th row "filter" between stripe and content: a sticky filter bar (.filterbar/.setfind) is a
     direct child of .scroll with no grid-area; without its own area it auto-places into an implicit
     row at the BOTTOM, killing its sticky and pushing it below the content. (Projects-list round.) */
  .scroll{display:grid;grid-template-columns:1fr;grid-template-rows:auto auto auto 1fr;grid-template-areas:"head" "stripe" "filter" "content";align-content:start;}
  .head{grid-area:head;} .stripe{grid-area:stripe;} .filterbar,.setfind{grid-area:filter;max-width:860px;}
  .content{grid-area:content;max-width:860px;width:100%;}
  .summary .total{font-size:30px;}
}
/* desktop = list + fixed side-panel (ui_screens §6.2; restores pre-rewrite offer layout, D-069).
   Scoped to .has-panel (offer) so the summary becomes a right-side panel instead of a sticky bar;
   payments/placeholders keep the centered single column above. */
@media(min-width:900px){
  body.has-panel .app{display:grid;grid-template-columns:1fr 360px;grid-template-rows:1fr;height:100dvh;max-width:1180px;}
  body.has-panel .scroll{grid-column:1;min-width:0;}
  body.has-panel .content{max-width:760px;}
  body.has-panel .bottom{grid-column:2;display:flex;flex-direction:column;border-inline-start:1px solid var(--line);box-shadow:none;padding-bottom:0;}
  body.has-panel .summary{flex-direction:column;align-items:stretch;gap:14px;border-top:none;padding:22px 18px;}
  body.has-panel .summary .lbl{font-size:var(--fz-sub);}
  body.has-panel .summary .grow{display:none;}
  body.has-panel .summary .btn-primary{width:100%;}
  body.has-panel .nav{margin-top:auto;}
}

/* ───────────── Round 14: settings + about (D-083/D-084) ───────────── */
/* search-filter pinned at the head of settings (mandatory entry point) */
.setfind{display:flex;align-items:center;gap:8px;margin:8px 16px 2px;background:var(--paper);border:1px solid var(--amber);border-radius:var(--radius-btn);padding:0 10px;box-shadow:var(--shadow);}
.setfind .material-symbols-outlined{font-size:20px;color:var(--gray);flex:0 0 auto;}
.setfind input{flex:1;border:none;background:none;font:inherit;height:42px;outline:none;min-width:0;}
.setfind .fb-btn{background:none;border:none;color:var(--gray);cursor:pointer;display:grid;place-items:center;width:30px;height:30px;border-radius:8px;}

.setgrp{margin:14px 0 0;}
.setgrp-h{font-size:var(--fz-section);font-weight:800;color:var(--charcoal);padding:0 18px 6px;display:flex;flex-wrap:wrap;align-items:baseline;gap:8px;}
.setgrp-h::before{content:"";display:inline-block;width:3px;height:14px;background:var(--amber);transform:skewX(-12deg);margin-inline-end:2px;}
.setgrp-sub{font-size:var(--fz-help);font-weight:600;color:var(--gray);}
.setgrp-foot{font-size:var(--fz-help);color:var(--gray);padding:8px 18px 0;display:flex;gap:6px;align-items:flex-start;line-height:1.5;}
.setgrp-foot .material-symbols-outlined{font-size:16px;flex:0 0 auto;color:var(--amber-d);}

.setrow{display:flex;align-items:center;gap:10px;min-height:var(--row-h);padding:9px 4px;border-bottom:1px solid var(--line);}
.setrow:last-child{border-bottom:none;}
.setrow.tappable{cursor:pointer;}
.setrow .ic-lead{flex:0 0 auto;display:grid;place-items:center;color:var(--gray);width:24px;}
.setrow .ic-lead .material-symbols-outlined{font-size:20px;}
.setrow-tx{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;}
.setrow-l{font-size:var(--fz-row);font-weight:700;color:var(--ink);}
.setrow-n{font-size:var(--fz-help);color:var(--gray);margin-top:1px;}
.setrow-v{flex:0 0 auto;font-size:var(--fz-sub);font-weight:700;color:var(--charcoal);text-align:start;max-width:46%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.setrow .chev{font-size:18px;color:var(--gray);flex:0 0 auto;}
.setrow.locked{opacity:.72;}
.setrow.locked .setrow-v{color:var(--gray);font-weight:600;}
.setrow .locknote{color:var(--gray);}

.setedit{flex-basis:100%;display:flex;gap:8px;margin-top:8px;}
.setedit-in{flex:1;border:1px solid var(--amber);border-radius:8px;padding:8px 10px;font:inherit;outline:none;min-width:0;}

.aboutlink{display:flex;align-items:center;gap:10px;margin:16px 0 4px;padding:13px 14px;background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);font-weight:700;color:var(--ink);text-decoration:none;}
.aboutlink .chev{margin-inline-start:auto;color:var(--gray);}
.aboutlink .material-symbols-outlined{font-size:20px;color:var(--amber-d);}

/* about — connection status + version stamp */
.connstat{flex:0 0 auto;display:inline-flex;align-items:center;gap:3px;font-size:var(--fz-help);font-weight:800;padding:3px 9px;border-radius:999px;}
.connstat .material-symbols-outlined{font-size:15px;}
.connstat.ok{color:var(--green);background:rgba(31,122,77,.10);}
.connstat.down{color:var(--red);background:rgba(192,59,34,.10);}
.verscard{text-align:center;padding:16px;}
.versbig{font-size:34px;font-weight:900;color:var(--charcoal);letter-spacing:.5px;line-height:1;}
.versmeta{font-size:var(--fz-sub);color:var(--amber-d);font-weight:700;margin-top:4px;}
.versrow{display:flex;justify-content:space-between;align-items:center;border-top:1px solid var(--line);margin-top:10px;padding-top:8px;font-size:var(--fz-sub);color:var(--gray);}
.versrow b{color:var(--ink);}
.mono{font-family:ui-monospace,Menlo,Consolas,monospace;}

/* #27 — UNIFORM row-tag chip (the mechanism's tag look, identical across every list type). The base lives
   here so RenList's `.row .rtag` chips render the same everywhere; chip shape was previously scoped only to
   `.crudrow`/`.brow`, so list.html rows showed loose/coloured text. Variants set colour only; shape is shared. */
.rtag{display:inline-flex;align-items:center;font-size:var(--fz-help);font-weight:700;color:var(--gray);background:var(--bg);border-radius:999px;padding:1px 8px;flex:0 0 auto;white-space:nowrap;}
.rtag.rtag-warn{color:var(--red);background:rgba(192,59,34,.12);}   /* flagged · סומן לבדיקה */
.rtag.rtag-mute{color:var(--gray);background:var(--bg);}             /* טרם אומת */

/* ───────────── Round 15: management card sheet + unified contacts (D-085) ───────────── */
.crudrow .rtag{font-size:var(--fz-help);font-weight:700;color:var(--amber-d);background:var(--amber-pale);border-radius:999px;padding:1px 8px;margin-inline-start:6px;flex:0 0 auto;}
/* distinct status-tag colors (Wave 2 C): paid=green, overdue=red, draft/cancelled=grey, else amber */
.rtag.tag-green{color:var(--green);background:rgba(31,122,77,.12);}
.rtag.tag-red{color:var(--red);background:rgba(192,59,34,.12);}
.rtag.tag-grey{color:var(--gray);background:var(--bg);}
.crudrow.attn{position:relative;}
.crudrow.attn::before{content:"";position:absolute;inset-inline-start:-1px;top:8px;bottom:8px;width:3px;background:var(--amber);border-radius:2px;}

/* entity card / creation form = bottom sheet */
.sheet-back{position:fixed;inset:0;background:rgba(43,38,36,.34);opacity:0;pointer-events:none;transition:opacity .2s;z-index:60;}
.sheet-back.on{opacity:1;pointer-events:auto;}
.csheet{position:fixed;inset-inline:0;bottom:0;z-index:61;background:var(--paper);border-radius:18px 18px 0 0;box-shadow:var(--shadow-up);padding:8px 16px calc(20px + var(--safe-bottom));transform:translateY(105%);transition:transform .24s cubic-bezier(.25,.8,.3,1);max-height:88vh;overflow-y:auto;}
.csheet.on{transform:translateY(0);}
.csheet-grab{width:38px;height:4px;border-radius:2px;background:var(--line);margin:2px auto 10px;}
.csheet-h{display:flex;align-items:flex-start;gap:10px;}
.csheet-t{font-size:var(--fz-screen);font-weight:900;color:var(--charcoal);line-height:1.15;}
.csheet-s{font-size:var(--fz-sub);color:var(--gray);font-weight:700;margin-top:2px;}
.csheet-x{margin-inline-start:auto;background:none;border:none;color:var(--gray);cursor:pointer;display:grid;place-items:center;width:34px;height:34px;border-radius:9px;flex:0 0 auto;}
.csheet-comm{display:flex;gap:10px;margin:14px 0 4px;}
.commbtn{flex:1;display:flex;align-items:center;justify-content:center;gap:7px;height:46px;border-radius:var(--radius-btn);font-weight:800;text-decoration:none;cursor:pointer;border:1px solid var(--line);}
.commbtn .material-symbols-outlined{font-size:20px;}
.commbtn.wa{background:rgba(31,122,77,.10);color:var(--green);border-color:rgba(31,122,77,.25);}
.commbtn.call{background:var(--bg);color:var(--ink);}
.cpend{display:flex;align-items:center;gap:6px;font-size:var(--fz-help);color:var(--amber-d);background:var(--amber-pale);border-radius:9px;padding:7px 10px;margin:10px 0 2px;}
.cpend .material-symbols-outlined{font-size:16px;}
.csheet-fields{margin:10px 0 4px;}
.cfield{display:flex;align-items:center;gap:8px;min-height:46px;padding:7px 2px;border-bottom:1px solid var(--line);cursor:pointer;}
.cfield:last-child{border-bottom:none;}
.cfield .cf-l{font-size:var(--fz-help);color:var(--gray);font-weight:700;flex:0 0 34%;}
.cfield .cf-v{flex:1;font-size:var(--fz-row);color:var(--ink);font-weight:600;overflow-wrap:anywhere;}
.cfield > .material-symbols-outlined{font-size:17px;color:var(--line);flex:0 0 auto;}
/* #4 PART 6: direct-field rows STACK (label above value) on mobile so a phone/email/long value sits on
   one line — the 34% label column ate the width and wrapped 10-digit phones. Placed AFTER the base
   .cfield rules so it wins by source order (a @media block does not raise specificity). */
@media(max-width:559px){
  .cfield{flex-wrap:wrap;row-gap:1px;}
  .cfield .cf-l{flex:1 1 100%;}
  .cfield .cf-v{flex:1 1 auto;min-width:0;}
}
.cfield.editing{cursor:default;}
.cf-in{flex:1;border:1px solid var(--amber);border-radius:8px;padding:7px 9px;font:inherit;outline:none;min-width:0;}
.cf-save{background:var(--amber);border:none;border-radius:8px;width:38px;height:34px;display:grid;place-items:center;cursor:pointer;color:var(--charcoal);flex:0 0 auto;}
.cnew{display:block;margin-bottom:10px;}
.cnew span{display:block;font-size:var(--fz-help);color:var(--gray);font-weight:700;margin:0 0 4px;}
.cnew input{width:100%;border:1px solid var(--line);border-radius:9px;padding:10px 11px;font:inherit;outline:none;box-sizing:border-box;}
.cnew input:focus{border-color:var(--amber);}
.csheet-foot{display:flex;gap:10px;margin-top:14px;padding-top:12px;border-top:1px solid var(--line);}
.csheet-foot .btn-tertiary.danger{color:var(--red);margin-inline-start:auto;}
.csheet.creating .csheet-foot .btn{flex:1;}

/* ───────────── Round 15: settings switch + options picker (D-085/C) ───────────── */
.setrow.viewonly{cursor:default;}
.setrow.viewonly .setrow-v{color:var(--gray);font-weight:600;}
/* toggle switch — reads clearly as on/off, one tap */
.switch{flex:0 0 auto;width:42px;height:24px;border-radius:999px;background:var(--line);position:relative;transition:background .18s;}
.switch .knob{position:absolute;top:2px;inset-inline-start:2px;width:20px;height:20px;border-radius:50%;background:var(--paper);box-shadow:var(--shadow);transition:inset-inline-start .18s;}
.switch.on{background:var(--green);}
.switch.on .knob{inset-inline-start:20px;}
/* options picker sheet */
.picksheet{position:fixed;inset-inline:0;bottom:0;z-index:61;background:var(--paper);border-radius:18px 18px 0 0;box-shadow:var(--shadow-up);padding:8px 14px calc(16px + var(--safe-bottom));transform:translateY(105%);transition:transform .22s cubic-bezier(.25,.8,.3,1);max-height:80vh;overflow-y:auto;}
.picksheet.on{transform:translateY(0);}
.picksheet-h{font-size:var(--fz-section);font-weight:800;color:var(--charcoal);padding:2px 4px 10px;}
.pickopt{display:flex;align-items:center;gap:8px;width:100%;background:none;border:none;border-top:1px solid var(--line);padding:14px 6px;font:inherit;font-size:var(--fz-row);color:var(--ink);cursor:pointer;text-align:start;}
.pickopt .material-symbols-outlined{margin-inline-start:auto;color:var(--green);font-size:20px;}
.pickopt.on{font-weight:800;color:var(--charcoal);}
.pickopt:active{background:rgba(43,38,36,.04);}

/* ───────────── Round 16: empty-optional field affordance + new screens (D-086) ───────────── */
.cfield.cf-add{cursor:pointer;}
.cf-addhint{flex:1;display:flex;align-items:center;gap:5px;color:var(--amber-d);font-size:var(--fz-sub);font-weight:700;}
.cf-addhint .material-symbols-outlined{font-size:17px;}

/* ───────────── Round 16 screens: catalog · invoice-out · incoming (D-086) ───────────── */
/* catalog */
.catbar{display:flex;gap:7px;overflow-x:auto;padding:2px 0 8px;-webkit-overflow-scrolling:touch;scrollbar-width:none;}
.catbar::-webkit-scrollbar{display:none;}
.catchip{flex:0 0 auto;border:1px solid var(--line);background:var(--paper);border-radius:999px;padding:5px 12px;font-size:var(--fz-help);font-weight:700;color:var(--gray);cursor:pointer;white-space:nowrap;}
.catchip.on{background:var(--amber-pale);color:var(--charcoal);border-color:var(--amber);}
.cat-h{margin:14px 0 6px;}
.catrow{background:var(--paper);border:1px solid var(--line);border-radius:10px;padding:9px 11px;margin-bottom:6px;cursor:pointer;box-shadow:var(--shadow);}
.cr-1{display:flex;align-items:flex-start;gap:8px;}
.cr-desc{flex:1;font-size:var(--fz-sub);font-weight:600;color:var(--ink);line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.cr-price{flex:0 0 auto;font-weight:800;color:var(--charcoal);}
.cr-2{display:flex;align-items:center;gap:8px;margin-top:4px;}
.cr-meta{flex:1;font-size:var(--fz-help);color:var(--gray);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.cr-role{font-weight:700;padding:1px 6px;border-radius:999px;}
/* distinct catalog pricing_role colors (Wave 2 C): anchor=green, complexity=amber, neutral=grey */
.cr-role.role-anchor{color:var(--green);background:rgba(31,122,77,.12);}
.cr-role.role-complexity{color:var(--amber-d);background:var(--amber-pale);}
.cr-role.role-neutral{color:var(--gray);background:var(--bg);}
.role-anchor{color:var(--amber-d);background:var(--amber-pale);}
.role-complexity{color:#7A4DAB;background:rgba(122,77,171,.10);}
.role-neutral{color:var(--gray);background:var(--bg);}
.cr-use{flex:0 0 auto;font-size:var(--fz-help);color:var(--gray);font-weight:700;}
.catmore{text-align:center;color:var(--gray);font-size:var(--fz-help);padding:10px;}
/* catalog item detail */
.cs-block{margin:12px 0 0;}
.cs-h{font-size:var(--fz-help);font-weight:800;color:var(--gray);margin-bottom:6px;}
.cs-clauses{margin:0;padding-inline-start:18px;font-size:var(--fz-sub);color:var(--ink);line-height:1.6;}
.cs-prices{display:flex;gap:8px;}
.cs-p{flex:1;border:1px solid var(--line);border-radius:10px;padding:9px;text-align:center;}
.cs-p.own{border-color:var(--amber);background:var(--amber-pale);}
.cs-p b{display:block;font-size:var(--fz-section);color:var(--charcoal);margin:3px 0;}
.cs-pl{font-size:var(--fz-help);font-weight:800;color:var(--ink);}
.cs-pn{font-size:10px;color:var(--gray);}
.cs-basis{font-size:var(--fz-help);color:var(--gray);margin-top:8px;}
.cs-srcs{display:flex;flex-direction:column;gap:4px;}
.cs-src{display:flex;gap:8px;font-size:var(--fz-help);color:var(--ink);border-bottom:1px solid var(--line);padding-bottom:4px;}
.cs-src span:nth-child(2){flex:1;color:var(--gray);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
/* invoice-out */
.invmeta,.invsum{padding:4px 13px;}
.imrow{display:flex;gap:10px;padding:9px 0;border-bottom:1px solid var(--line);align-items:flex-start;}
.imrow:last-child{border-bottom:none;}
.iml{flex:0 0 34%;font-size:var(--fz-help);color:var(--gray);font-weight:700;}
.imv{flex:1;font-size:var(--fz-sub);color:var(--ink);font-weight:600;}
.imv small{color:var(--gray);font-weight:400;}
.iline{padding:9px 13px;border-bottom:1px solid var(--line);}
.iline:last-child{border-bottom:none;}
.il-1{display:flex;gap:8px;align-items:flex-start;}
.il-d{flex:1;font-size:var(--fz-sub);color:var(--ink);font-weight:600;line-height:1.35;}
.il-t{flex:0 0 auto;font-weight:700;color:var(--charcoal);}
.il-2{font-size:var(--fz-help);color:var(--gray);margin-top:2px;}
.isrow{display:flex;justify-content:space-between;padding:7px 0;font-size:var(--fz-sub);color:var(--ink);border-bottom:1px solid var(--line);}
.isrow:last-child{border-bottom:none;}
.isrow.tot{font-weight:900;color:var(--charcoal);font-size:var(--fz-section);border-top:2px solid var(--charcoal);margin-top:3px;padding-top:9px;}
.qrbill{display:flex;gap:12px;align-items:center;padding:12px 13px;border-top:1px dashed var(--line);}
.qrbox{position:relative;width:64px;height:64px;flex:0 0 auto;border:2px solid var(--charcoal);border-radius:6px;display:grid;place-items:center;}
.qrbox .material-symbols-outlined{font-size:46px;color:var(--charcoal);}
.qrbox .swisscross{position:absolute;width:16px;height:16px;background:var(--charcoal);clip-path:polygon(40% 0,60% 0,60% 40%,100% 40%,100% 60%,60% 60%,60% 100%,40% 100%,40% 60%,0 60%,0 40%,40% 40%);}
.qrtx b{display:block;color:var(--charcoal);} .qrtx small{color:var(--gray);font-size:var(--fz-help);}
/* incoming intake */
.intake-in{display:flex;gap:0;padding:0;overflow:hidden;}
.intk{flex:1;display:flex;flex-direction:column;align-items:center;gap:4px;padding:13px 4px;background:none;border:none;border-inline-end:1px solid var(--line);font:inherit;font-size:var(--fz-help);font-weight:700;color:var(--ink);cursor:pointer;}
.intk:last-child{border-inline-end:none;}
.intk .material-symbols-outlined{font-size:24px;color:var(--amber-d);}
.incrow .incflex{display:flex;gap:10px;align-items:flex-start;margin:8px 0;}
.incrow .bel{flex:0 0 auto;width:42px;height:52px;border:1px solid var(--line);border-radius:6px;display:grid;place-items:center;color:var(--gray);background:var(--bg);}
.xfields-inline{flex:1;display:flex;flex-wrap:wrap;gap:5px;min-width:0;}
.xchip{font-size:var(--fz-help);background:var(--bg);border:1px solid var(--line);border-radius:7px;padding:3px 7px;color:var(--ink);}
.xchip b{color:var(--gray);font-weight:700;}
.lowconf{color:var(--amber-d);font-size:11px;vertical-align:middle;}
.belegbox{display:flex;flex-direction:column;align-items:center;gap:6px;padding:24px;border:1px dashed var(--line);border-radius:10px;background:var(--bg);color:var(--gray);margin-bottom:10px;}
.belegbox .material-symbols-outlined{font-size:48px;color:var(--gray);}
.xtag{display:flex;align-items:center;gap:6px;font-size:var(--fz-help);color:var(--amber-d);background:var(--amber-pale);border-radius:8px;padding:7px 10px;margin-bottom:8px;}
.xtag .material-symbols-outlined{font-size:16px;}

/* ───────────── Round 17: foundational grammar — view vs clickable, CHF, list-add (D-087) ───────────── */
/* CHF symbol distinct from digits (H): smaller, lighter, spaced — never reads as a number */
.cur{font-size:.7em;font-weight:600;color:var(--gray);margin-inline-end:3px;letter-spacing:.5px;}

/* A2 — display block looks like TEXT, not a stack of buttons: no frame, no shadow, hairline rows */
.flatcard{background:none;border:none;box-shadow:none;border-radius:0;}
.flatcard .imrow,.flatcard .isrow,.flatcard .setrow{background:none;}
/* a pure view-row carries no affordance at all (cursor, press, chevron) */
.setrow.viewonly,.imrow,.isrow{cursor:default;}
.setrow.viewonly:active,.imrow:active,.isrow:active{background:none;filter:none;}
.viewtag{font-size:10px;font-weight:700;color:var(--gray);background:var(--bg);border:1px solid var(--line);border-radius:6px;padding:1px 6px;margin-inline-start:6px;}

/* A1 — + הוסף at the TOP of a list, beside the title (visible, context-bound) */
.list-add{display:inline-flex;align-items:center;gap:5px;flex:0 0 auto;background:var(--amber-pale);color:var(--amber-d);border:1px solid var(--amber);border-radius:999px;padding:6px 13px;font:inherit;font-size:var(--fz-help);font-weight:800;cursor:pointer;}
.list-add .material-symbols-outlined{font-size:18px;}
.head-addrow{display:flex;align-items:center;gap:10px;margin-top:6px;}
.head-addrow .title{margin:0;flex:1;}

/* F — version quick-reference at the menu bottom (grey, low-key, tappable) */
.menu-ver{display:block;width:100%;text-align:center;background:none;border:none;border-top:1px solid var(--line);margin-top:10px;padding:14px 0 6px;color:var(--gray);font:inherit;font-size:var(--fz-help);font-weight:600;cursor:pointer;letter-spacing:.3px;}
.menu-ver:active{color:var(--ink);}

/* E — info-bubble (ⓘ) for setting detail instead of a permanent sub-line */
.info-i{flex:0 0 auto;color:var(--gray);cursor:pointer;display:grid;place-items:center;width:24px;height:24px;}
.info-i .material-symbols-outlined{font-size:18px;}

/* B2 — Assignment transfer affordance (העבר ל) in the long-press menu + card */
.ctx button.xfer .material-symbols-outlined,.csheet-foot .xferbtn .material-symbols-outlined{color:var(--amber-d);}
.xferbtn{display:inline-flex;align-items:center;gap:6px;background:var(--bg);border:1px solid var(--line);border-radius:var(--radius-btn);padding:9px 12px;font:inherit;font-weight:700;color:var(--ink);cursor:pointer;}

.csheet-links{display:flex;gap:8px;margin:12px 0 4px;}
.csheet-links .xferbtn{flex:1;justify-content:center;}
.csheet-xfer{display:flex;gap:10px;margin:12px 0 0;flex-wrap:wrap;}
.ctx button.xfer{color:var(--amber-d);font-weight:700;}

.setedit-suf{align-self:center;color:var(--gray);font-size:var(--fz-sub);font-weight:700;}

/* offer version-pick dropdown (A5) */
.verdrop-back{position:fixed;inset:0;z-index:64;display:none;}
.verdrop{position:fixed;z-index:65;display:none;background:var(--paper);border:1px solid var(--line);border-radius:12px;box-shadow:0 6px 24px rgba(43,38,36,.18);padding:5px;min-width:210px;max-width:300px;}
.veropt{display:flex;align-items:center;gap:8px;width:100%;background:none;border:none;border-radius:8px;padding:11px 10px;font:inherit;cursor:pointer;text-align:start;}
.veropt:active{background:rgba(43,38,36,.05);}
.veropt.on{background:var(--amber-pale);}
.veropt .d{font-weight:800;color:var(--charcoal);flex:0 0 auto;}
.veropt .vst{flex:1;color:var(--gray);font-size:var(--fz-help);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.veropt .vt{font-weight:700;color:var(--charcoal);}
.veropt .material-symbols-outlined{color:var(--green);font-size:18px;}

/* ───────────── Round 18: root-fixes — flat view-rows, pencil-edit, zero-delete (D-088) ───────────── */
/* A2 (hard): a pure view-row is text — no card row, no separators, no press */
.flatcard .setrow,.flatcard .imrow,.flatcard .isrow{border-bottom:none;padding-top:5px;padding-bottom:5px;}
.setrow.viewonly .setrow-l{color:var(--gray);font-weight:700;}
.setrow.viewonly .setrow-v{color:var(--ink);font-weight:700;}
/* A: edit is a real pencil BUTTON; tapping the field body never edits */
.cf-edit{flex:0 0 auto;background:none;border:none;color:var(--gray);cursor:pointer;display:grid;place-items:center;width:34px;height:34px;border-radius:8px;}
.cf-edit .material-symbols-outlined{font-size:18px;}
.cf-edit:active{background:rgba(43,38,36,.06);}
.cfield.haslink{cursor:pointer;}
.cfield.haslink .cf-v{color:var(--amber-d);}
/* D: inactive (hidden) item shown muted with a tag when the filter is on */
.crudrow.inactive,.row.inactive,.txrow.inactive{opacity:.55;}
.crudrow.inactive .rtag{color:var(--gray);background:var(--bg);}
.inactive-tag{font-size:var(--fz-help);font-weight:700;color:var(--gray);background:var(--bg);border:1px solid var(--line);border-radius:999px;padding:1px 7px;margin-inline-start:6px;}
/* manual-transaction sheet reuses .csheet; field rows */
.mtx-field{display:block;margin-bottom:10px;}
.mtx-field span{display:block;font-size:var(--fz-help);color:var(--gray);font-weight:700;margin:0 0 4px;}
.mtx-field input,.mtx-field select{width:100%;border:1px solid var(--line);border-radius:9px;padding:10px 11px;font:inherit;outline:none;box-sizing:border-box;background:var(--paper);}
.mtx-field input:focus,.mtx-field select:focus{border-color:var(--amber);}
.pk-field{width:100%;text-align:start;border:1px solid var(--line);border-radius:9px;padding:10px 11px;font:inherit;background:var(--paper);color:var(--ink);cursor:pointer;box-sizing:border-box;}   /* #9 A2: styled picker-field (replaces native select) */


/* ───────────── Round 19: transactions screen (1a) ───────────── */
.tx-amt{font-size:var(--fz-row);font-weight:800;flex:0 0 auto;}
.tx-amt.tx-in{color:var(--green);} .tx-amt.tx-out{color:var(--charcoal);}
/* per-account aggregate hint (D-093): unresolved personal-account txns are silent per-row, surfaced as ONE count */
.tx-hint{display:flex;align-items:center;gap:8px;background:var(--bg);border:1px dashed var(--line);border-radius:10px;padding:10px 12px;margin:2px 0 10px;font-size:var(--fz-sub);color:var(--gray);}
.tx-hint .material-symbols-outlined{font-size:18px;color:var(--amber-d);flex:0 0 auto;}
.tx-classify{display:flex;flex-direction:column;gap:8px;margin:6px 0 2px;}
.tx-classify .btn{width:100%;}
.row.tx-oos{opacity:.5;}
.tx-oos-tag{font-size:10px;font-weight:800;background:var(--line);color:var(--gray);border-radius:999px;padding:1px 8px;margin-inline-start:6px;flex:0 0 auto;}
.cf-hint{font-size:var(--fz-help);color:var(--gray);font-weight:600;margin-inline-start:6px;}

/* ───────────── Round 20: financial backbone 1b (hours/salary/profit/buckets) ───────────── */
.est-tag{font-size:10px;font-weight:800;background:var(--amber-pale);color:var(--amber-d);border-radius:999px;padding:1px 7px;margin-inline-start:6px;white-space:nowrap;}
.reg-banner{display:flex;gap:8px;align-items:flex-start;background:var(--amber-pale);border:1px solid var(--amber);border-radius:10px;padding:10px 12px;margin:8px 0;font-size:var(--fz-help);color:var(--ink);line-height:1.55;}
.reg-banner .material-symbols-outlined{font-size:18px;color:var(--amber-d);flex:0 0 auto;}
.btn-locked{background:var(--line);color:var(--gray);height:var(--primary-h);padding:0 18px;border:none;border-radius:var(--radius-btn);font:inherit;font-weight:800;display:inline-flex;align-items:center;justify-content:center;gap:7px;width:100%;cursor:not-allowed;}
.btn-locked .material-symbols-outlined{font-size:20px;color:var(--gray);}
.lock-reason{font-size:var(--fz-help);color:var(--gray);text-align:center;line-height:1.5;}
/* salary breakdown */
.sal-sum{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden;}
.isrow2{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 13px;border-bottom:1px solid var(--line);font-size:var(--fz-sub);}
.isrow2:last-child{border-bottom:none;}
.isrow2.tot{font-weight:900;color:var(--charcoal);background:var(--bg);}
.isrow2 .neg{color:var(--red);}
/* hours: section sum chip */
.section-h .sh-sum{margin-inline-start:auto;font-size:var(--fz-help);font-weight:800;color:var(--amber-d);background:var(--amber-pale);border-radius:999px;padding:1px 9px;}
/* project profit composition (clickable → composing transactions) */
.pf-block{margin-top:10px;background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden;}
.pf-row{display:flex;align-items:center;gap:8px;padding:0 13px;min-height:46px;border-bottom:1px solid var(--line);cursor:pointer;font-size:var(--fz-sub);}
.pf-row:last-child{border-bottom:none;}
.pf-row .pf-l{flex:1;color:var(--ink);font-weight:700;}
.pf-row .pf-sub{color:var(--gray);font-size:var(--fz-help);font-weight:600;margin-inline-start:6px;}
.pf-row .pf-v{margin-inline-start:auto;font-weight:800;color:var(--charcoal);flex:0 0 auto;}
.pf-row.profit{background:var(--bg);font-weight:900;}
.pf-row.profit .pf-l{font-weight:900;color:var(--charcoal);}
.pf-row.profit .pf-v.pos{color:var(--green);} .pf-row.profit .pf-v.neg{color:var(--red);}
/* company buckets */
.bk-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;margin:8px 0 4px;}
.bk-tile{border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:10px 11px;background:var(--paper);cursor:pointer;display:flex;flex-direction:column;gap:2px;}
.bk-tile .bk-l{font-size:var(--fz-help);color:var(--gray);}
.bk-tile .bk-v{font-size:16px;font-weight:900;color:var(--charcoal);}
.bk-tile .bk-v.pos{color:var(--green);} .bk-tile .bk-v.neg{color:var(--red);}

/* ───────────── Round 21: contact card tabs + ContactLink + CRM views ───────────── */
.ctab-bar{display:flex;border:1px solid var(--line);border-radius:999px;background:var(--bg);padding:2px;margin:8px 0;}
.ctab-bar button{flex:1;border:none;background:none;font:inherit;font-size:var(--fz-help);font-weight:700;padding:7px 0;border-radius:999px;color:var(--gray);cursor:pointer;}
.ctab-bar button[aria-pressed="true"]{background:var(--amber-pale);color:var(--charcoal);}
.cmrow{padding:9px 2px;border-bottom:1px solid var(--line);}
.cmrow:last-child{border-bottom:none;}
.cmrow .cm-top{display:flex;align-items:center;gap:8px;}
.cm-dir{flex:0 0 auto;display:inline-flex;align-items:center;gap:2px;font-size:var(--fz-help);font-weight:800;}
.cm-dir.in{color:var(--green);} .cm-dir.out{color:var(--amber-d);}
.cm-dir .material-symbols-outlined{font-size:15px;}
.cmrow .cm-subj{flex:1;font-weight:700;font-size:var(--fz-sub);color:var(--ink);min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.cmrow .cm-date{flex:0 0 auto;font-size:var(--fz-help);color:var(--gray);}
.cmrow .cm-body{font-size:var(--fz-sub);color:var(--ink);opacity:.9;margin-top:3px;max-height:120px;overflow-y:auto;line-height:1.5;-webkit-overflow-scrolling:touch;}
.cmrow .cm-meta{font-size:var(--fz-help);color:var(--gray);margin-top:2px;}
.rel-row{display:flex;align-items:center;gap:8px;padding:9px 2px;border-bottom:1px solid var(--line);}
.rel-row:last-child{border-bottom:none;}
.rel-row .rel-main{flex:1;min-width:0;}
.rel-row .rel-name{font-weight:700;font-size:var(--fz-sub);color:var(--ink);}
.rel-row .rel-sub{font-size:var(--fz-help);color:var(--gray);}
.lt-chip{font-size:10px;font-weight:800;border-radius:999px;padding:1px 8px;flex:0 0 auto;white-space:nowrap;}
.lt-co{background:rgba(31,122,77,.12);color:var(--green);} .lt-assoc{background:var(--line);color:var(--gray);} .lt-func{background:var(--amber-pale);color:var(--amber-d);}
.rel-sug{background:var(--amber-pale);border:1px dashed var(--amber);border-radius:8px;padding:8px 10px;margin-bottom:6px;display:flex;align-items:center;gap:8px;font-size:var(--fz-help);color:var(--ink);}
.rel-sug .grow{flex:1;}
.rel-sug .approve{background:var(--amber);color:var(--charcoal);border:none;border-radius:999px;padding:5px 13px;font:inherit;font-weight:800;font-size:var(--fz-help);cursor:pointer;flex:0 0 auto;}
.crm-empty{font-size:var(--fz-sub);color:var(--gray);padding:8px 2px;}

/* ───────────── Round 22: project lifecycle (handover gate / warranty / cancel / audit) ───────────── */
.chk-row{display:flex;align-items:center;gap:10px;padding:0 13px;min-height:46px;border-bottom:1px solid var(--line);cursor:pointer;font-size:var(--fz-sub);}
.chk-row:last-child{border-bottom:none;}
.chk-box{width:22px;height:22px;border-radius:6px;border:2px solid var(--line);display:grid;place-items:center;flex:0 0 auto;color:#fff;}
.chk-row.done .chk-box{background:var(--green);border-color:var(--green);}
.chk-box .material-symbols-outlined{font-size:16px;opacity:0;}
.chk-row.done .chk-box .material-symbols-outlined{opacity:1;}
.chk-row .chk-l{flex:1;}
.chk-row.done .chk-l{color:var(--gray);text-decoration:line-through;}
.handover-gate{display:flex;gap:8px;align-items:flex-start;background:rgba(192,59,34,.08);border:1px solid var(--red);border-radius:10px;padding:9px 12px;margin:8px 0 0;font-size:var(--fz-help);color:var(--ink);line-height:1.5;}
.handover-gate.ok{background:rgba(31,122,77,.08);border-color:var(--green);}
.handover-gate .material-symbols-outlined{font-size:18px;flex:0 0 auto;}
.handover-gate.ok .material-symbols-outlined{color:var(--green);}
.handover-gate:not(.ok) .material-symbols-outlined{color:var(--red);}
.audit-line{font-size:var(--fz-help);color:var(--gray);padding:12px 4px 2px;text-align:start;border-top:1px dashed var(--line);margin-top:14px;line-height:1.5;}
.chain .st.warr .dot{background:var(--amber);border-color:var(--amber-d);box-shadow:0 0 0 3px var(--amber-pale);}

/* ───────────── Round 23: offer completeness (mwst/discount/payment/sub-items/price-check/market) ───────────── */
.grp-head{display:flex;align-items:center;gap:8px;padding:9px 13px 6px;background:var(--bg);border-bottom:1px solid var(--line);font-weight:900;font-size:var(--fz-sub);color:var(--charcoal);}
.grp-head .grp-l{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.grp-head .grp-sub{color:var(--gray);font-weight:800;flex:0 0 auto;}
.row.sub-item{padding-inline-start:24px;}
.disc-note{font-size:var(--fz-help);color:var(--green);font-weight:700;margin-inline-start:6px;flex:0 0 auto;}
.lt-note{font-size:var(--fz-help);color:var(--amber-d);font-weight:700;margin-inline-start:6px;flex:0 0 auto;}
.dev-hint{display:inline-flex;align-items:center;gap:2px;font-size:var(--fz-help);color:var(--red);font-weight:800;margin-inline-start:6px;cursor:pointer;flex:0 0 auto;}
.dev-hint .material-symbols-outlined{font-size:14px;}

/* ───────── F3 (D-145) 3-tier card IA — head money-strip + bottom-tier collapse ───────── */
.money-strip{display:flex;gap:8px;margin:10px 0 2px;}
.money-strip .ms-cell{flex:1;background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:9px 11px;display:flex;flex-direction:column;gap:2px;}
.money-strip .ms-l{font-size:var(--fz-help);color:var(--gray);font-weight:700;}
.money-strip .ms-v{font-weight:900;}
.coll{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);margin-top:12px;overflow:hidden;}
.coll-head{display:flex;align-items:center;gap:8px;padding:11px 13px;cursor:pointer;font-weight:900;font-size:var(--fz-sub);color:var(--charcoal);}
.coll-head .coll-chev{font-size:20px;color:var(--gray);transition:transform .18s;}
.coll.open .coll-head .coll-chev{transform:rotate(180deg);}
.coll-head .coll-count{color:var(--gray);font-weight:700;font-size:var(--fz-help);flex:0 0 auto;}
.coll-body{display:none;}
.coll.open .coll-body{display:block;}
.coll-body > .blk,.coll-body > #handoverBlock,.coll-body > #blkProfitSoon{margin-top:0;border:none;border-radius:0;box-shadow:none;}
.offsum{margin-top:6px;}
.market-row{color:var(--gray);font-size:var(--fz-help);}
.market-row b{color:var(--amber-d);}
.isrow2 .sum-add{color:var(--amber-d);font-weight:700;}
.isrow2.tappable{cursor:pointer;}
.isrow2 .ed{font-size:var(--fz-help);color:var(--amber-d);font-weight:700;margin-inline-start:6px;}
.pc-stat{display:flex;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid var(--line);font-size:var(--fz-sub);}
.pc-stat:last-child{border-bottom:none;}
.pc-stat .pc-l{color:var(--gray);font-weight:700;}
.pc-note{font-size:var(--fz-help);color:var(--gray);margin-top:8px;line-height:1.5;}

/* ───────────── Round 24: profit-% chip ───────────── */
.pf-pct{font-size:var(--fz-help);font-weight:800;margin-inline-start:6px;}
.pf-pct.pos{color:var(--green);} .pf-pct.neg{color:var(--red);}

/* ───────────── #5b: entity-card loading skeleton (shared; entity.html) ─────────────
   Shown ONLY while body.card-loading is set — entity.html adds it 150ms after boot and removes it on
   render(), so a card that hydrates faster than the threshold never shows the skeleton (no double-flash).
   Replaces the bare "—"/empty shell so the wait reads as "card loading", not an unknown/blank page. */
.card-skel,#eSkelTitle{display:none;}
body.card-loading #eSkelTitle{display:block;}
body.card-loading .card-skel{display:block;}
body.card-loading #eTitle,body.card-loading #eSub,body.card-loading #eKicker,body.card-loading #eBanner,body.card-loading #eBody{display:none;}
.skel-bar{background:linear-gradient(100deg,var(--line) 30%,#F3EEE7 50%,var(--line) 70%);background-size:200% 100%;animation:skelSheen 1.2s ease-in-out infinite;border-radius:7px;}
@keyframes skelSheen{0%{background-position:200% 0;}100%{background-position:-200% 0;}}
#eSkelTitle.sk-title{height:28px;width:62%;margin:6px 0 12px;}
.card-skel .sk-block{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:14px 16px;margin:0 0 12px;}
.card-skel .sk-row{height:14px;margin:10px 0;}
.card-skel .w1{width:82%;} .card-skel .w2{width:54%;} .card-skel .w3{width:68%;}

/* #6c live-document staging: the 1px top progress sliver the router shows only while it HOLDS the old
   screen waiting for data (router.js sets width/opacity inline; this just adds the brand color + a soft
   shimmer so a long hold reads as motion, not a frozen bar). */
#navSliver{ background:var(--amber); box-shadow:0 0 6px rgba(240,164,34,.55); }


/* #4-STG salary&costs (salary.html) reuse hooks. Row grammar/cutsbar/toggle/empty are reused as-is;
   these add only the row-2 SECONDARY estimate money, the month nav, and the muted estimate caption. */
.agg-est{flex:0 0 auto;display:inline-flex;align-items:center;font-size:var(--fz-sub);font-weight:700;color:var(--gray);margin-inline-start:auto;}
.agg-est .cur{margin-inline-end:1px;color:var(--gray);}
.monthnav{display:inline-flex;align-items:center;gap:2px;margin-inline-start:auto;}
.monthnav button{border:none;background:none;color:var(--charcoal);cursor:pointer;padding:4px 8px;border-radius:8px;font-size:18px;line-height:1;}
.monthnav button:active{background:rgba(43,38,36,.06);}
.monthnav .mlabel{font-size:var(--fz-help);font-weight:700;color:var(--charcoal);min-width:78px;text-align:center;}
.estnote{display:flex;align-items:flex-start;gap:6px;color:var(--gray);font-size:var(--fz-help);padding:2px 2px 8px;}
.estnote .material-symbols-outlined{font-size:15px;line-height:1.3;}
.empty .esub{font-size:var(--fz-sub);color:var(--gray);margin-bottom:12px;}

/* ───────────── ground-&-layer host (STAGE 1, ui_screens §"קרקע-ושכבה") ───────────── */
/* the LAYER: a high bottom-sheet above the frozen ground. z 54/55 = above the bottom bar (50),
   BELOW every overlay the card opens (pickers/csheet 61+, ctx 91, modal-back 98, menu 120) —
   viewers and editors open ON TOP of the layer, as they do on a page. */
.lay-back{position:fixed;inset:0;background:rgba(43,38,36,.45);z-index:54;opacity:0;pointer-events:none;transition:opacity .22s;}
.lay-back.on{opacity:1;pointer-events:auto;}
.laysheet{position:fixed;inset-inline:0;bottom:0;top:clamp(42px,7dvh,84px);z-index:55;background:var(--bg);
  border-radius:18px 18px 0 0;box-shadow:var(--shadow-up);display:flex;flex-direction:column;overflow:hidden;
  transform:translateY(105%);transition:transform .26s cubic-bezier(.25,.8,.3,1);max-width:1180px;margin-inline:auto;}
.laysheet.on{transform:translateY(0);}
.lay-top{flex:0 0 auto;background:var(--paper);border-bottom:1px solid var(--line);border-radius:18px 18px 0 0;}
.lay-grab{display:flex;justify-content:center;padding:8px 0 4px;cursor:grab;touch-action:none;}
.lay-handle{width:44px;height:5px;border-radius:999px;background:var(--line);}
.lay-head{display:flex;align-items:center;gap:10px;padding:0 14px 10px;}
.lay-titles{flex:1;min-width:0;}
.lay-title{font-size:18px;}
.lay-sub{font-size:var(--fz-help);color:var(--gray);margin-top:2px;min-height:0;}
.lay-expand{flex:0 0 auto;}
.lay-body{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:4px 16px calc(24px + var(--safe-bottom));}
/* the ground under an open layer: scroll locked IN PLACE (overflow:hidden keeps scrollTop — closing
   reveals the list exactly as left; the ground is never re-rendered). */
body.layer-open .scroll{overflow:hidden;}

/* ───────────── ground-&-layer STAGE 3: nav rail + panel skin + breadcrumbs (≥900px — WIDTH only, never device) ───────────── */
:root{--rail-w:212px;--lay-w:clamp(380px,33vw,560px);}
body.rail-min{--rail-w:64px;}
.rail{display:none;}
.lay-crumbs{display:none;}
@media(min-width:900px){
  /* ── nav rail (spec rule 16): the drawer content re-hosted, fixed on the RIGHT (RTL identity side) ── */
  .rail{position:fixed;inset-inline-start:0;top:0;bottom:0;width:var(--rail-w);background:var(--paper);
    border-inline-end:1px solid var(--line);z-index:52;display:flex;flex-direction:column;padding:10px 0 8px;overflow:hidden;}
  .rail .rail-top{display:flex;align-items:center;gap:8px;padding:2px 12px 10px;border-bottom:1px solid var(--line);}
  .rail .rail-top .r-mark{width:28px;height:28px;}
  .rail .rail-top .wordmark{height:16px;display:block;}
  .rail .rail-top .rail-min-btn{margin-inline-start:auto;color:var(--gray);}
  .rail-places{display:flex;flex-direction:column;padding:8px 8px 4px;border-bottom:1px solid var(--line);}
  .rplace{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:10px;color:var(--gray);
    text-decoration:none;font-weight:700;font-size:var(--fz-sub);}
  .rplace .material-symbols-outlined{font-size:22px;}
  .rplace.active{background:var(--amber-pale);color:var(--charcoal);}
  .rail-groups{flex:1;overflow-y:auto;padding:0 12px;}
  .rail-groups .mgrp{padding:10px 0 2px;}
  .rail-groups .mgrp h5{font-size:var(--fz-help);font-weight:900;color:var(--charcoal);margin:0 0 2px;display:flex;align-items:center;gap:8px;}
  .rail-groups .mgrp h5::before{content:"";width:11px;height:11px;background:var(--amber);transform:skewX(-20deg);border-radius:1px;}
  .rail-actions{display:flex;justify-content:center;padding:8px 0 2px;border-top:1px solid var(--line);}
  .rail-ver{font-size:var(--fz-help);}
  .rail-ver .menu-ver{margin-top:0;border-top:none;padding:8px 0 2px;}
  /* collapsed-to-icons (sticky per user): labels/groups/version hide; places + action button stay */
  body.rail-min .rail .lbl,body.rail-min .rail-groups,body.rail-min .rail-ver{display:none;}
  body.rail-min .rplace{justify-content:center;padding-inline:0;}
  body.rail-min .rail .rail-top{justify-content:center;padding-inline:4px;}
  body.rail-min .rail .rail-top .r-mark{display:none;}
  body.rail-min .rail .rail-top .rail-min-btn{margin-inline-start:0;}
  /* the narrow hosts of the same content hide above the breakpoint. offer.html (has-panel) keeps its
     .bottom — it hosts the offer summary panel there, not just the nav bar. */
  body.rail-on #menuBtn{display:none;}
  body.rail-on:not(.has-panel) .bottom{display:none;}
  /* the app reserves the rail's width (inline-start = right in RTL)… */
  body.rail-on .app{margin-inline-start:var(--rail-w);margin-inline-end:auto;}
  /* …and the OPEN panel's width on the other side: rail | ground | panel, no horizontal scroll */
  body.rail-on.lay-wide.layer-open .app{margin-inline-end:var(--lay-w);}
  body.lay-wide.layer-open:not(.rail-on) .app{margin-inline-end:var(--lay-w);margin-inline-start:auto;}

  /* ── panel skin (spec rule 4): the layer docks inline-end (left in RTL) beside the LIVE ground —
     no backdrop, no scroll lock; ground rows stay tappable. Same DOM, same trail, same mountLayer. ── */
  body.lay-wide .lay-back{display:none;}
  body.lay-wide.layer-open .scroll{overflow:auto;}
  body.lay-wide .laysheet{inset-inline-end:0;inset-inline-start:auto;top:0;bottom:0;width:var(--lay-w);max-width:var(--lay-w);
    margin:0;border-radius:0;border-inline-start:1px solid var(--line);transform:translateX(-105%);}
  body.lay-wide .laysheet.on{transform:translateX(0);}
  body.lay-wide .lay-grab{display:none;}   /* swipe-down is a sheet gesture */
  body.lay-wide .lay-top{border-radius:0;padding-top:10px;}
  /* ── breadcrumb strip (spec rule 8) — wide skin only; the narrow sheet keeps arrow-only ── */
  body.lay-wide .lay-crumbs.has{display:flex;align-items:center;gap:4px;padding:0 14px 8px;flex-wrap:nowrap;overflow:hidden;}
  .lay-crumb{background:none;border:none;font:inherit;font-size:var(--fz-help);font-weight:700;color:var(--amber-d);
    cursor:pointer;padding:2px;max-width:16ch;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:0 1 auto;}
  .lay-cur{font-size:var(--fz-help);font-weight:700;color:var(--gray);max-width:16ch;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .lay-csep{color:var(--line);font-weight:900;flex:0 0 auto;}
}

/* ground-&-layer STAGE 4: a CARD-PAGE ground (search-from-entity, rule 6) is HELD while the layer
   lives — the single live-card-state mechanism can't serve two records at once, so even the wide
   skin keeps the backdrop + scroll lock over a page ground (lists/home stay live as in STAGE 3). */
@media(min-width:900px){
  body.lay-wide.lay-hold .lay-back{display:block;}
  body.lay-wide.lay-hold.layer-open .scroll{overflow:hidden;}
}
