.ed-shell {
  --ed-rule: #e7e4e6;
  --ed-subtle: #6f6971;
  color: #29252b;
  min-height: 100dvh;
}
.ed-shell *, .ed-shell *::before, .ed-shell *::after { box-sizing: border-box; }
.ed-shell [hidden] { display: none !important; }
.ed-shell button, .ed-shell input, .ed-shell textarea, .ed-shell select { font: inherit; }
.ed-shell button:not(:disabled), .ed-shell select { cursor: pointer; }
.ed-shell button:disabled { cursor: default; }
.ed-shell .ed-header {
  position: sticky; top: 0; z-index: 4; min-height: 60px; gap: 14px;
  padding: 8px clamp(15px,2.25vw,36px); background: #fcfbfa; border-color: #ebe8e9;
}
.ed-header .fu-button, .ed-dialog .fu-button, .ed-summary .fu-button { min-height: 36px; font-weight: 550; }
.ed-shell .ed-brand {
  border: 0; background: none; padding: 0 2px 3px 0; font-size: 25px; line-height: 1; color: #42293d;
  font-weight: 750; letter-spacing: -.07em; opacity: 1;
}
.ed-crumb,.ed-link,.ed-save { border: 0; background: transparent; color: #51414e; padding: 4px 0; }
.ed-link:hover,.ed-crumb:hover { text-decoration: underline; text-underline-offset: 3px; }
.ed-divider { color:#b4aeb3; }
.ed-crumb-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 560; }
.ed-save,.ed-header-state { color:var(--ed-subtle); font-size:13px !important; }
.ed-save { margin-right: 6px; }
.ed-header .fu-actions { flex-shrink: 0; }
.ed-preview-role,.ed-input {
  color: #302a31; background: #fff; border: 1px solid #b9b3b8; border-radius: 6px; min-height: 36px; padding: 5px 9px;
}
.ed-feedback { background: white; border-bottom: 1px solid var(--ed-rule); padding: 8px 24px; color: var(--fu-positive); }
.ed-feedback.is-error { color:var(--fu-error); }
.ed-layout { grid-template-columns: minmax(0,1fr) clamp(238px,21vw,290px); align-items: start; }
.ed-desk { min-width: 0; padding: clamp(12px,2vw,30px) clamp(12px,3.5vw,60px) 32px; }
.ed-paper-viewport { width:100%; overflow-x:auto; -webkit-text-size-adjust:100%; text-size-adjust:100%; }
.ed-magnification { display:flex; justify-content:flex-end; gap:3px; margin:0 0 8px; }
.ed-magnification button { min-height:32px; padding:4px 10px; border:1px solid transparent; border-radius:6px; color:var(--ed-subtle); background:transparent; }
.ed-magnification button[aria-pressed=true] { color:var(--fu-action); border-color:var(--ed-rule); background:white; }
.ed-arrange button[aria-pressed=true]{background:#eee9ed;color:var(--fu-action)}
.ed-field-select { position:absolute; inset:0; border:0; border-radius:4px; background:transparent; }
.ed-field-bar { position:absolute; z-index:2; inset-inline-start:0; bottom:calc(100% + 5px); transform:scale(var(--ed-inverse-zoom,1)); transform-origin:bottom left; display:flex; align-items:center; gap:8px; padding:2px 3px 2px 10px; border:1px solid #ded8dd; border-radius:8px; background:white; color:var(--fu-action); box-shadow:0 3px 12px rgb(54 36 51 / 10%); font:550 12px/1 var(--fu-font-ui); }
.ed-gear { width:32px; height:32px; display:grid; place-items:center; border:0; border-inline-start:1px solid #eee9ed; border-radius:4px; background:white; color:inherit; }
.ed-gear:hover,.ed-gear[aria-expanded=true] { background:#f4eff3; }
.ed-field-bar>span{max-width:16ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ed-aside { background:white; border-inline-start:1px solid #e9e6e8; width:100%; min-width:0; min-height:calc(100dvh - 60px); align-self:stretch; }
.ed-rail-contents { position:sticky; top:66px; overflow:auto; max-height:calc(100dvh - 70px); padding:22px 15px; }
.ed-tools.fu-panel { border:0; padding:0; }
.ed-tools.fu-panel h2,.ed-properties h2,.ed-summary h2 {
  font-size:15px; letter-spacing:-.015em; font-weight:650; line-height:1.3;
}
.ed-tools.fu-panel h2 { display:flex; align-items:baseline; justify-content:space-between; margin:25px 8px 8px; }
.ed-tools.fu-panel h2:first-child { margin-top:0; }
.ed-tools .ed-link,.ed-properties .ed-link { font-size:12px; font-weight:500; }
.ed-tools .fu-recipient { min-height:39px; }
.ed-tools .fu-recipient .fu-avatar { background:#eeebef; color:#503f4e; }
.ed-tools .fu-recipient[aria-pressed=true] { background:#f3eff3; }
.ed-tools .fu-recipient[aria-pressed=true] .fu-avatar { background:#e5dfe8; }
.ed-tools .fu-tool { border:0; min-height:34px; padding:5px 8px; color:#39323a; }
.ed-tool-icon { width:18px; text-align:center; font:500 17px/1 Georgia,serif; color:#746774; }
.ed-label { display:grid; gap:5px; color:#504851; font-size:13px; }
.ed-label .ed-input { width:100%; padding:7px 9px; font-size:14px; }
.ed-properties { display:grid; gap:13px; padding:0 5px; }
.ed-properties:not([hidden]) { animation:ed-reveal .15s ease-out; }
@keyframes ed-reveal { from { opacity:0; transform:translateX(5px); } to { opacity:1; transform:translateX(0); } }
.ed-field-sheet { position:fixed; inset:auto 0 0; width:100%; max-width:none; max-height:75dvh; margin:0; padding:0; border:0; border-radius:16px 16px 0 0; background:white; color:var(--fu-ink); overflow:auto; }
.ed-field-sheet .ed-properties { padding:24px 20px max(24px,env(safe-area-inset-bottom)); }
.ed-field-sheet::backdrop { background:rgb(41 28 38 / 22%); }
.ed-field-sheet[open] { animation:ed-sheet-in .16s ease-out; }
@keyframes ed-sheet-in { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@media(prefers-reduced-motion:reduce){.ed-properties:not([hidden]),.ed-field-sheet[open]{animation:none}}
.ed-panel-heading { display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
.ed-panel-heading h2,.ed-summary h2 { margin:0; }
.ed-properties p { margin:0; }
.ed-check { display:flex; align-items:center; gap:7px; }
.ed-check input { accent-color:var(--fu-action); }
.ed-properties .ed-remove-field { justify-self:start; color:var(--fu-error); margin-top:12px; }
.ed-quote-back { margin:0 0 12px 3px; font-size:13px !important; }
.ed-quote-inspector { min-width:0; }
.ed-summary { display:grid; gap:10px; align-content:start; padding:0 6px; }
.ed-summary p { margin:0; }
.ed-signer-name { font-weight:600; }
.ed-status { font-weight:600; color:#534050; }
.ed-fine { color:var(--ed-subtle); font-size:13px; }
.ed-summary > button { margin-top:5px; }
.ed-share-person { display:grid; gap:3px; padding:14px 0 4px; border-top:1px solid var(--ed-rule); }
.ed-share-actions { display:flex; align-items:center; gap:14px; }
.ed-share-actions .ed-link { font-size:13px; text-decoration:underline; text-underline-offset:3px; }
.ed-header .ed-mobile-tools { display:none; }
.ed-dialog { width:min(92vw,380px); border:1px solid var(--ed-rule); border-radius:10px; padding:22px; color:#29252b; background:white; }
.ed-dialog h2 { margin:0 0 18px; font:650 20px/1.2 var(--fu-font-ui); letter-spacing:-.025em; }
.ed-dialog::backdrop { background:rgb(33 26 32 / 24%); }
.ed-dialog-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:20px; }
.ed-form-stack { display:grid; gap:12px; }
.ed-shell .ed-mark-input { font:italic 23px/1.4 var(--fu-font-document,Georgia,serif); }
.ed-header a.ed-crumb{text-decoration:none}.ed-header a.ed-crumb:hover{text-decoration:underline}.ed-header .wordmark{margin-right:2px}
.ed-header .ed-save:disabled{opacity:1}.ed-save[data-saved=true]::before{content:'';display:inline-block;width:9px;height:5px;border-left:1.5px solid var(--fu-positive);border-bottom:1.5px solid var(--fu-positive);transform:translateY(-3px) rotate(-45deg);margin-right:6px}.ed-shell .ed-header{border-bottom:1px solid #e5e2e3}.ed-layout{grid-template-columns:minmax(0,1fr) 264px}
.ed-feedback{display:flex;align-items:baseline;gap:6px 16px;flex-wrap:wrap;overflow-wrap:anywhere}.ed-feedback.is-error{background:#fff9f9;border-bottom-color:#ecd4d5}.ed-feedback .ed-link{color:inherit;font-weight:600;text-decoration:underline;text-underline-offset:3px}
.ed-arrange{display:flex;align-items:center;gap:4px}.ed-arrange .icon-button{border:1px solid var(--fu-line)}.ed-copy{background:transparent;border:0;display:inline-flex;align-items:center;gap:6px;color:var(--fu-action);font-size:13px!important;padding:5px 8px}
.ed-insert{display:flex;gap:6px;flex-wrap:wrap}.ed-insert strong{width:100%;font-size:13px;font-weight:550;color:var(--fu-muted)}.ed-insert .fu-button{min-height:30px;font-size:13px;padding:2px 8px}.ed-recipient-actions{display:flex;gap:12px}.ed-no-people{margin:5px 8px}.ed-tools .fu-tool .ui-icon{width:17px;height:17px;color:#71626f;margin-right:2px}
.ed-history{display:flex;align-items:center;gap:4px;border-top:1px solid var(--ed-rule);padding-top:12px;margin:12px 5px 0}.ed-history .ed-link{margin-left:auto;font-size:13px}.ed-live{display:block;text-align:end;font-size:13px;margin:4px 5px 0;text-underline-offset:3px}.ed-page-tools{font-size:13px;margin:20px 8px 0;color:var(--fu-muted)}.ed-page-tools>summary{color:var(--fu-ink);font-weight:550}.ed-page-tools[open]>summary{margin-bottom:8px}.ed-color{display:flex;align-items:center;justify-content:space-between;margin:4px 0}.ed-color input{border:0;padding:0;background:none;width:32px;height:26px;cursor:pointer}.ed-tools-sheet>.ed-link{margin:12px 16px 0}
.rd-layout.rd-full{grid-template-columns:minmax(0,1fr)}.rd-full .rd-desk{grid-column:1/-1}.rd-pages{width:100%;position:relative;min-width:0}.rd-files{display:grid;gap:8px;margin:5px 0 8px}.ed-consent{display:flex;gap:8px;align-items:flex-start;font:400 14px/1.45 var(--fu-font-ui);padding:12px 0 0;border-top:1px solid var(--ed-rule)}.ed-consent input{accent-color:var(--fu-action);margin:3px 0 0;width:16px;height:16px;flex:none}.ed-share-person .ed-input{width:100%;min-width:0}.ed-summary .ds-status{font-weight:600}.rd-shell .ed-rail-contents{padding:24px 16px}
.sig-layer{position:absolute;inset:0;pointer-events:none;overflow:clip;color:var(--fu-ink);font:14px/1.3 var(--fu-font-ui)}.sig-place{position:absolute;display:flex;align-items:center;transform-origin:top left;pointer-events:auto;background:var(--sig-paper,#fff)}.sig-mark,.sig-input:not([type=checkbox]),.sig-check{display:flex;align-items:center;gap:6px;width:100%;min-height:32px;padding:5px 8px;text-align:start;box-sizing:border-box;background:var(--sig-paper,#fff);border:1px solid var(--fu-control-edge);border-radius:4px}.sig-mark{justify-content:space-between;color:var(--fu-action);border:0;border-bottom:1px solid var(--fu-control-edge);border-radius:0;font-size:13px!important}.sig-mark:hover{background:color-mix(in srgb,var(--fu-action) 4%,var(--sig-paper,#fff))}.sig-mark small{font:12px var(--fu-font-ui)}.sig-typed{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:italic 19px/1.2 var(--fu-font-document)}.sig-check{cursor:pointer;border:0;padding-inline:0}.sig-check input{margin:0;accent-color:var(--fu-action);width:17px;height:17px}.sig-auto{font-size:13px;color:var(--fu-muted)}
@media(pointer:coarse){.sig-input:not([type=checkbox]){font-size:16px}.ed-field-select,.sig-input,.sig-mark{scroll-margin-block:100px}}
@media(min-width:761px){.ed-aside{min-height:calc(100svh - 60px)}}
@media(max-width:760px){
  .ed-layout { display:flex; flex-direction:column; }
  .ed-shell .ed-header { gap:8px; top:0; flex-wrap:wrap; }
  .ed-crumb,.ed-divider { display:none; }
  .ed-header .fu-actions { gap:5px; }
  .ed-header .ed-mobile-tools { display:flex; }
  .ed-crumb-name { flex:1 1 65px; }
  .ed-header .ed-save { display:inline-block; margin-right:2px;font-size:11px!important; }
  .ed-header .ed-preview-role { max-width:120px; }
  .ed-header .fu-button { padding:0 9px; }
  .ed-shell .fu-button,.ed-shell .fu-tool,.ed-shell .fu-recipient { min-height:44px; }
  .ed-desk { width:100%; padding:12px 8px 18px; }
  .ed-gear { width:44px; height:44px; }
  .ed-magnification button,.ed-field-sheet .ed-link,.ed-field-sheet .ed-input { min-height:44px; }
  .ed-aside { display:none; min-height:0; border:0; }
  .ed-aside.is-open { display:block; order:-1; }
  .ed-rail-contents { position:static; max-height:none; padding:16px; }
  .ed-layout:has(.ed-summary) .ed-aside { display:block; }
  .ed-layout:has(.ed-summary) .ed-aside:not(.is-open) .ed-rail-contents{padding-top:16px;border-top:1px solid var(--ed-rule)}
  .ed-layout .ed-aside.is-open{border-bottom:1px solid var(--ed-rule)}.ed-shell[data-mode=edit] .ed-aside{display:none}.ed-row-menu{opacity:1}.ed-tools-sheet .ed-rail-contents{padding:12px 16px 24px}
}
@media(max-width:420px){
  .ed-header .ed-crumb-name { display:none; }
}
@media print{
  .ed-shell,.ed-desk,.ed-layout { background:white; display:block; padding:0; margin:0; }
  .ed-aside,.ed-feedback,.ed-header,.ed-header.fu-header,.ed-dialog,.ed-field-sheet,.ed-magnification,.sig-layer,.ed-control-plane { display:none !important; }
  .ed-paper-viewport { width:auto; overflow:visible; }
}

/* Fixed A4 underneath, author controls above. Borders and tools never take up
   space in the sheet's flow. Both layers use the same origin and fit scale. */
.ed-control-plane { position:absolute; inset:0 auto auto 0; z-index:1; width:210mm; transform-origin:0 0; pointer-events:none; }
.ed-control-plane .ed-inline,.ed-control-plane .ed-slot,.ed-control-plane .ed-anchor-menu,
.ed-control-plane .ed-preview-slot,.ed-quote-layer > * { position:absolute; pointer-events:auto; }
.ed-control-plane .ed-inline { min-width:0; min-height:0; border:0; border-radius:2px; margin:0; padding:0; resize:none; overflow:hidden; appearance:none; background:transparent; color:transparent; caret-color:var(--fu-ink); }
.ed-control-plane .ed-inline:hover { outline:1px dashed var(--fu-line); outline-offset:2px; }
.ed-control-plane .ed-inline:focus,.ed-control-plane .ed-inline[aria-invalid=true],.ed-control-plane .ed-inline.q-choice { color:var(--fu-ink); background:var(--ed-stock,#fff); outline:1px solid var(--fu-control-edge); outline-offset:1px; }
.ed-control-plane .ed-inline:focus-visible { outline:2px solid var(--fu-action); outline-offset:2px; }
.ed-control-plane .ed-inline[aria-invalid=true] { outline-color:var(--fu-error); }
.ed-inline::placeholder { color:var(--fu-muted); }
.ed-inline.ed-client-input:placeholder-shown { font:400 10pt/15pt var(--fu-font-ui)!important; }
.ed-control-plane .ed-slot { margin:0; outline:1px dashed #d4cdd2; outline-offset:2px; border-radius:3px; }
.ed-control-plane .ed-slot.is-selected { outline:2px solid var(--fu-action); z-index:3; }
.ed-slot .ed-field-select { width:100%;height:100%; }
.ed-preview-slot { display:grid;align-items:center;background:var(--ed-stock); }
.ed-control-plane .ed-anchor-menu { padding:0;color:var(--fu-muted); background:var(--ed-stock); border:1px solid var(--fu-line); }
.ed-anchor-menu .ui-icon,.ed-quote-layer summary .ui-icon { stroke-width:2.6; }
.ed-control-plane .ed-anchor-menu:hover,.ed-control-plane .ed-anchor-menu:focus-visible { opacity:1; }
.ed-control-plane .q-paper-trigger { opacity:0;border:0;cursor:pointer; }
.ed-control-plane .q-paper-trigger:focus-visible,.ed-control-plane .q-paper-trigger:hover { opacity:1;background:var(--ed-stock); }
.ed-control-plane .q-edit-tools { justify-content:flex-end;gap:10px; }
.ed-control-plane .q-row-menu { position:absolute; z-index:1; }
.ed-control-plane .q-row-menu>summary { opacity:.5; }
.ed-control-plane .q-row-menu[open],.ed-control-plane .q-row-menu:focus-within { z-index:3; }
