:root{color-scheme:light;--ink:#173354;--muted:#71829a;--blue:#245faa;--nav:#f0f5fb;--line:#e2e9f2;--paper:#fff;--wash:#f7f9fc;--shadow:0 16px 54px #153b691a;font-family:Arial,sans-serif;font-size:14px;color:var(--ink);background:var(--wash)}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit;color:inherit}button,a,input,select,textarea{touch-action:manipulation}button{cursor:pointer;border:1px solid var(--line);background:var(--paper);padding:9px 13px;border-radius:8px;transition:background .15s}button:hover{background:#e8f0fa}button:disabled{opacity:.55;cursor:wait}button:focus-visible,a:focus-visible{outline:3px solid #75aaff;outline-offset:2px}input,select,textarea{border:1px solid var(--line);background:var(--paper);padding:11px;border-radius:8px;max-width:100%}input:focus,select:focus,textarea:focus{outline:2px solid #a5c8f3;border-color:#568bce}a{color:var(--blue);text-decoration:none}label{display:block;font-size:13px}label>input,label>select{display:block;width:100%;margin:7px 0 18px}h1,h2,p{margin-top:0}.primary{background:var(--blue);border-color:var(--blue);color:#fff;font-weight:600}.primary:hover{background:#194b8a}.secondary{background:var(--nav)}.wide{width:100%;margin-top:12px}.icon{background:none;border:0;font-size:21px;line-height:1;padding:8px}.eyebrow{font-size:10px;letter-spacing:1.7px;font-weight:700;color:var(--muted)}[hidden]{display:none!important}.mobile-only{display:none}.access{min-height:100dvh;display:grid;grid-template-columns:1fr 1fr;max-width:1300px;margin:auto;align-items:center;padding:64px;gap:100px}.welcome{padding:40px 0}.welcome img{display:block;margin-bottom:32px}.welcome .eyebrow{display:block}.welcome h1{font-family:Georgia,serif;font-weight:400;font-size:64px;line-height:1.12;letter-spacing:-2px;margin:24px 0}.welcome p{font-size:17px;line-height:1.8;max-width:390px;color:var(--muted)}.welcome-path{display:flex;gap:18px;margin-top:44px;color:var(--blue);font-size:13px}.welcome-path span{color:#a6b7cd}.access-form{padding:42px;background:var(--paper);border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow)}.access-form h2{font-size:26px;margin:16px 0}.access-form p{color:var(--muted);line-height:1.6}.access-form form{margin-top:28px}.access-form small{display:block;line-height:1.6;color:var(--muted);margin-top:20px}.password{display:flex;margin:7px 0 18px}.password input{width:100%;border-radius:8px 0 0 8px}.password button{border-radius:0 8px 8px 0}.error{color:#aa3535!important}.topbar{height:70px;background:var(--paper);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 25px;gap:12px}.brand{display:flex;align-items:center;gap:10px;color:var(--ink);font-size:20px;font-weight:700}.brand small{display:block;font-size:8px;letter-spacing:2px;margin-top:3px;color:var(--muted)}.top-actions{display:flex;align-items:center;gap:16px}.connection{font-size:11px;color:var(--muted)}.connection:before{content:'•';color:#50867b;padding-right:6px}.assistant-button{background:#edf4ff;color:var(--blue);border:1px solid #dce8fa}.avatar{border-radius:50%;width:35px;height:35px;padding:0;background:#e6eef9;font-weight:700}.workspace{display:grid;grid-template-columns:228px 315px minmax(0,1fr);height:calc(100dvh - 70px)}.sidebar{background:var(--nav);display:flex;flex-direction:column;padding:24px 16px;overflow-y:auto;border-right:1px solid var(--line)}.new-note{width:100%;padding:12px;text-align:left}.nav-shortcuts{display:grid;gap:3px;margin:23px 0}.nav-shortcuts button{text-align:left;background:transparent;border:0;padding:12px}.nav-shortcuts button.selected{background:#dfeaf8;color:#215d9e;font-weight:600}.section-heading{display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:10px;letter-spacing:1.3px;padding-left:12px}.tree{flex:1;min-height:90px}.tree details{margin:7px 0}.tree summary{cursor:pointer;padding:8px 5px;list-style:none;display:flex;align-items:center;gap:5px}.tree summary:before{content:'›';font-size:18px;width:12px;color:var(--muted)}.tree details[open]>summary:before{transform:rotate(90deg)}.tree .book-name{flex:1;overflow:hidden;text-overflow:ellipsis;font-weight:600}.tree .tree-action{font-size:16px;padding:4px}.tree .notebook{width:100%;display:flex;gap:8px;align-items:center;justify-content:space-between;padding:10px 8px 10px 26px;border:0;background:transparent;text-align:left;font-size:13px}.tree .notebook.selected{background:#dfeaf8;border-radius:6px;color:var(--blue)}.notebook small{color:var(--muted)}.sidebar-footer{margin-top:25px;padding-top:20px;border-top:1px solid var(--line);display:grid;gap:10px}.sidebar-footer button,.sidebar-footer a{border:0;background:transparent;text-align:left;padding:6px 9px;font-size:12px}.sidebar-footer span{font-size:10px;color:var(--muted);padding:12px 9px 0}.listing{border-right:1px solid var(--line);background:var(--paper);overflow-y:auto}.list-heading{padding:28px 21px 0;position:sticky;top:0;background:var(--paper);z-index:1}.list-heading h1{font-size:24px;letter-spacing:-.5px;margin:10px 0 22px}.search{display:flex;align-items:center;background:var(--wash);border:1px solid var(--line);border-radius:9px;padding:0 10px}.search span{font-size:26px;color:var(--muted)}.search input{border:0;background:none;width:100%;font-size:12px}.list-controls{display:flex;align-items:center;justify-content:space-between;margin:14px 0 6px;font-size:11px;color:var(--muted)}.text-button{border:0;background:none;color:var(--blue);font-size:11px}.note-list{padding:6px 11px}.note-card{display:block;width:100%;text-align:left;padding:17px 13px;margin-bottom:5px;border:1px solid transparent;background:var(--paper);border-radius:9px}.note-card:hover{background:var(--wash)}.note-card.active{background:#eef4fd;border-color:#d6e5f9;box-shadow:inset 3px 0 #356fb7}.note-card strong{display:block;font-size:14px;line-height:1.4;overflow-wrap:anywhere}.note-card p{font-size:12px;line-height:1.65;color:var(--muted);margin:8px 0 10px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}.note-card small{font-size:10px;color:var(--muted);display:flex;justify-content:space-between;gap:10px}.no-results{padding:40px 20px;text-align:center;color:var(--muted);line-height:1.7}.editor-panel{background:var(--paper);overflow:auto;min-width:0}.empty{height:100%;min-height:400px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:35px}.empty-icon{font-size:55px;color:#7d9fc6;background:var(--nav);border-radius:20px;padding:20px 25px;margin-bottom:28px}.empty h2{font-family:Georgia,serif;font-weight:400;font-size:30px;margin:18px 0}.empty p{color:var(--muted);line-height:1.8;margin-bottom:24px}.note-top{display:flex;align-items:center;gap:10px;justify-content:space-between;border-bottom:1px solid var(--line);padding:15px 25px;min-height:62px}.note-top>span{font-size:11px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.note-actions{display:flex;align-items:center;gap:7px;flex-shrink:0}.note-actions>span{font-size:10px;color:var(--muted)}.note-actions button{font-size:12px}.title-block{padding:30px 40px 22px}.title-block>input{font-family:Georgia,serif;font-size:32px;letter-spacing:-.5px;border:0;padding:0;width:100%;background:transparent}.note-meta{display:flex;align-items:center;gap:10px;margin-top:17px}.note-meta select,.note-meta input{border:0;background:var(--wash);font-size:11px;padding:8px;min-width:0}.note-meta select{max-width:45%}.note-meta input{flex:1}.toolbar{display:flex;align-items:center;gap:3px;flex-wrap:wrap;padding:10px 28px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:#fcfdff;position:sticky;top:0;z-index:1}.toolbar button{border:0;background:transparent;padding:7px;min-width:28px}.toolbar select{font-size:11px;padding:6px;border:0;background:var(--nav)}.color{display:inline-flex}.color input{padding:0;border:0;width:24px;height:24px;margin:0}.editor-panel #editor{min-height:calc(100dvh - 420px);padding:30px 40px;font-family:Arial,sans-serif;font-size:16px;line-height:1.8;outline:none;overflow-wrap:anywhere}.editor-panel #editor:empty:before{content:attr(data-placeholder);color:#a5b1c2;pointer-events:none}#editor img{max-width:100%;height:auto;border-radius:6px}#editor table{border-collapse:collapse;max-width:100%;width:100%}#editor td,#editor th{border:1px solid #b8c8dc;padding:8px;min-width:40px}#editor pre{white-space:pre-wrap;background:var(--wash);padding:15px;border-radius:7px}#editor blockquote{border-left:3px solid #84a9d6;margin-left:0;padding-left:20px}.editor-footer{display:flex;justify-content:space-between;gap:10px;padding:16px 40px;border-top:1px solid var(--line);font-size:10px;color:var(--muted)}.attachments{display:flex;gap:8px;flex-wrap:wrap;padding:10px 40px}.attachment{font-size:11px;padding:9px 12px;border:1px solid var(--line);border-radius:7px}.conflict{background:#fff4df;padding:14px;font-size:12px;color:#755416}.assistant-panel{width:390px;position:fixed;right:0;top:70px;bottom:0;background:var(--paper);box-shadow:-14px 0 50px #163d6d22;border-left:1px solid var(--line);z-index:5;display:flex;flex-direction:column}.assistant-panel>header{padding:20px;display:flex;align-items:center;justify-content:space-between}.assistant-panel h2{margin:6px 0 0;font-size:20px}.assistant-tabs{display:flex;gap:5px;padding:0 16px 12px;border-bottom:1px solid var(--line)}.assistant-tabs button{font-size:11px;flex:1}.assistant-tabs .selected{color:var(--blue);background:var(--nav)}#notesChat{display:flex;flex-direction:column;min-height:0;flex:1;padding:16px}.assistant-intro,.assistant-foot{font-size:11px;line-height:1.6;color:var(--muted)}.scope{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:11px}.scope select{font-size:11px;margin:0;padding:8px}.chat-messages{overflow-y:auto;flex:1;min-height:100px;margin:14px 0;display:flex;flex-direction:column;gap:12px}.chat-message{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7;font-size:13px;padding:13px;background:var(--wash);border-radius:10px}.chat-message.user{background:#e8f1ff;margin-left:25px}.chat-sources{display:flex;flex-wrap:wrap;gap:5px;margin-top:12px}.chat-sources button{font-size:10px;text-align:left;padding:6px}.chat-save{display:block;margin-top:10px;font-size:10px}#chatForm textarea{width:100%;resize:vertical;max-height:140px;font-size:13px}#chatForm button{display:block;margin:8px 0 10px auto}#clinuxChat{padding:10px;flex:1;min-height:0;display:flex;flex-direction:column}#clinuxChat p,#clinuxChat a{font-size:11px;line-height:1.6}#clinuxFrame{flex:1;margin-top:10px}#clinuxFrame iframe{width:100%;height:100%;border:1px solid var(--line);border-radius:8px}dialog{max-width:520px;width:calc(100% - 30px);border:1px solid var(--line);border-radius:15px;padding:24px;box-shadow:var(--shadow)}dialog::backdrop{background:#17335455;backdrop-filter:blur(3px)}.dialog-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.dialog-heading h2{font-size:21px;margin:0}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}#dialogBody{max-height:65dvh;overflow:auto;line-height:1.6}#dialogBody .menu-item{display:block;width:100%;text-align:left;margin:7px 0}#dialogBody textarea{width:100%;min-height:100px}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#153b69;color:#fff;border-radius:10px;padding:13px 22px;z-index:100;box-shadow:var(--shadow);max-width:min(90%,600px);font-size:13px;line-height:1.5}mark{background:#d5e7ff;color:inherit}#more{display:block;margin:10px auto}#filters{padding:5px 0 16px}#filters input,#filters select{padding:8px;margin-bottom:10px}#filters small{font-size:10px;color:var(--muted)}
@media(min-width:1550px){.workspace{grid-template-columns:248px 350px minmax(0,1fr)}body.assistant-open .workspace{padding-right:390px}}
@media(max-width:1100px){.workspace{grid-template-columns:200px 275px minmax(0,1fr)}.title-block{padding:26px 24px}.editor-panel #editor{padding:25px}.toolbar{padding:10px 18px}.note-top{padding:12px}.connection{display:none}.access{gap:45px;padding:40px}.welcome h1{font-size:50px}}
@media(max-width:850px){.workspace{grid-template-columns:280px minmax(0,1fr)}.sidebar{display:none;position:fixed;top:70px;bottom:0;left:0;width:260px;z-index:10;box-shadow:var(--shadow)}.sidebar.open{display:flex}.mobile-only{display:inline-block}.topbar{padding:0 15px}.brand{margin-right:auto}.access{padding:24px;gap:25px}.access-form{padding:28px}.welcome h1{font-size:43px}.note-actions>span{max-width:70px}.title-block>input{font-size:27px}}
@media(max-width:600px){.topbar{height:62px;padding:0 10px;gap:5px}.brand{font-size:18px}.brand img{width:29px;height:29px}.top-actions{gap:7px}.assistant-button{font-size:12px;padding:8px}.workspace{display:block;height:calc(100dvh - 62px)}.listing{height:100%;border:0}.editor-panel{display:none;height:100%}body.editing .listing{display:none}body.editing .editor-panel{display:block}.sidebar{top:62px}.list-heading{padding:23px 22px 0}.list-heading h1{font-size:28px}.note-list{padding:6px 12px}.note-card{padding:18px 13px}.assistant-panel{top:62px;width:100%}.title-block{padding:24px 20px 18px}.title-block>input{font-size:28px}.toolbar{padding:8px 10px}.editor-panel #editor{padding:23px 20px;min-height:40dvh}.note-top{gap:5px}.note-top>span{flex:1}.note-actions button{padding:7px}.editor-footer,.attachments{padding:15px 20px}.access{display:block;padding:28px 20px}.welcome{padding:5px 5px 25px}.welcome img{width:42px;height:42px;margin-bottom:20px}.welcome h1{font-size:38px;margin:16px 0}.welcome h1 br{display:none}.welcome p{font-size:14px;margin-bottom:0}.welcome-path{display:none}.access-form{padding:25px}.access-form h2{font-size:23px}input,textarea{font-size:16px}.note-meta input{font-size:12px}.scope select{font-size:12px}.topbar #install{font-size:11px;padding:7px}.note-meta{gap:6px}}
/* CQDigital blue night palette. Color preference does not mutate note formatting. */
:root[data-theme="dark"]{color-scheme:dark;--ink:#dfebfb;--muted:#a4b7d1;--blue:#548fe1;--nav:#10243e;--line:#294362;--paper:#122b48;--wash:#0b192c;--shadow:0 16px 54px #020b1c80;background:var(--wash)}
[data-theme="dark"] button:hover{background:#23466e}[data-theme="dark"] .primary{background:#326ebc;border-color:#5087ce;color:#fff}[data-theme="dark"] .primary:hover{background:#3f7ccc}[data-theme="dark"] .assistant-button,[data-theme="dark"] .avatar{background:#1d3c64;color:#dbeaff;border-color:#355b87}[data-theme="dark"] .nav-shortcuts button.selected,[data-theme="dark"] .tree .notebook.selected{background:#203f65;color:#a8ceff}[data-theme="dark"] .note-card.active{background:#1b3a60;border-color:#416b9d;box-shadow:inset 3px 0 #88b9ff}[data-theme="dark"] .toolbar{background:#10243e}[data-theme="dark"] .chat-message.user{background:#203f65}[data-theme="dark"] .search{background:#0d2037}[data-theme="dark"] .empty-icon{color:#8db5e6}[data-theme="dark"] .chat-message{background:#0e223a}[data-theme="dark"] .error{color:#ffb4b4!important}[data-theme="dark"] .conflict{background:#29344a;color:#f2dba4}[data-theme="dark"] .assistant-panel{box-shadow:-14px 0 50px #020b1c66}[data-theme="dark"] mark{background:#345c8c;color:#fff}[data-theme="dark"] #editor td,[data-theme="dark"] #editor th{border-color:#526d8e}[data-theme="dark"] #editor font[color="#000000"],[data-theme="dark"] #editor font[color="#000"],[data-theme="dark"] #editor [style*="color:rgb(0, 0, 0)"],[data-theme="dark"] #editor [style*="color:#000000"]{color:var(--ink)!important}[data-theme="dark"] dialog{background:var(--paper);color:var(--ink)}[data-theme="dark"] dialog::backdrop{background:#020b1ca8}
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:36px;height:36px;padding:7px;border:1px solid var(--line);background:var(--paper);color:var(--ink);border-radius:50%}.theme-toggle svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.theme-toggle .sun{display:none}[data-theme="dark"] .theme-toggle .moon{display:none}[data-theme="dark"] .theme-toggle .sun{display:block}.access-theme{position:absolute;right:22px;top:20px}.import-guide{background:var(--nav);border:1px solid var(--line);border-radius:9px;padding:14px;margin:0 0 18px}.import-guide ol{padding-left:20px;margin:8px 0}.import-guide small{display:block;color:var(--muted)}.import-result{font-size:13px}.import-result ul{padding-left:20px}.import-file-hint{color:var(--muted);font-size:12px}
@media(max-width:600px){.top-actions{gap:5px}.theme-toggle{width:32px;height:32px}.topbar #install{display:none}.topbar .assistant-button{padding:8px 7px}.topbar .brand{font-size:16px;gap:6px}.topbar .avatar{width:31px;height:31px}}

/* Mujer Orfebre: palette requested by the user; reference mujer-orfebre-skin. */
:root[data-theme="orfebre"]{color-scheme:light;--ink:#211f1d;--muted:#6f6761;--blue:#1f5f53;--nav:#f7f2ec;--line:#dfd4c8;--paper:#fffdf9;--wash:#f7f2ec;--shadow:0 16px 54px #32221b1f;background:var(--wash)}
[data-theme="orfebre"] button:hover{background:#eee4d6}
[data-theme="orfebre"] .primary{background:#2f7d6d;border-color:#2f7d6d;color:#fff}
[data-theme="orfebre"] .primary:hover{background:#1f5f53;border-color:#1f5f53}
[data-theme="orfebre"] .assistant-button,[data-theme="orfebre"] .avatar{background:#e5eee7;border-color:#c3d6cc;color:#1f5f53}
[data-theme="orfebre"] .nav-shortcuts button.selected,[data-theme="orfebre"] .tree .notebook.selected{background:#e5eee7;color:#1f5f53}
[data-theme="orfebre"] .note-card.active{background:#f3eadb;border-color:#c9a86a;box-shadow:inset 3px 0 #9b6048}
[data-theme="orfebre"] .toolbar{background:#f7f2ec}
[data-theme="orfebre"] .chat-message.user{background:#e5eee7}
[data-theme="orfebre"] .empty-icon{color:#9b6048}
[data-theme="orfebre"] .eyebrow{color:#9b6048}
[data-theme="orfebre"] .welcome h1{color:#681b1c}
[data-theme="orfebre"] .welcome-path span{color:#9b6048}
[data-theme="orfebre"] .assistant-panel{box-shadow:-14px 0 50px #32221b1f}
[data-theme="orfebre"] mark{background:#ead8b6;color:#211f1d}
[data-theme="orfebre"] #toast{background:#1f5f53}
[data-theme="orfebre"] #editor td,[data-theme="orfebre"] #editor th{border-color:#b9a18b}
[data-theme="orfebre"] #editor blockquote{border-color:#c9a86a}
[data-theme="orfebre"] #editor:empty:before{color:#6f6761}
[data-theme="orfebre"] dialog{background:var(--paper);color:var(--ink)}
[data-theme="orfebre"] dialog::backdrop{background:#32221b55}
[data-theme="orfebre"] :is(button,a,input,select,textarea):focus-visible{outline:2px solid #9b6048;outline-offset:2px;border-color:#9b6048}
.theme-toggle .gem{display:none}
[data-theme="dark"] .theme-toggle .sun{display:none}
[data-theme="dark"] .theme-toggle .gem{display:block}
[data-theme="orfebre"] .theme-toggle .moon{display:none}
[data-theme="orfebre"] .theme-toggle .sun{display:block}

/* The entire library scrolls; expanded books retain their natural height. */
.sidebar{min-height:0}
.sidebar>*{flex-shrink:0}
.sidebar .tree{flex:1 0 auto}
:root{--row-hover:#dae8f9;--row-hover-active:#c6dcf5;--row-hover-ink:#173354}
:root[data-theme="dark"]{--row-hover:#24486f;--row-hover-active:#315b89;--row-hover-ink:#edf5ff}
:root[data-theme="orfebre"]{--row-hover:#ede0ca;--row-hover-active:#dfccaa;--row-hover-ink:#392b20}
.tree summary{border-radius:7px;transition:background .15s,color .15s}
@media(hover:hover){
 :root .tree summary:hover,:root .tree .notebook:hover,:root .note-card:hover{background:var(--row-hover);color:var(--row-hover-ink)}
 :root .tree .notebook.selected:hover,:root .note-card.active:hover{background:var(--row-hover-active);color:var(--row-hover-ink)}
}
:root .tree summary:focus-visible,:root .tree .notebook:focus-visible,:root .note-card:focus-visible{background:var(--row-hover);color:var(--row-hover-ink);outline:2px solid var(--blue);outline-offset:-2px}
.note-row{position:relative}.note-row .note-card{padding-right:42px}.note-row-menu{position:absolute;right:7px;top:10px;padding:3px 7px;font-size:21px;line-height:1;background:var(--paper);border-color:var(--line);border-radius:6px}.note-row.dragging{opacity:.5}.note-row[draggable="true"] .note-card{cursor:grab}.note-row[draggable="true"] .note-card:active{cursor:grabbing}
:root .tree .notebook.drop-target{background:var(--row-hover-active);color:var(--row-hover-ink);outline:2px dashed var(--blue);outline-offset:-2px}
.note-dropdown{position:fixed;inset:auto;margin:0;min-width:220px;max-width:calc(100vw - 16px);padding:6px;border:1px solid var(--line);border-radius:10px;background:var(--paper);color:var(--ink);box-shadow:var(--shadow)}.note-dropdown button{display:block;width:100%;border:0;text-align:left;padding:11px}.note-dropdown small{display:block;font-size:11px;color:var(--muted);margin-top:4px}.note-dropdown button:hover,.note-dropdown button:focus-visible{background:var(--row-hover);color:var(--row-hover-ink)}
.notebook-row{position:relative}.tree .notebook-row .notebook{padding-right:34px}.notebook-menu-button{position:absolute;right:2px;top:5px;padding:3px 5px;font-size:19px;line-height:1;border:0;background:transparent}.deleted-notebook{padding:12px 0;border-bottom:1px solid var(--line)}.deleted-notebook p{margin-bottom:8px}
.toolbar{gap:7px;padding:10px 18px}.toolbar-group,.toolbar-more{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.toolbar-group{padding-right:8px;border-right:1px solid var(--line)}.toolbar-more{gap:7px}.toolbar button[aria-pressed="true"]{background:var(--row-hover-active);color:var(--row-hover-ink)}.toolbar .color{gap:3px;align-items:center;font-weight:bold}.highlight-label{display:flex;gap:5px;align-items:center;font-size:11px}.table-dimensions{display:grid;grid-template-columns:1fr 1fr;gap:16px}.table-dimensions input{width:100%}.search-expansion{padding:0 20px}.search-expansion small{display:block;color:var(--muted);font-size:11px;line-height:1.5}.attachment-item{display:flex;align-items:center;gap:8px;max-width:100%;border:1px solid var(--line);border-radius:8px;padding:9px;font-size:12px}.attachment-name{overflow-wrap:anywhere;min-width:0}.attachment-name small{display:block;color:var(--muted);font-size:10px;margin-top:4px}.attachment-item button{padding:6px 9px}.attachment-download{white-space:nowrap;font-size:12px}.attachment-preview{display:block;max-width:100%;max-height:55dvh;margin:0 auto 15px}audio.attachment-preview{width:100%}.pdf-preview{width:100%;height:55dvh;border:1px solid var(--line);border-radius:8px}.text-preview{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.6}.preview-help{font-size:12px;color:var(--muted)}
@media(min-width:601px){#moreFormatting{display:none}}
@media(max-width:600px){.toolbar{padding:8px;gap:4px}.toolbar-more{display:none;width:100%;padding-top:7px;border-top:1px solid var(--line)}.toolbar.more-open .toolbar-more{display:flex}.toolbar-group{padding-right:3px;gap:2px}.toolbar button{padding:7px 5px}.toolbar #heading{max-width:105px}.attachment-item{width:100%}.attachment-name{flex:1}}
/* Additional user-selected palettes; UI colors do not alter stored note HTML. */
:root[data-theme="rosa"]{--ink:#492335;--muted:#805b6d;--blue:#a83267;--nav:#faeaf2;--line:#e8cbd9;--paper:#fffafd;--wash:#fff4f9;--shadow:0 16px 54px #71354e20;--theme-selected:#f6dae8;--theme-hover:#f8e2ed}
:root[data-theme="lila"]{--ink:#39274f;--muted:#746183;--blue:#7350a6;--nav:#f0e9f8;--line:#dbcee9;--paper:#fdfaff;--wash:#f7f2fc;--shadow:0 16px 54px #52347720;--theme-selected:#e9def5;--theme-hover:#eee4f8}
:root[data-theme="black"]{color-scheme:dark;--ink:#eeeeee;--muted:#b0b0b0;--blue:#d4d4d4;--nav:#101010;--line:#3a3a3a;--paper:#191919;--wash:#090909;--shadow:0 16px 54px #0009;--theme-selected:#333;--theme-hover:#292929}
:is([data-theme="rosa"],[data-theme="lila"],[data-theme="black"]) button:hover{background:var(--theme-hover)}
:is([data-theme="rosa"],[data-theme="lila"],[data-theme="black"]) .primary{background:var(--blue);border-color:var(--blue);color:var(--paper)}
:is([data-theme="rosa"],[data-theme="lila"],[data-theme="black"]) .primary:hover{filter:brightness(.92);background:var(--blue)}
:is([data-theme="rosa"],[data-theme="lila"],[data-theme="black"]) :is(.assistant-button,.avatar,.chat-message.user,.nav-shortcuts button.selected,.tree .notebook.selected){background:var(--theme-selected);color:var(--ink);border-color:var(--line)}
:is([data-theme="rosa"],[data-theme="lila"],[data-theme="black"]) .note-card.active{background:var(--theme-selected);border-color:var(--line);box-shadow:inset 3px 0 var(--blue)}
:is([data-theme="rosa"],[data-theme="lila"],[data-theme="black"]) :is(.toolbar,.chat-message,.search){background:var(--nav)}
:is([data-theme="rosa"],[data-theme="lila"],[data-theme="black"]) .empty-icon{color:var(--blue)}
:is([data-theme="rosa"],[data-theme="lila"],[data-theme="black"]) mark{background:var(--theme-selected);color:var(--ink)}
[data-theme="black"] .error{color:#ffb4b4!important}[data-theme="black"] .conflict{background:#332d20;color:#ffe1a0}
[data-theme="black"] #editor td,[data-theme="black"] #editor th{border-color:var(--muted)}
[data-theme="black"] #editor font[color="#000000"],[data-theme="black"] #editor font[color="#000"],[data-theme="black"] #editor [style*="color:rgb(0, 0, 0)"],[data-theme="black"] #editor [style*="color:#000000"]{color:var(--ink)!important}
#themePicker{width:min(540px,calc(100vw - 28px));max-height:calc(100dvh - 32px);overflow:auto;padding:24px;background:var(--paper);color:var(--ink);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow)}
#themePicker::backdrop{background:#07101d88}#themePicker h2{font-size:21px;margin:0}#themePicker>p{color:var(--muted);margin:14px 0 20px}
.theme-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.theme-option{position:relative;text-align:left;padding:12px;border:2px solid var(--line);background:var(--paper);min-height:100px}.theme-option[aria-pressed="true"]{border-color:var(--blue)}.theme-swatches{display:flex;height:35px;border-radius:7px;overflow:hidden;border:1px solid var(--line);margin-bottom:10px}.theme-swatches i{flex:1}.theme-check{display:none;margin-left:8px;color:var(--blue)}.theme-option[aria-pressed="true"] .theme-check{display:inline}
@media(max-width:360px){#themePicker{padding:16px}.theme-options{gap:8px}.theme-option{padding:9px;font-size:12px}}
:is(:root[data-theme="rosa"],:root[data-theme="lila"],:root[data-theme="black"]){--row-hover:var(--theme-hover);--row-hover-active:var(--theme-selected);--row-hover-ink:var(--ink)}

/* PDF documents render locally; the original remains an explicit download. */
dialog:has(.pdf-preview){max-width:960px}.pdf-preview{height:auto;min-height:150px;padding:8px}.pdf-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.pdf-controls label{display:flex;align-items:center;gap:6px;margin-left:auto}.pdf-controls select{margin:0;width:auto;padding:6px}.pdf-scroll{max-height:48dvh;overflow:auto;background:#ddd}.pdf-scroll canvas{display:block;margin:auto;background:white}.pdf-preview [data-status]{font-size:12px;margin:8px 0}.pdf-controls [data-page]{font-size:12px}

.selection-tools{padding:10px 16px;display:flex;flex-wrap:wrap;align-items:center;gap:6px;border-bottom:1px solid var(--line)}.selection-tools button{font-size:11px;padding:6px}.selection-tools span,.selection-tools small{width:100%;font-size:11px;color:var(--muted)}.note-select{position:absolute;top:18px;left:8px;width:18px;height:18px;margin:0;cursor:pointer;accent-color:var(--blue);z-index:1}.note-row:has(.note-select) .note-card{padding-left:34px}.note-row.multi-selected .note-card{border-color:var(--blue);box-shadow:inset 3px 0 var(--blue)}

#editor ul[data-task-list]{list-style:none;padding-left:28px}#editor [data-task]{display:inline-block;cursor:pointer;user-select:none;min-width:24px;font-size:20px;color:var(--blue);text-decoration:none}#editor li:has(> [data-task="done"]){text-decoration:line-through;color:var(--muted)}#editor [data-task]:focus-visible{outline:2px solid var(--blue);outline-offset:2px}

.text-color-button{display:inline-flex;align-items:center;gap:5px}.text-color-button #textColorSample{width:16px;height:16px;border:1px solid var(--muted);border-radius:3px}.text-color-palette{position:fixed;margin:0;width:278px;max-width:calc(100vw - 16px);padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--paper);color:var(--ink);box-shadow:var(--shadow)}.text-color-palette strong{font-size:13px}.text-color-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin:12px 0}.text-color-grid button{min-width:0;height:42px;padding:6px;background:var(--paper);border:1px solid var(--line)}.text-color-grid button span{display:block;width:100%;height:100%;background:var(--swatch);border:1px solid #888;border-radius:3px}.text-color-grid button[aria-pressed="true"]{outline:2px solid var(--blue);outline-offset:1px}#moreTextColors{width:100%;font-size:13px}

/* Toolbar labels must not inherit form-field vertical margins. */
.toolbar .highlight-label{display:inline-flex;align-items:center;gap:6px;height:32px;margin:0}.toolbar .highlight-label>select{display:block;width:auto;height:32px;margin:0}.toolbar .highlight-icon{display:block;flex:none;width:20px;height:20px}.toolbar .text-color-button{height:32px}

#highlightButton .highlight-icon{border-bottom:3px solid var(--highlight-choice,transparent)}#highlightPalette>button{width:100%;margin-top:6px;font-size:13px}

.note-find-bar{display:flex;align-items:center;gap:5px;padding:8px 16px;background:var(--paper);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:3;flex-wrap:wrap}.note-find-bar input{flex:1;min-width:120px;width:160px;padding:7px;font-size:13px}.note-find-bar button{padding:5px 8px}.note-find-bar span{font-size:11px;color:var(--muted)}#noteEditor:has(.note-find-bar:not([hidden])) .toolbar{top:var(--note-find-height,52px)}::highlight(note-search){background-color:#ffe680;color:#172b40}::highlight(note-search-active){background-color:#ff9c33;color:#172b40}#noteFindOverlay{pointer-events:none;position:fixed;inset:0;z-index:2}#noteFindOverlay span{position:absolute;background:#ffe680;opacity:.45}#noteFindOverlay span.active{background:#ff9c33;opacity:.6}@media(max-width:600px){.note-find-bar{padding:6px 8px}.note-find-bar input{flex-basis:130px}.note-actions{gap:3px}.note-actions #findInNote{font-size:11px;padding:6px}}

.family-create{display:grid;gap:12px}.family-create label{display:grid;gap:5px}.family-members{display:grid;gap:12px;margin-top:16px}.family-member{display:grid;gap:6px;padding:14px;border:1px solid var(--border,#ccd8e8);border-radius:12px;overflow-wrap:anywhere}.family-member button{justify-self:start}#familyLink{width:100%;min-height:100px;box-sizing:border-box}
