:root { font-family: Inter, 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-synthesis: none; color: #293932; background: #f6f6f2; font-size: 13px; } * { box-sizing: border-box; } body { margin: 0; } button, input { font: inherit; } button { cursor: pointer; } button, a, input { outline-offset: 4px; } button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid #448267; } button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; background: transparent; color: inherit; border-radius: 6px; } button:hover { background: var(--hover); } .app { --bg: #fff; --canvas: #fbfbf9; --sidebar: #f3f4ef; --text: #293932; --muted: #7d867f; --line: #e6e9e3; --hover: #e9eee7; --accent: #326c52; --active: #e3ebe0; display: flex; height: 100dvh; min-height: 500px; color: var(--text); background: var(--canvas); } .dark { --bg: #1d2522; --canvas: #19201d; --sidebar: #151d19; --text: #d6e2d9; --muted: #9aa79f; --line: #334139; --hover: #2b3c31; --accent: #8bc5a6; --active: #2a4133; color-scheme: dark; } .sidebar { width: 240px; flex-shrink: 0; padding: 32px 20px 20px; background: var(--sidebar); border-right: 1px solid var(--line); display: flex; flex-direction: column; } .brand { display: flex; align-items: center; color: var(--text); text-decoration: none; font-size: 24px; font-weight: 700; letter-spacing: -1px; padding: 0 10px; margin-bottom: 47px; } .brand-mark { display: grid; place-items: center; width: 34px; height: 34px; margin-right: 10px; border-radius: 10px; background: #326c52; color: white; } .brand-dot { color: var(--accent); } .workspace-label { font-size: 11px; color: var(--muted); padding: 0 10px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; } .workspace-label span { font-size: 8px; letter-spacing: 1px; border: 1px solid var(--line); padding: 2px 4px; border-radius: 4px; } .nav-item { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--active); border-radius: 7px; color: var(--accent); font-weight: 500; } .nav-item > span { margin-left: auto; font-size: 11px; } .section-label { font-size: 10px; color: var(--muted); margin: 29px 10px 15px; letter-spacing: 1px; } .document-item { padding: 10px; display: flex; align-items: center; gap: 8px; font-size: 12px; } .document-item > span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .active-dot { height: 5px; width: 5px; background: var(--accent); border-radius: 50%; margin-left: auto; flex-shrink: 0; } .sidebar-note { margin-top: auto; padding: 30px 12px 36px; } .note-line { display: block; width: 24px; height: 2px; background: #9cae98; } .sidebar-note p { font-size: 18px; line-height: 1.9; letter-spacing: 1px; font-family: Georgia, 'Songti SC', serif; margin: 17px 0 10px; } .sidebar-note small { color: var(--muted); font-size: 10px; letter-spacing: 1px; } .local-badge { border-top: 1px solid var(--line); padding: 20px 9px 0; color: var(--muted); font-size: 10px; display: flex; align-items: center; gap: 7px; } .local-badge > span { width: 6px; height: 6px; background: #7c9477; border-radius: 50%; } .workspace { flex: 1; min-width: 0; display: flex; flex-direction: column; } .topbar { height: 70px; flex-shrink: 0; padding: 0 34px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); gap: 16px; } .breadcrumbs { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 11px; min-width: 0; } .breadcrumbs strong { font-weight: 500; color: var(--text); max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .slash { color: #b4bbb4; } .icon-button { width: 30px; height: 32px; color: var(--muted); } .header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; } .text-button { padding: 8px 10px; font-size: 11px; } .export-button { padding: 9px 13px; background: #326c52; color: #fff; font-size: 11px; } .export-button:hover { background: #255840; } .document-heading { display: flex; align-items: center; justify-content: space-between; padding: 32px 36px 28px; gap: 20px; } .eyebrow { font-size: 9px; letter-spacing: 2px; color: var(--muted); margin-bottom: 10px; } .title-label input { width: min(400px, 35vw); background: transparent; border: 0; color: var(--text); font-size: 27px; font-weight: 600; letter-spacing: -0.8px; padding: 0 0 10px; } .save-label { display: flex; gap: 7px; align-items: center; color: var(--muted); font-size: 10px; } .status-dot { width: 5px; height: 5px; border-radius: 50%; background: #709574; } .status-dot.pending { background: #c59742; } .meta-separator { margin: 0 7px; color: var(--muted); } .view-switch { display: flex; padding: 4px; background: var(--sidebar); border: 1px solid var(--line); border-radius: 8px; align-self: flex-end; } .view-switch button { font-size: 11px; padding: 7px 10px; color: var(--muted); } .view-switch button[aria-pressed='true'] { background: var(--bg); color: var(--accent); box-shadow: 0 1px 3px #0000000c; } .editor-shell { display: flex; flex: 1; min-height: 0; margin: 0 34px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); } .editor-column, .preview-column { width: 50%; min-width: 0; display: flex; flex-direction: column; } .editor-column { border-right: 1px solid var(--line); } [hidden] { display: none !important; } .mode-edit .editor-column, .mode-preview .preview-column { width: 100%; border-right: 0; } .pane-label { height: 41px; padding: 0 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; background: var(--canvas); color: var(--muted); flex-shrink: 0; } .pane-label > span { display: flex; align-items: center; gap: 7px; font-size: 10px; } .pane-label > span + span { font-size: 8px; letter-spacing: 1px; } .live-label > span { height: 4px; width: 4px; background: #79a17f; border-radius: 50%; } .source-pane { display: flex; flex-direction: column; flex: 1; min-height: 0; } .format-toolbar { display: flex; align-items: center; gap: 3px; height: 43px; padding: 0 12px; border-bottom: 1px solid var(--line); flex-shrink: 0; } .format-toolbar button { height: 27px; width: 28px; color: var(--muted); } .toolbar-hint { margin-left: auto; font-size: 9px; color: var(--muted); } .code-area { overflow: auto; flex: 1; padding: 17px 8px 30px 0; font-size: 12px; line-height: 1.9; } .cm-editor { background: transparent !important; } .cm-scroller { font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace !important; } .cm-gutters { background: transparent !important; border: 0 !important; color: #aeb7ad !important; min-width: 42px; } .cm-content { padding: 0 10px !important; } .cm-focused { outline: none !important; } .preview-scroll { overflow: auto; flex: 1; scroll-behavior: smooth; } .markdown-body { padding: 30px 35px 60px; line-height: 1.95; font-size: 13px; overflow-wrap: anywhere; } .markdown-body > :first-child { margin-top: 0; } .markdown-body h1 { font-size: 27px; line-height: 1.5; letter-spacing: -1px; margin-bottom: 20px; } .markdown-body h2 { font-size: 18px; margin: 30px 0 12px; letter-spacing: -0.3px; } .markdown-body h3 { font-size: 16px; } .markdown-body p { margin: 14px 0; color: var(--text); } .markdown-body strong { font-weight: 600; } .markdown-body blockquote { margin: 24px 0; padding: 2px 17px; border-left: 3px solid #91ab8c; background: var(--canvas); color: var(--muted); } .markdown-body blockquote p { color: var(--muted); font-size: 12px; } .markdown-body ul, .markdown-body ol { padding-left: 21px; } .markdown-body li { padding: 3px 0; } .markdown-body .contains-task-list { list-style: none; padding-left: 0; } .markdown-body input[type='checkbox'] { accent-color: #527c58; margin-right: 8px; } .markdown-body pre { background: var(--sidebar); border: 1px solid var(--line); border-radius: 7px; padding: 17px; font-size: 11px; overflow: auto; line-height: 1.8; } .markdown-body code { font-family: 'SFMono-Regular', Consolas, monospace; font-size: 0.9em; } .markdown-body :not(pre) > code { background: var(--sidebar); padding: 2px 5px; border-radius: 4px; } .markdown-body table { border-collapse: collapse; width: 100%; font-size: 12px; margin: 20px 0; } .markdown-body th, .markdown-body td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; } .markdown-body th { background: var(--canvas); } .markdown-body a { color: var(--accent); text-underline-offset: 3px; } .markdown-body img { max-width: 100%; height: auto; } .markdown-body hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; } .statusbar { height: 39px; flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; padding: 0 36px; font-size: 9px; color: var(--muted); } .statusbar > span { display: flex; align-items: center; gap: 5px; } .error-banner { margin: 0 34px 12px; background: #fff2d7; color: #714d09; padding: 12px; border-radius: 6px; font-size: 12px; } .error-banner button { margin-left: 15px; text-decoration: underline; } @media (min-width: 1600px) { .markdown-body { padding: 40px 60px; } .code-area { font-size: 14px; } .document-heading { padding-top: 40px; padding-bottom: 35px; } } @media (max-width: 1150px) { .sidebar { width: 200px; padding-left: 12px; padding-right: 12px; } .topbar { padding: 0 22px; } .document-heading { padding: 26px 24px; } .editor-shell { margin: 0 22px; } .markdown-body { padding: 25px; } .toolbar-hint { display: none; } .breadcrumbs > span:not(.slash) { display: none; } .keyboard-hint { display: none !important; } } @media (max-width: 800px) { .sidebar { display: none; } .topbar { height: 60px; padding: 0 14px; } .document-heading { padding: 24px 16px; } .editor-shell { margin: 0 12px; } .title-label input { font-size: 22px; width: 43vw; } .view-switch button { padding: 6px 8px; } .save-label { font-size: 9px; } .breadcrumbs { gap: 7px; } .breadcrumbs strong { max-width: 140px; } .header-actions { gap: 4px; } .statusbar { padding: 0 16px; } .error-banner { margin: 0 12px 10px; } } @media (max-width: 560px) { .app { height: 100dvh; } .document-heading { flex-wrap: wrap; gap: 14px; padding: 18px 16px; } .title-label input { width: 85vw; } .eyebrow { display: none; } .view-switch { margin-left: auto; } .topbar .breadcrumbs strong { max-width: 100px; } .export-button { font-size: 10px; padding: 8px; } .text-button { padding: 7px; font-size: 10px; } .mode-split { flex-direction: column; overflow: auto; } .mode-split .editor-column, .mode-split .preview-column { width: 100%; min-height: 300px; flex: 1; } .mode-split .editor-column { border-right: 0; border-bottom: 1px solid var(--line); } .markdown-body { padding: 23px; } .markdown-body h1 { font-size: 23px; } } /* Document workspace */ button:disabled { opacity: 0.45; cursor: not-allowed; } .sidebar .brand { margin-bottom: 28px; padding: 0 4px; } .library-tabs { display: flex; gap: 4px; } .library-tabs button { flex: 1 1 auto; white-space: nowrap; padding: 10px 4px; font-size: 11px; } .library-tabs button[aria-pressed='true'] { background: var(--active); color: var(--accent); } .document-search { display: flex; align-items: center; gap: 6px; margin: 18px 0 12px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: var(--bg); } .document-search input { width: 100%; min-width: 0; background: transparent; border: 0; color: var(--text); font-size: 11px; } .new-document { width: 100%; padding: 9px; border: 1px dashed var(--line); color: var(--accent); } .document-list { overflow: auto; flex: 1; min-height: 0; margin-bottom: 16px; } .document-row { display: flex; align-items: center; gap: 6px; border-radius: 6px; margin-bottom: 4px; } .document-row.selected { background: var(--active); color: var(--accent); } .document-row .document-item { width: 100%; justify-content: flex-start; text-align: left; } .document-row .document-item svg { flex-shrink: 0; } .document-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; padding: 10px 0; font-size: 11px; } .empty-hint { font-size: 11px; color: var(--muted); line-height: 1.8; padding: 0 12px; } .mobile-close { display: none; } .document-controls { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 4px; } .document-controls .view-switch { align-self: center; } .writing-area { display: flex; flex: 1; min-height: 0; gap: 14px; padding: 0 24px; } .writing-area .editor-shell { margin: 0; min-width: 0; } .mode-split .editor-column { width: var(--editor-width, 50%); } .mode-split .preview-column { width: calc(100% - var(--editor-width, 50%)); } .split-control { display: flex; align-items: center; gap: 5px; font-size: 9px; } .split-control input { width: 65px; accent-color: var(--accent); } .split-control span { width: 28px; } .detail-panel { position: relative; width: 190px; flex-shrink: 0; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); } .detail-panel .pane-label { padding-right: 30px; } .detail-panel .pane-label > span + span { display: none; } .panel-close { position: absolute; right: 2px; top: 4px; } .outline-list { padding: 14px 4px; } .outline-list button { display: block; width: 100%; text-align: left; padding: 8px 10px; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; color: var(--muted); } .outline-list button:hover { color: var(--accent); } .markdown-body :is(h1, h2, h3, h4, h5, h6) { scroll-margin-top: 20px; } .snapshot-button { margin: 14px 12px 0; padding: 8px 10px; background: var(--active); color: var(--accent); font-size: 11px; } .version-entry { display: flex; flex-direction: column; gap: 7px; padding: 14px 12px; border-top: 1px solid var(--line); font-size: 10px; overflow-wrap: anywhere; } .version-entry time, .version-entry > span { color: var(--muted); } .version-entry button { justify-content: flex-start; color: var(--accent); font-size: 11px; padding: 5px 0; } .empty-workspace { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 14px; text-align: center; padding: 24px; } .empty-workspace h1 { font-size: 24px; margin: 0; } .empty-workspace p { color: var(--muted); } .workspace-notice { min-height: 24px; font-size: 10px; color: var(--accent); padding: 0 26px 8px; } .error-banner { margin-top: 12px; flex-shrink: 0; } .error-actions { display: flex; flex-wrap: wrap; margin-top: 7px; } .focus-mode .topbar { display: none; } .focus-mode .document-heading { padding-top: 20px; padding-bottom: 18px; } .command-dialog { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 12px; width: min(500px, calc(100vw - 28px)); padding: 20px; max-height: 80dvh; box-shadow: 0 20px 90px #0003; } .command-dialog::backdrop { background: #15231d66; backdrop-filter: blur(3px); } .dialog-heading { display: flex; align-items: center; justify-content: space-between; } .dialog-heading h2 { margin: 0 0 16px; font-size: 16px; } .command-search { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 6px; padding: 10px; } .command-search input { width: 100%; border: 0; background: transparent; color: var(--text); } .command-list { margin: 12px 0; } .command-list button { display: flex; justify-content: space-between; padding: 11px 10px; width: 100%; text-align: left; } .command-list kbd { color: var(--muted); font-size: 10px; } .shortcut-help { color: var(--muted); font-size: 10px; line-height: 1.9; border-top: 1px solid var(--line); padding-top: 12px; } @media (max-width: 1200px) { .detail-panel { width: 160px; } .document-heading { padding: 23px 24px; } .title-label input { width: min(300px, 28vw); font-size: 23px; } .writing-area { padding: 0 18px; gap: 10px; } .format-toolbar { flex-wrap: wrap; height: auto; min-height: 43px; padding: 5px 8px; } } @media (max-width: 1000px) { .detail-panel { position: absolute; right: 18px; top: 210px; bottom: 68px; width: 210px; z-index: 4; box-shadow: 0 5px 35px #0002; } } @media (max-width: 800px) { .sidebar { display: flex; position: absolute; inset: 0 auto 0 0; z-index: 10; width: 250px; box-shadow: 0 0 0 100vmax #14251b33; } .mobile-close { display: inline-flex; margin-left: auto; } .document-heading { flex-wrap: wrap; gap: 12px; } .title-label input { width: 70vw; } .document-controls { margin-left: auto; } .writing-area { padding: 0 12px; } .header-actions { gap: 0; } .breadcrumbs strong { max-width: 80px; } .topbar { padding: 0 10px; } .header-actions .text-button { padding: 6px; } .export-button { padding: 8px; font-size: 10px; } .detail-panel { top: 230px; } } @media (max-width: 560px) { .mode-split .editor-column, .mode-split .preview-column { width: 100%; } .split-control { display: none; } .topbar .breadcrumbs strong { max-width: 66px; } .document-heading { padding: 18px 16px; } .detail-panel { top: 210px; } } /* Extended Markdown rendering and insertion panels. */ .code-area { overflow: hidden; padding: 0; } .code-area .cm-content { padding-top: 17px !important; padding-bottom: 60px !important; } .code-area .cm-gutters { padding-top: 17px; } .preview-scroll { scroll-behavior: auto; } .sync-toggle { margin-left: auto; font-size: 9px; padding: 4px 7px; color: var(--muted); } .sync-toggle[aria-pressed='true'] { color: var(--accent); } .preview-column .live-label { margin-left: 8px; } .formula-block { display: block; overflow-x: auto; padding: 8px 0; } .formula-loading { font-family: monospace; color: var(--muted); } .render-error { display: block; border-left: 3px solid #b68b42; background: var(--sidebar); padding: 10px 12px; color: var(--text); font-size: 11px; overflow-wrap: anywhere; } .render-error p { font-size: 11px; white-space: pre-wrap; } .render-error pre { white-space: pre-wrap; } .code-block { border: 1px solid var(--line); border-radius: 7px; overflow: hidden; margin: 18px 0; } .code-caption { display: flex; justify-content: space-between; padding: 6px 12px; background: var(--sidebar); color: var(--muted); font-size: 10px; border-bottom: 1px solid var(--line); } .markdown-body .code-block pre { margin: 0; border: 0; border-radius: 0; } .hljs-keyword, .hljs-selector-tag, .hljs-literal { color: #8054a3; } .hljs-string, .hljs-regexp, .hljs-attr { color: #2c7250; } .hljs-title, .hljs-function, .hljs-built_in { color: #286d9c; } .hljs-number, .hljs-symbol { color: #b26432; } .hljs-comment, .hljs-quote { color: #828b80; font-style: italic; } .dark .hljs-keyword, .dark .hljs-selector-tag, .dark .hljs-literal { color: #cba5ef; } .dark .hljs-string, .dark .hljs-attr { color: #9bd6af; } .dark .hljs-title, .dark .hljs-built_in { color: #91c9ef; } .dark .hljs-number { color: #e5af87; } .mermaid-block { margin: 20px 0; padding: 14px; background: #fff; color: #293932; border: 1px solid var(--line); border-radius: 8px; overflow: auto; } .mermaid-block svg { max-width: 100%; height: auto; display: block; margin: auto; } .diagram-loading { color: #6a756c; font-size: 11px; } .mermaid-render-host { position: absolute; left: -100000px; top: 0; width: 1200px; visibility: hidden; pointer-events: none; } .insert-dialog label { display: flex; flex-direction: column; gap: 7px; font-size: 12px; margin: 14px 0; } .insert-dialog input, .insert-dialog select, .insert-dialog textarea { width: 100%; border: 1px solid var(--line); border-radius: 6px; background: var(--canvas); padding: 9px; color: var(--text); } .insert-dialog textarea { resize: vertical; font-family: monospace; } .dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 12px; } .dialog-actions button { padding: 8px 16px; } .table-dimensions { display: flex; gap: 14px; } .editor-notice { display: flex; justify-content: space-between; padding: 7px 12px; font-size: 11px; background: var(--sidebar); color: var(--muted); } @media (max-width: 1200px) { .preview-column .live-label { display: none; } }