/* ════════════════════════════════════════════════════════════════════════
   Koma — the sheet viewer (stage F2). Loaded after koma.css, koma-mobile.css and koma-app.css.
   Sections 2 and 6 are the viewer rules of the approved system, ported from g-polish/system.css and
   g-polish/mobile.css with the same tokens; the rest is what a real file needs and the prototype did not:
   the pan / zoom stage, loading and failure states, the comment composer, replies, the native PDF frame.
   Tokens only, logical properties only. The one exception is drawing geometry: the sheet box and its
   pins are placed with physical left / top (a drawing does not mirror), set through the CSSOM.

   CLASS INDEX
   ─ shell     .app.is-viewer   .viewer   .viewer__body   .viewer__main   .vgone
   ─ top bar   .viewer .topbar   .crumbs h1   .vtop__ed   .vtop__ball
   ─ tools     .vtools   .vtools__zoom
   ─ canvas    .vcanvas (.is-dragging .is-adding .is-static)   .vsheet (.is-gliding)   .vsheet__img   .vsheet__pdf   .vsheet__detail   .vpins
               .pin--new   .vfill   .vframe   .vtext   .vstate   .vload   .vskel   .vblock
   ─ panel     .vpanel   .vpanel__head   .vpanel__sub   .vpanel__body   .vpanel__anchor   .vpanel__foot
               .vpanel__due   .vpanel__actions(--more)   .vrail   .vrail__btn   .vrail__count   .cbar
               .vfilter   .vnote   .vcompose   .thread__replies   .thread__r   .edition__wide   .vcap   .vacts
   ─ phone     .m-viewer   .m-canvas   .m-stage   .m-plan   .m-float   .m-tools   .m-pager   .m-fab   .m-hint   .m-load
               .m-peek   .m-full   .m-step   .m-comment   .m-reply   .m-resolve   .m-decide   .m-edchip
               state on .viewer: data-m-state="peek | comment"   data-m-load
   ════════════════════════════════════════════════════════════════════════ */

/* ───────── 1. shell: a full-window task screen ───────── */
.app.is-viewer{grid-template-columns:minmax(0,1fr)}
.app.is-viewer .app__top,.app.is-viewer .app__bottom{display:none}
:where(.k) .viewer{display:flex;flex-direction:column;flex:1;min-block-size:0;min-inline-size:0;overflow:hidden;background:var(--c-canvas)}
:where(.k) .vgone{flex:1;display:grid;place-items:center;background:var(--c-app)}
:where(.k) .viewer .topbar>.logo{flex:none}
:where(.k) .crumbs h1{flex:0 1 auto;min-inline-size:48px;overflow:hidden;text-overflow:ellipsis;font-size:var(--fs-14);line-height:var(--lh-14);font-weight:600;color:var(--c-ink)}
:where(.k) .crumbs h1 .num{font-weight:500;color:var(--c-text-2);margin-inline-end:var(--sp-1)}
:where(.k) .vtop__ed{flex:none;margin-inline-start:var(--sp-2)}
:where(.k) .vtop__ed .select__native{max-inline-size:216px}
:where(.k) .vtop__ball{flex:0 2 auto;min-inline-size:72px;font-size:var(--fs-13);line-height:var(--lh-13);color:var(--c-text-3)}
:where(.k) .viewer .topbar>.btn,:where(.k) .viewer .topbar>.more{flex:none}

