.document-editor{--gap:.75rem;--panel:var(--card-tint);--surface:var(--color-surface-raised);--control:2.25rem;--rail:3.5rem;gap:var(--gap);width:100%;min-width:0;min-height:0;padding:0 var(--gap) var(--gap);background:var(--color-bg);color:var(--color-text-body);font-size:var(--text-sm);letter-spacing:var(--tracking-ui);flex-direction:column;flex:1;line-height:1.45;display:flex;position:relative}.document-editor .visually-hidden{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.document-editor .icon{flex:none;display:inline-flex}.document-editor .icon svg{width:100%;height:100%}.document-editor :focus-visible{outline:2px solid var(--accent);outline-offset:2px}.document-editor .button{border-radius:var(--radius-pill);background:var(--surface);min-height:2.75rem;color:var(--color-text);font:inherit;font-weight:var(--weight-semibold);white-space:nowrap;cursor:pointer;transition:background-color var(--duration-fast) var(--ease), transform var(--duration-fast) var(--ease);border:1px solid #0000;justify-content:center;align-items:center;gap:.5rem;padding:0 1.25rem;line-height:1;display:inline-flex}.document-editor .button:active:not(:disabled){transform:scale(.98)}.document-editor .button.small{min-height:var(--control);padding:0 1rem}.document-editor .button.primary{background:var(--accent-strong);color:var(--color-on-accent)}.document-editor .button.primary:hover:not(:disabled){background:var(--accent-hover)}.document-editor .button.secondary{border-color:var(--color-border-strong)}.document-editor .button.secondary:hover:not(:disabled),.document-editor .button.ghost:hover:not(:disabled){background:var(--panel)}.document-editor .button.ghost{background:0 0}.document-editor .button.danger{color:var(--color-text)}.document-editor .button:disabled{opacity:.45;cursor:not-allowed}.document-editor .icon-button,.document-editor .tool{width:var(--control);height:var(--control);border-radius:var(--radius-pill);color:var(--color-text);cursor:pointer;transition:background-color var(--duration-fast) var(--ease);background:0 0;border:0;flex:none;place-items:center;padding:0;display:inline-grid}.document-editor .icon-button:hover:not(:disabled),.document-editor .tool:hover:not(:disabled){background:var(--surface)}.document-editor .tool[aria-pressed=true],.document-editor .tool[aria-pressed=true]:hover:not(:disabled),.document-editor .tool[aria-expanded=true]{background:var(--color-text);color:var(--color-bg)}.document-editor .tool:disabled,.document-editor .icon-button:disabled{opacity:.35;cursor:not-allowed}.document-editor input:not([type=checkbox]),.document-editor select{border:1px solid var(--color-border);border-radius:var(--radius-sm);background:var(--color-bg);width:100%;min-width:0;min-height:2.5rem;color:var(--color-text);font:inherit;transition:border-color var(--duration-fast) var(--ease);padding:.5rem .75rem}.document-editor input:not([type=checkbox]):hover,.document-editor select:hover{border-color:var(--color-text-muted)}.document-editor input[type=checkbox]{width:1.125rem;height:1.125rem;accent-color:var(--accent)}.document-editor .field{min-width:0;color:var(--color-text);font-weight:var(--weight-medium);flex-direction:column;gap:.375rem;display:flex}.document-editor .field>span:first-child{font-size:var(--text-xs)}.document-editor .input-unit{display:block;position:relative}.document-editor .input-unit input{font-variant-numeric:tabular-nums;padding-right:2.25rem}.document-editor .input-unit small{color:var(--color-text-muted);font-size:var(--text-xs);pointer-events:none;position:absolute;top:50%;right:.75rem;transform:translateY(-50%)}.document-editor .check{color:var(--color-text);align-items:center;gap:.5rem;display:flex}.document-editor .row{grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem;display:grid}.document-editor .hint{color:var(--color-text-muted);font-size:var(--text-xs)}.document-editor .error{color:var(--color-text);font-weight:var(--weight-semibold)}.document-editor .topbar{align-items:center;gap:var(--space-2);min-height:3.5rem;display:flex}.document-editor .doc-title{flex:18rem;align-items:center;gap:.5rem;min-width:0;max-width:34rem;display:flex}.document-editor .doc-icon{width:var(--control);height:var(--control);border-radius:var(--radius-md);background:var(--accent-soft);color:var(--accent-text);flex:none;place-items:center;display:grid}.document-editor .title-input{min-width:0;font-size:var(--text-md);font-weight:var(--weight-bold);letter-spacing:var(--tracking-heading);background:0 0;border-color:#0000}.document-editor .title-input:hover,.document-editor .title-input:focus{border-color:var(--color-border);background:var(--color-bg)}.document-editor .badge{border-radius:var(--radius-pill);background:var(--panel);color:var(--color-text-muted);font-size:var(--text-xs);font-weight:var(--weight-semibold);flex:none;padding:.125rem .625rem}.document-editor .status{min-width:0;color:var(--color-text-muted);font-size:var(--text-xs);white-space:nowrap;flex:1;justify-content:center;align-items:center;gap:.5rem;display:flex}.document-editor .status-dot{background:var(--color-text-muted);border-radius:50%;width:.5rem;height:.5rem}.document-editor .status-dot.saved{background:var(--accent)}.document-editor .topbar-actions{align-items:center;gap:.5rem;margin-left:auto;display:flex}.document-editor .workspace{gap:var(--gap);flex:1;min-height:0;display:flex}.document-editor .rail{width:var(--rail);border-radius:var(--radius-lg);background:var(--panel);scrollbar-width:none;flex-direction:column;flex:none;align-items:center;gap:.5rem;padding:.5rem 0;display:flex;overflow-y:auto}.document-editor .rail-group{border-bottom:1px solid var(--color-border);flex-direction:column;align-items:center;gap:.125rem;padding-bottom:.5rem;display:flex}.document-editor .rail-group:last-child{border-bottom:0;padding-bottom:0}.document-editor .rail-group:empty{display:none}.document-editor .rail-right{gap:var(--gap);flex:none;min-height:0;display:flex}.document-editor .rail-tabs{align-self:flex-start;height:auto;padding:.5rem 0}.document-editor .tab-wrap{position:relative}.document-editor .tab-wrap .dot{background:var(--accent);pointer-events:none;border-radius:50%;width:.5rem;height:.5rem;position:absolute;top:.125rem;right:.125rem}.document-editor .panel{border-radius:var(--radius-lg);background:var(--panel);flex-direction:column;gap:1rem;width:17.5rem;padding:1.25rem 1rem;display:flex;overflow-y:auto}.document-editor .panel h2{font-size:var(--text-md);letter-spacing:var(--tracking-heading)}.document-editor .panel-section{flex-direction:column;gap:.75rem;display:flex}.document-editor .panel-section h3{color:var(--color-text-muted);font-size:var(--text-xs);font-weight:var(--weight-semibold);letter-spacing:.04em;text-transform:uppercase}.document-editor .stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem;margin:0;display:grid}.document-editor .stats div{border-radius:var(--radius-md);background:var(--surface);padding:.75rem}.document-editor .stats dt{color:var(--color-text-muted);font-size:var(--text-xs)}.document-editor .stats dd{color:var(--color-text);font-size:var(--text-xl);font-weight:var(--weight-bold);font-variant-numeric:tabular-nums;letter-spacing:var(--tracking-heading);margin:0}.document-editor .button-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.375rem;display:grid}.document-editor .button-grid .button{font-size:var(--text-xs);padding:0 .5rem}.document-editor .segmented{border-radius:var(--radius-pill);background:var(--surface);padding:.25rem;display:flex}.document-editor .segmented button{border-radius:var(--radius-pill);min-height:2rem;color:var(--color-text);font:inherit;font-weight:var(--weight-medium);cursor:pointer;background:0 0;border:0;flex:1;padding:0 .5rem}.document-editor .segmented button.on{background:var(--color-text);color:var(--color-bg);font-weight:var(--weight-semibold)}.document-editor .chips{flex-wrap:wrap;gap:.375rem;display:flex}.document-editor .chip{border:1px solid var(--color-border);border-radius:var(--radius-pill);min-height:2rem;color:var(--color-text);font:inherit;font-variant-numeric:tabular-nums;cursor:pointer;background:0 0;align-items:center;gap:.375rem;padding:0 .75rem;display:inline-flex}.document-editor .chip:hover{background:var(--panel)}.document-editor .chip.on{background:var(--color-text);color:var(--color-bg);border-color:#0000}.document-editor .outline{flex-direction:column;gap:.125rem;margin:0;padding:0;list-style:none;display:flex}.document-editor .outline button{border-radius:var(--radius-sm);width:100%;color:var(--color-text);font:inherit;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;background:0 0;border:0;padding:.375rem .625rem;overflow:hidden}.document-editor .outline button:hover{background:var(--surface)}.document-editor .compat-ok,.document-editor .compat-list li{border-radius:var(--radius-md);background:var(--surface);color:var(--color-text);gap:.625rem;padding:.75rem;display:flex}.document-editor .compat-list{flex-direction:column;gap:.5rem;margin:0;padding:0;list-style:none;display:flex}.document-editor .compat-list li>.icon,.document-editor .compat-ok>.icon{margin-top:.125rem}.document-editor .compat-list div{flex-direction:column;gap:.125rem;display:flex}.document-editor .compat-list span{color:var(--color-text-muted);font-size:var(--text-xs)}.document-editor .font-list{color:var(--color-text);word-break:break-word}.flyout{z-index:110;border-radius:var(--radius-md);background:var(--color-surface-raised);max-height:calc(100dvh - 1rem);color:var(--color-text);font-size:var(--text-sm);box-shadow:0 0 0 1px var(--color-border), var(--shadow-lg);flex-direction:column;gap:.625rem;padding:.5rem;display:flex;position:fixed;overflow-y:auto}.flyout .menu-list{flex-direction:column;margin:0;padding:0;list-style:none;display:flex}.flyout .menu-list button,.flyout .wide{border-radius:var(--radius-sm);width:100%;min-height:2.25rem;color:var(--color-text);font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;justify-content:space-between;align-items:center;gap:.5rem;padding:.375rem .75rem;display:flex}.flyout .menu-list li button:has(small){flex-direction:column;align-items:flex-start;gap:0}.flyout .menu-list button>span{align-items:center;gap:.5rem;display:inline-flex}.flyout .menu-list small{color:var(--color-text-muted);font-size:var(--text-xs);padding-left:1.5rem}.flyout .menu-list button:hover,.flyout .wide:hover{background:var(--card-tint)}.flyout .menu-list button.on{font-weight:var(--weight-semibold)}.flyout .fonts{max-height:13rem;overflow-y:auto}.flyout .size-row{justify-content:space-between;align-items:center;gap:.5rem;display:flex}.flyout .size-row output{color:var(--color-text);font-size:var(--text-md);font-weight:var(--weight-bold);font-variant-numeric:tabular-nums}.flyout .step{border:1px solid var(--color-border);border-radius:var(--radius-pill);width:2rem;height:2rem;color:var(--color-text);cursor:pointer;background:0 0;place-items:center;display:grid}.flyout .icon-row{gap:.125rem;display:flex}.flyout .hint{color:var(--color-text-muted);font-size:var(--text-xs)}.flyout .swatches,.document-editor .swatches{grid-template-columns:repeat(8,1fr);gap:.25rem;display:grid}.swatch{aspect-ratio:1;border:1px solid var(--color-border);border-radius:var(--radius-sm);cursor:pointer;min-width:1.25rem}.swatch:hover,.swatch.on{outline:2px solid var(--color-text);outline-offset:1px}.flyout .grid-picker{flex-direction:column;gap:.25rem;display:flex}.flyout .grid-row{gap:.25rem;display:flex}.flyout .grid-picker .cell{border:1px solid var(--color-border-strong);cursor:pointer;background:0 0;border-radius:.25rem;width:1.5rem;height:1.5rem;padding:0}.flyout .grid-picker .cell.on{background:var(--accent);border-color:#0000}.flyout .tool{color:var(--color-text)}.document-editor .canvas-wrap{flex:1;min-width:0;min-height:0;display:flex;position:relative}.document-editor .canvas{border-radius:var(--radius-lg);background:light-dark(color-mix(in srgb, var(--color-text) 7%, var(--color-bg)),var(--color-bg));flex:1;min-width:0;padding:1.5rem 1.5rem 5rem;overflow:auto}.document-editor .zoom-box{margin:0 auto}.document-editor .pages{transform-origin:0 0;position:relative}.document-editor .page-cards{pointer-events:none;position:absolute;inset:0}.document-editor .page-card{width:var(--page-w);height:var(--page-h);background:var(--color-surface-raised);box-shadow:0 0 0 1px var(--color-border-strong), var(--shadow-md);border-radius:2px;position:absolute;left:0}.document-editor .page-header,.document-editor .page-footer{right:var(--m-right);left:var(--m-left);color:var(--color-text-muted);text-align:center;font-size:9pt;position:absolute}.document-editor .page-header{top:calc(var(--m-top) / 2 - .5em)}.document-editor .page-footer{top:calc(100% - var(--m-bottom) + .5rem)}.document-editor .sheet-host{z-index:1;position:relative}.document-editor .zoom-pill{border-radius:var(--radius-pill);background:var(--color-surface-raised);color:var(--color-text);font-size:var(--text-xs);box-shadow:0 0 0 1px var(--color-border), var(--shadow-lg);align-items:center;gap:.25rem;padding:.25rem .5rem .25rem 1rem;display:flex;position:absolute;bottom:1rem;left:50%;transform:translate(-50%)}.document-editor .page-indicator{font-weight:var(--weight-semibold);font-variant-numeric:tabular-nums;margin-right:.5rem}.document-editor .zoom-pill .icon-button{width:1.75rem;height:1.75rem}.document-editor .zoom-value{min-width:3rem;color:inherit;font:inherit;font-variant-numeric:tabular-nums;cursor:pointer;background:0 0;border:0;padding:0}.document-editor .banner span{white-space:nowrap}.document-editor .canvas.with-banner{padding-top:4.75rem}.document-editor .banner{border-radius:var(--radius-pill);background:var(--color-surface-raised);color:var(--color-text);font-weight:var(--weight-semibold);box-shadow:0 0 0 1px var(--color-border), var(--shadow-lg);align-items:center;gap:1rem;padding:.5rem .5rem .5rem 1.25rem;display:flex;position:absolute;top:1rem;left:50%;transform:translate(-50%)}.document-editor .floating-bar{z-index:30;border-radius:var(--radius-md);background:var(--color-surface-raised);width:21rem;color:var(--color-text);box-shadow:0 0 0 1px var(--color-border), var(--shadow-lg);flex-direction:column;gap:.5rem;padding:.75rem;display:flex;position:absolute;top:1rem;right:2rem}.document-editor .bar-row{align-items:center;gap:.375rem;display:flex}.document-editor .bar-row.end{justify-content:flex-end}.document-editor .bar-row .count{color:var(--color-text-muted);font-size:var(--text-xs);font-variant-numeric:tabular-nums;white-space:nowrap;flex:none}.document-editor .notices{z-index:40;flex-direction:column;gap:.5rem;max-width:min(26rem,100% - 2rem);display:flex;position:absolute;bottom:1rem;left:1rem}.document-editor .notice{border-radius:var(--radius-md);background:var(--color-text);color:var(--color-bg);box-shadow:var(--shadow-lg);align-items:flex-start;gap:.625rem;padding:.75rem .5rem .75rem 1rem;display:flex}.document-editor .notice>.icon{margin-top:.125rem}.document-editor .notice span:not(.icon){flex:1}.document-editor .notice .icon-button{width:1.75rem;height:1.75rem;color:inherit}.document-editor .notice .icon-button:hover{opacity:.7;background:0 0}.document-editor .kdoc-page:focus-visible{outline:none}.kdoc-page{box-sizing:border-box;width:var(--page-w);min-height:var(--page-h);padding:var(--m-top) var(--m-right) var(--m-bottom) var(--m-left);color:var(--color-text);word-wrap:break-word;white-space:break-spaces;font-variant-ligatures:none;font-feature-settings:"liga" 0;caret-color:var(--color-text);outline:none;position:relative}.kdoc-page p,.kdoc-page h1,.kdoc-page h2,.kdoc-page h3,.kdoc-page h4,.kdoc-page h5,.kdoc-page h6{min-height:1em;margin-top:0}.kdoc-page ul,.kdoc-page ol{margin:0;padding-left:36pt}.kdoc-page li{position:relative}.kdoc-page li>p{margin-bottom:0}.kdoc-page a{color:var(--accent-text);cursor:pointer;text-decoration:underline}.kdoc-page img{vertical-align:baseline;max-width:100%;display:inline-block}.kdoc-page img.ProseMirror-selectednode{outline:2px solid var(--accent)}.kdoc-page .tableWrapper{margin-bottom:6pt;overflow-x:visible}.kdoc-page table{border-collapse:collapse;table-layout:fixed;width:100%;overflow:visible}.kdoc-page [data-borders=grid] td,.kdoc-page [data-borders=grid] th{border:1px solid}.kdoc-page [data-borders=none] td,.kdoc-page [data-borders=none] th{outline:1px dashed var(--color-border);outline-offset:-1px}.kdoc-page td,.kdoc-page th{box-sizing:border-box;vertical-align:top;padding:3pt 5.4pt;position:relative}.kdoc-page td>p:last-child,.kdoc-page th>p:last-child{margin-bottom:0}.kdoc-page td[style*=background],.kdoc-page th[style*=background],.kdoc-page span[style*=background-color]{color:light-dark(var(--color-text),var(--color-bg))}.kdoc-page .selectedCell:after{z-index:2;background:var(--accent);opacity:.18;content:"";pointer-events:none;position:absolute;inset:0}.kdoc-page .column-resize-handle{z-index:20;background:var(--accent);pointer-events:none;width:4px;position:absolute;top:0;bottom:0;right:-2px}.kdoc-page.resize-cursor{cursor:col-resize}.kdoc-page .find-match{background:var(--accent-soft);box-shadow:0 0 0 1px var(--accent);border-radius:2px}.kdoc-page .find-current{background:var(--accent);color:var(--color-on-accent)}.kdoc-page .pg-spacer{pointer-events:none;user-select:none;margin:0;padding:0;display:block}.kdoc-page span.pg-spacer,.kdoc-page .pg-inline{vertical-align:top;width:100%;line-height:0;display:inline-block}.kdoc-page li.pg-spacer{list-style:none}.kdoc-page li.pg-spacer::marker{content:none}.kdoc-page td.pg-cell{padding:0;border:0!important;outline:0!important}.kdoc-page .ProseMirror-gapcursor{pointer-events:none;display:none;position:absolute}.kdoc-page .ProseMirror-gapcursor:after{border-top:1px solid var(--color-text);content:"";width:20px;animation:1.1s steps(2,start) infinite kdoc-blink;display:block;position:absolute;top:-2px}.kdoc-page.ProseMirror-focused .ProseMirror-gapcursor{display:block}@keyframes kdoc-blink{to{visibility:hidden}}.kdoc-page .ProseMirror-hideselection ::selection{background:0 0}@media (prefers-reduced-motion:reduce){.kdoc-page .ProseMirror-gapcursor:after{animation:none}}@media (width<=70rem){.document-editor .status{display:none}}@media (width<=60rem){.document-editor .panel{top:0;right:calc(var(--rail) + var(--gap));z-index:50;box-shadow:0 0 0 1px var(--color-border), var(--shadow-lg);position:absolute;bottom:0}.document-editor .rail-right{position:relative}}
