:root{color-scheme:dark;--bg:#0d0f11;--shell:#101214;--layer:#121518;--panel:#111416;--ink:#e8eaed;--muted:#828891;--faint:#555c66;--line:#24282d;--line-soft:#1c2025;--hover:#202429;--active:#252a30;--blue:#94b9e8;--mono:'IBM Plex Mono',ui-monospace,SFMono-Regular,Consolas,monospace;--sans:'DM Sans',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}
*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0}body{background:var(--bg);color:var(--ink);font-family:var(--sans);font-size:13px;-webkit-font-smoothing:antialiased}button,input,textarea{font:inherit}button{color:inherit;cursor:pointer}button:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid #6c95c7;outline-offset:2px}button:disabled{opacity:.45;cursor:not-allowed}svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none}.svg-sprite{display:none}[hidden],.hidden{display:none!important}
.app-shell{display:grid;grid-template-columns:58px 270px minmax(0,1fr) 316px;width:calc(100% - 28px);height:calc(100dvh - 28px);margin:14px auto;background:var(--shell);border:1px solid #2a2f35;border-radius:16px;overflow:hidden;box-shadow:0 16px 70px #0004}.rail{display:flex;flex-direction:column;align-items:center;gap:14px;padding:19px 8px;border-right:1px solid var(--line-soft);background:linear-gradient(165deg,#131619,#101214 70%)}.brand{width:40px;height:35px;display:flex;align-items:center;justify-content:center;font:bold 25px var(--sans);letter-spacing:-2px;margin:0 0 21px;color:#f0f1f3}.brand-mini{font-size:10px;font-weight:700;letter-spacing:1.2px;color:#58616c;padding:12px}.rail-button{width:38px;height:38px;display:grid;place-items:center;background:none;border:0;border-radius:9px;color:#9ba2ac}.rail-button:hover,.rail-button.selected{background:#242930;color:#e9edf3}.rail-button svg{width:19px;height:19px}.rail-spacer{flex:1}
.sidebar{display:flex;flex-direction:column;min-width:0;background:linear-gradient(180deg,#111416,#101315);border-right:1px solid var(--line)}.sidebar-head{height:60px;display:flex;align-items:center;justify-content:space-between;padding:0 22px}.side-label{font-size:10px;letter-spacing:1.9px;font-weight:700;color:#a4abb3}.side-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:#85aa96;margin:0 0 1px 8px}.sidebar-close{display:none!important}.search-wrap{margin:5px 14px 13px;display:flex;height:39px;align-items:center;padding:0 11px;gap:9px;border:1px solid #262b30;background:#101215;border-radius:9px;color:#8d95a1}.search-wrap svg{width:16px;height:16px}.search-wrap input{min-width:0;flex:1;border:0;outline:0;color:#dedfe2;background:transparent;font-size:12px}.search-wrap input::placeholder{color:#828891}.search-wrap kbd{font:10px var(--sans);color:#717984}.create-note{display:flex;align-items:center;text-align:left;gap:12px;margin:0 14px 15px;border:1px solid #252a2f;border-radius:9px;background:linear-gradient(#24282d,#1b2024);padding:11px 13px;height:42px;font-size:12px;font-weight:600}.create-note:hover{background:#2b3137}.create-note svg{width:16px;height:16px}.create-note .create-trailing{margin-left:auto}.side-scroll{overflow-y:auto;overflow-x:hidden;min-height:0;flex:1;padding:0 13px 20px;scrollbar-width:thin;scrollbar-color:#3a4148 transparent}.quick-link,.folder-item,.note-item{display:flex;align-items:center;gap:11px;border:0;border-radius:7px;width:100%;height:31px;text-align:left;padding:0 10px;background:transparent;color:#bfc4cb;font-size:12px}.quick-link svg,.folder-item svg,.note-item svg{height:15px;width:15px;stroke-width:1.6}.quick-link:hover,.folder-item:hover,.note-item:hover{background:#20252a;color:#fff}.quick-link.active,.folder-item.active,.note-item.active{background:#262b30;color:#f0f2f4}.quick-link .count,.folder-item .count{margin-left:auto;color:#a7aeb6;background:#21262b;border-radius:7px;min-width:20px;text-align:center;padding:2px 4px;font-size:10px}.section-heading{display:flex;align-items:center;justify-content:space-between;padding:25px 9px 9px;font-size:10px;letter-spacing:1.4px;color:#939ba4}.section-heading button{background:transparent;border:0;color:#838b93;height:20px;display:grid;place-items:center}.section-heading button:hover{color:white}.section-heading svg{height:15px;width:15px}.folder-item .folder-name,.note-item .note-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.folder-item{height:32px}.folder-item .count{background:none;color:#626b77}.notes-heading{padding-top:22px}.tiny-count{letter-spacing:0;color:#69717b}.note-item{padding-left:20px}.note-item .note-name{font-size:11.5px}.note-item svg{height:14px;width:14px}.note-item.deleted-note{color:#986e73}.sidebar-foot{display:flex;align-items:center;gap:8px;min-height:51px;border-top:1px solid var(--line);padding:0 16px;font-size:11px;color:#87909c}.sidebar-foot button{border:0;background:transparent;margin-left:auto;color:#858e9b;display:grid;place-items:center}.sidebar-foot svg{height:16px;width:16px}.status-led{width:6px;height:6px;background:#87a996;border-radius:50%}
.editor-pane{display:flex;flex-direction:column;min-width:0;min-height:0;position:relative;background:radial-gradient(ellipse 85% 42% at 45% 36%,#15191c 0%,#111417 88%)}.desktop-tabbar{height:48px;border-bottom:1px solid #20252a;display:flex;align-items:flex-end;padding-left:0;flex:none}.active-tab{height:40px;min-width:177px;max-width:260px;background:#14171b;border:1px solid #292e33;border-bottom:1px solid #14171b;border-radius:11px 11px 0 0;display:flex;gap:10px;align-items:center;padding:0 13px;color:#d8dde3;font:12px var(--sans)}#tab-title{max-width:179px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tab-arrow{font-size:20px;color:#737b83}.tab-circle{width:7px;height:7px;background:#646e78;border-radius:50%;margin-left:auto}.new-tab{border:0;background:none;color:#848c97;font-size:24px;font-weight:300;padding:0 18px;height:40px}.new-tab:hover{color:white}.editor-toolbar{display:flex;align-items:center;gap:8px;min-height:55px;padding:0 31px;border-bottom:1px solid #171a1d;flex:none}.desktop-breadcrumb{font-size:11px;color:#777e88;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.desktop-breadcrumb span{padding:0 7px;color:#464d55}.toolbar-spacer{flex:1}.sync-button{border:0;background:none;display:flex;gap:10px;align-items:center;color:#9fa7b2;padding:7px 2px;font-size:11px;white-space:nowrap}.sync-button svg{width:18px;height:18px}.sync-button:hover{color:#f2f2f2}.toolbar-time{color:#626b75}.icon-button{border:0;background:none;display:grid;place-items:center;width:33px;height:34px;border-radius:8px;color:#a1a7af}.icon-button:hover{background:#252a30;color:#fff}.icon-button svg{width:18px;height:18px}.editor-scroll{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#343a40 transparent}.editor-content{width:min(100%,780px);margin:0 auto;padding:51px 66px 20px}.editor-eyebrow{font:10px var(--sans);letter-spacing:2px;color:#6c7580;font-weight:700;margin-bottom:22px}.editor-eyebrow span{color:#565d67;margin:0 5px}.note-title-input{width:100%;background:transparent;border:0;outline:none!important;color:#f1f2f3;font:600 clamp(29px,2.6vw,39px)/1.3 var(--mono);letter-spacing:.2px;padding:0;display:block;min-width:0}.note-title-input::placeholder{color:#57616d}.under-title{display:flex;align-items:center;gap:12px;margin-top:16px;color:#77808a;font-size:11px}.under-line{width:29px;height:1px;background:#4a6178}.note-body,.markdown-preview{font:400 16px/1.95 var(--mono);color:#d6dbe1;letter-spacing:.01em;tab-size:2}.note-body{display:block;width:100%;min-height:490px;margin:36px 0 0;padding:0;resize:none;overflow:hidden;border:none;outline:none!important;background:transparent;white-space:pre-wrap;overflow-wrap:break-word}.note-body::placeholder{color:#666d75}.note-body:focus{color:#eff0f2}.markdown-preview{margin:36px 0 0;min-height:400px;overflow-wrap:break-word}.markdown-preview p{margin:0 0 24px}.markdown-preview h2{font-size:20px;line-height:1.55;margin:26px 0 16px;color:#f1f2f4}.markdown-preview h3{font-size:17px;margin:23px 0 12px}.markdown-preview strong{color:#f3f3f3;font-weight:600}.markdown-preview em{color:#d1d5dd}.markdown-preview blockquote{border-left:3px solid #4f565e;margin:24px 0;padding:3px 0 3px 24px;color:#9299a3}.markdown-preview .md-line{min-height:1.6em}.markdown-preview .wiki-link{color:var(--blue);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px;cursor:pointer}.markdown-preview code{background:#20272d;padding:3px 6px;border-radius:4px;font-size:.85em}.note-tags{display:flex;gap:8px;flex-wrap:wrap;padding-top:24px}.tag{border:1px solid #30353b;background:#23272d;border-radius:16px;padding:7px 12px;font:11px var(--sans);color:#a9b1ba}.tag:hover{color:white;border-color:#526171}.tag-add{background:transparent;color:#9da4ab;font-size:16px;padding:4px 10px}.editor-bottom-space{height:100px}.writing-controls{height:45px;padding:5px 20px;display:flex;align-items:center;gap:4px;flex:none;border-top:1px solid #1c2024;background:#121518}.format-btn{height:31px;min-width:33px;padding:0 7px;display:grid;place-items:center;background:none;border:0;border-radius:5px;color:#868f99;font-size:15px;font-weight:500}.format-btn:hover,.text-action:hover{background:#23282e;color:white}.format-btn svg{height:16px;width:16px}.format-btn span{font-size:9px;position:absolute;margin-left:17px;margin-top:8px}.format-btn.strong{font-weight:700}.format-btn.italic{font-style:italic;font-family:Georgia,serif}.writing-spacer{flex:1}.text-action{background:none;border:0;border-radius:7px;color:#9199a4;height:30px;display:flex;align-items:center;gap:7px;padding:0 10px;font-size:11px}.text-action svg{height:16px;width:16px}.text-action.preview-on{background:#2c3239;color:white}.editor-footer{height:35px;display:flex;align-items:center;gap:14px;padding:0 28px;border-top:1px solid #1e2328;color:#818994;font-size:10px;white-space:nowrap}.footer-separator{color:#4c5560}.footer-spacer{flex:1}.footer-aa{font-size:13px}.footer-keyboard{font-size:16px}.mobile-menu,.mobile-note-title{display:none}
.insights{display:flex;min-width:0;min-height:0;flex-direction:column;border-left:1px solid #252a30;background:linear-gradient(180deg,#121518 0%,#101316 100%)}.insights-tabs{height:61px;flex:none;display:flex;align-items:center;justify-content:space-around;border-bottom:1px solid var(--line);padding:0 14px}.insights-tab,.insights-close{border:0;background:transparent;color:#969faa;width:57px;height:40px;border-radius:8px;display:grid;place-items:center}.insights-tab:hover,.insights-tab.active{background:#22272d;color:#e5e8eb}.insights-tab svg{width:19px;height:19px}.insights-close{display:none}.insights-scroll{overflow:auto;min-height:0;flex:1;scrollbar-width:thin;scrollbar-color:#333941 transparent}.insight-section{padding:22px 22px 20px;border-bottom:1px solid var(--line)}.insight-section h3{font-size:12px;font-weight:600;color:#e2e5e9;margin:0 0 13px}.graph-container{height:320px;position:relative;width:100%}.graph-svg{display:block;height:100%;width:100%;overflow:visible}.graph-svg line{stroke:#535e6a;stroke-width:1;opacity:.75}.graph-svg .graph-node{cursor:pointer}.graph-svg .graph-node circle{fill:#939fac;stroke:#d4dce5;stroke-width:1.1}.graph-svg .graph-node.current circle{fill:#81abdb;stroke:#d9eaff;stroke-width:2}.graph-svg .graph-node text{font:10px var(--sans);fill:#c5cbd2;pointer-events:none}.graph-svg .graph-node:hover circle{fill:#c7dcf4}.graph-svg .center-halo{fill:#7499c6;opacity:.09}.linked-item{padding:10px 0;display:flex;gap:10px;align-items:flex-start;border:0;background:none;text-align:left;color:#c9d0d8;width:100%;font-size:12px}.linked-item:hover{color:#fff}.linked-item svg{height:16px;width:16px;margin-top:2px}.linked-item div{min-width:0;flex:1}.linked-item .link-sub{display:block;font-size:11px;color:#7c8793;line-height:1.55;margin-top:5px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.linked-item .link-arrow{margin:7px 0 0 auto;color:#77818b}.empty-state{font-size:12px;line-height:1.7;color:#7e8791;padding:8px 0 14px}.detail-row{display:flex;justify-content:space-between;padding:11px 0;color:#aab1ba;border-bottom:1px solid #20252a}.detail-row span:last-child{color:#e2e5e9}.tag-insights{display:flex;flex-wrap:wrap;gap:7px}.tag-insights .tag{font-size:10px;padding:6px 10px}.side-tip{font-size:10px;color:#66717e;line-height:1.7;margin:11px 0 0}
.mobile-nav{display:none}.overlay{position:fixed;inset:0;z-index:19;background:rgba(0,0,0,.63);backdrop-filter:blur(2px)}.menu-popover{position:fixed;right:335px;top:115px;width:220px;padding:7px;border:1px solid #373f47;border-radius:10px;background:#1a1e23;box-shadow:0 20px 60px #0008;z-index:30}.menu-popover button{width:100%;display:flex;align-items:center;gap:12px;background:transparent;border:0;border-radius:6px;text-align:left;padding:11px 10px;color:#d0d5db;font-size:12px}.menu-popover button:hover{background:#2a3139}.menu-popover svg{width:16px;height:16px}.menu-popover button.danger-action{color:#f09e9d}
.modal{position:fixed;z-index:40;width:min(92vw,540px);max-height:90dvh;overflow-y:auto;color:#e5e9ef;background:#171b20;border:1px solid #333b46;border-radius:17px;padding:27px;box-shadow:0 32px 110px #000b}.modal::backdrop{background:#020508b9;backdrop-filter:blur(4px)}.modal-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.modal-kicker{font:700 10px var(--sans);letter-spacing:1.9px;color:#8ea8c8}.modal h2{font-size:20px;font-weight:600;margin:8px 0 0}.modal h3{font-size:13px;font-weight:600}.modal-description{font-size:12px;line-height:1.75;color:#929da9;margin:13px 0 18px}.cloud-state{padding:11px 13px;border-radius:8px;background:#222a31;border:1px solid #323d49;color:#abc4dc;font-size:12px;margin-bottom:16px}.form-grid{display:grid;gap:12px}.form-grid label{display:grid;gap:7px;color:#aab2bc;font-size:11px}.form-grid input{width:100%;height:41px;border-radius:7px;border:1px solid #353c45;background:#101316;padding:0 12px;color:#e2e7ed;outline:none}.form-grid input:focus{border-color:#7c9fc2}.modal-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:15px}.modal-actions button{border-radius:7px;padding:10px 13px;display:flex;align-items:center;justify-content:center;gap:8px;font-size:12px}.modal-actions svg{width:15px;height:15px}.modal-actions .primary{background:#bed2e6;color:#19222b;font-weight:700;border:1px solid #bed2e6}.modal-actions .secondary{background:#262d35;border:1px solid #3b444e;color:#c9d2dc}.modal-actions button:hover{filter:brightness(1.14)}.form-feedback{min-height:17px;color:#b3bfcd;font-size:11px;line-height:1.55}.modal-rule{border:0;border-top:1px solid #313840;margin:21px 0}.fine-print{color:#828f9b;font-size:10px;line-height:1.7;margin:17px 0 0}.fine-print code{color:#bad4ef}.toast{position:fixed;z-index:80;left:50%;bottom:20px;transform:translate(-50%,15px);background:#2b333b;color:#f5f7f9;padding:12px 17px;border-radius:9px;box-shadow:0 12px 45px #0009;font-size:12px;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;max-width:calc(100vw - 36px);text-align:center}.toast.show{opacity:1;transform:translate(-50%,0)}
body.focus-mode .app-shell{grid-template-columns:1fr}body.focus-mode .rail,body.focus-mode .sidebar,body.focus-mode .insights{display:none!important}body.focus-mode .editor-content{width:min(100%,820px)}body.focus-mode .desktop-tabbar{opacity:.35}body.focus-mode .desktop-breadcrumb{visibility:hidden}
@media(max-width:1200px){.app-shell{grid-template-columns:53px 242px minmax(0,1fr) 270px}.editor-content{padding-left:48px;padding-right:48px}.insight-section{padding-left:18px;padding-right:18px}.menu-popover{right:286px}}
@media(max-width:1010px){.app-shell{grid-template-columns:54px 252px minmax(0,1fr)}.insights{position:fixed;right:14px;top:14px;bottom:14px;width:320px;z-index:25;box-shadow:-18px 0 60px #0009;display:none}.insights.open{display:flex}.insights-close{display:grid}.menu-popover{right:35px}}
@media(max-width:760px){body{background:#0e1114}.app-shell{width:100%;height:100dvh;margin:0;border:0;border-radius:0;display:block;overflow:hidden}.rail{display:none!important}.sidebar{position:fixed;z-index:26;inset:0 auto 0 0;width:min(87vw,340px);transform:translateX(-103%);transition:transform .2s ease;box-shadow:15px 0 45px #0008}.sidebar.open{transform:translateX(0)}.sidebar-head{height:67px}.sidebar-close{display:grid!important}.editor-pane{height:100dvh;padding-bottom:164px}.desktop-tabbar{display:none}.editor-toolbar{padding:calc(env(safe-area-inset-top,0px) + 15px) 17px 0;min-height:82px;gap:8px;border:0}.mobile-menu{display:grid;width:32px;margin-left:-6px}.mobile-menu svg{height:24px;width:24px}.mobile-note-title{display:flex;align-items:center;gap:8px;padding:0;background:none;border:0;font:500 15px var(--mono);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:36vw}.mobile-note-title svg{width:15px;height:15px;color:#87909b}.desktop-breadcrumb{display:none}.sync-button{flex-direction:column;gap:2px;font-size:9px}.sync-button svg{width:22px;height:22px}.toolbar-time{display:none}.editor-toolbar #focus-button{display:none}.editor-toolbar #more-button{margin-right:0}.editor-scroll{flex:1}.editor-content{padding:54px 28px 0;width:100%}.editor-eyebrow{font-size:9px;letter-spacing:1.7px;margin-bottom:24px}.note-title-input{font-size:clamp(25px,6.7vw,35px);line-height:1.32;font-weight:600}.under-title{margin-top:18px}.note-body,.markdown-preview{font-size:15px;line-height:2.0;margin-top:42px;min-height:calc(100dvh - 420px)}.note-tags{padding-top:20px}.editor-bottom-space{height:60px}.writing-controls{position:absolute;bottom:164px;width:100%;height:44px;background:#15191de8;backdrop-filter:blur(12px);border-top:1px solid #272c32;padding:0 13px;gap:1px}.format-btn{min-width:34px}.text-action span{display:none}.editor-footer{position:absolute;bottom:208px;width:100%;height:32px;padding:0 24px;background:#111417e8;backdrop-filter:blur(10px);border:0;font-size:10px;gap:10px}.footer-aa,.footer-keyboard{display:none}.mobile-nav{position:absolute;bottom:0;left:0;right:0;height:164px;display:grid;grid-template-columns:repeat(4,1fr);grid-template-rows:91px 73px;align-items:start;gap:0;background:linear-gradient(165deg,#20252a,#14181c 68%);border-top:1px solid #333941;box-shadow:0 -12px 45px #07090b55;padding:18px 13px env(safe-area-inset-bottom,8px);border-radius:30px 30px 0 0}.mobile-nav-btn{background:transparent;border:0;border-radius:12px;display:flex;align-items:center;flex-direction:column;gap:7px;padding:9px 4px;color:#b7c0ca;font-size:11px}.mobile-nav-btn svg{width:24px;height:24px}.mobile-nav-btn.active{background:#2f363e;color:#fff}.mobile-nav-tail{grid-column:1/-1;border-top:1px solid #30363d;padding:12px 4px 0;display:flex;justify-content:flex-end;align-items:center}.mobile-nav-tail::before{content:'All notes  ·  Your workspace';margin-right:auto;color:#838d97;font-size:11px}.mobile-new{display:flex;gap:8px;align-items:center;background:#292f36;color:#eef0f3;border:1px solid #3a4149;border-radius:12px;padding:10px 13px;font-size:12px}.mobile-new svg{width:18px;height:18px}.insights{position:fixed;top:0;bottom:0;right:0;width:min(100%,430px);z-index:28;border-left:0;box-shadow:-18px 0 50px #000b;display:none}.insights.open{display:flex}.insights-tabs{padding-top:env(safe-area-inset-top,0px);height:77px}.insights-close{display:grid}.graph-container{height:370px}.menu-popover{right:14px;top:72px}.modal{padding:21px;width:calc(100% - 22px)}body.focus-mode .editor-pane{padding-bottom:0}body.focus-mode .mobile-nav,body.focus-mode .writing-controls,body.focus-mode .editor-footer{display:none}body.focus-mode .editor-toolbar #focus-button{display:grid}body.focus-mode .editor-content{padding-top:34px}}
@media(max-width:360px){.mobile-note-title{max-width:29vw}.editor-content{padding-left:21px;padding-right:21px}.note-body,.markdown-preview{font-size:14px}.mobile-nav-tail::before{content:'All notes'}.sync-button{font-size:8px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition-duration:.01ms!important;animation-duration:.01ms!important}}
/* Functional cloud verification and appearance controls */
.sync-verification{border:1px solid #364452;border-radius:12px;padding:15px 16px;background:linear-gradient(160deg,#1d2832,#1b2027);margin:0 0 18px}
.verify-header{display:flex;align-items:center;gap:9px;font-size:10px;font-weight:700;color:#a9c7e2;letter-spacing:1.4px;margin-bottom:13px}
.verify-header svg{width:18px;height:18px;color:#9dbad3}
.verify-line{display:flex;gap:16px;justify-content:space-between;align-items:center;border-top:1px solid #34414e;padding:11px 0;font-size:11px;color:#a3b0bd}
.verify-line strong{text-align:right;color:#e4ecf5;font-weight:600;font-size:11px;max-width:60%;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.verify-help{border-top:1px solid #34414e;font-size:11px;line-height:1.65;color:#a0b0bf;padding-top:12px;margin:1px 0 12px}
.sync-now-button{display:flex;gap:9px;align-items:center;justify-content:center;width:100%;border:1px solid #536b85;background:#2b3d4f;border-radius:8px;height:38px;font-size:12px;color:#e9f2fb;font-weight:600}
.sync-now-button svg{width:16px;height:16px}
.sync-now-button:not(:disabled):hover{background:#3b5269}
.sync-now-button:disabled{cursor:not-allowed;opacity:.6}
.appearance-setting{border:1px solid #353c45;border-radius:11px;padding:13px 15px;margin:0 0 16px;display:flex;align-items:center;justify-content:space-between;gap:14px;background:#1a2026}
.appearance-setting p{font-size:13px;font-weight:600;margin:6px 0 3px}
.appearance-setting #theme-mode{color:#a2acb8;font-size:11px}
.settings-section-label{font-size:10px;font-weight:700;letter-spacing:1.5px;color:#a7bad0}
.appearance-button{display:flex;align-items:center;gap:7px;background:#2b343e;border:1px solid #43505d;padding:10px;border-radius:8px;font-size:11px;white-space:nowrap}
.appearance-button svg{height:16px;width:16px}
.appearance-button:hover{background:#344350}
#theme-toggle{transition:background-color .15s,color .15s}
#theme-toggle:hover{color:#d9e9fa}

/* Light mode — a complete matching palette, not a CSS inversion filter */
:root[data-theme="light"]{color-scheme:light;--bg:#e7ebed;--shell:#f8fafb;--layer:#eff2f4;--panel:#f4f6f8;--ink:#1e2934;--muted:#637180;--faint:#8b96a1;--line:#d5dde3;--line-soft:#e0e5e9;--hover:#e5ebef;--active:#dce5ec;--blue:#366995}
[data-theme="light"] body{background:#e7ebed;color:#26333e}
[data-theme="light"] .app-shell{background:#f8fafb;border-color:#cfd7de;box-shadow:0 16px 65px #26354425}
[data-theme="light"] .rail{background:linear-gradient(165deg,#e9edf1,#e2e8ed);border-color:#d3dce3}
[data-theme="light"] .brand{color:#243441}
[data-theme="light"] .brand-mini{color:#778792}
[data-theme="light"] .rail-button{color:#617182}
[data-theme="light"] .rail-button:hover,[data-theme="light"] .rail-button.selected{background:#d1dde7;color:#192f46}
[data-theme="light"] .sidebar{background:linear-gradient(180deg,#f3f6f8,#edf2f5);border-color:#d3dce3}
[data-theme="light"] .side-label{color:#607184}
[data-theme="light"] .side-dot{background:#4d9775}
[data-theme="light"] .search-wrap{background:#fff;border-color:#d0d9e1;color:#718394}
[data-theme="light"] .search-wrap input{color:#273848}
[data-theme="light"] .search-wrap input::placeholder{color:#8997a4}
[data-theme="light"] .search-wrap kbd{color:#8996a2}
[data-theme="light"] .create-note{background:linear-gradient(#e5edf3,#dae5ed);border-color:#c7d5e0;color:#284155}
[data-theme="light"] .create-note:hover{background:#d3e0eb}
[data-theme="light"] .quick-link,[data-theme="light"] .folder-item,[data-theme="light"] .note-item{color:#4e6071}
[data-theme="light"] .quick-link:hover,[data-theme="light"] .folder-item:hover,[data-theme="light"] .note-item:hover{background:#e0e8ef;color:#1d2d3d}
[data-theme="light"] .quick-link.active,[data-theme="light"] .folder-item.active,[data-theme="light"] .note-item.active{background:#d6e2eb;color:#1e3041}
[data-theme="light"] .quick-link .count{background:#d2dee8;color:#506578}
[data-theme="light"] .folder-item .count{color:#8191a0}
[data-theme="light"] .section-heading{color:#748393}
[data-theme="light"] .section-heading button{color:#697f91}
[data-theme="light"] .tiny-count{color:#91a0ac}
[data-theme="light"] .sidebar-foot{border-color:#d5dfe7;color:#657a8d}
[data-theme="light"] .sidebar-foot button{color:#647a8e}
[data-theme="light"] .status-led{background:#4e9975}
[data-theme="light"] .editor-pane{background:radial-gradient(ellipse 85% 48% at 45% 38%,#fff 0%,#f8fafb 94%)}
[data-theme="light"] .desktop-tabbar{border-color:#e0e6eb}
[data-theme="light"] .active-tab{background:#f9fbfc;border-color:#d7e0e7;border-bottom-color:#f9fbfc;color:#253747}
[data-theme="light"] .tab-arrow,[data-theme="light"] .new-tab{color:#6a7b8a}
[data-theme="light"] .tab-circle{background:#a3b0bc}
[data-theme="light"] .editor-toolbar{border-color:#ebeff2}
[data-theme="light"] .desktop-breadcrumb{color:#748493}
[data-theme="light"] .desktop-breadcrumb span{color:#a3afba}
[data-theme="light"] .sync-button{color:#617b93}
[data-theme="light"] .toolbar-time{color:#8291a0}
[data-theme="light"] .icon-button{color:#718293}
[data-theme="light"] .icon-button:hover{background:#e4ebf1;color:#213b52}
[data-theme="light"] .editor-eyebrow{color:#728499}
[data-theme="light"] .editor-eyebrow span{color:#aab7c3}
[data-theme="light"] .note-title-input{color:#192e41}
[data-theme="light"] .note-title-input::placeholder{color:#a8b4bf}
[data-theme="light"] .under-title{color:#8b97a3}
[data-theme="light"] .under-line{background:#8eaac4}
[data-theme="light"] .note-body,[data-theme="light"] .markdown-preview{color:#283744}
[data-theme="light"] .note-body:focus{color:#172e43}
[data-theme="light"] .note-body::placeholder{color:#9daab6}
[data-theme="light"] .markdown-preview h2,[data-theme="light"] .markdown-preview h3,[data-theme="light"] .markdown-preview strong{color:#1e3347}
[data-theme="light"] .markdown-preview blockquote{border-color:#9db0c0;color:#667b8c}
[data-theme="light"] .markdown-preview code{background:#e4edf3;color:#2c5679}
[data-theme="light"] .markdown-preview .wiki-link{color:#2f6795}
[data-theme="light"] .tag{background:#e7edf2;border-color:#d0dae2;color:#617384}
[data-theme="light"] .tag:hover{color:#234660;border-color:#91acbf}
[data-theme="light"] .tag-add{background:transparent}
[data-theme="light"] .writing-controls{background:#f1f5f7;border-color:#dce4e9}
[data-theme="light"] .format-btn,[data-theme="light"] .text-action{color:#63798d}
[data-theme="light"] .format-btn:hover,[data-theme="light"] .text-action:hover,[data-theme="light"] .text-action.preview-on{background:#dce7ef;color:#24455f}
[data-theme="light"] .editor-footer{border-color:#e1e7ed;color:#728392}
[data-theme="light"] .footer-separator{color:#bdc6ce}
[data-theme="light"] .insights{background:linear-gradient(180deg,#f4f7f9,#ecf1f5);border-color:#d4dce3}
[data-theme="light"] .insights-tabs,[data-theme="light"] .insight-section{border-color:#d9e1e7}
[data-theme="light"] .insights-tab,[data-theme="light"] .insights-close{color:#6e7e8f}
[data-theme="light"] .insights-tab.active,[data-theme="light"] .insights-tab:hover{background:#d9e5ed;color:#294258}
[data-theme="light"] .insight-section h3{color:#284156}
[data-theme="light"] .graph-svg line{stroke:#8696a5}
[data-theme="light"] .graph-svg .graph-node circle{fill:#9caaba;stroke:#536a7e}
[data-theme="light"] .graph-svg .graph-node.current circle{fill:#5593c8;stroke:#25608f}
[data-theme="light"] .graph-svg .graph-node text{fill:#3c5368}
[data-theme="light"] .graph-svg .graph-node:hover circle{fill:#75add7}
[data-theme="light"] .graph-svg .center-halo{fill:#6ba4d1;opacity:.14}
[data-theme="light"] .linked-item{color:#3c5165}
[data-theme="light"] .linked-item:hover{color:#0c4b7e}
[data-theme="light"] .linked-item .link-sub,[data-theme="light"] .linked-item .link-arrow{color:#8191a1}
[data-theme="light"] .empty-state,[data-theme="light"] .side-tip{color:#83909e}
[data-theme="light"] .detail-row{color:#6d7d8d;border-color:#dbe3e9}
[data-theme="light"] .detail-row span:last-child{color:#2b4257}
[data-theme="light"] .menu-popover{background:#fcfdff;border-color:#cedae3;box-shadow:0 20px 50px #233f5929}
[data-theme="light"] .menu-popover button{color:#34495b}
[data-theme="light"] .menu-popover button:hover{background:#e8eef3}
[data-theme="light"] .menu-popover button.danger-action{color:#b53a47}
[data-theme="light"] .modal{color:#22364a;background:#fbfcfd;border-color:#cbd6df;box-shadow:0 30px 90px #223b5250}
[data-theme="light"] .modal::backdrop{background:#24384a80}
[data-theme="light"] .modal-kicker,[data-theme="light"] .settings-section-label{color:#5b7f9e}
[data-theme="light"] .modal-description,[data-theme="light"] .fine-print{color:#6d8092}
[data-theme="light"] .cloud-state{background:#eaf1f6;border-color:#d4e1e9;color:#416482}
[data-theme="light"] .form-grid label{color:#64798b}
[data-theme="light"] .form-grid input{background:#fff;border-color:#cbd7e0;color:#253c51}
[data-theme="light"] .form-grid input:focus{border-color:#729bbb}
[data-theme="light"] .modal-actions .primary{background:#365f82;border-color:#365f82;color:#fff}
[data-theme="light"] .modal-actions .secondary{background:#e8eef3;border-color:#c8d6e0;color:#314c62}
[data-theme="light"] .form-feedback{color:#4b718e}
[data-theme="light"] .modal-rule{border-color:#d8e1e7}
[data-theme="light"] .fine-print code{color:#447da9}
[data-theme="light"] .sync-verification{background:linear-gradient(160deg,#e8f0f7,#eef3f8);border-color:#c7d8e7}
[data-theme="light"] .verify-header{color:#426c90}
[data-theme="light"] .verify-header svg{color:#527b9f}
[data-theme="light"] .verify-line,[data-theme="light"] .verify-help{border-color:#d0dfe9;color:#647f95}
[data-theme="light"] .verify-line strong{color:#2e4b64}
[data-theme="light"] .sync-now-button{background:#d5e4f0;border-color:#afc7da;color:#2e5777}
[data-theme="light"] .sync-now-button:not(:disabled):hover{background:#c6dced}
[data-theme="light"] .appearance-setting{background:#f0f4f7;border-color:#d4dfe7}
[data-theme="light"] .appearance-setting #theme-mode{color:#6b7f90}
[data-theme="light"] .appearance-button{background:#e1eaf1;border-color:#c3d2de;color:#345772}
[data-theme="light"] .appearance-button:hover{background:#d2e1ed}
[data-theme="light"] .toast{background:#dfeaf3;color:#25425b;box-shadow:0 12px 40px #25425b44}
@media(max-width:760px){
  [data-theme="light"] body{background:#f7fafc}
  [data-theme="light"] .mobile-nav{background:linear-gradient(165deg,#e9f0f6,#dce5ed 78%);border-color:#c6d3de;box-shadow:0 -12px 42px #7d9cb240}
  [data-theme="light"] .mobile-nav-btn{color:#57738b}
  [data-theme="light"] .mobile-nav-btn.active{background:#cbdae6;color:#21435f}
  [data-theme="light"] .mobile-nav-tail{border-color:#c1d1de}
  [data-theme="light"] .mobile-nav-tail::before{color:#70899e}
  [data-theme="light"] .mobile-new{background:#d4e1eb;border-color:#b6c7d5;color:#31536d}
  [data-theme="light"] .writing-controls,[data-theme="light"] .editor-footer{background:#f0f5f8ef;border-color:#dae5eb}
  [data-theme="light"] .sidebar{box-shadow:15px 0 45px #4560783b}
  [data-theme="light"] .mobile-note-title{color:#274052}
}
@media(max-width:420px){.appearance-setting{align-items:flex-start}.appearance-button{padding:9px 7px;font-size:10px}.verify-line{gap:8px}.verify-line strong{max-width:58%}}

/* MX Notes v3 — Obsidian-inspired typography, live rich editing, native-feeling UI */
:root{--sans:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;--mono:'IBM Plex Mono',monospace}
button,.note-tab,.menu-popover,.modal,.insights,.sidebar{ -webkit-tap-highlight-color:transparent}
button{transition:background-color .17s ease,color .17s ease, border-color .17s ease, transform .17s ease}
button:active{transform:scale(.975)}
.app-shell,.editor-pane,.sidebar,.insights{transition:grid-template-columns .23s ease,background-color .22s ease,opacity .2s ease}
body.panel-hidden .app-shell{grid-template-columns:58px 270px minmax(0,1fr)}
body.panel-hidden .insights{display:none!important}
body.panel-hidden #toggle-insights{background:var(--active);color:var(--ink)}
.desktop-tabbar{align-items:stretch;padding:0 10px 0 0;flex-shrink:0;overflow:hidden;gap:3px}
.open-tabs{display:flex;align-items:flex-end;flex:1;min-width:0;overflow-x:auto;scrollbar-width:thin;scrollbar-color:#30363c transparent;gap:5px;padding:7px 0 0 8px}
.note-tab{position:relative;display:flex;gap:8px;align-items:center;flex:0 0 auto;max-width:224px;min-width:125px;height:36px;background:transparent;color:#85909a;border:1px solid transparent;border-radius:10px 10px 0 0;padding:0 8px 0 12px;cursor:pointer}
.note-tab.active{background:#1e2328;border-color:#303840;border-bottom-color:#1e2328;color:#ebedef}
.note-tab:hover:not(.active){background:#191d22;color:#c4ccd3}
.note-tab svg{width:14px;height:14px;flex:none}
.note-tab-title{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:11.5px;font-weight:500}
.note-tab .tab-close{height:22px;width:22px;flex:none;border:0;background:transparent;border-radius:5px;color:#818b95;padding:4px;display:grid;place-items:center}
.note-tab .tab-close svg{width:12px;height:12px}
.note-tab .tab-close:hover{background:#303942;color:#fff}
.note-tab.active::after{content:'';position:absolute;left:12px;right:12px;bottom:-1px;height:2px;background:#8faccc;border-radius:2px}
.new-tab{padding:0;width:35px;height:35px;display:grid;place-items:center;align-self:flex-end;margin-bottom:2px;border-radius:7px}
.new-tab svg{width:17px;height:17px}
.new-tab:hover{background:#292f36}
.editor-toolbar{min-height:52px;gap:5px}
.editor-content{width:min(100%,790px);padding:45px 64px 35px}
.editor-eyebrow{font:600 10px/1.6 var(--sans);letter-spacing:1.3px;margin:0 0 18px}
.note-title-input{font:650 clamp(28px,2.5vw,37px)/1.3 var(--sans);letter-spacing:-1px;color:#edf0f3}
.under-title{margin-top:12px}
.rich-editor{position:relative;width:100%;outline:0;min-height:440px;margin:35px 0 0;padding:0 0 100px;color:#cdd4db;font:400 15.2px/1.86 var(--sans);letter-spacing:-.012em;white-space:normal;overflow-wrap:break-word;-webkit-user-select:text;user-select:text;caret-color:#b9cfea}
.rich-editor:empty:before{content:attr(data-placeholder);color:#687580;pointer-events:none}
.rich-editor:focus{color:#e4e7eb}
.rich-editor h1,.rich-editor h2,.rich-editor h3{color:#e9edf1;margin:26px 0 14px;font-weight:650;letter-spacing:-.025em;line-height:1.42}
.rich-editor h1{font-size:28px}.rich-editor h2{font-size:21px}.rich-editor h3{font-size:17px}
.rich-editor p{margin:0 0 16px;min-height:1.55em}
.rich-editor div{min-height:1.65em}
.rich-editor ul,.rich-editor ol{padding-left:24px;margin:7px 0 20px}
.rich-editor li{padding-left:5px;margin:5px 0}
.rich-editor blockquote{border-left:3px solid #607791;margin:22px 0;padding:4px 0 4px 18px;color:#aab5c0;font-style:italic}
.rich-editor a{color:#8cbde9;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.rich-editor a[data-note-id]{color:#a3c8f1;text-decoration:underline;text-decoration-style:dotted}
.rich-editor strong,.rich-editor b{font-weight:700;color:inherit}
.rich-editor code{background:#28313b;border-radius:4px;padding:2px 5px;font:13px var(--mono)}
.rich-editor [data-checklist="1"]{display:flex;gap:11px;align-items:flex-start}
.rich-editor [data-checkbox]{cursor:pointer;font:22px/1.45 var(--sans);color:#8faec9;flex:none;user-select:none}
.rich-editor [data-checkbox="1"]{color:#7bb797}
.editor-footer{height:31px}
.writing-controls{height:49px;gap:5px;padding:7px 25px;background:#15191d;border-color:#292e33}
.format-btn{height:33px;width:37px;min-width:36px;border-radius:8px;font-size:15px;color:#a4adb8;font-family:var(--sans)}
.format-btn:hover{background:#2b343c;color:#ecf2f8}
.format-btn:focus-visible{outline:2px solid #648ab4}
.format-btn.strong{font-weight:700}.format-btn.italic{font-style:italic}
.format-btn svg{width:17px;height:17px}
.format-btn.format-style{display:flex;align-items:center;justify-content:center;gap:3px;min-width:65px;width:65px;font-weight:650}
.style-symbol{font-size:17px;letter-spacing:-1px}
.format-btn.format-style svg{width:12px;height:12px}
.format-divider{width:1px;height:21px;background:#343b44;margin:0 7px}
.list-number{font-weight:650;font-size:15px}
.sidebar .note-item,.sidebar .folder-item{transition:background-color .16s,color .16s,transform .15s}
.sidebar .note-item:active,.sidebar .folder-item:active{transform:scale(.988)}
.note-star{color:#d5b989;font-size:12px}
.graph-container{height:335px!important;width:100%;overflow:visible}
.graph-svg{width:100%;height:100%;shape-rendering:geometricPrecision;text-rendering:geometricPrecision;filter:none!important;transform:none!important}
.graph-svg .graph-node text{font-family:var(--sans)!important;font-size:12.6px!important;font-weight:500!important;letter-spacing:0!important;fill:#d0d8e0!important;paint-order:stroke;stroke:none;text-shadow:none}
.graph-svg .graph-node circle{stroke-width:1.3}
.graph-svg .graph-node.current text{font-weight:650!important;fill:#ebf2f8!important}
.insight-section h3{font-size:12px;font-weight:600}
.insights-hide-button{border:0;border-top:1px solid var(--line);background:transparent;width:100%;height:42px;color:#84909d;font-size:11px;text-align:center;margin-top:auto}
.insights-hide-button:hover{color:var(--ink);background:var(--hover)}
.insights-close{display:grid}
.insights-tabs .insights-close{width:36px}
.menu-popover{padding:7px;width:240px;left:0;right:auto;top:0;min-width:205px;opacity:0;transform:translateY(-5px) scale(.98);transform-origin:top left;pointer-events:none;transition:opacity .13s ease,transform .16s cubic-bezier(.2,1,.3,1);box-shadow:0 18px 60px #0009;z-index:45;max-height:calc(100dvh - 16px);overflow-y:auto}
.menu-popover.visible{opacity:1;pointer-events:auto;transform:translateY(0) scale(1)}
.menu-popover button{font-size:12px;font-weight:450;height:35px;padding:7px 10px;gap:11px}
.menu-popover button svg{width:15px;height:15px}
.context-divider{height:1px;background:#303944;margin:5px 3px}
.style-popover{width:175px;min-width:175px;z-index:46;opacity:1;transform:none;pointer-events:auto}
.style-popover button{height:36px}
.modal{transition:opacity .18s ease,transform .18s cubic-bezier(.22,1,.36,1)}
.modal[open]{animation:modal-in .18s cubic-bezier(.22,1,.36,1) both}
@keyframes modal-in{from{opacity:0;transform:translateY(10px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}
.action-dialog{width:min(92vw,410px);padding:26px}
.action-dialog h2{font-size:17px;margin:0 0 20px}
.action-dialog .dialog-label{font-size:11px;color:#a5b5c6;display:block;margin-bottom:9px}
.action-dialog #action-input{width:100%;background:#101418;border:1px solid #3a4856;border-radius:10px;outline:0;color:#edf1f4;padding:12px 13px;font-size:13px}
.action-dialog #action-input:focus{border-color:#759ec6;box-shadow:0 0 0 3px #759ec61c}
.action-dialog #confirm-text{color:#aebbc7;font-size:12px;line-height:1.65}
.dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:22px}
.dialog-actions button{height:37px;border-radius:9px;padding:0 16px;border:1px solid #3b4855;font-size:12px}
.dialog-actions .primary{background:#c0d4e5;color:#1d3244;border-color:#c0d4e5;font-weight:650}
.dialog-actions .secondary{background:#242c34;color:#c7d1db}
.dialog-actions .danger-button{background:#9e4550;color:white;border-color:#b85f6c}
.dialog-actions button:hover{filter:brightness(1.11)}
[data-theme="light"] .note-tab.active{background:#f7fafc;border-color:#cbd6df;color:#274057}
[data-theme="light"] .note-tab.active::after{background:#4779aa}
[data-theme="light"] .note-tab:not(.active){color:#6e8193}
[data-theme="light"] .note-tab:hover{background:#e7eef4}
[data-theme="light"] .note-tab .tab-close:hover{background:#dce7f0;color:#1e415e}
[data-theme="light"] .new-tab:hover{background:#e2eaf1}
[data-theme="light"] .note-title-input{color:#233a50}
[data-theme="light"] .rich-editor{color:#324759}
[data-theme="light"] .rich-editor:focus{color:#243b4f}
[data-theme="light"] .rich-editor:empty:before{color:#95a4b1}
[data-theme="light"] .rich-editor h1,[data-theme="light"] .rich-editor h2,[data-theme="light"] .rich-editor h3{color:#243b50}
[data-theme="light"] .rich-editor blockquote{color:#6f8193;border-color:#a5bbc9}
[data-theme="light"] .rich-editor a{color:#346da0}
[data-theme="light"] .rich-editor code{background:#e0eaf1}
[data-theme="light"] .writing-controls{background:#eff4f7;border-color:#d9e2e9}
[data-theme="light"] .format-btn{color:#627d92}
[data-theme="light"] .format-btn:hover{background:#dce7ef;color:#244c6a}
[data-theme="light"] .format-divider{background:#c8d7e2}
[data-theme="light"] .graph-svg .graph-node text{fill:#3b546b!important}
[data-theme="light"] .graph-svg .graph-node.current text{fill:#204665!important}
[data-theme="light"] .insights-hide-button{border-color:#dce4ea;color:#698094}
[data-theme="light"] .insights-hide-button:hover{background:#e0ebf3}
[data-theme="light"] .context-divider{background:#d9e1e8}
[data-theme="light"] .action-dialog #action-input{background:#fff;border-color:#cad6df;color:#2c4356}
[data-theme="light"] .action-dialog .dialog-label,[data-theme="light"] .action-dialog #confirm-text{color:#748799}
[data-theme="light"] .dialog-actions .secondary{background:#e7eff5;color:#42627b;border-color:#cbd9e4}
[data-theme="light"] .dialog-actions .primary{background:#365f82;color:white;border-color:#365f82}
@media(max-width:1200px){body.panel-hidden .app-shell{grid-template-columns:53px 242px minmax(0,1fr)}}
@media(max-width:1010px){
  body.panel-hidden .app-shell{grid-template-columns:54px 252px minmax(0,1fr)}
  .insights{z-index:28}
  .insights.open{display:flex}
}
@media(max-width:760px){
  html,body{overflow:hidden}
  .app-shell{width:100%;height:100dvh;margin:0;border:0;border-radius:0}
  .editor-pane{height:100dvh;padding-bottom:calc(113px + env(safe-area-inset-bottom,0px))}
  .editor-toolbar{padding:calc(env(safe-area-inset-top,0px) + 6px) 13px 0;min-height:64px;gap:3px}
  .mobile-menu{width:34px}
  .mobile-note-title{font:550 14px var(--sans);max-width:40vw}
  .sync-button{font-size:9px;gap:1px;padding:0 4px}
  .sync-button svg{width:19px;height:19px}
  #toggle-insights{display:none}
  .editor-content{padding:30px 22px 20px}
  .editor-eyebrow{font-size:9px;letter-spacing:1.1px;margin-bottom:13px}
  .note-title-input{font:650 clamp(27px,7vw,34px)/1.3 var(--sans);letter-spacing:-.8px}
  .under-title{margin-top:8px;font-size:10px}
  .rich-editor{font:400 15.8px/1.85 var(--sans);margin-top:28px;padding-bottom:30px;min-height:calc(100dvh - 260px)}
  .rich-editor h1{font-size:26px}.rich-editor h2{font-size:21px}
  .rich-editor p{margin-bottom:13px}
  .writing-controls{position:absolute;bottom:calc(60px + env(safe-area-inset-bottom,0px));left:0;right:0;height:53px;display:flex;justify-content:space-between;gap:1px;padding:7px 9px;background:#191e23eb;backdrop-filter:blur(22px);border-top:1px solid #303943}
  .format-btn{min-width:32px;width:34px;height:37px;font-size:14px}
  .format-btn.format-style{min-width:53px;width:53px;font-size:15px}
  .format-divider{margin:0 2px}
  .writing-spacer{flex:1}
  .editor-footer{display:none}
  .mobile-nav{display:flex;align-items:center;justify-content:space-around;gap:1px;height:calc(60px + env(safe-area-inset-bottom,0px));padding:3px 9px env(safe-area-inset-bottom,0px);bottom:0;grid-template-columns:none;grid-template-rows:none;border-radius:17px 17px 0 0}
  .mobile-nav-btn{flex:1;min-width:0;align-items:center;justify-content:center;gap:2px;height:51px;padding:3px;border-radius:9px;font-size:9px;line-height:1.2}
  .mobile-nav-btn svg{width:19px;height:19px}
  .mobile-nav-tail{display:none}
  .mobile-create{background:#303945;border:1px solid #45505e;flex:0 0 52px}
  .mobile-create svg{width:20px;height:20px}
  .editor-scroll{scrollbar-width:none}
  .insights{position:fixed;top:0;right:0;bottom:0;width:min(100%,405px)}
  .insights-tabs{min-height:64px;padding-top:env(safe-area-inset-top,0px);height:calc(64px + env(safe-area-inset-top,0px))}
  .insights-hide-button{margin-top:auto}
  .graph-container{height:365px!important}
  .menu-popover{max-width:calc(100vw - 16px)}
  .editing .mobile-nav{display:none}
  .editing .editor-pane{padding-bottom:calc(53px + env(safe-area-inset-bottom,0px))}
  .editing .writing-controls{bottom:env(safe-area-inset-bottom,0px)}
  .editing .rich-editor{min-height:calc(100dvh - 210px)}
  body.focus-mode .editor-pane{padding-bottom:0}
  body.focus-mode .writing-controls{display:flex}
  body.focus-mode .mobile-nav{display:none}
  body.focus-mode #focus-button{display:grid}
  [data-theme="light"] .mobile-nav{background:linear-gradient(165deg,#e7eef5,#dce7ef 80%)}
  [data-theme="light"] .mobile-create{background:#c6d9e8;border-color:#adc7d9;color:#2d597a}
  [data-theme="light"] .writing-controls{background:#edf4f9ed;border-color:#d0dee8}
}
@media(max-width:360px){
  .editor-content{padding-left:17px;padding-right:17px}
  .mobile-note-title{max-width:33vw}
  .format-btn{width:30px;min-width:30px}
  .format-btn.format-style{min-width:46px;width:46px}
  .format-divider{margin:0 1px}
}


/* MX Notes — quiet, wide Apple Notes-inspired reading surface */
:root{
  --writing-font:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
[data-writing-font="obsidian"]{--writing-font:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
[data-writing-font="reading"]{--writing-font:Georgia,"Times New Roman",serif}
.app-shell,
body.panel-hidden .app-shell{grid-template-columns:58px 270px minmax(0,1fr)}
.editor-pane{
  background:radial-gradient(ellipse 100% 76% at 26% 40%,#16191c 0%,#111417 95%);
}
.editor-content,body.focus-mode .editor-content{
  max-width:none;width:100%;margin:0;
  padding:36px clamp(20px,2.7vw,42px) 45px;
}
.note-title-input,.rich-editor{
  width:100%;text-align:start;unicode-bidi:plaintext;
  font-family:var(--writing-font);
}
.note-title-input{font-size:clamp(29px,2.6vw,39px);letter-spacing:-.035em;line-height:1.27}
.rich-editor{
  max-width:100%;min-height:55vh;line-height:1.84;
  margin-top:26px;font-size:15.6px;
  overflow-wrap:anywhere;white-space:normal;tab-size:4;
}
.rich-editor p,.rich-editor div,.rich-editor h1,.rich-editor h2,.rich-editor h3,
.rich-editor li,.rich-editor blockquote{text-align:start;unicode-bidi:plaintext}
.rich-editor ul,.rich-editor ol{padding-inline-start:1.5em;padding-left:unset}
.rich-editor blockquote{border-inline-start:3px solid #607791;border-left:0;padding-inline-start:17px;padding-left:0}
.editor-eyebrow{opacity:.85}
.editor-scroll{scroll-behavior:auto}
.rail{align-items:center}
#rail-settings{
  width:41px;height:41px;border:1px solid #343c45;border-radius:13px;
  background:linear-gradient(150deg,#2b333c,#1b2128 76%);
  box-shadow:inset 0 1px 0 #ffffff16,0 4px 16px #0004;
  color:#bfcfe2;transition:background-color .18s,border-color .18s,transform .18s;
}
#rail-settings:hover{border-color:#59738e;color:#f4f8ff;transform:translateY(-1px)}
#rail-settings svg{width:21px;height:21px}
#toggle-notes-list{
  border:0;background:transparent;display:flex;align-items:center;gap:6px;
  padding:7px 0;color:inherit;cursor:pointer;font-size:inherit;letter-spacing:inherit;font-weight:inherit;
}
#toggle-notes-list svg,.note-group-toggle svg,.note-expand svg{
  width:13px;height:13px;transition:transform .22s cubic-bezier(.2,.9,.2,1)
}
#toggle-notes-list.collapsed svg,.note-group-toggle.collapsed svg{transform:rotate(-90deg)}
.note-group{margin:4px 5px 9px}
.note-group-toggle{
  display:flex;width:100%;height:34px;gap:8px;align-items:center;
  padding:0 11px;border:0;border-radius:9px;background:transparent;
  font-size:11px;font-weight:600;color:#929faa;text-align:start;
}
.note-group-toggle:hover{background:#20262d;color:#dbe4ee}
.note-group-toggle .count{margin-inline-start:auto;opacity:.75}
.note-group-items{display:flex;flex-direction:column;padding:1px 0 4px 13px}
.note-row{position:relative;min-width:0;border-radius:9px;margin:1px 0;transition:background-color .18s}
.note-row:hover{background:#1c232a}
.note-row-top{display:flex;align-items:center;min-width:0}
.note-row .note-item{flex:1;min-width:0;margin:0 0 0 0;padding-inline:9px 2px}
.note-row .note-name{text-align:start;overflow:hidden;text-overflow:ellipsis}
.note-expand{
  display:grid;place-items:center;width:29px;height:32px;flex:none;
  background:transparent;border:0;border-radius:8px;color:#798794;
}
.note-expand:hover{background:#2a343d;color:#dbe8f2}
.note-expand.expanded svg{transform:rotate(180deg)}
.note-preview{
  font-size:11px;color:#95a3af;line-height:1.55;
  padding:5px 15px 10px 29px;text-align:start;
  overflow-wrap:anywhere;white-space:pre-wrap;
  animation:mx-fade-in .16s ease both;
}
@keyframes mx-fade-in{from{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:translateY(0)}}
.desktop-tabbar,.open-tabs{user-select:none}
.note-tab{transition:background-color .16s,color .16s,border-color .16s}
.note-tab-title{direction:auto;unicode-bidi:plaintext;text-align:start}
.menu-popover{
  border-radius:13px;border-color:#3a4550;background:#1a2027f2;
  backdrop-filter:blur(22px);-webkit-backdrop-filter:blur(22px);
  padding:7px;max-width:min(310px,calc(100vw - 20px));
}
.menu-popover button{min-height:36px;height:auto;padding:9px 11px;border-radius:8px;font-size:12px;line-height:1.35}
.menu-popover button:hover{background:#303e4d;color:#f6f9fc}
.modal{border-radius:19px;box-shadow:0 24px 95px #000b}
.modal-head{margin-bottom:17px}
.modal-description,.fine-print{display:none!important}
.font-setting{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:14px 15px;margin:0 0 18px;
  border:1px solid #353c45;border-radius:11px;background:#1a2026;
}
.font-setting-copy{display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.font-setting-copy strong{font-size:13px;font-weight:600;margin-top:5px}
.font-setting-copy small{color:#97a4b1;font-size:11px}
.font-setting select{
  min-width:152px;max-width:58%;min-height:39px;border-radius:9px;
  background:#2b343e;border:1px solid #43505d;color:#e6ebf1;
  font-size:12px;padding:9px 28px 9px 10px;cursor:pointer;
}
[data-theme="light"] .editor-pane{background:radial-gradient(ellipse 90% 72% at 26% 36%,#fff 0%,#f8fafb 94%)}
[data-theme="light"] #rail-settings{background:linear-gradient(150deg,#fdfefe,#dde7ef);color:#526b80;border-color:#b8cbd9;box-shadow:0 4px 12px #718aa223}
[data-theme="light"] .note-group-toggle{color:#698091}
[data-theme="light"] .note-group-toggle:hover,[data-theme="light"] .note-row:hover{background:#e4edf4}
[data-theme="light"] .note-expand{color:#77899b}
[data-theme="light"] .note-preview{color:#6d8496}
[data-theme="light"] .font-setting{background:#f0f4f7;border-color:#d4dfe7}
[data-theme="light"] .font-setting-copy small{color:#6b7f90}
[data-theme="light"] .font-setting select{background:#fff;color:#324d64;border-color:#c3d2de}
[data-theme="light"] .menu-popover{background:#f9fbfdf5;border-color:#cbd7e2}
[data-theme="light"] .menu-popover button:hover{background:#e4edf5;color:#203d55}
@media(max-width:1200px){
  .app-shell,body.panel-hidden .app-shell{grid-template-columns:53px 242px minmax(0,1fr)}
}
@media(max-width:1010px) and (min-width:761px){
  .app-shell,body.panel-hidden .app-shell{grid-template-columns:54px 252px minmax(0,1fr)}
}
@media(max-width:760px){
  .app-shell,body.panel-hidden .app-shell{display:block;grid-template-columns:none}
  .editor-pane{background:var(--shell)}
  .editor-content,body.focus-mode .editor-content{width:100%;padding:27px 18px 22px}
  .note-title-input{font-size:clamp(26px,7vw,35px);letter-spacing:-.025em}
  .rich-editor{margin-top:22px;font-size:15.6px;line-height:1.85;min-height:calc(100dvh - 265px)}
  .mobile-nav{padding-inline:5px;gap:0}
  .mobile-nav-btn{font-size:9px;gap:3px;min-width:0;padding-inline:1px}
  .mobile-nav-btn svg{width:19px;height:19px}
  .font-setting{flex-direction:column;align-items:stretch;gap:10px}
  .font-setting select{max-width:100%;width:100%}
  .sidebar{will-change:transform}
  .menu-popover{width:min(260px,calc(100vw - 16px))}
  .note-group{margin-inline:7px}
}
@media(prefers-reduced-motion:reduce){.note-preview{animation:none!important}}
