:root { --article-blue:#386885; --article-green:#48704c; }
html[data-theme="dark"] { --article-blue:#90bedf; --article-green:#9abe91; }
.post-format-picker { margin-bottom:20px; }
.post-format-picker > span { display:block; margin-bottom:8px; font-size:13px; color:var(--c-ink-700); }
.post-format-picker > div { display:flex; gap:8px; }
.post-format-picker button, .article-editor button, .article-preview button { border:1px solid var(--c-ink-200); border-radius:7px; background:var(--surface-paper); color:var(--c-ink-700); padding:7px 11px; font:inherit; font-size:12px; cursor:pointer; }
.post-format-picker button[aria-pressed="true"], .article-editor button[aria-pressed="true"] { border-color:var(--c-ink-800); background:var(--c-ink-800); color:var(--surface-paper); }
.post-format-picker p, .rte-hint { color:var(--c-ink-500); font-size:12px; line-height:1.8; margin:10px 0; }
#composerPanel.article-mode { width:min(960px,100vw); }
#articleEditor[hidden], .article-preview[hidden] { display:none; }
.article-editor { margin-bottom:24px; min-width:0; }
.rte-top { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding:14px 0; }
.rte-top > strong { margin-right:auto; font:600 18px var(--serif); }
.rte-top label, .rte-toolbar label { display:flex; align-items:center; gap:5px; font-size:11px; color:var(--c-ink-600); }
.article-editor select { border:1px solid var(--c-ink-200); border-radius:5px; background:var(--surface-paper); color:var(--c-ink-800); font:inherit; font-size:12px; padding:6px 4px; width:auto; }
.rte-toolbar { position:sticky; top:0; z-index:3; display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:12px; border:1px solid var(--c-ink-200); border-radius:10px; background:var(--surface-paper); box-shadow:0 3px 12px #00000006; }
.rte-toolbar button { min-width:30px; padding:7px 8px; }
.rte-paper { padding:16px; background:var(--surface-canvas); border:1px solid var(--c-ink-100); border-radius:12px; }
.rte-block { padding:10px 16px 16px; border:1px solid transparent; border-radius:7px; margin:0 auto 10px; background:var(--surface-paper); max-width:680px; min-width:0; }
.rte-block.active { border-color:var(--c-ink-300); }
.rte-block-actions { display:flex; align-items:center; gap:6px; margin-bottom:12px; font-size:11px; color:var(--c-ink-400); }
.rte-block-actions > span { margin-right:auto; }
.rte-block-actions button { padding:3px 5px; font-size:10px; border-color:transparent; }
.rte-block-actions button[data-drag] { cursor:grab; }
.rte-text { min-height:44px; white-space:pre-wrap; overflow-wrap:anywhere; outline:none; font-size:16px; color:var(--c-ink-800); }
.rte-text:empty:before { content:attr(data-placeholder); color:var(--c-ink-300); pointer-events:none; }
.rte-text-heading { font-weight:600; }
.rte-text-quote { padding:12px 18px; border-left:3px solid var(--c-ink-300); background:var(--c-ink-50); }
.rte-text-list { padding-left:20px; border-left:2px dotted var(--c-ink-200); }
.rte-image { display:block; max-width:100%; height:auto; border-radius:5px; margin:0 auto 12px; }
.rte-image-settings { display:flex; flex-wrap:wrap; gap:10px; }
.rte-image-settings label { display:flex; align-items:center; gap:8px; font-size:12px; color:var(--c-ink-500); white-space:nowrap; }
.rte-image-settings label:first-child { flex:1; min-width:120px; }
.rte-image-settings input { min-width:0; width:100%; border:1px solid var(--c-ink-200); background:var(--surface-paper); color:var(--c-ink-700); padding:8px; border-radius:5px; font:inherit; }
.rte-insert { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:14px 0; }
#articleCount { margin-left:auto; font-size:11px; color:var(--c-ink-500); }
#articleCount.over { color:var(--c-danger-600); }
.article-editor button:disabled { opacity:.35; cursor:default; }
.article-document { font:16px/1.8 var(--ui-sans); color:var(--c-ink-800); overflow-wrap:anywhere; }
.article-document p, .article-document h2, .article-document h3, .article-document blockquote, .article-document figure, .article-document ul, .article-document ol { margin-top:0; }
.article-document p, .article-document h2, .article-document h3, .article-document blockquote { white-space:pre-wrap; }
.article-document h2 { font-size:26px; line-height:1.6; font-weight:600; }
.article-document h3 { font-size:20px; line-height:1.6; font-weight:600; }
.article-document blockquote { padding:14px 20px; border-left:3px solid var(--c-ink-300); background:var(--c-ink-50); color:var(--c-ink-600); }
.article-document figure { margin-inline:0; text-indent:0 !important; }
.article-document figure img { display:block; max-width:100%; height:auto; cursor:zoom-in; border-radius:5px; }
.article-document figcaption { font:12px/1.8 var(--ui-sans); color:var(--c-ink-500); margin-top:8px; text-align:center; }
.article-document hr, .rte-block hr { border:0; border-top:1px solid var(--c-ink-200); margin-top:20px; }
.article-document li { white-space:pre-wrap; }
.article-theme-campus h2, .article-theme-campus .rte-text-heading { font-family:var(--serif); color:var(--c-accent-600); }
.article-theme-campus blockquote { border-color:var(--c-accent-500); }
.article-theme-notes h2, .article-theme-notes .rte-text-heading { border-bottom:1px solid var(--c-ink-200); padding-bottom:10px; }
.article-preview { position:fixed; inset:0; z-index:1300; display:grid; place-items:center; background:#0007; padding:20px; }
.article-preview > section { display:flex; flex-direction:column; width:min(900px,100%); max-height:94vh; background:var(--surface-canvas); border-radius:14px; overflow:hidden; }
.article-preview-head { display:flex; align-items:center; flex-wrap:wrap; justify-content:space-between; gap:10px; padding:16px; background:var(--surface-paper); border-bottom:1px solid var(--c-ink-200); }
.article-preview-head > div { display:flex; gap:8px; }
.article-preview-scroll { overflow:auto; padding:20px; }
.article-preview-page { margin:auto; padding:24px; background:var(--surface-paper); border:1px solid var(--c-ink-100); box-sizing:border-box; }
.article-preview-page.phone { width:min(390px,100%); }
.article-preview-page.desktop { width:min(740px,100%); }
.article-preview-page h1 { margin:0 0 24px; font:600 25px/1.6 var(--serif); overflow-wrap:anywhere; }
@media(max-width:600px) {
  .rte-toolbar { gap:7px; padding:9px; position:static; }
  .rte-toolbar label { font-size:10px; }
  .rte-paper { padding:8px; }
  .rte-block { padding:8px 10px 12px; }
  .rte-image-settings label { width:100%; }
  .article-preview { padding:10px; }
  .article-preview-scroll { padding:10px; }
  .article-preview-page { padding:20px 16px; }
}
