:root{color-scheme:light;--bg: #f4f1ea;--text: #1d1c19;--muted: #6f6a62;--surface: #fffcf7;--border: #e3ddd2;--accent: #2f5d50;--on-accent: #fffcf7;--danger: #8c3a32;--code-keyword: #2f5d50;--code-string: #8c3a32;--code-number: #8a5a12;--code-type: #3d5f78;--code-property: #6b4c2a;font-family:Segoe UI,sans-serif}:root[data-theme=dark]{color-scheme:dark;--bg: #171614;--text: #f3efe6;--muted: #b1aaa0;--surface: #221f1c;--border: #3a352f;--accent: #8fbfa8;--on-accent: #171614;--danger: #e7b2ab;--code-keyword: #8fbfa8;--code-string: #e7b2ab;--code-number: #e6c07b;--code-type: #9ec3d8;--code-property: #e6c07b}@media(prefers-color-scheme:dark){:root:not([data-theme]),:root[data-theme=system]{color-scheme:dark;--bg: #171614;--text: #f3efe6;--muted: #b1aaa0;--surface: #221f1c;--border: #3a352f;--accent: #8fbfa8;--on-accent: #171614;--danger: #e7b2ab;--code-keyword: #8fbfa8;--code-string: #e7b2ab;--code-number: #e6c07b;--code-type: #9ec3d8;--code-property: #e6c07b}}*{box-sizing:border-box}body{margin:0;min-height:100vh;background:var(--bg);color:var(--text)}button,input,select{font:inherit;color:var(--text)}button,input,select{background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:8px 12px}button{cursor:pointer}button:disabled{opacity:.6;cursor:default}button.primary{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}button.danger{color:var(--danger);border-color:var(--danger)}input,select{padding:10px 12px}a{color:var(--accent)}:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.shell,.board{min-height:100vh;display:grid;align-content:start;gap:20px;padding:20px 24px 48px;margin:0 auto}.shell{max-width:480px}.board{max-width:1080px}.topbar,.topbar-actions,.tile-actions,.inline-form,.shared-meta{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.topbar{flex-wrap:nowrap;justify-content:space-between;gap:16px;min-width:0}.topbar-actions{flex:none;flex-wrap:nowrap;justify-content:flex-end;gap:12px}.brand{display:flex;align-items:center;gap:8px;min-width:0;flex:1;overflow:hidden}.brand .mark{flex:none}.brand-sep{flex:none;color:var(--muted);font-size:14px}.brand-notebook{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text);font-size:15px}.bar-icon{display:inline-grid;place-items:center;flex:none;width:44px;height:44px;padding:0;border:none;background:transparent;border-radius:10px;color:var(--text)}.bar-icon svg{width:22px;height:22px;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.bar-icon:hover{background:color-mix(in srgb,var(--text) 8%,transparent)}.auth-card{display:grid;gap:16px}.mark{margin:0;color:var(--accent);font-size:13px;letter-spacing:.08em;text-transform:uppercase;text-decoration:none}h1{margin:0;font-size:40px;font-weight:600;letter-spacing:-.03em}h2,h3,p{margin:0}h2{font-size:18px;font-weight:600}.status,.hint,.empty,.notice,.shared-meta{color:var(--muted)}.form{display:grid;gap:14px}.form label,.section{display:grid;gap:8px}.form label{color:var(--muted);font-size:14px}.form input,.inline-form input,.tile-form input{width:100%;color:var(--text)}.form .primary{width:100%}.form-error{margin:0;color:var(--danger)}.section{gap:12px}.board-head{display:flex;align-items:center;justify-content:space-between;gap:16px;min-width:0}.board-head h1{min-width:0}.add-notebook{display:inline-grid;place-items:center;flex:none;width:44px;height:40px;padding:0;border-radius:10px}.add-notebook svg{width:22px;height:22px;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.notebook-tabs{display:flex;flex-wrap:wrap;gap:8px}.notebook-tabs button{border-radius:999px;padding:8px 18px}.notebook-tabs button[aria-selected=true]{background:var(--text);border-color:var(--text);color:var(--bg)}.inline-form input{flex:1 1 200px;width:auto}.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,220px),1fr));gap:12px}.tile{position:relative;display:flex;flex-direction:column;gap:12px;padding:16px;background:var(--surface);border:1px solid var(--border);border-radius:14px}.tile-link{padding:0;gap:0}.tile h3{font-size:18px;font-weight:600;overflow-wrap:anywhere}.tile-hit{display:flex;flex-direction:column;gap:8px;min-width:0;padding:16px;color:inherit;text-decoration:none;border-radius:inherit}.tile-link:has(.tile-tools) .tile-hit{padding-right:96px}.tile-link:has(.tile-hit:hover){border-color:var(--accent)}.tile-hit:hover h3{color:var(--accent)}.tile-tools{position:absolute;z-index:1;top:8px;right:8px;display:flex;align-items:center;gap:4px}.tile-tool{display:inline-grid;place-items:center;width:36px;height:36px;padding:0;border:none;background:transparent;border-radius:8px;color:var(--text)}.tile-tool svg{width:18px;height:18px;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.tile-tool:hover{background:color-mix(in srgb,var(--text) 8%,transparent)}.tile-form,.confirm{display:flex;flex-direction:column;gap:12px;flex:1}.tile-actions,.shared-meta{margin-top:auto}.tile-hit .shared-meta{margin-top:0}.shared-icon{width:16px;height:16px;flex:none;color:var(--accent)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:640px){.shell,.board{padding:16px 16px 40px}h1{font-size:32px}}.workspace{height:100vh;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr)}.workspace-head{display:grid;gap:10px;padding:16px 24px;border-bottom:1px solid var(--border);min-width:0}.notebook-title{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}.workspace-body{display:grid;grid-template-columns:280px minmax(0,1fr);align-items:stretch;min-height:0;min-width:0}.navigator{min-height:0;height:100%;background:var(--surface);border-right:1px solid var(--border);padding:8px;overflow:auto}.navigator-body{display:grid;align-content:start;gap:2px}.document-pane{min-height:0;min-width:0;height:100%;padding:0;display:flex;flex-direction:column}.document-pane .empty{padding:28px 24px}.doc-bar{display:flex;align-items:center;flex-wrap:nowrap;gap:8px;padding:8px 12px;border-bottom:1px solid var(--border);min-height:48px;min-width:0;overflow:hidden}.doc-title{display:flex;align-items:center;gap:4px;min-width:0;flex:1;overflow:hidden}.doc-title h2{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.doc-rename{flex:1;min-width:0}.doc-rename input{width:100%}.doc-dirty{color:var(--muted);font-size:13px;flex:none}.doc-save,.tool-icon{display:inline-grid;place-items:center;flex:none;width:36px;height:36px;padding:0;border:none;background:transparent;border-radius:8px;color:var(--text)}.doc-save svg,.tool-icon svg,.nav-tab svg{width:20px;height:20px;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.doc-save:hover{background:color-mix(in srgb,var(--text) 8%,transparent)}.nav-tab:hover{background:color-mix(in srgb,var(--text) 8%,var(--surface))}.tool-icon,.tool-icon:hover,.tool-icon:focus,.tool-icon:focus-visible,.tool-icon:active{background:transparent;outline:none;-webkit-tap-highlight-color:transparent}.doc-save:disabled{opacity:.35}.doc-tools{display:flex;align-items:center;justify-content:flex-end;gap:2px;min-height:44px;min-width:0;padding:4px 8px;border-bottom:1px solid var(--border)}button.doc-icon{width:28px;height:28px}.doc-error,.doc-status{margin:12px 16px 0}.editor-host{flex:1;min-height:0}.cm-h1,.cm-h2,.cm-h3,.cm-h4,.cm-h5,.cm-h6{font-weight:650;line-height:1.3}.cm-h1{font-size:1.6em}.cm-h2{font-size:1.35em}.cm-h3{font-size:1.15em}.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-strike{text-decoration:line-through}.cm-code{font-family:Consolas,monospace;font-size:.92em;background:var(--surface);border-radius:4px;padding:0 .2em}.cm-wiki{color:var(--accent);cursor:pointer;text-decoration:underline}.cm-wiki.missing{color:var(--muted);cursor:text;text-decoration:underline dotted}.cm-link{color:var(--accent)}.cm-md-image{display:block;max-width:min(100%,640px);height:auto;margin:8px 0;border-radius:8px}.cm-codeblock{margin:8px 0;padding:10px 12px;overflow:auto;border-radius:8px;background:var(--surface);border:1px solid var(--border);font-family:Consolas,monospace;font-size:.92em;line-height:1.45;white-space:pre-wrap}.cm-codeblock .tok-keyword{color:var(--code-keyword)}.cm-codeblock .tok-string,.cm-codeblock .tok-string2{color:var(--code-string)}.cm-codeblock .tok-number{color:var(--code-number)}.cm-codeblock .tok-comment{color:var(--muted);font-style:italic}.cm-codeblock .tok-typeName,.cm-codeblock .tok-className,.cm-codeblock .tok-namespace{color:var(--code-type)}.cm-codeblock .tok-propertyName,.cm-codeblock .tok-variableName2{color:var(--code-property)}.cm-codeblock .tok-operator,.cm-codeblock .tok-punctuation{color:var(--muted)}.cm-codeblock .tok-atom,.cm-codeblock .tok-bool{color:var(--code-keyword)}.cm-table{border-collapse:collapse;margin:8px 0}.cm-table td,.cm-table th{border:1px solid var(--border);padding:4px 8px;text-align:left}.cm-quote{box-shadow:-3px 0 0 var(--border);padding-left:.45em}.cm-task{box-sizing:border-box;display:inline-block;width:1.05em;height:1.05em;margin:0 .45em 0 .15em;vertical-align:-.18em;border:1.5px solid color-mix(in srgb,var(--text) 42%,transparent);border-radius:.35em;background:transparent;position:relative;cursor:pointer}.cm-task.checked{background:var(--accent);border-color:var(--accent)}.cm-task.checked:after{content:"";position:absolute;left:50%;top:46%;width:.26em;height:.48em;border:solid var(--on-accent);border-width:0 .12em .12em 0;transform:translate(-50%,-58%) rotate(45deg)}.cm-tooltip.cm-tooltip-autocomplete{background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:10px}.cm-tooltip-autocomplete ul li[aria-selected]{background:var(--bg);color:var(--text)}.leave-backdrop{z-index:60}.nav-tab{display:none}.tree-row{display:flex;align-items:center;gap:2px;min-height:32px;border-radius:8px}.tree-row.selected{background:var(--bg)}.tree-row.drop-target{outline:2px solid var(--accent);outline-offset:-2px}button.icon-button,button.tree-label,.menu button{border:0;background:transparent;box-shadow:none}button.icon-button{width:22px;height:22px;padding:0;color:var(--muted);flex:none}button.tree-label{flex:1;min-width:0;padding:4px 6px;text-align:left;border-radius:6px;overflow-wrap:anywhere}button.tree-label[draggable=true]{cursor:grab}.tree-spacer{width:22px;flex:none}.chevron{width:14px;height:14px;display:block}.chevron.open{transform:rotate(90deg)}.menu{position:fixed;z-index:30;min-width:200px;padding:6px;display:grid;background:var(--surface);border:1px solid var(--border);border-radius:10px;box-shadow:0 12px 32px #00000029}.menu button{text-align:left;border-radius:6px;padding:8px 10px}.menu button:hover,.menu button:focus-visible{background:var(--bg)}.backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:40;display:grid;place-items:center;padding:16px;background:#00000059}.dialog{width:min(440px,100%);display:grid;gap:12px;padding:16px;background:var(--surface);border:1px solid var(--border);border-radius:14px}.dialog-actions,.move-list{display:flex;flex-wrap:wrap;gap:8px}.move-list{display:grid}.access-list{display:grid;gap:8px;margin:0;padding:0;list-style:none}.access-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.access-row span{min-width:0;overflow-wrap:anywhere}.access-row button{flex:none}.dropzone{display:grid;justify-items:center;gap:10px;padding:24px 12px;border:1px dashed var(--border);border-radius:10px;color:var(--muted)}.dropzone.hot{border-color:var(--accent);color:var(--text)}@media(max-width:800px){.workspace-head{padding:16px}.workspace-body{grid-template-columns:minmax(0,1fr)}.navigator{display:none;position:fixed;z-index:20;top:0;bottom:0;left:0;width:min(320px,calc(100vw - 36px));height:auto;min-height:0;box-shadow:8px 0 24px #0000002e}.navigator.open{display:block}.tool-icon{position:relative;z-index:1}.nav-tab{display:grid;place-items:center;position:fixed;z-index:25;left:0;width:44px;padding:0;border-radius:0 12px 12px 0;border:1px solid var(--border);border-left:0;background:var(--surface);color:var(--text);writing-mode:horizontal-tb}.nav-tab.open{left:min(320px,calc(100vw - 36px))}.document-pane{min-height:0}}