/* ───────── 2. the approved viewer (ported) ───────── */
:where(.k) .viewer .topbar{padding-inline:var(--sp-3) var(--sp-4)}
:where(.k) .vtools{display:flex;align-items:center;gap:var(--sp-1);block-size:44px;flex:none;min-inline-size:0;padding-inline:var(--sp-3);background:var(--c-surface);border-block-end:1px solid var(--c-line)}
:where(.k) .vtools .vr{margin-inline:var(--sp-2)}
:where(.k) .vtools.is-wrap{block-size:auto;min-block-size:44px;padding-block:6px;row-gap:var(--sp-1)}
:where(.k) .vtools__zoom{min-inline-size:44px;text-align:center;font-size:var(--fs-13);font-weight:500;color:var(--c-text-2)}
:where(.k) .viewer__body{flex:1;min-block-size:0;display:flex}
:where(.k) .viewer__main{flex:1;min-inline-size:0;display:flex;flex-direction:column}
:where(.k) .vload{position:absolute;inset-block-end:var(--sp-6);inset-inline:0;margin-inline:auto;inline-size:280px;display:flex;flex-direction:column;gap:var(--sp-2);color:var(--c-text-2);font-size:var(--fs-12);line-height:var(--lh-12);text-align:center}
/* side panel, docked on the inline-end side */
:where(.k) .vpanel{inline-size:var(--w-vpanel);flex:none;display:flex;flex-direction:column;min-block-size:0;background:var(--c-surface);border-inline-start:1px solid var(--c-line)}
:where(.k) .vpanel__head{display:flex;align-items:stretch;gap:var(--sp-1);padding-inline:var(--sp-2) var(--sp-2);border-block-end:1px solid var(--c-line);flex:none}
:where(.k) .vpanel__head .tabs{box-shadow:none;flex:1;padding-inline:var(--sp-2);--tabs-pad:var(--sp-2)}
:where(.k) .vpanel__head .tabs__tab{block-size:44px}
:where(.k) .vpanel__head .btn{align-self:center}
:where(.k) .vpanel__sub>span:first-child{flex:1 1 auto;min-inline-size:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
:where(.k) .vpanel__sub>.grow{display:none}
:where(.k) .vpanel__sub>.btn{flex:0 1 auto;max-inline-size:55%}
:where(.k) .vpanel__sub{display:flex;align-items:center;gap:var(--sp-3);block-size:40px;padding-inline:var(--sp-4);font-size:var(--fs-12);line-height:var(--lh-12);color:var(--c-text-3);border-block-end:1px solid var(--c-line);flex:none}
:where(.k) .vpanel__sub b{font-weight:600;color:var(--c-ink)}
:where(.k) .vpanel__body{flex:1;min-block-size:0;overflow:auto}
:where(.k) .vpanel__foot{display:flex;flex-direction:column;gap:var(--sp-3);padding:var(--sp-3) var(--sp-4) var(--sp-4);border-block-start:1px solid var(--c-line);flex:none}
:where(.k) .vpanel__due{display:flex;align-items:flex-start;gap:var(--sp-2);font-size:var(--fs-13);line-height:var(--lh-13);color:var(--c-text-2)}
:where(.k) .vpanel__due>span:not(.avatar):not(.due){flex:1 1 auto;min-inline-size:0;overflow-wrap:anywhere}
:where(.k) .vpanel__due>.grow{display:none}
:where(.k) .vpanel__due>.due{flex:none;line-height:var(--lh-13)}
/* decision buttons are sized by their labels and share the row; when the labels do not fit side by side they stack */
:where(.k) .vpanel__actions{display:flex;flex-wrap:wrap;gap:var(--sp-2)}
:where(.k) .vpanel__actions>.btn{flex:1 1 auto}
:where(.k) .vpanel__actions>.btn--primary{flex-grow:1.25}
/* collapsed rail */
:where(.k) .vrail{inline-size:var(--w-vrail);flex:none;display:none;flex-direction:column;align-items:center;gap:var(--sp-1);padding-block:var(--sp-2);background:var(--c-surface);border-inline-start:1px solid var(--c-line)}
:where(.k) .vrail__btn{flex-direction:column;gap:2px;block-size:44px;inline-size:36px;padding:0}
:where(.k) .vrail__count{font-size:11px;line-height:12px;font-weight:600;color:var(--c-text-3)}
:where(.k) .vrail__count--mine{color:var(--c-accent)}
:where(.k) .vrail .vr{inline-size:20px;block-size:1px;margin-block:var(--sp-1)}
:where(.k) .viewer.is-collapsed .vpanel{display:none}
:where(.k) .viewer.is-collapsed .vrail{display:flex}
:where(.k) .cbar{display:none;align-items:center;gap:var(--sp-3);block-size:48px;flex:none;padding-inline:var(--sp-4) var(--sp-3);background:var(--c-surface);border-block-start:1px solid var(--c-line);font-size:var(--fs-13);line-height:var(--lh-13)}
:where(.k) .viewer.is-collapsed .cbar{display:flex}
:where(.k) .cbar{min-inline-size:0}
:where(.k) .cbar b{font-weight:600;white-space:nowrap;flex:0 2 auto;min-inline-size:40px;overflow:hidden;text-overflow:ellipsis}
:where(.k) .cbar .mine{flex:0 1 auto}
:where(.k) .cbar__text{color:var(--c-text-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-inline-size:48px;flex:0 4 auto}
/* ───────── 3. canvas: the stage, the sheet, pins, states ───────── */
:where(.k) .vcanvas{flex:1;min-block-size:0;position:relative;overflow:hidden;background:var(--c-canvas);touch-action:none;cursor:grab;outline:none;user-select:none;-webkit-user-select:none}
:where(.k) .vcanvas.is-dragging{cursor:grabbing}
:where(.k) .vcanvas.is-adding{cursor:crosshair}
:where(.k) .vcanvas.is-static{cursor:default;touch-action:auto;user-select:auto;-webkit-user-select:auto}
:where(.k) .vcanvas:focus-visible{box-shadow:inset 0 0 0 2px var(--c-accent)}
/* on the light canvas the white sheet separates with a hairline and a very soft shadow */
:where(.k) .vsheet{position:absolute;top:0;left:0;direction:ltr;background:var(--sheet);box-shadow:0 0 0 1px var(--c-line-strong),0 1px 2px rgba(20,23,26,.05),0 4px 12px rgba(20,23,26,.05);will-change:transform}
:where(.k) .vsheet[hidden]{display:none}
:where(.k) .vsheet.is-gliding{transition:transform var(--t-base) var(--ease),width var(--t-base) var(--ease),height var(--t-base) var(--ease)}
:where(.k) .vsheet__img{display:block;position:absolute;inset:0;inline-size:100%;block-size:100%;pointer-events:none;-webkit-user-drag:none}
:where(.k) .vsheet__deep{position:absolute;inset:0;overflow:hidden;pointer-events:none}      /* Liav 6.11: the tiles of a scanned sheet (render.js deepLayer) */
:where(.k) .vsheet__clip{position:absolute;overflow:hidden}
:where(.k) .vsheet__tile{position:absolute;display:block;max-inline-size:none;pointer-events:none;-webkit-user-drag:none;image-rendering:auto}
/* a PDF page: the whole page on one canvas, and a sharper patch over the visible part when zoomed far in */
:where(.k) .vsheet__pdf{position:absolute;inset:0;overflow:hidden;pointer-events:none}
:where(.k) .vsheet__detail{display:block;position:absolute;pointer-events:none}
:where(.k) .vpins{position:absolute;inset:0}
:where(.k) .vpins .pin{cursor:pointer}
:where(.k) .vpins .pin.is-selected{z-index:2}
:where(.k) .pin--new{background:var(--c-accent);z-index:3;cursor:default}
:where(.k) .vfill{position:absolute;inset:0;display:flex;background:var(--c-canvas);cursor:default}
:where(.k) .vfill[hidden]{display:none}
:where(.k) .vfill.is-loading>*{visibility:hidden}
:where(.k) .vframe{flex:1;min-inline-size:0;inline-size:100%;block-size:100%;border:0;background:var(--sheet)}
:where(.k) .vtext{flex:1;min-inline-size:0;max-inline-size:840px;margin:var(--sp-6) auto;padding:var(--sp-8);overflow:auto;background:var(--sheet);box-shadow:0 0 0 1px var(--c-line-strong),0 4px 12px rgba(20,23,26,.05);font-family:var(--sans);font-size:var(--fs-14);line-height:24px;color:var(--c-ink);white-space:pre-wrap;overflow-wrap:anywhere;user-select:text;-webkit-user-select:text}
:where(.k) .vtext:focus-visible{box-shadow:0 0 0 1px var(--c-line-strong),0 0 0 3px var(--c-accent)}
:where(.k) .vstate{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none}
:where(.k) .vstate>*{pointer-events:auto}
:where(.k) .vstate:empty{display:none}
:where(.k) .vskel{inline-size:min(72%,(100vh - 260px)*1.5);aspect-ratio:3/2;border-radius:0;background:var(--sheet);box-shadow:0 0 0 1px var(--c-line)}
/* QA 9.11: while a CAD sheet is drawn for the first time, its own small picture (from the file) stands in for the skeleton, faded */
:where(.k) .vskel--thumb{display:block;object-fit:contain;opacity:.55;pointer-events:none}
:where(.k) .vblock{padding:var(--sp-8) var(--sp-6);border-radius:var(--r-lg);background:var(--c-surface);border:1px solid var(--c-line);cursor:default;user-select:text;-webkit-user-select:text}
:where(.k) .vblock .thumb{margin-block-end:var(--sp-3)}
:where(.k) .vblock .thumb .ic{inline-size:28px;block-size:28px}
:where(.k) .vblock .empty__title{overflow-wrap:anywhere}
:where(.k) .vskel-line{margin-block-start:var(--sp-3)}
:where(.k) .vskel-btn{inline-size:100%;block-size:var(--h-ctl-lg)}
:where(.k) .vpanel__head--skel{align-items:center;block-size:45px;padding-inline:var(--sp-4)}
:where(.k) .vtools>.skel{margin-inline:var(--sp-1)}
:where(.k) .viewer__main>div>.banner{flex:none}

/* ───────── 4. panel: what the prototype showed in one state only ───────── */
:where(.k) .vpanel__anchor{position:relative;block-size:0;margin-inline:var(--sp-4);flex:none}
:where(.k) .vpanel__anchor>.dialog--pop{inline-size:auto;inset-inline:0;inset-block-end:var(--sp-2)}
:where(.k) .dialog--pop.dialog--down{inset-block:calc(100% + var(--sp-2)) auto;inset-inline:auto 0}
:where(.k) .dialog--pop .dialog__body:empty{display:none}
:where(.k) .dialog--pop .dialog__body p{color:var(--c-text-2);overflow-wrap:anywhere}
:where(.k) .vpanel__foot[hidden]{display:none}
:where(.k) .vpanel__due b{font-weight:600;color:var(--c-accent)}
:where(.k) .vpanel__due .avatar .ic{inline-size:12px;block-size:12px}
:where(.k) .vpanel__actions--more>.btn{flex:1 1 0}
:where(.k) .vpanel__sub{position:sticky;inset-block-start:0;z-index:1;background:var(--c-surface)}
:where(.k) .vpanel__sub>.btn{flex:none}
:where(.k) .vfilter{display:inline-flex;align-items:center;gap:var(--sp-1);flex:none;block-size:var(--h-ctl-sm);padding-inline:var(--sp-2);border-radius:var(--r-md);color:var(--c-text-2);cursor:pointer;position:relative}
:where(.k) .vfilter:hover{background:var(--c-hover);color:var(--c-ink)}
:where(.k) .vfilter:focus-within{box-shadow:var(--focus)}
:where(.k) .vfilter .select__native{font-size:var(--fs-12);font-weight:500;max-inline-size:96px}
:where(.k) .vnote{display:flex;align-items:flex-start;gap:var(--sp-2);margin:0;padding:var(--sp-3) var(--sp-3) var(--sp-3) var(--sp-4);font-size:var(--fs-12);line-height:var(--lh-12);color:var(--c-text-2);background:var(--c-subtle);border-block-end:1px solid var(--c-line)}
:where(.k) .vnote>.ic{margin-block-start:1px;color:var(--c-text-3)}
:where(.k) .vnote>span{flex:1 1 0;min-inline-size:0;padding-block:1px}
:where(.k) .vnote>.btn{margin-block:-4px}
:where(.k) .thread__text,:where(.k) .thread__r p,:where(.k) .m-comment__text{white-space:pre-wrap}
:where(.k) .thread:focus-visible{box-shadow:inset 0 0 0 2px var(--c-accent)}
:where(.k) .thread__head>.grow{flex:1 1 0}
:where(.k) .thread__tools{display:inline-flex;flex:none;gap:2px;margin-block:-4px;margin-inline-end:-6px}
:where(.k) .thread__rhead .thread__tools{margin-block:-6px}
:where(.k) .thread__edited{flex:none;font-size:var(--fs-12);white-space:nowrap}
:where(.k) .thread__replies{display:flex;flex-direction:column;gap:var(--sp-3);margin-block-start:var(--sp-3);margin-inline-start:28px;padding-inline-start:var(--sp-3);border-inline-start:2px solid var(--c-accent-line)}
:where(.k) .thread__rhead{display:flex;align-items:baseline;gap:var(--sp-2);min-inline-size:0;font-size:var(--fs-12);line-height:var(--lh-12)}
:where(.k) .thread__rhead b{font-size:var(--fs-13);font-weight:600;color:var(--c-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-inline-size:0}
:where(.k) .thread__rhead .t3{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-inline-size:0;flex:0 100 auto}
:where(.k) .thread__rhead time{margin-inline-start:auto;flex:none;color:var(--c-text-3);white-space:nowrap}
:where(.k) .thread__r p{margin-block-start:2px;font-size:var(--fs-13);line-height:var(--lh-13);color:var(--c-ink);overflow-wrap:anywhere}
:where(.k) .thread__foot .ic{flex:none}
:where(.k) .thread__resolve{margin-inline-start:-10px}
:where(.k) .thread__actions>.grow{flex:1 1 0}
:where(.k) .vcompose{display:flex;flex-direction:column;gap:var(--sp-3);padding:var(--sp-4);background:var(--c-accent-tint);border-block-end:1px solid var(--c-line)}
:where(.k) .vcompose .thread__head b{max-inline-size:none}
:where(.k) .vcompose__where{display:flex;align-items:center;flex-wrap:wrap;gap:var(--sp-1) var(--sp-2);margin:0;font-size:var(--fs-12);line-height:var(--lh-12);color:var(--c-text-2)}
:where(.k) .vcompose__where>.btn{margin-block:-4px;block-size:24px}
:where(.k) .vcompose .textarea{min-block-size:72px}
:where(.k) .vcompose__to{inline-size:100%;background:var(--c-surface)}
:where(.k) .vcompose__to .select__native{flex:1 1 0;min-inline-size:0;max-inline-size:none;font-weight:400}
:where(.k) .vcompose .thread__actions{justify-content:flex-end}
:where(.k) .edition__wide{grid-column:1/-1;margin:0}
:where(.k) .edition__actions--tight{margin-block-start:var(--sp-2)}
:where(.k) .edition__shown{font-size:var(--fs-12);line-height:var(--lh-12);margin-inline-end:auto}
:where(.k) .edition__note b{font-weight:600;color:var(--c-ink)}
:where(.k) .edition .thumb .ic{inline-size:20px;block-size:20px}
:where(.k) .vlink{color:var(--c-accent);font-weight:500}
:where(.k) .vlink:hover{text-decoration:underline;text-underline-offset:3px}
:where(.k) .vpre{white-space:pre-wrap}
:where(.k) .dl dd b{font-weight:600}
:where(.k) .vcap{display:flex;align-items:center;gap:var(--sp-2);margin:0;padding:var(--sp-4) var(--sp-4) var(--sp-2);border-block-start:1px solid var(--c-line);font-size:var(--fs-12);line-height:var(--lh-12);font-weight:600;color:var(--c-text-2)}
:where(.k) .vgroup{margin-inline:var(--sp-4);border:1px solid var(--c-line)}
:where(.k) .vquiet{margin:0;padding:0 var(--sp-4) var(--sp-4);font-size:var(--fs-13);line-height:var(--lh-13);color:var(--c-text-3)}
:where(.k) .vrow{padding:var(--sp-2) var(--sp-4) var(--sp-4)}
:where(.k) .vacts{margin:0;padding:0 var(--sp-4) var(--sp-4);list-style:none;display:flex;flex-direction:column;gap:var(--sp-2);font-size:var(--fs-13);line-height:var(--lh-13);color:var(--c-text-2)}
:where(.k) .vacts li{display:flex;align-items:baseline;gap:var(--sp-3);min-inline-size:0}
:where(.k) .vacts li>span{flex:1 1 0;min-inline-size:0;overflow-wrap:anywhere}
:where(.k) .vacts b{font-weight:600;color:var(--c-ink)}
:where(.k) .vacts time{flex:none;font-size:var(--fs-12);color:var(--c-text-3);white-space:nowrap}
:where(.k) .cbar__pos{font-size:var(--fs-12);flex:none}
:where(.k) .cbar>.btn,:where(.k) .cbar>.pin,:where(.k) .cbar>.vr,:where(.k) .cbar>.tag{flex:none}
:where(.k) .vrail__btn .ic{flex:none}

/* ───────── 5. phone: bar pieces ───────── */
:where(.k) .m-bar__sheet{display:flex;flex-direction:column;min-inline-size:0;flex:1 1 0;padding-inline:var(--sp-1)}
:where(.k) .m-bar__sheet b{display:flex;align-items:center;gap:var(--sp-2);font-size:var(--fs-16);line-height:var(--lh-16);font-weight:600;white-space:nowrap}
:where(.k) .m-bar__sheet b .status{font-weight:400;font-size:var(--m-fs-13);line-height:var(--m-lh-13);overflow:hidden;text-overflow:ellipsis;min-inline-size:0}
:where(.k) .m-bar__sheet small{font-size:var(--m-fs-13);line-height:var(--m-lh-13);color:var(--c-text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
:where(.k) .m-edchip{display:inline-flex;align-items:center;gap:var(--sp-1);block-size:36px;padding-inline:var(--sp-3);border:1px solid var(--c-line-strong);border-radius:var(--r-lg);font-size:var(--m-fs-13);line-height:var(--m-lh-13);font-weight:600;white-space:nowrap;flex:none;position:relative}
:where(.k) .m-edchip::after{content:"";position:absolute;inset-inline:0;inset-block:calc(var(--sp-1)*-1)}
:where(.k) .m-edchip:active{background:var(--c-pressed)}
:where(.k) .m-edchip .ic{color:var(--c-text-3)}

/* ───────── 6. phone: the approved viewer (ported) ───────── */
:where(.k) .m-viewer{background:var(--c-canvas)}
:where(.k) .m-canvas{flex:1;min-block-size:0;position:relative;overflow:hidden;background:var(--c-canvas)}
:where(.k) .m-plan .pin{inline-size:32px;block-size:32px;font-size:var(--m-fs-15);box-shadow:0 0 0 2px var(--c-surface),0 1px 4px rgba(20,23,26,.3)}
:where(.k) .m-plan .pin::after{content:"";position:absolute;inset:calc(var(--sp-2)*-1);border-radius:50%}   /* 48px touch target */
:where(.k) .m-plan .pin.is-selected{box-shadow:0 0 0 2px var(--c-surface),0 0 0 6px var(--c-accent),0 0 0 8px var(--c-surface)}
:where(.k) .m-plan{box-shadow:0 0 0 1px var(--c-line-strong),0 4px 12px rgba(20,23,26,.05)}   /* the sheet edge on the light canvas */
/* floating controls: one column in the thumb corner, always above the sheet, never over the pins */
:where(.k) .m-float{position:absolute;inset-inline-start:var(--sp-3);inset-block-end:calc(var(--m-sheet-h) + var(--sp-3));display:flex;flex-direction:column;align-items:flex-start;gap:var(--sp-3);transition:inset-block-end var(--t-base) var(--ease),opacity var(--t-base) var(--ease);pointer-events:none}
:where(.k) .m-float>*{pointer-events:auto}
:where(.k) .m-tools{display:flex;flex-direction:column;border-radius:var(--r-lg);background:var(--c-surface);border:1px solid var(--c-line-strong);box-shadow:var(--e-1);overflow:hidden}
:where(.k) .m-tools__btn{display:grid;place-items:center;inline-size:var(--m-tap);block-size:var(--m-tap);color:var(--c-ink);transition:background var(--t-fast) var(--ease)}
:where(.k) .m-tools__btn+.m-tools__btn{border-block-start:1px solid var(--c-line)}
:where(.k) .m-tools__btn:active,:where(.k) .m-tools__btn[aria-pressed="true"]{background:var(--c-pressed)}
:where(.k) .m-pager{flex-direction:row;align-items:center}
:where(.k) .m-pager .m-tools__btn+.m-tools__btn{border-block-start:0}
:where(.k) .m-pager .m-tools__btn:disabled{color:var(--c-text-3);opacity:.5}
:where(.k) .m-pager__n{min-inline-size:44px;padding-inline:var(--sp-1);text-align:center;font-size:var(--m-fs-15);line-height:var(--m-lh-15);font-weight:600;color:var(--c-ink)}
:where(.k) [data-m-load] .m-pager{display:none}
:where(.k) .m-fab{display:inline-flex;align-items:center;gap:var(--sp-2);block-size:var(--m-tap-lg);padding-inline:var(--sp-4) var(--sp-5);border-radius:999px;background:var(--c-accent);color:var(--c-surface);font-size:var(--m-fs-15);line-height:var(--m-lh-15);font-weight:600;white-space:nowrap;box-shadow:0 0 0 2px var(--c-surface),var(--e-1);transition:background var(--t-fast) var(--ease)}      /* primary = brand blue (D-7) */
:where(.k) .m-fab:active{background:var(--c-accent-hover)}
:where(.k) .m-fab[aria-pressed="true"]{background:var(--c-accent-hover)}
:where(.k) [data-m-state="comment"] .m-float{opacity:0;pointer-events:none}
:where(.k) [data-m-state="comment"] .m-float>*{pointer-events:none}
/* slow network / loading */
:where(.k) .m-load{position:absolute;inset-inline:var(--sp-8);inset-block-start:calc((100% - var(--m-sheet-h))/2 - 48px);display:none;flex-direction:column;align-items:center;gap:var(--sp-3);text-align:center;color:var(--c-text-2);font-size:var(--fs-14);line-height:var(--lh-14)}
:where(.k) .m-load b{display:block;font-size:var(--fs-16);line-height:var(--lh-16);font-weight:600;color:var(--c-ink)}
:where(.k) .m-load .spinner{inline-size:24px;block-size:24px}
:where(.k) [data-m-load] .m-load{display:flex}
:where(.k) [data-m-load] .m-plan{visibility:hidden}
:where(.k) [data-m-load] .m-tools{display:none}
:where(.k) [data-m-load] .m-fab{opacity:.5;pointer-events:none}
:where(.k) [data-m-load] .m-decide .btn{opacity:.5;pointer-events:none}   /* nothing can be decided before the sheet is on screen */

/* bottom sheet */
:where(.k) .m-step .m-iconbtn{z-index:1}
:where(.k) .m-peek{display:flex;flex-direction:column;gap:var(--sp-2);inline-size:100%;flex:none;padding:0 var(--m-gutter) var(--sp-3);text-align:start}
:where(.k) .m-peek__top{display:flex;align-items:center;gap:var(--sp-2);font-size:var(--fs-16);line-height:var(--lh-16);font-weight:600}
:where(.k) .m-peek__top .mine--text{font-size:var(--m-fs-15)}
:where(.k) .m-peek__top .ic{margin-inline-start:auto;color:var(--c-text-2)}
:where(.k) .m-peek__line{display:flex;align-items:center;gap:var(--sp-2);font-size:var(--m-fs-15);line-height:var(--lh-16);color:var(--c-text-2);min-inline-size:0}
:where(.k) .m-peek__line b{font-weight:600;color:var(--c-ink);flex:none}
:where(.k) .m-peek__line>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-inline-size:0}
:where(.k) .m-full{display:none;flex-direction:column;flex:1;min-block-size:0}
:where(.k) [data-m-state="comment"] .m-peek{display:none}
:where(.k) [data-m-state="comment"] .m-full{display:flex}
:where(.k) .m-step{display:flex;align-items:center;gap:var(--sp-1);flex:none;padding-inline:var(--m-gutter) var(--sp-2);margin-block-start:calc(var(--sp-2)*-1);font-size:var(--m-fs-15);line-height:var(--m-lh-15);font-weight:600}
:where(.k) .m-step .t3{font-weight:400}
:where(.k) .m-step .m-iconbtn{inline-size:var(--m-tap);block-size:var(--m-tap)}
:where(.k) .m-full__body{flex:1;min-block-size:0;overflow-y:auto;padding:var(--sp-1) var(--m-gutter) var(--sp-3)}
:where(.k) .m-comment__head{display:flex;align-items:center;gap:var(--sp-2);min-block-size:var(--m-tap-min)}
:where(.k) .m-comment__head .pin--static{inline-size:24px;block-size:24px;font-size:var(--m-fs-13)}
:where(.k) .m-comment__who{display:flex;flex-direction:column;min-inline-size:0}
:where(.k) .m-comment__who b{font-size:var(--fs-16);line-height:var(--lh-14);font-weight:600}
:where(.k) .m-comment__who small{font-size:var(--m-fs-13);line-height:var(--m-lh-13);color:var(--c-text-3);white-space:nowrap}
:where(.k) .m-comment__text{margin-block:var(--sp-1) var(--sp-2);font-size:var(--fs-16);line-height:var(--lh-16);color:var(--c-ink);text-wrap:pretty}
:where(.k) .m-comment__foot{display:flex;align-items:center;gap:var(--sp-2);min-block-size:24px;font-size:var(--m-fs-13);line-height:var(--m-lh-13);color:var(--c-text-3)}
:where(.k) .m-reply{display:flex;align-items:center;gap:var(--sp-2);margin-block-start:var(--sp-3)}
:where(.k) .m-decide{flex:none;display:flex;flex-direction:column;gap:var(--sp-3);padding:var(--sp-3) var(--m-gutter) calc(var(--sp-4) + var(--m-safe-b));border-block-start:1px solid var(--c-line);background:var(--c-surface)}
:where(.k) .m-decide__due{display:flex;align-items:center;gap:var(--sp-2);font-size:var(--fs-14);line-height:var(--lh-14);color:var(--c-text-2)}
:where(.k) .m-decide__due .due{font-size:var(--m-fs-13);margin-inline-start:auto}
/* in peek the decision row stays (buttons only); the due line appears when the sheet is expanded */
:where(.k) [data-m-state="peek"] .m-decide__due{display:none}
:where(.k) .m-decide__actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:var(--sp-2)}
:where(.k) .m-decide__actions .m-btn{padding-inline:var(--sp-2)}

/* modal confirmation sheet (the deliberate second step) */

/* ───────── 7. phone: what the real viewer adds ───────── */
:where(.k) .m-stage{position:absolute;inset:0}
:where(.k) .m-canvas .vfill,:where(.k) .m-canvas>.vstate{inset-block-end:var(--m-sheet-h)}
:where(.k) .m-canvas .vtext{margin:0;padding:var(--sp-4);box-shadow:none;font-size:var(--m-fs-15);line-height:var(--m-lh-15)}
:where(.k) .m-canvas .vblock{margin-inline:var(--m-gutter)}
:where(.k) .m-canvas .vskel{inline-size:84%}
/* Liav 6.11: the strip over a model's picture (and a DXF's note) never sits under the floating controls. They stand in a column
   at the inline-start edge, and the comment button (the widest) at the bottom: the strip keeps out of that column and ends
   above the button, and its details scroll inside it. The card of a file without a picture scrolls past the button. */
:where(.k) .m-canvas>.vstate>.vcad-note{justify-self:stretch;max-inline-size:none;margin-inline:calc(var(--sp-3) + var(--m-tap) + 2px + var(--sp-2)) var(--sp-3);max-block-size:calc(100% - var(--m-tap-lg) - 3 * var(--sp-3));overflow:auto;overscroll-behavior:contain}
:where(.k) .m-canvas .vcad-note .vinfo__pop{max-block-size:none;overflow:visible}
:where(.k) .m-canvas .vcard{padding-block-end:calc(var(--m-tap-lg) + 2 * var(--sp-3))}
:where(.k) [data-m-load] .vsheet{visibility:hidden}
:where(.k) .m-edchip__native{position:absolute;inset:0;inline-size:100%;block-size:100%;appearance:none;-webkit-appearance:none;border:0;margin:0;padding:0;opacity:0;font-size:16px;cursor:pointer}   /* the chip shows the short label; the native list sits invisibly over it (16px: no zoom on focus in iOS) */
:where(.k) .m-edchip:focus-within{border-color:var(--c-accent);box-shadow:0 0 0 3px var(--c-accent-ring)}
:where(.k) .m-hint{position:absolute;inset-block-start:var(--sp-3);inset-inline:var(--m-gutter);display:flex;justify-content:center;pointer-events:none}
:where(.k) .m-hint[hidden]{display:none}
:where(.k) .m-hint .tooltip{block-size:auto;min-block-size:32px;padding:var(--sp-1) var(--sp-3);white-space:normal;text-align:center;font-size:var(--m-fs-13);line-height:var(--m-lh-13)}
:where(.k) .m-peek--pick .m-peek__top{font-size:var(--m-fs-15);line-height:var(--m-lh-15)}
:where(.k) .m-peek--pick .m-peek__line{gap:var(--sp-2)}
:where(.k) .m-peek--pick .btn{block-size:var(--m-tap-min);font-size:var(--m-fs-15)}
:where(.k) .m-full__body--flush{padding:0}
:where(.k) .m-full__body .vcompose{margin-inline:calc(var(--m-gutter)*-1);background:none;border:0;padding-block:var(--sp-1) 0}
:where(.k) .m-full__body .vcompose>.thread__head{display:none}
:where(.k) .m-full__body .vcompose__where{font-size:var(--m-fs-13);line-height:var(--m-lh-13)}
:where(.k) .m-full__body .vcompose__to{block-size:var(--m-tap)}
:where(.k) .m-full__body .vcompose__to .select__native{font-size:var(--fs-16)}
:where(.k) .m-full__body .vcompose .thread__actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr)}
:where(.k) .m-full__body .thread__replies{margin-inline-start:0;margin-block:var(--sp-2) var(--sp-3)}
:where(.k) .m-full__body .thread__r p{font-size:var(--m-fs-15);line-height:var(--m-lh-15)}
:where(.k) .m-full__body .thread__rhead b{font-size:var(--m-fs-15)}
:where(.k) .m-full__body .thread__rhead,:where(.k) .m-full__body .thread__rhead time{font-size:var(--m-fs-13)}
:where(.k) .m-comment__foot .ic{flex:none}
:where(.k) .m-resolve{display:flex;margin-block-start:var(--sp-2)}
:where(.k) .m-resolve .btn{flex:1 1 auto;border-color:var(--c-line-strong)}
:where(.k) .m-decide__due>span:not(.avatar):not(.due){flex:1 1 0;min-inline-size:0}
:where(.k) .m-decide__due b{font-weight:600;color:var(--c-accent)}
:where(.k) .m-decide__actions--one{grid-template-columns:minmax(0,1fr)}
:where(.k) .m-decide .btn:disabled{opacity:.5}
:where(.k) .m-decide .btn--primary:disabled{background:var(--c-ink);border-color:var(--c-ink);color:var(--c-surface)}   /* waiting for the sheet: the action keeps its shape, dimmed */
:where(.k) .m-viewer .m-bar .more__menu{inset-inline-end:0}
:where(.k) .vskel-sheet{position:absolute;inset-inline:0;inset-block-end:0;display:flex;flex-direction:column;gap:var(--sp-3);padding:var(--sp-6) var(--m-gutter);background:var(--c-surface);border-start-start-radius:var(--m-r-sheet);border-start-end-radius:var(--m-r-sheet);box-shadow:var(--m-e-sheet)}
:where(.k) .vskel-sheet .skel--btn{inline-size:100%;block-size:var(--m-tap-lg)}
@media (prefers-reduced-motion:reduce){ :where(.k) .vsheet.is-gliding{transition:none} }

/* DXF drawn in the browser (brief 2026-10-25, part 7): one ink colour, hairlines that keep their width at any zoom */
:where(.k) .vsheet__dxfbox{display:block}
:where(.k) .vsheet__dxf{display:block;inline-size:100%;block-size:100%;overflow:visible}
:where(.k) .vsheet__dxf path,:where(.k) .vsheet__dxf circle{fill:none;stroke:var(--plan-ink);stroke-width:1;stroke-linecap:round;stroke-linejoin:round}
:where(.k) .vsheet__dxf text{fill:var(--plan-ink);font-family:var(--sans);stroke:none}
:where(.k) .vcad-note{align-self:start;justify-self:center;display:flex;align-items:center;gap:var(--sp-2);max-inline-size:min(720px,calc(100% - 24px));margin-block-start:var(--sp-3);padding:6px var(--sp-3);border:1px solid var(--c-line);border-radius:var(--r-lg);background:var(--c-surface);box-shadow:var(--e-1);font-size:var(--fs-12);line-height:var(--lh-12);color:var(--c-text-2);pointer-events:auto}
:where(.k) .vcad-note .ic{flex:none;color:var(--c-text-3)}
:where(.k) .vcad-note__dl{display:inline-flex;align-items:center;gap:4px;flex:none;color:var(--c-accent);font-weight:500;white-space:nowrap}
:where(.k) .vcad-note__dl:hover{text-decoration:underline;text-underline-offset:3px}

/* Edition compare (brief 2026-10-25, part 9). Colour only on the drawing layers: older edition blue, newer red
   (DESIGN.md "Plan First"); unchanged lines, where both cover each other, come out dark. The interface keeps its one blue. */
:root{--diff-old:#2563C9;--diff-new:#D23F31}
:where(.k) .viewer__main,:where(.k) .m-canvas{position:relative}
:where(.k) .vcmp{position:absolute;inset:0;z-index:4;display:flex;flex-direction:column;background:var(--c-canvas)}
:where(.k) .vcmp[hidden]{display:none}
:where(.k) .viewer.is-compare .vtools{display:none}
:where(.k) .m-viewer.is-compare .m-sheet,:where(.k) .m-viewer.is-compare .m-float,:where(.k) .m-viewer.is-compare .m-hint{display:none}
:where(.k) .vcmp__head{flex:none;display:flex;flex-direction:column;gap:var(--sp-2);padding:var(--sp-2) var(--sp-3);background:var(--c-surface);border-block-end:1px solid var(--c-line)}
:where(.k) .vcmp__bar{display:flex;align-items:center;flex-wrap:wrap;gap:var(--sp-2) var(--sp-3)}
:where(.k) .vcmp__sel{gap:6px}
:where(.k) .vcmp__dot{display:inline-block;inline-size:10px;block-size:10px;border-radius:50%;flex:none;background:var(--c-old)}
:where(.k) .vcmp__dot--old{background:var(--diff-old)} :where(.k) .vcmp__dot--new{background:var(--diff-new)} :where(.k) .vcmp__dot--same{background:#3A2440}
:where(.k) .vcmp__range{display:inline-flex;align-items:center;gap:var(--sp-2);font-size:var(--fs-13);line-height:var(--lh-13)}
:where(.k) .vcmp__range input{inline-size:140px;accent-color:var(--c-accent)}
:where(.k) .vcmp__pager{display:inline-flex;align-items:center;gap:var(--sp-1);font-size:var(--fs-13)}
:where(.k) .vcmp__legend{display:inline-flex;flex-wrap:wrap;gap:var(--sp-3);font-size:var(--fs-12);line-height:var(--lh-12);color:var(--c-text-2)}
:where(.k) .vcmp__legend span,:where(.k) .vcmp__label{display:inline-flex;align-items:center;gap:6px}
:where(.k) .vcmp__note{display:flex;align-items:center;gap:var(--sp-2);font-size:var(--fs-12);line-height:var(--lh-12);color:var(--c-text-2)}
:where(.k) .vcmp__note--quiet{color:var(--c-text-3)}
:where(.k) .vcmp__note .ic{flex:none}
:where(.k) .vcmp__body{position:relative;flex:1;min-block-size:0;display:flex}
:where(.k) .vcmp__view{flex:1;min-inline-size:0;position:relative;overflow:hidden;touch-action:none}
:where(.k) .vcmp--side .vcmp__body{gap:1px;background:var(--c-line)}
:where(.k) .vcmp__pane{flex:1;min-inline-size:0;display:flex;flex-direction:column;background:var(--c-canvas)}
:where(.k) .vcmp__label{flex:none;padding:var(--sp-2) var(--sp-3);font-size:var(--fs-12);line-height:var(--lh-12);font-weight:600;color:var(--c-text-2);background:var(--c-surface);border-block-end:1px solid var(--c-line)}
:where(.k) .vcmp__sheet{overflow:hidden}
:where(.k) .vcmp__img{position:absolute;top:0;left:0;display:block;pointer-events:none}
:where(.k) .vcmp__top{mix-blend-mode:multiply}
:where(.k) .vcmp__state{pointer-events:auto}
@media (max-width:759px){
  :where(.k) .vcmp__head{padding:var(--sp-2)}
  :where(.k) .vcmp__bar .btn,:where(.k) .vcmp__sel{block-size:40px}
  :where(.k) .vcmp__range{inline-size:100%} :where(.k) .vcmp__range input{flex:1}
  :where(.k) .vcmp__note--quiet{display:none}
}

/* ───────── brief 2 part D6: "who viewed" (the viewer's "צפיות" tab and phone pane) ───────── */
:where(.k) .vw-people{display:flex;flex-direction:column;margin:0 0 var(--sp-3);padding:0;list-style:none}
:where(.k) .vw-person{display:flex;align-items:center;gap:var(--sp-2);min-block-size:44px;padding-block:var(--sp-1);border-block-end:1px solid var(--c-line-soft, var(--c-line))}
:where(.k) .vw-person:last-child{border-block-end:0}
:where(.k) .vw-person__b{display:flex;flex-direction:column;min-inline-size:0;flex:1 1 auto}
:where(.k) .vw-person__b b{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
:where(.k) .vw-person__b small{font-size:var(--fs-12);line-height:var(--lh-12);color:var(--c-text-3)}
:where(.k) .vw-person .status{flex:none}
:where(.k) .vpane .vw-people,:where(.k) #vpane .vw-people{padding-inline:var(--sp-4)}
/* part D2: the scale typed by hand ("1 : N"), and phone-sized targets for the drawing tools */
:where(.k) .ms-ratio{display:flex;align-items:center;gap:var(--sp-2)}
:where(.k) .ms-ratio__pre{flex:none;font-weight:600;color:var(--c-text-2);padding-inline-start:var(--sp-3)}
@media (max-width:759px){
  :where(.k) .vmk-bar--m .vmk-tool,:where(.k) .vmk-bar--m .btn{min-inline-size:44px;min-block-size:44px}
  /* a 28px colour inside a 44px target: the white border is part of the button */
  :where(.k) .vmk-bar--m .vmk-swatch{inline-size:44px;block-size:44px;border-width:8px;box-shadow:inset 0 0 0 1px var(--c-line-strong)}
  :where(.k) .vmk-bar--m .vmk-swatch[aria-pressed="true"]{box-shadow:inset 0 0 0 2px var(--c-ink)}
}
/* Brief 3 C2: the 48-hour distribution metric at the top of "צפיות" (one line, the accent-free ink, the rest quiet). */
:where(.k) .vw-metric{margin:0 0 var(--sp-3);padding-inline:var(--sp-4);font-size:var(--fs-13);line-height:var(--lh-13);color:var(--c-ink)}
:where(.k) .vw-metric b{font-weight:600}

/* ───────── 8. night round: the waiting-on bar, who didn't see, distribute, share ─────────
   One strip under the top bar (and under the phone's bar): who holds the ball, how many of the people told have opened the
   valid edition, and the actions that matter. Tokens only, logical properties only. */
:where(.k) .vwait{position:relative;display:flex;align-items:center;gap:var(--sp-3);flex:none;min-block-size:52px;padding:var(--sp-2) var(--sp-4);background:var(--c-surface);border-block-end:1px solid var(--c-line);min-inline-size:0}
:where(.k) .vwait[hidden]{display:none}
:where(.k) .vwait__who{display:flex;align-items:center;gap:var(--sp-2);min-inline-size:0;flex:0 1 auto;font-size:var(--fs-14);line-height:var(--lh-14);color:var(--c-text-2)}
:where(.k) .vwait__text{min-inline-size:0;overflow-wrap:anywhere}
:where(.k) .vwait__text b{font-weight:600;color:var(--c-accent)}
:where(.k) .vwait__from{display:block;font-size:var(--fs-12);line-height:var(--lh-12);color:var(--c-text-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}      /* Liav 9.11: who sent it to me, and when (desktop: a quiet second line) */
:where(.k) .vwait__ic{display:grid;place-items:center;inline-size:24px;block-size:24px;flex:none;border-radius:999px;background:var(--c-subtle);color:var(--c-text-3)}
:where(.k) .vwait__ic--ok{background:var(--c-accent-tint);color:var(--c-accent)}
:where(.k) .vwait__seen{display:inline-flex;align-items:center;gap:var(--sp-2);flex:none;min-block-size:32px;padding-inline:var(--sp-3);border:1px solid var(--c-line-strong);border-radius:999px;background:var(--c-surface);color:var(--c-text-2);font-size:var(--fs-13);line-height:var(--lh-13);transition:background var(--t-fast) var(--ease),border-color var(--t-fast) var(--ease)}
:where(.k) .vwait__seen:hover{background:var(--c-hover);border-color:var(--c-accent-line)}
:where(.k) .vwait__seen:focus-visible{outline:0;box-shadow:var(--focus)}
:where(.k) .vwait__seen .ic{color:var(--c-text-3)}
:where(.k) .vwait__unseen{display:inline-flex;align-items:center;gap:6px;font-weight:600;color:var(--c-text-2)}
:where(.k) .vwait__unseen::before{content:"";inline-size:8px;block-size:8px;border-radius:50%;background:var(--c-wait)}      /* "N לא ראו": neutral words, the attention dot (Liav 8.11; was red) */
:where(.k) .vwait__acts{display:flex;align-items:center;gap:var(--sp-2);flex:none;min-inline-size:0}
:where(.k) .vwait .grow{flex:1 1 0;min-inline-size:0}
:where(.k) .viewer .vwait .due{flex:none}
/* narrower windows: the bar wraps into two lines instead of squeezing */
@media (max-width:1100px){
  :where(.k) .vwait:not(.m-vwait){flex-wrap:wrap;row-gap:var(--sp-2)}
  :where(.k) .vwait .grow{display:none}
  :where(.k) .vwait__acts{margin-inline-start:auto}
}
/* phone: one slim row, icon buttons of finger size; approve / return stay in the foot of the sheet */
:where(.k) .m-viewer .vwait{gap:var(--sp-2);min-block-size:var(--m-tap);padding-inline:var(--m-gutter) var(--sp-1);flex-wrap:nowrap}
:where(.k) .m-viewer .vwait__who{flex:1 1 0;font-size:var(--m-fs-13);line-height:var(--m-lh-13)}
:where(.k) .m-viewer .vwait__text{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
:where(.k) .m-viewer .vwait .due{display:none}
:where(.k) .m-viewer .vwait__seen{min-block-size:var(--m-tap-min);padding-inline:var(--sp-3);gap:var(--sp-1)}
:where(.k) .m-viewer .vwait .grow{display:none}
:where(.k) .m-viewer .vwait__acts{margin-inline-start:0;gap:0}
:where(.k) .m-viewer .vwait__ib{color:var(--c-accent)}
:where(.k) .m-viewer .vwait__ib:active{background:var(--c-pressed)}
:where(.k) [data-m-load] .vwait__ib{opacity:.5;pointer-events:none}
/* the confirmation of approve / return opens under the bar and lines up with the end of it */
:where(.k) .vwait.pop-anchor>.dialog--pop{inset-block:calc(100% + var(--sp-1)) auto;inset-inline:auto var(--sp-4)}
/* who didn't see: the meter, the empty state of a never-distributed edition, the reminder */
:where(.k) progress.vw-meter{display:block;appearance:none;-webkit-appearance:none;inline-size:calc(100% - var(--sp-8));block-size:6px;margin:0 var(--sp-4) var(--sp-4);border:0;border-radius:999px;background:var(--c-pressed);overflow:hidden;color:var(--c-accent)}
:where(.k) progress.vw-meter::-webkit-progress-bar{background:var(--c-pressed);border-radius:999px}
:where(.k) progress.vw-meter::-webkit-progress-value{background:var(--c-accent);border-radius:999px}
:where(.k) progress.vw-meter::-moz-progress-bar{background:var(--c-accent);border-radius:999px}
:where(.k) .vw-never{margin:var(--sp-4)}
:where(.k) .vpanel__body .vrow,:where(.k) .m-full__body .vrow{padding-inline:var(--sp-4)}
/* distribute dialog */
:where(.k) .dist-quick{display:flex;align-items:center;flex-wrap:wrap;gap:var(--sp-1) var(--sp-4);margin-block-end:var(--sp-2)}
:where(.k) .dist-people{display:flex;flex-direction:column;margin:0 0 var(--sp-4);padding:0;border:1px solid var(--c-line);border-radius:var(--r-lg);max-block-size:min(320px,40dvh);overflow:auto;min-inline-size:0}
:where(.k) .dist-person{display:flex;align-items:center;gap:var(--sp-3);min-block-size:48px;padding:var(--sp-2) var(--sp-4);border-block-end:1px solid var(--c-line)}
:where(.k) .dist-person:last-child{border-block-end:0}
:where(.k) .dist-person:hover{background:var(--c-hover)}
:where(.k) .dist-person__b{display:flex;flex-direction:column;min-inline-size:0;flex:1 1 auto}
:where(.k) .dist-person__b b{font-weight:500;font-size:var(--fs-14);line-height:var(--lh-14)}
:where(.k) .dist-person__b small{font-size:var(--fs-12);line-height:var(--lh-12)}
:where(.k) .dist-state{flex:none;font-size:var(--fs-12);line-height:var(--lh-12);color:var(--c-text-3)}
:where(.k) .dist-state--opened{color:var(--c-accent);font-weight:500}
:where(.k) .dist-state--late{color:var(--c-accent);font-weight:600}      /* late = the one attention colour, as .due--late (Liav 8.11; was red) */
/* share dialog */
:where(.k) .sh-link{display:flex;gap:var(--sp-2);align-items:stretch}
:where(.k) .sh-link__url{flex:1 1 auto;min-inline-size:0;block-size:var(--h-ctl-lg);padding-inline:var(--sp-3);border:1px solid var(--c-line-strong);border-radius:var(--r-md);background:var(--c-subtle);color:var(--c-ink);font-size:var(--fs-13);text-overflow:ellipsis}
:where(.k) .sh-link__url:focus{outline:0;border-color:var(--c-accent);box-shadow:0 0 0 3px var(--c-accent-ring)}
:where(.k) .sh-link .btn{block-size:var(--h-ctl-lg);flex:none}
:where(.k) .sh-status{min-block-size:var(--lh-13);margin:var(--sp-2) 0 var(--sp-3);font-size:var(--fs-13);line-height:var(--lh-13);color:var(--c-accent);font-weight:500}
:where(.k) .sh-status:empty{margin-block:0;min-block-size:0}
@media (max-width:759px){
  :where(.k) .sh-link{flex-direction:column}
  :where(.k) .sh-link .btn,:where(.k) .sh-link__url{block-size:var(--m-tap);inline-size:100%}
  :where(.k) .dist-person{min-block-size:var(--m-tap)}
}
/* phone: the tools list in the thumb column */
:where(.k) .m-toolmenu{align-self:flex-start}
:where(.k) .m-toolmenu__btn{display:grid;place-items:center;inline-size:var(--m-tap);block-size:var(--m-tap)}
:where(.k) .m-toolmenu .menu{min-inline-size:min(260px,calc(100vw - 32px))}
:where(.k) .m-toolmenu .menu__item{block-size:var(--m-tap-min);font-size:var(--m-fs-15)}
/* the sheet is loading (desktop): centred on the sheet's skeleton, with the file it is fetching */
:where(.k) .vload--c{inset-block:50% auto;transform:translateY(-50%);align-items:center;gap:var(--sp-2);inline-size:min(320px,80%);padding:var(--sp-4);background:var(--c-surface);border:1px solid var(--c-line);border-radius:var(--r-lg);box-shadow:var(--e-1)}
:where(.k) .vload--c b{font-size:var(--fs-14);line-height:var(--lh-14);font-weight:600;color:var(--c-ink)}
:where(.k) .vload--c .spinner{inline-size:20px;block-size:20px}
:where(.k) .vload__file{max-inline-size:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--c-text-3)}
:where(.k) .vload__slow:empty{display:none}
:where(.k) .vload__slow{color:var(--c-text-2)}
/* D4: a sheet card on a desktop keeps the edition badge whole: the "waiting on" / "updated" line goes under it instead of over it */
:where(.k) .sheet-card:not(.m-card) .sheet-card__meta{flex-wrap:wrap;row-gap:var(--sp-1)}
:where(.k) .sheet-card:not(.m-card) .sheet-card__meta .ed-badge{flex:none;max-inline-size:100%}
:where(.k) .sheet-card:not(.m-card) .sheet-card__meta>.clip,:where(.k) .sheet-card:not(.m-card) .sheet-card__meta>.ws-ball{flex:1 1 100%;min-inline-size:0}
/* F: phone. The sheet rises over the keyboard where the page does not resize (--m-kb is set from visualViewport), and its
   last line clears the home indicator when there is no decision footer (which carries the inset itself). */
:where(.k) .m-viewer .m-sheet{inset-block-end:var(--m-kb,0px)}
:where(.k) .m-viewer .m-float{inset-block-end:calc(var(--m-sheet-h) + var(--m-kb,0px) + var(--sp-3))}
:where(.k) .m-viewer .m-sheet:not(:has(.m-decide))::after{content:"";display:block;flex:none;block-size:var(--m-safe-b)}
:where(.k) .m-step__act{margin-inline-start:var(--sp-2);block-size:var(--m-tap-min);font-size:var(--m-fs-13)}

/* ---- Workbooks and building models (Liav 5.11, fileview.js): the model card, a model picture's details, the
   workbook table. No new tokens: surface, line, subtle, the text scale and the existing .tabs / .table / .tag. */
:where(.k) .vcard{flex:1;min-inline-size:0;overflow:auto;padding:var(--sp-6) var(--sp-4)}
:where(.k) .vcard:focus-visible{outline:2px solid var(--c-accent);outline-offset:-2px}
:where(.k) .vcard__card{max-inline-size:720px;margin-inline:auto;display:grid;gap:var(--sp-4);padding:var(--sp-6);background:var(--c-surface);border:1px solid var(--c-line);border-radius:var(--r-lg);box-shadow:var(--e-1)}
:where(.k) .vcard__head{display:flex;align-items:center;gap:var(--sp-4);min-inline-size:0}
:where(.k) .vcard__head>div{min-inline-size:0;display:grid;gap:4px}
:where(.k) .vcard__head .thumb{flex:none;display:grid;place-items:center;color:var(--c-text-3)}
:where(.k) .vcard__title{margin:0;font-size:var(--fs-16,16px);line-height:1.4;font-weight:600;overflow-wrap:anywhere}
:where(.k) .vcard__needs{display:flex;gap:var(--sp-2);align-items:flex-start;margin:0;color:var(--c-text-2);font-size:var(--fs-13);line-height:var(--lh-13)}
:where(.k) .vcard__needs .ic,:where(.k) .vinfo__warn .ic{flex:none;margin-block-start:2px;color:var(--c-text-3)}
:where(.k) .vcard__actions{display:flex;gap:var(--sp-2);flex-wrap:wrap}
:where(.k) .vinfo__facts{display:grid;grid-template-columns:minmax(120px,max-content) 1fr;gap:6px var(--sp-4);margin:0;font-size:var(--fs-13);line-height:var(--lh-13)}
:where(.k) .vinfo__row{display:contents}
:where(.k) .vinfo__facts dt{color:var(--c-text-3)}
:where(.k) .vinfo__facts dd{margin:0;color:var(--c-ink);overflow-wrap:anywhere;min-inline-size:0}
:where(.k) .vinfo__h{margin:var(--sp-2) 0 0;font-size:var(--fs-13);line-height:var(--lh-13);font-weight:600;color:var(--c-ink)}
:where(.k) .vinfo__counts{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:6px var(--sp-3);margin:0;padding:0;list-style:none;font-size:var(--fs-13);line-height:var(--lh-13)}
:where(.k) .vinfo__counts li{display:flex;justify-content:space-between;gap:var(--sp-2);padding:6px var(--sp-2);border-radius:var(--r-sm);background:var(--c-subtle)}
:where(.k) .vinfo__table{font-size:var(--fs-13)}
:where(.k) .vinfo__table td{padding:6px var(--sp-3);border-block-end:1px solid var(--c-line)}
:where(.k) .vinfo__list{display:grid;gap:6px;margin:0;padding:0;list-style:none;font-size:var(--fs-13);line-height:var(--lh-13)}
:where(.k) .vinfo__list li{display:grid;gap:2px;padding:6px var(--sp-2);border-radius:var(--r-sm);background:var(--c-subtle);overflow-wrap:anywhere}
:where(.k) .vinfo__warn{display:flex;gap:var(--sp-2);align-items:flex-start;margin:0;padding:var(--sp-2) var(--sp-3);border-radius:var(--r-sm);background:var(--c-subtle);color:var(--c-text-2);font-size:var(--fs-12);line-height:var(--lh-12)}
:where(.k) .vinfo-note{align-items:flex-start}
/* Liav 16.11: the Revit export line under the picture's strip (fileview.js infoNote), and a file of a ZIP that opens (zipfile.js). */
:where(.k) .vinfo-note:has(.vinfo-note__export){flex-wrap:wrap}
:where(.k) .vinfo-note__export{flex-basis:100%;margin:0;padding-block-start:6px;border-block-start:1px solid var(--c-line);color:var(--c-text-2)}
:where(.k) a.vzip__open{color:var(--c-accent);text-decoration:none;border-radius:var(--r-sm)}
:where(.k) a.vzip__open .ic{color:currentColor}
@media (hover:hover){:where(.k) a.vzip__open:hover bdi{text-decoration:underline;text-underline-offset:2px}}
:where(.k) a.vzip__open:focus-visible{outline:2px solid var(--c-accent);outline-offset:2px}
:where(.k) .zf__bar .gv__meta{display:flex;align-items:center;gap:4px;flex-wrap:wrap;min-inline-size:0}
:where(.k) .zf .gv__title{min-inline-size:0}
:where(.k) .zf .gv__title h1{overflow-wrap:anywhere}
/* Liav 6.11: a ZIP archive's files (fileview.js zipBody): a folder tree as a table, indented by depth, folders first. */
:where(.k) .vzip__sum{display:flex;align-items:center;gap:var(--sp-2);margin:0;color:var(--c-text-2);font-size:var(--fs-13);line-height:var(--lh-13)}
:where(.k) .vzip__sum .ic{flex:none;color:var(--c-text-3)}
:where(.k) .vzip__main{display:flex;align-items:center;flex-wrap:wrap;gap:var(--sp-2);margin:0 0 var(--sp-3)}
:where(.k) .vzip__scroll{max-block-size:min(60vh,640px);overflow:auto;border:1px solid var(--c-line);border-radius:var(--r-sm)}
:where(.k) .vzip__scroll:focus-visible{outline:2px solid var(--c-accent);outline-offset:2px}
:where(.k) .vzip__table{inline-size:100%;border-collapse:separate;border-spacing:0;font-size:var(--fs-13);line-height:var(--lh-13)}
:where(.k) .vzip__table thead th{position:sticky;inset-block-start:0;z-index:1;padding:6px var(--sp-3);background:var(--c-subtle);border-block-end:1px solid var(--c-line-strong);color:var(--c-text-3);font-weight:500;text-align:start}
:where(.k) .vzip__table td{padding:6px var(--sp-3);border-block-end:1px solid var(--c-line);vertical-align:top}
:where(.k) .vzip__table tr:last-child td{border-block-end:0}
:where(.k) .vzip__n,:where(.k) .vzip__day{white-space:nowrap;text-align:end;color:var(--c-text-2)}
:where(.k) .vzip__name{display:flex;align-items:flex-start;gap:6px;min-inline-size:0;overflow-wrap:anywhere;color:var(--c-ink)}
:where(.k) .vzip__name .ic{flex:none;margin-block-start:2px;color:var(--c-text-3)}
:where(.k) .vzip__row.is-folder .vzip__name{font-weight:600}
:where(.k) .vzip__enc{display:inline-flex;align-items:center;gap:2px;margin-inline-start:4px;flex:none}
:where(.k) .vzip__d1 .vzip__name{padding-inline-start:16px}
:where(.k) .vzip__d2 .vzip__name{padding-inline-start:32px}
:where(.k) .vzip__d3 .vzip__name{padding-inline-start:48px}
:where(.k) .vzip__d4 .vzip__name{padding-inline-start:64px}
:where(.k) .vzip__d5 .vzip__name{padding-inline-start:80px}
:where(.k) .vzip__d6 .vzip__name,:where(.k) .vzip__d7 .vzip__name,:where(.k) .vzip__d8 .vzip__name{padding-inline-start:96px}
@media (max-width:759px){
  :where(.k) .vzip__scroll{max-block-size:none;overflow:visible;border:0}
  :where(.k) .vzip__table td,:where(.k) .vzip__table thead th{padding-inline:6px}
  :where(.k) .vzip__d1 .vzip__name{padding-inline-start:10px}
  :where(.k) .vzip__d2 .vzip__name{padding-inline-start:20px}
  :where(.k) .vzip__d3 .vzip__name{padding-inline-start:30px}
  :where(.k) .vzip__d4 .vzip__name,:where(.k) .vzip__d5 .vzip__name,:where(.k) .vzip__d6 .vzip__name,:where(.k) .vzip__d7 .vzip__name,:where(.k) .vzip__d8 .vzip__name{padding-inline-start:40px}
}
:where(.k) .vinfo{min-inline-size:0;flex:1}
:where(.k) .vinfo>summary{display:flex;align-items:center;gap:var(--sp-2);cursor:pointer;list-style:none;min-block-size:24px}
:where(.k) .vinfo>summary::-webkit-details-marker{display:none}
:where(.k) .vinfo>summary:focus-visible{outline:2px solid var(--c-accent);outline-offset:2px;border-radius:var(--r-sm)}
:where(.k) .vinfo__more{margin-inline-start:auto;color:var(--c-accent);font-weight:500;white-space:nowrap}
:where(.k) .vinfo[open] .vinfo__more{text-decoration:underline;text-underline-offset:3px}
:where(.k) .vinfo__pop{display:grid;gap:var(--sp-3);max-block-size:min(60vh,520px);overflow:auto;padding-block:var(--sp-3) var(--sp-1)}
:where(.k) .vxl{flex:1;min-inline-size:0;display:flex;flex-direction:column;background:var(--c-surface)}
:where(.k) .vxl__bar{display:flex;align-items:center;gap:var(--sp-3);padding-inline:var(--sp-3);border-block-end:1px solid var(--c-line);min-inline-size:0}
:where(.k) .vxl__tabs{flex:1;box-shadow:none}
:where(.k) .vxl__note{flex:none;max-inline-size:40%;font-size:var(--fs-12);line-height:var(--lh-12)}
:where(.k) .vxl__panel{flex:1;min-block-size:0;display:flex;flex-direction:column;gap:var(--sp-2);padding:var(--sp-2)}
:where(.k) .vxl__scroll{flex:1;min-block-size:0;overflow:auto;border:1px solid var(--c-line);border-radius:var(--r-sm);background:var(--sheet,#fff)}
:where(.k) .vxl__scroll:focus-visible{outline:2px solid var(--c-accent);outline-offset:-2px}
:where(.k) .vxl__table{border-collapse:separate;border-spacing:0;table-layout:fixed;font-size:var(--fs-13);line-height:18px;color:var(--c-ink)}
:where(.k) .vxl__table td{padding:3px 6px;border-inline-end:1px solid var(--c-line);border-block-end:1px solid var(--c-line);vertical-align:top;overflow-wrap:anywhere;unicode-bidi:plaintext;text-align:start;user-select:text;-webkit-user-select:text}
:where(.k) .vxl__table td.n{text-align:end;font-variant-numeric:tabular-nums;white-space:nowrap}
:where(.k) .vxl__table td.b{font-weight:600}
:where(.k) .vxl__table thead th,:where(.k) .vxl__corner{position:sticky;inset-block-start:0;z-index:2;block-size:24px;padding:0 6px;background:var(--c-subtle);border-inline-end:1px solid var(--c-line);border-block-end:1px solid var(--c-line-strong);font-size:var(--fs-12);font-weight:500;color:var(--c-text-3);text-align:center}
:where(.k) .vxl__table tbody th{position:sticky;inset-inline-start:0;z-index:1;padding:0 6px;background:var(--c-subtle);border-inline-end:1px solid var(--c-line-strong);border-block-end:1px solid var(--c-line);font-size:var(--fs-12);font-weight:500;color:var(--c-text-3);text-align:center}
:where(.k) .vxl__corner{inset-inline-start:0;z-index:3}
:where(.k) .vxl__table col.vxl__rh{inline-size:44px;width:44px}
:where(.k) .vxl__empty{margin:auto;color:var(--c-text-2);font-size:var(--fs-13)}
@media (max-width:759px){
  :where(.k) .vcard{padding:var(--sp-3)}
  :where(.k) .vcard__card{padding:var(--sp-4)}
  :where(.k) .vinfo__facts{grid-template-columns:1fr;gap:2px}
  :where(.k) .vinfo__facts dd{margin-block-end:6px}
  :where(.k) .vxl__note{display:none}
  :where(.k) .vxl__panel{padding:0}
  :where(.k) .vxl__scroll{border:0;border-radius:0}
  :where(.k) .vinfo__pop{max-block-size:45vh}
}

/* ---- The 3D view (Liav 5.11, model3d.js): the model fills the canvas area; a small toolbar above it; the properties of a
   picked element in a side panel (a bottom sheet on a phone). The highlight colour is the accent blue. */
:where(.k) .v3d{flex:1;min-inline-size:0;position:relative;display:flex;flex-direction:column;background:#f4f5f7}
:where(.k) .v3d__bar{display:flex;align-items:center;gap:var(--sp-2);flex-wrap:wrap;padding:var(--sp-2) var(--sp-3);background:var(--c-surface);border-block-end:1px solid var(--c-line)}
:where(.k) .v3d__storey select{block-size:32px;padding-inline:var(--sp-2);border:1px solid var(--c-line);border-radius:var(--r-sm);background:var(--c-surface);font:inherit;font-size:var(--fs-13);color:var(--c-ink)}
:where(.k) .v3d__hint{margin-inline-start:auto;font-size:var(--fs-12);line-height:var(--lh-12)}
:where(.k) .v3d__view{flex:1;min-block-size:0;position:relative;touch-action:none}
:where(.k) .v3d__view canvas{display:block;inline-size:100%;block-size:100%;outline:none}
:where(.k) .v3d__view canvas:focus-visible{box-shadow:inset 0 0 0 2px var(--c-accent)}
:where(.k) .v3d__status{position:absolute;inset-block-start:56px;inset-inline-start:50%;transform:translateX(-50%);padding:6px var(--sp-3);border-radius:var(--r-lg);background:var(--c-surface);box-shadow:var(--e-1);font-size:var(--fs-12)}
:where(.k) .v3d__status[hidden]{display:none}
:where(.k) .v3d__panel{position:absolute;inset-block:56px var(--sp-3);inset-inline-end:var(--sp-3);inline-size:min(340px,calc(100% - 24px));display:flex;flex-direction:column;background:var(--c-surface);border:1px solid var(--c-line);border-radius:var(--r-lg);box-shadow:var(--e-1);overflow:hidden}
:where(.k) .v3d__panel[hidden]{display:none}
:where(.k) .v3d__phead{display:flex;align-items:center;gap:var(--sp-2);padding:var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-3);border-block-end:1px solid var(--c-line)}
:where(.k) .v3d__phead h3{flex:1;min-inline-size:0;margin:0;font-size:var(--fs-14,14px);font-weight:600;overflow-wrap:anywhere}
:where(.k) .v3d__pbody{flex:1;min-block-size:0;overflow:auto;display:grid;align-content:start;gap:var(--sp-2);padding:var(--sp-3)}
:where(.k) .v3d__pbody .vinfo__facts{grid-template-columns:minmax(90px,max-content) 1fr;font-size:var(--fs-12);line-height:var(--lh-12)}
@media (max-width:759px){
  :where(.k) .v3d__hint{display:none}
  :where(.k) .v3d__panel{inset-block:auto 0;inset-inline:0;inline-size:auto;max-block-size:55%;border-radius:var(--r-lg) var(--r-lg) 0 0;border-inline:0;border-block-end:0}
}

/* Liav 6.11: the review tools under approve / return on the phone (hand on, hand back, ask for an opinion), and the
   lines of an edition card (hand-offs, opinions, files attached to a return). */
:where(.k) .m-decide__review{display:flex;flex-wrap:wrap;gap:var(--sp-2);margin-block-start:var(--sp-2)}
:where(.k) .m-decide__review .m-btn{flex:1 1 auto;min-inline-size:0}
:where(.k) .rv-op .status{margin-inline-end:var(--sp-1)}
:where(.k) .rv-files a{overflow-wrap:anywhere}
:where(.k) .rv-attach{margin-block-start:var(--sp-2)}
:where(.k) .rv-people{border:0;margin:0;padding:0;min-inline-size:0}      /* Liav 9.11: the people asked for an opinion, one per row (the group picker's .gp-pick list) */
:where(.k) .rv-people>legend{padding:0;margin-block-end:var(--sp-2)}
