/* Reading-first research workspace; system fonts only, no external assets. Colors come from style.css tokens. */
.research-prose{font-family:var(--serif);font-size:1.06rem;line-height:1.95;color:var(--ink);overflow-wrap:anywhere;padding:1rem 0;max-width:72ch}
.research-prose h1{font-size:1.85rem}.research-prose h2{font-size:1.45rem;margin-top:1.8rem}.research-prose h3{font-size:1.2rem}
.research-prose p{margin:.8rem 0 1.2rem}.research-prose a{color:var(--link);text-underline-offset:.2em}
.research-prose blockquote{margin:1.2rem 0;border-left:3px solid var(--accent);padding:.2rem 1.1rem;background:var(--surface-2);border-radius:0 var(--radius-sm) var(--radius-sm) 0}
.research-prose pre{font-family:var(--mono);font-size:.86rem;line-height:1.65;background:#132a30;color:#e1edea;border-radius:10px;padding:1.2rem;overflow-x:auto;white-space:pre;max-width:100%}
.research-prose code{font-family:var(--mono)}.research-prose :not(pre)>code{font-size:.86em;background:var(--surface-2);padding:.12rem .32rem;border-radius:4px}
.research-prose .kw,.research-prose .cf{color:#a7d8cd}.research-prose .st{color:#dbe5a5}.research-prose .dv,.research-prose .fl{color:#e7c5a8}.research-prose .co{color:#a6bbb7}.research-prose .fu,.research-prose .bu{color:#c4d8ee}
.research-prose table{display:block;overflow-x:auto;border-collapse:collapse;margin:1.2rem 0;max-width:100%;font-family:var(--sans);font-size:.95rem}.research-prose th,.research-prose td{border:1px solid var(--line);padding:.55rem .85rem}.research-prose th{background:var(--surface-2)}
.research-prose math[display=block]{display:block;overflow-x:auto;padding:1rem 0;font-size:1.15em}.research-prose math{font-size:1.05em}
.research-prose img{max-width:100%;height:auto;border-radius:10px}.research-prose .source-fallback{white-space:pre-wrap;background:transparent;color:inherit;padding:0}
.editor-actions,.workspace-nav{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap;margin:.8rem 0}
.editor-actions button{margin:0}
.workspace-nav{position:sticky;top:3.4rem;z-index:5;background:color-mix(in srgb,var(--surface) 92%,transparent);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);padding:.5rem 0;border-bottom:1px solid var(--line);margin:1rem 0 .4rem}
.workspace-nav a{font-size:.88rem;color:var(--ink-2);padding:.3rem .75rem;border:1px solid var(--line);border-radius:999px;text-decoration:none;background:var(--surface)}
.workspace-nav a:hover{border-color:var(--primary);color:var(--link)}
.preview-pane{padding:1.2rem;border:1px dashed var(--line-2);border-radius:10px;background:var(--surface-2);margin:1rem 0;max-width:100%}
.research-section{margin-top:2.2rem;padding-top:1.4rem;border-top:1px solid var(--line);scroll-margin-top:7rem}
.research-section>h3:first-child,.research-section .section-head h3{margin-top:0}
.material-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:.9rem}.material-card{border:1px solid var(--line);background:var(--surface-2);border-radius:10px;padding:1rem;min-width:0;overflow-wrap:anywhere}.material-card img{max-width:100%;max-height:280px;object-fit:contain;display:block;margin:0 auto 1rem;border-radius:6px}.material-card>a{color:var(--link);font-weight:600}.material-card code{font-size:.75rem;white-space:pre-wrap}
.collab-card{border:1px solid var(--line);border-radius:var(--radius);padding:1.2rem;margin:1rem 0;background:var(--surface-2)}.collab-card h4{font-size:1.12rem;margin:.7rem 0}.collab-event{border-left:2px solid var(--accent);padding:.25rem 1rem;margin:.5rem 0}.collab-event pre{margin:.3rem 0}.participants{font-size:.85rem;color:var(--muted)}
#diff-output{font-family:var(--mono);font-size:.85rem;white-space:pre-wrap;overflow-wrap:anywhere;margin:1rem 0}.diff-add{background:#e3f1dc;color:#2f5531}.diff-remove{background:#f9e4df;color:#7e3932}.diff-context{color:var(--muted)}
#publish textarea,#revise textarea{min-height:220px;font-family:var(--mono);font-size:.92rem;line-height:1.75}.format-help{font-size:.84rem;color:var(--muted)}
#comments .card{background:var(--surface)}
@media(max-width:600px){.research-prose{font-size:1rem}.material-grid{grid-template-columns:1fr}.collab-card{padding:1rem}.research-prose pre{padding:.85rem}.editor-actions button{font-size:.9rem}.workspace-nav{top:3.1rem}}
