/* Scoped to Taclen's document editor; the original Groot form stays available. */
html[data-design="taclen"] .nw-reader:has(#ne-editor) { padding:0; }
@media(min-width:1024px) {
 html:has(body.ne-open) { overflow:clip; }
 html[data-design="taclen"] #notes-workspace:has(#ne-editor) { grid-template-columns:300px minmax(0,1fr); overflow:clip; }
 html[data-design="taclen"] #notes-workspace:has(#ne-editor) .nw-layout { display:none; }
 html[data-design="taclen"] #notes-workspace:has(#ne-editor) .nw-select { flex:1; }
 html[data-design="taclen"] #notes-workspace:has(#ne-editor) .nw-select select { width:100%; max-width:100%; padding:0 6px; font-size:12px; }
}
html[data-design="taclen"] #ne-editor { min-width:0; min-height:100%; color:var(--text-primary); }
html[data-design="taclen"] .ne-header { display:flex; align-items:center; gap:12px; position:sticky; top:0; min-height:64px; padding:12px 22px; border-bottom:1px solid var(--separator); background:var(--bg-card); z-index:20; }
html[data-design="taclen"] #ne-editor button, html[data-design="taclen"] #ne-editor select { font:inherit; cursor:pointer; color:var(--text-primary); }
html[data-design="taclen"] #ne-editor button:disabled { cursor:default; opacity:.45; }
html[data-design="taclen"] #ne-editor :focus-visible { outline:2px solid var(--ios-blue); outline-offset:3px; }
html[data-design="taclen"] #ne-editor [hidden] { display:none !important; }
html[data-design="taclen"] .ne-header > button { border:0; background:transparent; padding:6px 10px; min-height:40px; border-radius:8px; }
html[data-design="taclen"] .ne-header #nw-back { display:inline-flex; align-items:center; gap:8px; color:var(--text-secondary); }
html[data-design="taclen"] #ne-state { margin-left:auto; font-size:12px; color:var(--text-secondary); min-width:0; overflow-wrap:anywhere; }
html[data-design="taclen"] #ne-state[data-state="dirty"]::before { content:'●'; color:var(--ios-blue); margin-right:6px; }
html[data-design="taclen"] #ne-state[data-state="error"] { color:var(--ios-red); }
html[data-design="taclen"] .ne-header #ne-save { flex-shrink:0; background:var(--ios-blue); color:var(--tc-on-accent); padding:9px 16px; }
html[data-design="taclen"] .ne-menu { position:relative; }
html[data-design="taclen"] .ne-menu summary { display:grid; place-items:center; list-style:none; min-width:36px; height:40px; cursor:pointer; font-size:24px; }
html[data-design="taclen"] .ne-menu summary::-webkit-details-marker { display:none; }
html[data-design="taclen"] .ne-menu > div { position:absolute; right:0; top:44px; width:225px; background:var(--sheet-bg); border:1px solid var(--separator); border-radius:10px; padding:6px; box-shadow:0 10px 30px #0003; }
html[data-design="taclen"] .ne-menu button { display:block; width:100%; min-height:42px; padding:9px 10px; text-align:left; background:transparent; border:0; border-radius:6px; }
html[data-design="taclen"] .ne-menu button:hover { background:var(--fill-secondary); }
html[data-design="taclen"] .ne-menu [data-ne="delete"] { color:var(--ios-red); }
html[data-design="taclen"] .ne-document { max-width:1100px; margin:0 auto; padding:24px 26px 32px; }
html[data-design="taclen"] #ne-editor #nw-reader-title { display:block; width:100%; min-width:0; border:0; border-radius:0; background:transparent; color:var(--text-primary); font:inherit; font-size:clamp(25px,2.2vw,36px); font-weight:700; line-height:1.25; letter-spacing:-.6px; resize:none; overflow:hidden; margin:0 0 14px; padding:0; user-select:text; -webkit-user-select:text; }
html[data-design="taclen"] #nw-reader-title::placeholder { color:var(--text-secondary); }
html[data-design="taclen"] .ne-meta { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:24px; color:var(--text-secondary); font-size:12px; }
html[data-design="taclen"] .ne-meta label { display:flex; align-items:center; gap:6px; border:1px solid var(--separator); border-radius:8px; min-height:36px; padding:0 9px; max-width:100%; }
html[data-design="taclen"] .ne-meta select { border:0; background:transparent; min-height:36px; min-width:0; max-width:180px; font-size:13px; }
html[data-design="taclen"] .ne-meta option { background:var(--sheet-bg); color:var(--text-primary); }
html[data-design="taclen"] #ne-modified { font-size:12px; }
html[data-design="taclen"] .ne-toolbar { position:sticky; top:65px; display:flex; align-items:center; gap:3px; border:1px solid var(--separator); border-radius:10px; padding:6px; background:var(--bg-card); z-index:10; overflow-x:auto; scrollbar-width:thin; }
html[data-design="taclen"] .ne-toolbar button { flex:0 0 36px; min-height:36px; padding:6px; border:0; border-radius:7px; background:transparent; font-size:18px; }
html[data-design="taclen"] .ne-toolbar button[aria-pressed="true"] { color:var(--ios-blue); background:var(--fill-secondary); }
html[data-design="taclen"] .ne-toolbar select { flex:0 0 88px; width:88px; min-height:36px; padding:4px; background:transparent; border:0; border-right:1px solid var(--separator); font-size:13px; }
html[data-design="taclen"] .ne-content { padding:22px 0; min-height:280px; border:0; }
html[data-design="taclen"] .ne-content .tiptap { min-height:260px; outline:0; font-size:16px; line-height:1.7; white-space:pre-wrap; user-select:text; -webkit-user-select:text; overflow-wrap:anywhere; }
html[data-design="taclen"] .ne-content .tiptap * { user-select:text; -webkit-user-select:text; }
html[data-design="taclen"] .ne-content .tiptap h1 { font-size:28px; line-height:1.3; margin:20px 0 14px; }
html[data-design="taclen"] .ne-content .tiptap h2 { font-size:23px; line-height:1.4; margin:20px 0 12px; }
html[data-design="taclen"] .ne-content .tiptap h3 { font-size:19px; line-height:1.4; margin:18px 0 10px; }
html[data-design="taclen"] .ne-content .tiptap p { margin:0 0 14px; }
html[data-design="taclen"] .ne-content .tiptap > :first-child { margin-top:0; }
html[data-design="taclen"] .ne-content .tiptap ul, html[data-design="taclen"] .ne-content .tiptap ol { padding-left:26px; }
html[data-design="taclen"] .ne-content .tiptap ul[data-type="taskList"] { padding-left:0; list-style:none; }
html[data-design="taclen"] .ne-content .tiptap li[data-checked] { display:flex; align-items:flex-start; gap:10px; margin-bottom:8px; }
html[data-design="taclen"] .ne-content .tiptap li[data-checked] > div { flex:1; min-width:0; }
html[data-design="taclen"] .ne-content .tiptap li[data-checked] > label { padding-top:3px; }
html[data-design="taclen"] .ne-content input[type="checkbox"] { width:18px; height:18px; accent-color:var(--ios-blue); }
html[data-design="taclen"] .ne-content blockquote { border-left:3px solid var(--ios-blue); margin:20px 0; padding:8px 16px; }
html[data-design="taclen"] .ne-content pre { white-space:pre-wrap; overflow-wrap:anywhere; }
html[data-design="taclen"] .ne-content table { display:block; width:100%; max-width:100%; overflow-x:auto; table-layout:auto; }
html[data-design="taclen"] .ne-content a { color:var(--ios-blue); }
html[data-design="taclen"] #ne-source { display:block; width:100%; min-height:300px; padding:22px 0; border:0; background:transparent; color:var(--text-primary); font:16px/1.7 ui-monospace,monospace; resize:none; overflow:hidden; user-select:text; -webkit-user-select:text; }
html[data-design="taclen"] #ne-source[data-format="text"] { font-family:inherit; }
html[data-design="taclen"] #ne-notice { color:var(--text-secondary); line-height:1.5; font-size:13px; margin-top:14px; }
html[data-design="taclen"] #ne-notice:empty, html[data-design="taclen"] #ne-file-error:empty { display:none; }
html[data-design="taclen"] #ne-file-list { display:flex; align-items:flex-start; flex-wrap:wrap; gap:10px; }
html[data-design="taclen"] .ne-file { display:flex; align-items:center; gap:8px; max-width:100%; min-height:46px; padding:8px 10px; margin-bottom:10px; background:var(--fill-secondary); border:1px solid var(--separator); border-radius:10px; }
html[data-design="taclen"] .ne-file img { width:34px; height:34px; object-fit:cover; border-radius:5px; }
html[data-design="taclen"] .ne-file a { min-width:0; overflow-wrap:anywhere; font-size:13px; color:var(--text-primary); text-decoration:none; }
html[data-design="taclen"] .ne-file button { width:32px; min-height:32px; flex-shrink:0; border:0; background:transparent; color:var(--text-secondary); }
html[data-design="taclen"] .ne-attach { min-height:44px; padding:8px 16px; border:1px solid var(--separator); border-radius:10px; background:transparent; }
html[data-design="taclen"] #ne-file-error { color:var(--ios-red); font-size:13px; line-height:1.5; }
html[data-design="taclen"] #ne-count { margin-top:28px; font-size:12px; color:var(--text-secondary); }
html[data-design="taclen"] .nw-reader.ne-full { position:fixed; inset:16px; z-index:180; padding:0; border:1px solid var(--separator); border-radius:12px; background:var(--bg-card); }
.ne-dialog { width:min(460px,calc(100% - 24px)); max-height:calc(100dvh - 24px); overflow:auto; margin:auto; padding:22px; border:1px solid var(--separator); border-radius:14px; background:var(--sheet-bg); color:var(--text-primary); }
.ne-dialog::backdrop { background:#0007; }
.ne-dialog h2 { font-size:22px; margin-bottom:12px; }
.ne-dialog p { font-size:14px; line-height:1.6; margin-bottom:14px; }
.ne-dialog footer { display:flex; gap:8px; justify-content:flex-end; flex-wrap:wrap; margin-top:16px; }
.ne-dialog button { min-height:44px; padding:8px 12px; border:1px solid var(--separator); border-radius:8px; background:var(--bg-card); color:var(--text-primary); font:inherit; cursor:pointer; }
.ne-dialog [data-leave="save"], .ne-dialog button[type="submit"] { background:var(--ios-blue); color:var(--tc-on-accent,#fff); border-color:var(--ios-blue); }
.ne-dialog label { display:block; font-size:14px; margin:12px 0; }
.ne-dialog input { display:block; width:100%; margin-top:6px; padding:10px; border:1px solid var(--separator); border-radius:8px; background:var(--bg-card); color:var(--text-primary); font:inherit; user-select:text; }
@media(max-width:1023px) {
 html[data-design="taclen"] body.ne-open :is(#ios-header,#ios-tab-bar,.ai-fab) { display:none !important; }
 html[data-design="taclen"] body.ne-open .nw-reader { position:fixed; inset:0; display:block; overflow-y:auto; z-index:150; padding:0; background:var(--bg-primary); border:0; border-radius:0; overscroll-behavior:contain; }
 html[data-design="taclen"] .ne-header { padding:calc(8px + env(safe-area-inset-top,0px)) 12px 8px; gap:8px; flex-wrap:wrap; }
 html[data-design="taclen"] .ne-header #nw-back { padding:4px; }
 html[data-design="taclen"] .ne-header #nw-back span { display:none; }
 html[data-design="taclen"] .ne-header [data-ne="expand"] { display:none; }
 html[data-design="taclen"] #ne-state { flex:1; margin:0; font-size:11px; }
 html[data-design="taclen"] .ne-header #ne-save { padding:9px 12px; min-height:44px; }
 html[data-design="taclen"] .ne-document { padding:22px 18px calc(100px + var(--ne-keyboard-bottom,0px) + env(safe-area-inset-bottom,0px)); }
 html[data-design="taclen"] #ne-editor #nw-reader-title { font-size:28px; }
 html[data-design="taclen"] .ne-meta { gap:8px; margin-bottom:16px; }
 html[data-design="taclen"] .ne-meta label { flex:1; padding:0 7px; }
 html[data-design="taclen"] .ne-meta select { width:100%; max-width:140px; }
 html[data-design="taclen"] #ne-modified { width:100%; }
 html[data-design="taclen"] .ne-toolbar { position:fixed; top:auto; bottom:var(--ne-keyboard-bottom,0px); left:0; right:0; z-index:170; border-radius:0; padding:6px 10px calc(6px + env(safe-area-inset-bottom,0px)); border-width:1px 0 0; }
 html[data-design="taclen"] .ne-toolbar button { flex-basis:40px; min-height:44px; }
 html[data-design="taclen"] .ne-content .tiptap { min-height:240px; }
 html[data-design="taclen"] .ne-file { width:100%; }
 html[data-design="taclen"] .ne-file a { flex:1; }
}

html[data-design="taclen"] .ne-content :is(th,td) { min-width:96px; word-break:normal; overflow-wrap:break-word; }
html[data-design="taclen"] .ne-content :is(th,td):first-child { min-width:160px; }
