.rich-document-editor,.rich-document-viewer{border:1px solid var(--ui-primary-border,#cbc5bb);background:var(--ui-surface,#fffdfa);color:var(--ui-text,#181b1c)}.rich-document-editor:focus-within{border-color:var(--ui-focus,#d65317);box-shadow:0 0 0 2px color-mix(in srgb, var(--ui-focus,#dc4e12) 14%, transparent)}.rich-document-toolbar{border-bottom:1px solid var(--ui-border,#ded9d0);background:var(--ui-surface-subtle,#f5f2eb);flex-wrap:wrap;align-items:center;gap:2px;min-height:48px;padding:3px 6px;display:flex}.rich-document-toolbar button{width:44px;min-width:44px;height:44px;color:var(--ui-muted,#555b58);background:0 0;border:1px solid #0000;place-items:center;padding:0;display:grid}.rich-document-toolbar button:hover:not(:disabled){border-color:var(--ui-primary-border,#cfc8bd);background:var(--ui-surface,#fffdfa);color:var(--ui-text,#181b1c)}.rich-document-toolbar button.is-active{border-color:var(--ui-primary-border,#dc4e12);background:var(--ui-primary-soft,#fff1e9);color:var(--ui-primary-text,#aa3810)}.rich-document-toolbar button:focus-visible{outline:2px solid var(--ui-focus,#d65317);outline-offset:-2px}.rich-document-toolbar>i{background:var(--ui-surface-hover,#d8d3ca);width:1px;height:28px;margin:0 4px}.rich-document-content{overflow-wrap:anywhere;outline:none;min-height:260px;padding:18px 20px;font-size:14px;line-height:1.75}.rich-document-viewer .rich-document-content{min-height:0;padding:20px}.rich-document-content>:first-child{margin-top:0}.rich-document-content>:last-child{margin-bottom:0}.rich-document-content h2{margin:1.2em 0 .45em;font-size:20px;line-height:1.35}.rich-document-content h3{margin:1em 0 .4em;font-size:17px;line-height:1.4}.rich-document-content p{white-space:pre-wrap;margin:.55em 0}.rich-document-content ul,.rich-document-content ol{margin:.65em 0;padding-left:1.6em}.rich-document-content blockquote{border-left:3px solid var(--ui-primary-border,#d65317);background:var(--ui-surface-subtle,#f8f5ef);color:var(--ui-muted,#555b58);margin:.8em 0;padding:8px 14px}.rich-document-content p.is-editor-empty:first-child:before{height:0;color:var(--ui-muted,#8b8f8c);content:attr(data-placeholder);float:left;pointer-events:none}.rich-document-image{border:1px solid var(--ui-border,#d8d3ca);background:var(--ui-surface-subtle,#f4f1ea);place-items:center;width:min(100%,760px);min-height:120px;max-height:70vh;margin:14px 0;display:grid;overflow:hidden}.rich-document-image.is-selected{border-color:var(--ui-primary-border,#d65317);box-shadow:0 0 0 2px color-mix(in srgb, var(--ui-shadow,#dc4e12) 18%, transparent)}.rich-document-image img{object-fit:contain;background:var(--ui-surface-subtle,#f4f1ea);width:100%;height:100%}.rich-document-image-state{min-height:120px;color:var(--ui-muted,#717672);justify-content:center;align-items:center;gap:8px;display:flex}.rich-document-image-state.is-error{color:var(--ui-danger,#a93c2c)}.rich-document-editor-status{border-top:1px solid var(--ui-border,#ded9d0);background:var(--ui-surface,#faf8f3);min-height:38px;color:var(--ui-muted,#737873);justify-content:space-between;align-items:center;gap:12px;padding:8px 12px;font-size:12px;display:flex}.rich-document-editor-status strong{color:var(--ui-danger,#a93c2c);font-weight:650}.rich-document-empty{border:1px dashed var(--ui-primary-border,#cfc8bd);background:var(--ui-surface,#faf8f3);min-height:150px;color:var(--ui-muted,#747975);text-align:center;place-items:center;padding:28px;display:grid}.document-anchor-mark{border-bottom:2px solid var(--ui-primary-border,#8b5e34);background:var(--ui-warning-soft,#fff4d8)}.document-reference-mark{border-bottom:2px solid var(--ui-primary-border,#d65317);background:var(--ui-primary-soft,#ffeadf);color:var(--ui-primary-text,#8c310f);cursor:pointer}.rich-document-viewer [data-document-anchor][role=link]{cursor:pointer}.rich-document-viewer [data-document-anchor][role=link]:focus-visible,.rich-document-viewer [data-document-reference][role=link]:focus-visible,.rich-document-viewer [data-document-focused=true]{outline:3px solid var(--ui-focus,#ff9d69);outline-offset:3px}.rich-document-location-status{border-bottom:1px solid var(--ui-border,#d8d3ca);background:var(--ui-surface-subtle,#f4f7ef);color:var(--ui-success,#315c3f);margin:0;padding:8px 14px;font-weight:650}.document-link-form label,.document-link-search{gap:7px;font-weight:650;display:grid}.document-link-form input,.document-link-search input{width:100%;min-height:46px}.document-link-search>span:last-child{align-items:center;display:flex;position:relative}.document-link-search svg{color:var(--ui-muted,#666c68);pointer-events:none;position:absolute;left:14px}.document-link-search input{padding-left:42px}.document-anchor-options{border:1px solid var(--ui-border,#d8d3ca);max-height:min(52vh,520px);margin-top:16px;display:grid;overflow:auto}.document-anchor-options>button{border:0;border-bottom:1px solid var(--ui-border,#e1ddd5);background:var(--ui-surface,#fffdf8);width:100%;min-height:74px;color:var(--ui-text,#181b1c);text-align:left;grid-template-columns:minmax(180px,.7fr) minmax(240px,1.3fr);gap:18px;padding:12px 14px;display:grid}.document-anchor-options>button:last-child{border-bottom:0}.document-anchor-options>button:hover{background:var(--ui-primary-soft,#fff4ec)}.document-anchor-options>button:focus-visible{outline:3px solid var(--ui-focus,#ff9d69);outline-offset:-3px;position:relative}.document-anchor-options span{align-content:center;gap:4px;display:grid}.document-anchor-options small{color:var(--ui-muted,#606661);font-size:12px}.document-anchor-options em{color:var(--ui-muted,#555b57);align-self:center;font-style:normal;line-height:1.5}.document-link-empty{border:1px dashed var(--ui-primary-border,#cbc5bb);background:var(--ui-surface,#faf8f3);min-height:130px;color:var(--ui-muted,#656b66);text-align:center;place-items:center;margin:16px 0 0;display:grid}@media (width<=767px){.rich-document-content{min-height:220px;padding:15px}.rich-document-editor-status{flex-direction:column;align-items:flex-start}.document-anchor-options>button{grid-template-columns:1fr;gap:6px}}
