:root{
  --paper:#f3eee4; --paper2:#e9e2d4; --ink:#14202e; --ink2:#3a4a5c; --mute:#7b8794;
  --accent:#e4572e; --accent-ink:#fff; --teal:#1f7a6d; --card:#fffdf8; --line:#d8d0bf;
  --shadow:0 1px 2px rgba(20,32,46,.12),0 6px 16px -6px rgba(20,32,46,.25);
  /* one family: orange (main action), teal (select / save), slate blue (order / reduce), red (danger) */
  --blue:#3f6283; --teal-ink:#1f7a6d; --danger:#c4361a;
  --ok-bg:#1f7a6d1f; --ok-ink:#0b5a4e; --warn-bg:#d99a1c29; --warn-ink:#744c00;
}
@media (prefers-color-scheme:dark){
  :root{--paper:#0f1822;--paper2:#16222f;--ink:#f1ece0;--ink2:#c3c9d0;--mute:#8793a0;--card:#1c2a3a;--line:#2b3b4d;
    --shadow:0 1px 2px rgba(0,0,0,.5),0 6px 16px -6px rgba(0,0,0,.6);
    --blue:#6f93b8; --teal-ink:#5cc2b1; --danger:#ff8a6b;
    --ok-bg:#5cc2b126; --ok-ink:#7fe0cf; --warn-bg:#e8b34a26; --warn-ink:#f2c566}
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0}
body{background:var(--paper);color:var(--ink);font:16px/1.45 system-ui,"Segoe UI",Roboto,"Noto Sans Hebrew",Arial,sans-serif;
  min-height:100vh;padding-bottom:calc(150px + env(safe-area-inset-bottom))}
button{font:inherit;color:inherit;cursor:pointer}
[hidden]{display:none!important}

.top{position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;
  padding:10px 16px;padding-top:max(10px,env(safe-area-inset-top));background:#14202e;color:#f6f1e7}
.brandrow{display:flex;align-items:center;gap:2px}
body[data-view="home"] #empty,body[data-view="home"] #work,body[data-view="home"] #selbar,body[data-view="home"] #bar,
body[data-view="home"] #undo,body[data-view="home"] #redo,body[data-view="home"] #backHome,body[data-view="doc"] #home{display:none!important}
body.loading #home{visibility:hidden}   /* until the saved works are read, so the list does not push the page around */
.home{max-width:520px;margin:0 auto;padding:20px 16px}
.homeh{font-size:.9rem;font-weight:700;letter-spacing:.2px;margin:32px 4px 8px;color:var(--mute)}
.doclist{display:flex;flex-direction:column;gap:8px}
.dwrap{position:relative;display:flex}
.dcard{flex:1;min-width:0;display:flex;gap:12px;align-items:center;text-align:start;padding:8px 12px;border-radius:16px;border:1px solid var(--line);background:var(--card);box-shadow:var(--shadow);min-height:72px}
.dwrap .dcard{padding-inline-end:56px}
.dcard:active{transform:scale(.99)}
.dcard:focus-visible,.ddel:focus-visible,.rrow button:focus-visible{outline:3px solid var(--blue);outline-offset:2px}
.dthumb{width:44px;height:58px;flex:none;border-radius:6px;background:#fff center/cover no-repeat;border:1px solid var(--line)}
.dinfo{min-width:0;flex:1;display:flex;flex-direction:column;gap:2px}
.dinfo b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:1rem;font-weight:600}
.dsub{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
.dmeta{color:var(--mute);font-size:.84rem}
.dbadge{padding:1px 9px;border-radius:999px;font-weight:700;font-size:.76rem;line-height:1.5;background:var(--ok-bg);color:var(--ok-ink)}
.dbadge.wait{background:var(--warn-bg);color:var(--warn-ink)}
.ddel{position:absolute;top:50%;inset-inline-end:6px;transform:translateY(-50%);width:44px;height:44px;border-radius:12px;border:0;background:transparent;color:var(--mute);display:grid;place-items:center;padding:0}
.ddel svg{width:22px;height:22px}
.ddel:hover,.ddel:active{color:var(--danger);background:color-mix(in srgb,var(--danger) 14%,transparent)}
.shareopts{display:flex;flex-direction:column;gap:10px}
#shareList{max-height:46vh;overflow:auto}
.homeempty,.homenote{color:var(--mute);text-align:center;font-size:.9rem;margin:24px 0 0}
.homeempty{padding:24px 16px;border:1px dashed var(--line);border-radius:16px;margin-top:8px}
.brand{display:flex;align-items:center;gap:10px;font-weight:700;font-size:1.1rem;letter-spacing:.2px}
.logo{width:30px;height:30px}
.hist{display:flex;gap:4px}
.ic{width:44px;height:44px;border:0;border-radius:12px;background:transparent;color:#f6f1e7;display:grid;place-items:center}
.ic svg{width:24px;height:24px}
.ic:disabled{opacity:.3}
.ic:not(:disabled):active{background:#ffffff22}

/* empty */
.empty{max-width:460px;margin:0 auto;padding:56px 24px;text-align:center}
.empty h1{font-size:1.7rem;margin:28px 0 10px}
.empty p{color:var(--ink2);margin:0 0 28px}
.stack{position:relative;width:110px;height:140px;margin:0 auto}
.stack i{position:absolute;inset:0;border-radius:8px;background:var(--card);box-shadow:var(--shadow);border:1px solid var(--line)}
.stack i:nth-child(1){transform:rotate(-9deg);background:var(--paper2)}
.stack i:nth-child(2){transform:rotate(6deg)}
.stack i:nth-child(3){background:linear-gradient(var(--accent) 0 12px,var(--card) 12px)}
.big{width:100%;padding:18px;border:0;border-radius:16px;background:var(--accent);color:var(--accent-ink);font-weight:700;font-size:1.15rem;box-shadow:var(--shadow)}
.big:active{transform:scale(.98)}

/* work */
main{padding:14px 22px 0}
.meta{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.fname{flex:1;min-width:0;font:700 1.15rem/1.2 inherit;font-family:inherit;color:var(--ink);background:transparent;border:0;border-bottom:2px dashed var(--line);padding:6px 2px;border-radius:0}
.fname:focus{outline:0;border-bottom-color:var(--accent)}
.count{white-space:nowrap;color:var(--mute);font-size:.9rem}
.filesrow{display:flex;align-items:flex-start;gap:6px;margin-bottom:12px}
.chips{flex:1;min-width:0;display:flex;gap:8px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
.chips::-webkit-scrollbar{display:none}
.chip{flex:0 0 auto;display:flex;align-items:center;gap:6px;max-width:62%;padding:5px 10px;border-radius:99px;background:var(--paper2);font-size:.85rem;color:var(--ink2)}
.chip i{width:10px;height:10px;border-radius:50%;flex:none}
.chip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.chip em{font-style:normal;color:var(--mute);flex:none;font-size:.78rem}
.chiptoggle{flex:none;width:30px;height:30px;border:0;border-radius:50%;background:var(--paper2);color:var(--ink2);display:grid;place-items:center;padding:0}
.chiptoggle svg{width:18px;height:18px;transition:transform .2s}
.filesrow.open .chiptoggle svg{transform:rotate(180deg)}
.filesrow.open .chips{flex-direction:column;overflow:visible;gap:6px}
.filesrow.open .chip{max-width:100%;border-radius:12px}
.filesrow.open .chip span{white-space:normal;overflow:visible;word-break:break-word;flex:1}

.grid{display:grid;grid-template-columns:repeat(var(--cols,3),minmax(0,1fr));gap:14px 10px}
/* with many columns the cards are small, so their buttons shrink too */
.grid[data-cols="4"] .pick,.grid[data-cols="4"] .grip{width:28px;height:28px;font-size:.9rem}
.grid[data-cols="5"] .pick,.grid[data-cols="5"] .grip{width:22px;height:22px;font-size:.7rem;border-width:1.5px}
.grid[data-cols="4"] .ins{width:22px;height:22px;font-size:1rem;inset-inline-start:-15px}
.grid[data-cols="5"] .ins{width:18px;height:18px;font-size:.85rem;inset-inline-start:-13px;border-width:1.5px}
.grid[data-cols="5"] .num{font-size:.8rem}
.colsbtn{display:flex;align-items:center;gap:4px;padding:6px 10px;border-radius:99px;border:1px solid var(--line);background:var(--paper2);color:var(--ink2);font-weight:700}
.colsbtn svg{width:18px;height:18px}
.demo{height:150px;display:grid;place-items:center;background:var(--paper);border-radius:14px}
.dsheet{position:relative;width:96px;height:124px;background:#fff;border-radius:6px;box-shadow:var(--shadow)}
.dsheet span{position:absolute;inset-inline:14px;height:5px;border-radius:3px;background:#d8d8d8}
.dsheet span:nth-of-type(1){top:44px}.dsheet span:nth-of-type(2){top:58px}.dsheet span:nth-of-type(3){top:72px;inset-inline-end:40px}
.dsheet i{position:absolute;display:grid;place-items:center;font-style:normal;color:#fff;font-weight:700}
.d-pick{top:5px;right:5px;width:26px;height:26px;border-radius:50%;background:#14202e99;border:2px solid #fff;font-size:.8rem}
.d-grip{top:5px;left:5px;width:26px;height:26px;border-radius:8px;background:#14202ecc;font-size:.9rem}
.d-ins{top:50px;right:-14px;width:24px;height:24px;border-radius:50%;background:var(--teal);border:2px solid var(--paper);font-size:1rem}
.demo[data-step="0"] .dsheet,.demo[data-step="4"] .dsheet{animation:pulse 1.4s ease-in-out infinite}
.demo[data-step="3"] .d-pick{animation:pulse 1.2s ease-in-out infinite;box-shadow:0 0 0 4px #e4572e88;background:var(--accent)}
.demo[data-step="1"] .d-pick,.demo[data-step="1"] .d-grip,.demo[data-step="2"] .d-ins{animation:pulse 1.2s ease-in-out infinite;box-shadow:0 0 0 4px #e4572e88}
@keyframes pulse{50%{transform:scale(1.12)}}
.dots{display:flex;gap:8px;justify-content:center}
.dots i{width:8px;height:8px;border-radius:50%;background:var(--line)}
.dots i.on{background:var(--accent);width:22px;border-radius:4px}
.card{position:relative;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;touch-action:manipulation;cursor:pointer}
.sheet{position:relative;background:#fff;border-radius:6px;box-shadow:var(--shadow);overflow:hidden;border:2px solid transparent;transition:transform .12s}
.sheet img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none;-webkit-user-drag:none}
.sheet .ph{position:absolute;inset:0;background:linear-gradient(110deg,#eee 30%,#f8f8f8 50%,#eee 70%);background-size:200% 100%;animation:sh 1.3s linear infinite}
html[lang="en"] .sheet.blank::after{content:"Blank page"}
.sheet.blank::after{content:"עמוד ריק";position:absolute;inset:0;display:grid;place-items:center;color:#b5b5b5;font-size:.8rem}
@keyframes sh{to{background-position:-200% 0}}
.card.sel .sheet{border-color:var(--accent);transform:scale(.95)}
.pick{position:absolute;top:4px;inset-inline-start:4px;z-index:2;width:34px;height:34px;padding:0;border-radius:50%;border:2px solid #fff;
  background:#14202e99;color:transparent;font:700 1.05rem/1 system-ui;display:grid;place-items:center;touch-action:manipulation}
.card.sel .pick{background:var(--accent);color:#fff;box-shadow:var(--shadow)}
.num{display:block;text-align:center;margin-top:6px;font:600 .95rem ui-monospace,Consolas,monospace;color:var(--ink2)}
.tag{position:absolute;bottom:0;inset-inline:0;height:4px}
.grip{position:absolute;top:4px;inset-inline-end:4px;width:34px;height:34px;border:0;border-radius:10px;background:#14202ecc;color:#fff;
  display:grid;place-items:center;touch-action:none;font-size:1.1rem;line-height:1}
.ins{position:absolute;top:calc(50% - 30px);inset-inline-start:-18px;z-index:3;width:26px;height:26px;padding:0;border:2px solid var(--paper);
  border-radius:50%;background:var(--teal);color:#fff;font:700 1.15rem/1 system-ui;display:grid;place-items:center;box-shadow:var(--shadow)}
.ins:active{background:var(--accent);transform:scale(1.15)}
.addtail{align-self:start;aspect-ratio:3/4;border:2px dashed var(--line);border-radius:6px;background:transparent;color:var(--mute);font-size:2rem}
.addtail:active{border-color:var(--accent);color:var(--accent)}
.card.drag .sheet{opacity:.3;outline:2px dashed var(--accent);outline-offset:-3px}
.card.drag .ins,.card.drag .grip,.card.drag .pick{opacity:0}
.viewer{position:fixed;inset:0;z-index:150;background:#0b121a;display:flex;flex-direction:column;touch-action:none;user-select:none;-webkit-user-select:none}
.vtop{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;padding-top:max(8px,env(safe-area-inset-top));color:#f6f1e7}
.vnum{font:600 1rem ui-monospace,Consolas,monospace;direction:ltr}
.vstage{position:relative;flex:1;min-height:0;display:grid;place-items:center;padding:0 6px;overflow:hidden}
.vpage{position:relative;container-type:inline-size;background:#fff;transform-origin:0 0;will-change:transform}
.vmarks{position:absolute;inset:0}
.vm{position:absolute;touch-action:none;cursor:grab;outline:2px dashed transparent}
.vm img{display:block;width:100%;height:auto;pointer-events:none;-webkit-user-drag:none}
.vm.on{outline-color:var(--accent)}
.vm.lost{min-height:24px;background:#e4572e22;outline-color:var(--accent)}
.vm button{position:absolute;width:30px;height:30px;padding:0;border-radius:50%;border:2px solid #fff;background:var(--accent);color:#fff;font:700 .85rem/1 system-ui;display:grid;place-items:center;touch-action:none}
.vm button{transform:scale(calc(1 / var(--z, 1)))}   /* the buttons keep their size when the page is zoomed */
.vm .vdel{left:-14px;top:-14px}
.vm .ved{right:-14px;top:-14px;background:var(--teal)}
.vm .vrs{right:-14px;bottom:-14px;background:#fff;border-color:var(--accent)}
/* a place for somebody else's signature: a bigger handle with a stretch arrow, and a wider area for the finger */
.vm.slot .vrs{width:40px;height:40px;right:-20px;bottom:-20px;background:var(--accent);border-color:#fff;box-shadow:0 2px 6px #0005}
.vm.slot .vrs::before{content:'';width:18px;height:18px;background:#fff;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 20h6v-6M20 20l-8-8M10 4H4v6M4 4l8 8' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 20h6v-6M20 20l-8-8M10 4H4v6M4 4l8 8' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat}
.vm.slot .vdel{width:36px;height:36px;left:-18px;top:-18px}
.vm.slot button::after{content:'';position:absolute;inset:-10px;border-radius:50%}
.vm.slot.on{outline:2px solid var(--accent);outline-offset:2px}
.sigprev{display:block;height:46px;max-width:100%;margin-top:4px;object-fit:contain;align-self:center}
.sigpad{width:100%;height:190px;border-radius:12px;touch-action:none;
  background:linear-gradient(transparent 72%,var(--line) 72%,var(--line) calc(72% + 2px),transparent calc(72% + 2px)),var(--paper)}
#txtVal,.fld select,.fld input{font:inherit;padding:12px;border-radius:12px;border:1px solid var(--line);background:var(--paper);color:var(--ink)}
#txtVal{resize:none;width:100%}
.swatches{display:flex;gap:12px;justify-content:center}
.sw{width:40px;height:40px;border-radius:50%;border:3px solid var(--card);background:var(--c);box-shadow:0 0 0 2px var(--line);padding:0}
.sw.on{box-shadow:0 0 0 3px var(--accent)}
.fld{display:flex;flex-direction:column;gap:6px;font-size:.92rem;color:var(--ink2)}
.sheet{container-type:inline-size}
.sheet img.mk{position:absolute;height:auto;object-fit:fill;pointer-events:none}
.pn{position:absolute;font-weight:600;color:#262626;font-size:1.85cqw;line-height:1;pointer-events:none;white-space:nowrap}
.pn-bc{bottom:3.7cqw;left:50%;transform:translateX(-50%)}.pn-br{bottom:3.7cqw;right:4cqw}.pn-bl{bottom:3.7cqw;left:4cqw}
.pn-tc{top:3.2cqw;left:50%;transform:translateX(-50%)}.pn-tr{top:3.2cqw;right:4cqw}.pn-tl{top:3.2cqw;left:4cqw}
.vbar{display:flex;justify-content:space-around;padding:6px 8px calc(8px + env(safe-area-inset-bottom))}
.vbar button{display:flex;flex-direction:column;align-items:center;gap:3px;min-width:72px;padding:8px 6px;border:0;border-radius:12px;background:transparent;color:#f6f1e7;font-size:.8rem;font-weight:600}
.vbar button:active{background:#ffffff1f}
.vbar svg{width:24px;height:24px}
.vbar .danger{color:#ff8a6b}
.vstage canvas{display:block;width:100%;height:100%;transition:opacity .15s}
.vnav{position:absolute;top:50%;transform:translateY(-50%);width:40px;height:64px;padding:0;border:0;border-radius:12px;background:#14202ecc;box-shadow:0 0 0 1px #ffffff55,0 2px 8px #0006;color:#fff;font-size:2.2rem;line-height:1;direction:ltr}   /* dark with an edge, so it shows over a white page; ltr so Hebrew does not mirror the sign */
.vnav:disabled{opacity:.15}
.vr{right:6px}.vl{left:6px}
.cropper{position:fixed;inset:0;z-index:150;background:#0b121a;color:#f6f1e7;display:flex;flex-direction:column}
.ctop{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;padding-top:max(8px,env(safe-area-inset-top));font-weight:700}
.chint{margin:0;text-align:center;font-size:.9rem;color:#c3c9d0}
.cstage{flex:1;min-height:0;margin:6px 0}
.cstage canvas{width:100%;height:100%;display:block;touch-action:none}
.cbar{display:flex;flex-direction:column;gap:8px;padding:8px 12px calc(12px + env(safe-area-inset-bottom))}
.crow{display:flex;gap:8px}
.cbar button{flex:1;padding:13px 6px;border-radius:12px;border:1px solid #ffffff40;background:transparent;color:#f6f1e7;font-weight:600}
.cbar button[aria-pressed="true"]{background:#ffffff26;border-color:#fff}
.cbar button.primary{background:var(--accent);border-color:var(--accent);color:#fff;padding:15px 6px}
.chk{display:flex;gap:10px;align-items:center;font-size:.92rem;color:var(--ink2)}
.chk input{width:20px;height:20px;accent-color:var(--accent)}
.ghost{position:fixed;left:0;top:0;z-index:200;pointer-events:none;margin:0;will-change:transform}
.ghost .sheet{box-shadow:0 22px 44px rgba(0,0,0,.45);border-color:var(--accent);transform:none}
.ghost .ins,.ghost .grip,.ghost .pick{display:none}

/* bars */
.bar,.selbar{position:fixed;inset-inline:0;z-index:30;background:var(--card);border-top:1px solid var(--line);box-shadow:0 -6px 20px -8px rgba(0,0,0,.3)}
.bar{bottom:0;display:flex;gap:6px;padding:10px 10px calc(10px + env(safe-area-inset-bottom))}
.bar button{flex:1 1 auto;border:1px solid var(--line);background:var(--paper);border-radius:12px;padding:12px 6px;font-weight:600;font-size:.88rem;white-space:nowrap}
.bar button.primary{flex:1.4 1 auto;background:var(--accent);color:#fff;border-color:var(--accent);font-size:.95rem}
.selbar{bottom:calc(68px + env(safe-area-inset-bottom));border-radius:18px 18px 0 0;padding:10px 10px 6px}
.selinfo{display:flex;justify-content:space-between;align-items:center;padding:0 6px 6px;color:var(--ink2);font-size:.95rem}
.selinfo b{color:var(--accent);font-size:1.1rem}
.link{background:none;border:0;color:var(--teal-ink);font-weight:600;padding:6px}
.actions{display:grid;grid-template-columns:repeat(6,1fr);gap:4px}
.actions button{display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px 2px;border:0;border-radius:12px;background:transparent;font-size:.72rem;font-weight:600;color:var(--ink)}
.actions button svg{width:24px;height:24px}
.actions button:active{background:var(--paper2)}
.actions button.danger{color:var(--danger)}

/* dialogs */
dialog{border:0;border-radius:20px;padding:20px;width:min(92vw,420px);background:var(--card);color:var(--ink);box-shadow:0 20px 60px rgba(0,0,0,.5)}
dialog::backdrop{background:rgba(10,16,24,.6)}
dialog h2{margin:0 0 8px;font-size:1.25rem}
dialog form{display:flex;flex-direction:column;gap:12px}
.hint{margin:0;color:var(--ink2);font-size:.92rem}.hint.small{font-size:.82rem;color:var(--mute)}
.err{margin:0;color:var(--danger);font-size:.9rem}
dialog input{font:inherit;padding:12px;border-radius:12px;border:1px solid var(--line);background:var(--paper);color:var(--ink)}
dialog input:focus{outline:2px solid var(--accent);border-color:transparent}
.row{display:flex;gap:8px;flex-wrap:wrap}
.row button{flex:1;padding:12px;border-radius:12px;border:1px solid var(--line);background:var(--paper);font-weight:600}
.row button.primary{background:var(--accent);border-color:var(--accent);color:#fff}
.row button.danger-btn{background:#c4361a;border-color:#c4361a;color:#fff}
.quick{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.quick button,.wide{padding:12px 6px;border-radius:12px;border:1px solid var(--line);background:var(--paper);font-weight:600;font-size:.92rem}
.sub{margin:8px 0 0;font-size:1rem;color:var(--ink2)}
.sec{display:flex;flex-direction:column;gap:10px;padding:12px;border-radius:14px;background:color-mix(in srgb,var(--c) 6%,var(--card));border:1px solid color-mix(in srgb,var(--c) 28%,var(--line));border-inline-start:6px solid var(--c)}
.sec h3{display:flex;align-items:center;gap:8px;margin:0;font-size:1rem;color:color-mix(in srgb,var(--c) 75%,var(--ink))}
/* the buttons inside a card wear the card's color, so what belongs together looks together */
.sec .wide,.sec .quick button,.sec .nrow button,.sec .row button:not(.primary){border-color:color-mix(in srgb,var(--c) 50%,var(--line));background:color-mix(in srgb,var(--c) 11%,var(--card));color:var(--ink)}
.sec input{background:var(--card)}
.sec .chk input{accent-color:var(--c)}
.sec .hint{margin:0}
.comp.sec{padding:12px;border:1px solid color-mix(in srgb,var(--c) 28%,var(--line));border-inline-start:6px solid var(--c)}
.badge{flex:none;font-size:.72rem;font-weight:700;padding:2px 9px;border-radius:99px;background:var(--c);color:#fff}
.nrow{display:flex;align-items:center;gap:8px;font-size:.92rem}
.nrow input{width:64px;text-align:center;padding:10px 4px}
.nrow button{margin-inline-start:auto;padding:10px 16px;border-radius:12px;border:1px solid var(--line);background:var(--paper);font-weight:600}
.comp{display:flex;flex-direction:column;gap:8px;padding-top:10px;border-top:1px solid var(--line)}
dialog{max-height:90vh;overflow:auto}
.close{align-self:center}
.opt{display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:start;padding:14px;border-radius:14px;border:1px solid var(--line);background:var(--paper)}
.opt b{font-size:1.05rem}.opt span{color:var(--ink2);font-size:.88rem}
.opt.main{background:var(--accent);border-color:var(--accent);color:#fff}.opt.main span{color:#ffffffdd}
.done{display:flex;align-items:center;gap:12px}
.done i{flex:none;width:40px;height:40px;border-radius:50%;background:var(--teal);color:#fff;display:grid;place-items:center;font:700 1.4rem/1 system-ui;font-style:normal}
.done h2{margin:0}
.opt.plain{background:transparent;align-items:center;margin-top:4px}
.outlist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.outlist li{display:flex;justify-content:space-between;gap:10px;padding:10px 12px;background:var(--paper);border-radius:10px;font-size:.95rem}
.outlist li span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.outlist li{align-items:center}
.outlist li input.oname{flex:1;min-width:0;padding:8px 10px;font-size:.95rem}
.langbtn{font:700 .8rem system-ui;letter-spacing:.02em}
[dir="ltr"] #backHome svg,[dir="ltr"] .vnav{transform:scaleX(-1)}
[dir="ltr"] .vnav{transform:translateY(-50%) scaleX(-1)}
[dir="ltr"] .vr{right:auto;left:6px}[dir="ltr"] .vl{left:auto;right:6px}
.ordbtn{flex:none;border:0;border-radius:99px;background:var(--paper2);color:var(--ink2);padding:0 12px;height:30px;font:600 .82rem inherit;font-family:inherit}
.orderlist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;max-height:52vh;overflow:auto}
.orderlist li{display:flex;align-items:center;gap:10px;padding:8px;background:var(--paper);border-radius:12px;border-inline-start:6px solid var(--c,#999)}
.othumb{position:relative;flex:none;width:44px;height:58px;border-radius:4px;background:#fff;box-shadow:var(--shadow);overflow:hidden;display:grid;place-items:center;font-size:.65rem;color:#b5b5b5}
.othumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.othumb .ph{position:absolute;inset:0;background:linear-gradient(110deg,#eee 30%,#f8f8f8 50%,#eee 70%);background-size:200% 100%;animation:sh 1.3s linear infinite}
.oinfo{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.oinfo b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.95rem}
.oinfo em{font-style:normal;color:var(--mute);font-size:.8rem}
.omv{flex:none;width:40px;height:40px;border-radius:12px;border:1px solid var(--line);background:var(--card);color:var(--ink);font-size:1rem;padding:0}
.omv:disabled{opacity:.3}
dialog.wide-dlg{width:min(96vw,640px)}
.pvgrid{--cols:3;max-height:48vh;overflow:auto;padding:6px 4px;align-content:start}
.pvgrid .card .pick{pointer-events:none}
.zoom{position:absolute;top:4px;inset-inline-end:4px;z-index:2;width:34px;height:34px;padding:0;border-radius:50%;border:2px solid #fff;background:#14202ecc;color:#fff;display:grid;place-items:center}
.zoom svg{width:18px;height:18px}
dialog.zoomdlg{position:fixed;inset:0;width:100%;max-width:100%;height:100%;max-height:100%;margin:0;padding:0;border-radius:0;overflow:hidden;background:#0b121a;color:#f6f1e7}
.zoomdlg form{height:100%;gap:0}
.ztop{display:flex;align-items:center;justify-content:space-between;padding:8px 12px}
.zstage{flex:1;min-height:0;overflow:auto;display:grid;place-items:start center;padding:0 6px;cursor:zoom-in;-webkit-overflow-scrolling:touch}
.zstage.big{cursor:zoom-out}
.zstage canvas{display:block;width:100%;height:auto;background:#fff;transition:opacity .15s}
.zstage.big canvas{width:250%;max-width:none}
.zbar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 12px calc(10px + env(safe-area-inset-bottom))}
.zbar .ic{background:#ffffff26;font-size:1.8rem;line-height:1;direction:ltr}   /* ltr: in Hebrew the browser would mirror the ‹ › signs */
.zpick{flex:1;padding:13px 10px;border-radius:12px;border:1px solid #ffffff40;background:transparent;color:#f6f1e7;font-weight:700}
.zpick.on{background:var(--accent);border-color:var(--accent);color:#fff}
[dir="ltr"] .zbar .ic{transform:scaleX(-1)}
/* the "to start" / "to end" icons point into their bar: in English the start is on the left, so they mirror */
[dir="ltr"] .actions button[data-act="first"] svg,[dir="ltr"] .actions button[data-act="last"] svg{transform:scaleX(-1)}
.pvrange{display:flex;gap:8px}
.pvrange input{flex:1;min-width:0}
.pvrange button{flex:none;padding:0 12px;border-radius:12px;border:1px solid var(--line);background:var(--paper);font-weight:600;font-size:.88rem}
.pvinfo{display:flex;justify-content:space-between;align-items:center;font-size:.92rem;color:var(--ink2)}
.row button:disabled{opacity:.45}
.outlist li span:last-child{color:var(--mute);flex:none}

.busy{position:fixed;inset:0;z-index:100;background:rgba(10,16,24,.65);display:grid;place-content:center;justify-items:center;gap:14px;color:#fff;font-weight:600}
.spin{width:44px;height:44px;border-radius:50%;border:4px solid #fff4;border-top-color:var(--accent);animation:sp .8s linear infinite}
@keyframes sp{to{transform:rotate(360deg)}}
.toast{position:fixed;inset-inline:16px;bottom:calc(150px + env(safe-area-inset-bottom));z-index:160;margin:auto;width:fit-content;max-width:90vw;
  background:#14202e;color:#f6f1e7;padding:10px 16px;border-radius:12px;box-shadow:var(--shadow);font-size:.95rem}
/* the selection bar sits above the bottom bar, so the page and the toast make room for it */
body.has-sel{padding-bottom:calc(210px + env(safe-area-inset-bottom))}
body.has-sel .toast{bottom:calc(196px + env(safe-area-inset-bottom))}

/* a computer screen: the work area and the bars keep a comfortable width, small pages get small buttons, the mouse shows what can be clicked */
.grid[data-cols="6"] .pick,.grid[data-cols="6"] .grip,.grid[data-cols="8"] .pick,.grid[data-cols="8"] .grip{width:22px;height:22px;font-size:.7rem;border-width:1.5px}
.grid[data-cols="6"] .ins,.grid[data-cols="8"] .ins{width:18px;height:18px;font-size:.85rem;inset-inline-start:-13px;border-width:1.5px}
.grid[data-cols="6"] .num,.grid[data-cols="8"] .num{font-size:.8rem}
@media (min-width:1000px){
  main{max-width:1280px;margin:0 auto;padding-inline:32px}
  .bar,.selbar{inset-inline:0;margin-inline:auto;max-width:760px;border:1px solid var(--line);border-bottom:0;border-radius:18px 18px 0 0}
  .home{max-width:640px}
}
@media (hover:hover){
  .dcard:hover,.bar button:hover,.actions button:hover{background:var(--paper2)}
  .bar button.primary:hover{filter:brightness(1.08);background:var(--accent)}
}
.drophint{display:none}
dialog.camdlg{width:min(92vw,760px)}
.camdlg video{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;background:#000;border-radius:12px;margin:8px 0 14px}
.camrow{display:flex;gap:8px}
.camrow button{flex:1;padding:12px;border-radius:12px;border:1px solid var(--line);background:var(--paper);font-weight:600}
.camrow button.primary{background:var(--accent);border-color:var(--accent);color:#fff}
.camrow button:disabled{opacity:.5}
.grip{cursor:grab}
body.dropping::after{content:"";position:fixed;inset:10px;z-index:300;border:3px dashed var(--accent);border-radius:20px;background:rgba(228,87,46,.08);pointer-events:none}

/* ===== on a computer (mouse, wide window): body.desk, set in app.js. The phone layout is untouched. =====
   a toolbar under the header instead of the bars at the bottom, pages chosen by click like in the file explorer,
   the buttons on a page appear when the mouse is over it, a right-click menu, and the saved work as a grid */
body.desk{padding-bottom:40px}
body.desk.has-sel{padding-bottom:40px}
body.desk .toast{bottom:28px}
body.desk[data-view="doc"] main{padding-top:74px}
body.desk .bar{position:fixed;top:64px;bottom:auto;inset-inline:0;max-width:none;margin:0;z-index:19;height:58px;padding:9px 24px;
  justify-content:flex-end;align-items:center;gap:8px;border:0;border-bottom:1px solid var(--line);border-radius:0;box-shadow:0 4px 14px -10px rgba(0,0,0,.35)}
body.desk .bar button{flex:0 0 auto;padding:8px 18px;font-size:.92rem}
body.desk .bar button.primary{flex:0 0 auto;padding:8px 28px}
body.desk .selbar{position:fixed;top:64px;bottom:auto;inset-inline-start:24px;inset-inline-end:auto;max-width:none;margin:0;z-index:20;height:58px;
  display:flex;align-items:center;gap:14px;padding:0;background:transparent;border:0;border-radius:0;box-shadow:none}
body.desk .selinfo{padding:0;gap:8px;white-space:nowrap}
body.desk .actions{display:flex;gap:2px}
body.desk .actions button{flex-direction:row;gap:6px;padding:8px 10px;font-size:.85rem;white-space:nowrap}
body.desk .actions button svg{width:19px;height:19px}
@media (max-width:1299px){ body.desk .actions button{font-size:0;padding:8px} body.desk .actions button svg{width:21px;height:21px} }
/* a narrower window (half of the screen): the selection bar takes the place of the toolbar while pages are selected */
@media (max-width:1099px){
  body.desk .bar{padding-inline:12px;gap:6px}
  body.desk .bar button{padding:8px 12px}
  body.desk .bar button.primary{padding:8px 18px}
  body.desk .selbar{inset-inline:0;padding:0 14px;background:var(--card);border-bottom:1px solid var(--line);box-shadow:0 4px 14px -10px rgba(0,0,0,.35)}
  body.desk main{padding-inline:14px}
  body.desk .home{padding-inline:16px}
}
/* pages */
body.desk .card{padding:6px 6px 2px;border-radius:10px;cursor:default;transition:background .12s}
body.desk .card:hover{background:var(--paper2)}
body.desk .card.sel{background:color-mix(in srgb,var(--accent) 14%,transparent)}
body.desk .card.sel .sheet{transform:none}
body.desk .grip{display:none}
body.desk .pick{opacity:0;transition:opacity .12s;top:10px;inset-inline-start:10px}
body.desk .card:hover .pick,body.desk.has-sel .pick,body.desk .pick:focus-visible{opacity:1}
body.desk .ins{opacity:0;transition:opacity .12s}
body.desk .card:hover .ins,body.desk .ins:focus-visible{opacity:1}
body.desk .ins:hover{background:var(--accent);transform:scale(1.15)}
body.desk .addtail{margin:6px}
body.desk .addtail:hover{border-color:var(--accent);color:var(--accent);background:color-mix(in srgb,var(--accent) 6%,transparent)}
body.desk .card.drag{background:transparent}
/* the menu of a right click */
.ctxmenu{position:fixed;z-index:200;min-width:220px;padding:6px;border-radius:12px;background:var(--card);color:var(--ink);
  border:1px solid var(--line);box-shadow:0 12px 32px rgba(0,0,0,.28)}
.ctxmenu button{display:flex;width:100%;align-items:center;justify-content:space-between;gap:24px;padding:8px 12px;border:0;border-radius:8px;
  background:transparent;font-size:.92rem;text-align:start}
.ctxmenu button:hover,.ctxmenu button:focus-visible{background:var(--paper2);outline:0}
.ctxmenu button.danger{color:var(--danger)}
.ctxmenu button[data-k="del"]{margin-top:4px;border-top:1px solid var(--line);border-radius:0 0 8px 8px}
.ctxmenu kbd{font:500 .75rem ui-monospace,Consolas,monospace;color:var(--mute);direction:ltr}
/* an empty document: a place to drop files */
body.desk .empty{max-width:620px;margin:48px auto;padding:48px 32px;border:2px dashed var(--line);border-radius:24px}
body.desk .empty .big{width:auto;padding:16px 36px}
body.desk .drophint{display:block;margin:14px 0 0;color:var(--mute);font-size:.92rem}
/* the home screen: the saved work as a grid of pages */
body.desk .home{max-width:1120px;padding:36px 32px}
body.desk #newDocBtn{width:auto;padding:14px 40px}
body.desk .homeh{margin-top:36px}
body.desk .doclist{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:18px}
body.desk .dwrap{display:block}
body.desk .dcard{width:100%;height:100%;flex-direction:column;align-items:stretch;gap:10px;padding:12px;min-height:0}
body.desk .dwrap .dcard{padding-inline-end:12px}
body.desk .dthumb{width:100%;height:auto;aspect-ratio:3/4;background-size:contain}
body.desk .dinfo{text-align:start;flex:none}
body.desk .ddel{top:20px;transform:none;inset-inline-end:20px;opacity:0;transition:opacity .12s;background:var(--card);border:1px solid var(--line);box-shadow:var(--shadow)}
body.desk .dwrap:hover .ddel,body.desk .ddel:focus-visible{opacity:1}
body.desk .remotesec .doclist{grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}
body.desk .homeempty,body.desk .homenote{text-align:start}

/* form filling: the places found on the page are lit; tap one to write in it (or to tick it) */
.vfields{position:absolute;inset:0;pointer-events:none}
.vf{position:absolute;pointer-events:auto;cursor:pointer;box-sizing:border-box;border:1.5px solid #1740a899;background:#1740a81c;border-radius:3px;touch-action:none}
.vf::after{content:'';position:absolute;inset:-5px}
.vf:hover,.vf:active{background:#1740a844}
.vf.line{border:0;border-bottom:2.5px solid #1740a8cc;border-radius:0;background:linear-gradient(to top,#1740a82a,#1740a800)}
.vf.check,.vf.radio{background:#e4572e2e;border-color:#e4572ecc}
.vf.radio{border-radius:50%}
.vbar button[aria-pressed=true]{background:#ffffff26;color:#ffd27a}
/* writing in a field: the bar above the keyboard, the lit field, the live text */
.fieldbar{position:fixed;left:0;right:0;bottom:0;z-index:170;display:flex;flex-direction:column;gap:8px;padding:10px 12px calc(10px + env(safe-area-inset-bottom));
  background:#fffdf8;color:#1a2430;border-radius:16px 16px 0 0;box-shadow:0 -6px 24px #0006}
.fieldbar.kb{padding-bottom:10px}
.fb-row{display:flex;gap:8px;align-items:stretch}
.fieldbar textarea{flex:1;min-width:0;font:inherit;font-size:1.1rem;line-height:1.3;padding:10px 12px;border-radius:12px;border:2px solid #1740a8;background:#fff;color:#111;resize:none;max-height:30vh}
.fieldbar textarea:focus{outline:none;box-shadow:0 0 0 3px #1740a833}
.vfields.editing .vf:not(.active){opacity:.22}
.vf.active{opacity:1;z-index:2;background:#1740a812;border:2px solid #1740a8;box-shadow:0 0 0 4px #1740a840}
.vf.line.active{background:#1740a822;border:0;border-bottom:3px solid #1740a8;box-shadow:none}
.vprev{position:absolute;pointer-events:none;display:block}
.vpage.anim{transition:transform .28s ease}
#dlgText{margin:6vh auto auto}          /* the plain text box sits at the top, so the keyboard does not hide it */
.fb-help{flex-wrap:wrap;align-items:center}
.fb-suggest{display:flex;gap:6px;flex-wrap:wrap;flex:1;min-width:0}
.chip{display:inline-flex;align-items:center;gap:4px;max-width:100%;padding:7px 12px;border-radius:999px;border:1px solid #1740a855;background:#1740a812;color:#1a2430;font:600 .95rem system-ui;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chip i{font-style:normal;color:#6b7480;padding:0 0 0 4px;margin-inline-start:4px;border-inline-start:1px solid #1740a833}
.vh{position:fixed;left:0;bottom:0;width:1px;height:1px;opacity:0;pointer-events:none;border:0;padding:0}
.vf.filled{background:transparent;border:1px dashed #1740a850}       /* already written in: still a place to tap, quietly */
.vf.line.filled{border:0;border-bottom:1px dashed #1740a850}
.vf.check.filled,.vf.radio.filled{border-color:transparent}
/* writing anywhere: a frame where the text goes, a blinking caret, a handle to drag it (sizes kept the same on screen at any zoom) */
.vf.freebox,.vfields.editing .vf.freebox{opacity:1;z-index:3;cursor:move;border:calc(1.5px / var(--z, 1)) dashed #1740a8;background:#1740a814;border-radius:calc(3px / var(--z, 1));box-shadow:0 0 0 calc(3px / var(--z, 1)) #1740a822}
.vf.freebox::after{inset:calc(-10px / var(--z, 1))}
.vf.freebox.moving{background:#1740a830;border-style:solid}
.vf.freebox .caret{position:absolute;top:10%;bottom:10%;width:calc(2px / var(--z, 1));background:#1740a8;animation:caret 1s steps(2) infinite;pointer-events:none}
.vf.freebox .grip{position:absolute;top:50%;width:30px;height:30px;margin:-15px 0 0;left:calc(-24px / var(--z, 1) - 15px);border-radius:50%;background:#1740a8;color:#fff;display:grid;place-items:center;font:700 17px/1 system-ui;transform:scale(calc(1 / var(--z, 1)));transform-origin:center;box-shadow:0 1px 5px #0006;z-index:1}
.vf.freebox.rtl .grip{left:auto;right:calc(-24px / var(--z, 1) - 15px)}
.vf.freebox .grip::after{content:'';position:absolute;inset:-8px}
@keyframes caret{50%{opacity:0}}

/* the format row of the writing bar (font, size, B I U, alignment, colours) */
.fb-pick{position:relative;overflow:hidden;background:conic-gradient(red,#ff0,lime,cyan,blue,#f0f,red)!important;display:inline-block}
.fb-pick input{position:absolute;inset:-6px;width:calc(100% + 12px);height:calc(100% + 12px);opacity:0;cursor:pointer;border:0;padding:0}
.fb-pick.on{box-shadow:0 0 0 3px var(--accent)}

#dlgText{width:min(96vw,440px);padding:16px}
#dlgText .fb-fmt{margin:4px 0;padding:0;background:none;border:0}
#dlgText .fb-fmt select{max-width:none}

/* the writing bar, laid out like the fill-and-sign apps: the text and "done" on top, the look of the writing (when "Aa" is open)
   in two tidy lines, and one row of tools: previous | Aa · signature | next */
.fb-done{flex:none;min-width:72px;padding:0 14px;border:0;border-radius:12px;background:var(--accent);color:#fff;font:700 1.05rem system-ui}
.fb-fmt{display:flex;flex-direction:column;gap:8px;padding:8px;border-radius:14px;background:#1740a80a;border:1px solid #1740a81f}
.fb-line{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 6px;min-width:0}
.fb-grp{display:flex;align-items:center;gap:2px;padding:2px;border-radius:11px;background:#fff;border:1px solid var(--line);flex:none}
.fb-ltr,.fb-al{direction:ltr}
.fb-fmt select{flex:1;min-width:80px;height:40px;padding:0 8px!important;border-radius:11px;border:1px solid var(--line);background:#fff;color:#1a2430;font:600 .95rem system-ui}
.fb-fmt .fmt{min-width:30px;height:36px;padding:0 4px;border-radius:9px;border:0;background:transparent;color:#1a2430;font:700 1rem system-ui;display:inline-grid;place-items:center}
#fbSmaller,#fbBigger{grid-auto-flow:column;align-items:baseline;align-content:center}
.fb-fmt .fmt small{font-size:.75em}
.fb-fmt .fmt[aria-pressed=true]{background:#1740a8;color:#fff}
.fb-fmt .fb-size{min-width:38px;font-size:.9rem;font-weight:600;color:#1740a8}
.fb-fmt .fb-hl[aria-pressed=true]{background:#ffe232;color:#1a2430}
.fb-colors{display:flex;align-items:center;gap:5px;flex:1 0 auto;justify-content:center}
.fb-fmt .sw{width:26px;height:26px;border-width:2px;flex:none}
.fb-fmt .fb-rst{flex:none;width:36px;height:36px;min-width:36px;border:1px solid var(--line);background:#fff;color:#6b7480}
.fb-tools{display:flex;align-items:center;justify-content:space-between;gap:8px}
.fb-tools .nav{height:44px;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:0 14px;border-radius:12px;border:1px solid var(--line);background:#fff;color:#1a2430;font:600 .95rem system-ui}
.fb-tools .arr{font-size:1.35rem;line-height:1;margin-top:-2px}
.fb-mid{display:flex;gap:8px}
[dir="ltr"] .fb-step .arr{transform:scaleX(-1)}
.fb-tools .fb-aa .aa{font:700 1.05rem Georgia,serif}
.fb-tools .fb-aa[aria-pressed=true]{background:#1740a8;color:#fff;border-color:#1740a8}
.fb-tools .fb-sig{border-color:#1740a8;color:#1740a8;font-weight:700}
.fb-tools .fb-sig svg{flex:none}
@media (max-width:430px){.fb-tools .fb-step .lbl,.fb-tools .fb-aa .lbl{display:none}.fb-tools .fb-step{width:46px;padding:0}.fb-tools .nav{padding:0 12px}}
@media (max-width:390px){.fieldbar{padding-inline:8px}.fb-fmt{padding:6px}.fb-fmt .fmt{min-width:28px}.fb-fmt select{min-width:70px}.fb-colors{gap:4px}.fb-fmt .sw{width:24px;height:24px}}
/* the signature dialog: my signatures, a new one, or a place for somebody else */
.sigsub{margin:10px 0 6px;font-size:.82rem;font-weight:700;color:var(--ink2)}
.sigopt{flex-direction:row;align-items:center;gap:12px;width:100%}
.sigopt>span{display:flex;flex-direction:column;gap:2px}
.sigic{flex:none;width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:#1740a814;color:#1740a8;font:700 1.4rem/1 system-ui;font-style:normal}
#dlgSigPick .close{margin-top:12px}



/* Hebrew + Latin fonts that come with the app (Google Fonts, open licence OFL): Assistant, Frank Ruhl Libre, Gveret Levin, Secular One */
@font-face{font-family:'Assistant';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/Assistant-hebrew.woff2) format('woff2');unicode-range:U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F}
@font-face{font-family:'Assistant';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/Assistant-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Assistant';font-style:normal;font-weight:600;font-display:swap;src:url(fonts/Assistant-hebrew.woff2) format('woff2');unicode-range:U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F}
@font-face{font-family:'Assistant';font-style:normal;font-weight:600;font-display:swap;src:url(fonts/Assistant-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Assistant';font-style:normal;font-weight:800;font-display:swap;src:url(fonts/Assistant-hebrew.woff2) format('woff2');unicode-range:U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F}
@font-face{font-family:'Assistant';font-style:normal;font-weight:800;font-display:swap;src:url(fonts/Assistant-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Frank Ruhl Libre';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/FrankRuhlLibre-hebrew.woff2) format('woff2');unicode-range:U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F}
@font-face{font-family:'Frank Ruhl Libre';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/FrankRuhlLibre-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Frank Ruhl Libre';font-style:normal;font-weight:700;font-display:swap;src:url(fonts/FrankRuhlLibre-hebrew.woff2) format('woff2');unicode-range:U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F}
@font-face{font-family:'Frank Ruhl Libre';font-style:normal;font-weight:700;font-display:swap;src:url(fonts/FrankRuhlLibre-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Gveret Levin';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/GveretLevin-hebrew.woff2) format('woff2');unicode-range:U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F}
@font-face{font-family:'Gveret Levin';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/GveretLevin-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Secular One';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/SecularOne-hebrew.woff2) format('woff2');unicode-range:U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F}
@font-face{font-family:'Secular One';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/SecularOne-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}

.vf.signed{pointer-events:none}
/* remote signing: the list of documents waiting for a signature */
.remotesec{margin:0}
.rrow{display:flex;flex-direction:column;gap:6px;padding:12px 14px;border-radius:16px;border:1px solid var(--line);background:var(--card);box-shadow:var(--shadow)}
.rrow.signed{border-color:color-mix(in srgb,var(--teal-ink) 55%,var(--line));border-inline-start:5px solid var(--teal-ink);background:color-mix(in srgb,var(--teal-ink) 9%,var(--card))}
.rrow b{display:block;font-size:1rem;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rrow .rsub{display:flex;gap:8px;align-items:center;flex-wrap:wrap;color:var(--mute);font-size:.84rem}
.rrow .rst{padding:1px 10px;border-radius:999px;font-weight:700;font-size:.8rem;line-height:1.5;background:var(--warn-bg);color:var(--warn-ink)}
.rrow .rst.signed{background:var(--ok-bg);color:var(--ok-ink)}
.rrow .rst.expired{background:color-mix(in srgb,var(--mute) 25%,transparent);color:var(--ink2)}
.rrow .ract{display:flex;gap:8px;align-items:center;margin-top:4px}
.rrow .ract button{min-height:44px;border-radius:12px;padding:0 14px;font-weight:600;font-size:.95rem;border:1px solid var(--line);background:transparent;color:var(--ink)}
.rrow .ract .ropen{flex:1;background:var(--teal);border-color:var(--teal);color:#fff;font-size:1rem}
.rrow .ract .rshare{flex:1;border-color:color-mix(in srgb,var(--blue) 60%,var(--line))}
.rrow .ract .rquiet{border-color:transparent;color:var(--ink2);font-weight:500}
.rrow .rquiet:hover,.rrow .rquiet:active{color:var(--danger)}
.rsdlg .linkbox{direction:ltr;text-align:left;font-size:.82rem}
.rsdlg textarea{font:inherit;padding:12px;border-radius:12px;border:1px solid var(--line);background:var(--paper);color:var(--ink);resize:vertical;min-height:56px}
.rsdlg label{display:flex;flex-direction:column;gap:4px;font-weight:600;font-size:.92rem}
.rsdlg .warn{padding:10px 12px;border-radius:12px;background:#d99a1c1f;border:1px solid #d99a1c66;color:var(--ink)}

.siglist{display:flex;flex-direction:column;gap:8px;margin:6px 0 10px;max-height:46vh;overflow:auto}
.sigrow{display:flex;gap:8px;align-items:stretch}
.sigrow .sigpick{flex:1;display:flex;align-items:center;justify-content:center;padding:10px;margin:0;background:#fff}
.sigrow .sigprev{max-height:64px;max-width:100%;object-fit:contain}
.sigdel{flex:none;width:44px;border-radius:12px;border:1px solid var(--line);background:#fff;color:#6b7480;font-size:1rem}
