.feed-authoring { --ap-text:#e8ebf0; --ap-muted:#8994a6; --ap-line:rgba(150,164,190,.17); --ap-soft:rgba(150,164,190,.07); --ap-accent:#82a9ff; --ap-bg:#141820; position:fixed; inset:0; z-index:1200; display:flex; align-items:center; justify-content:center; padding:24px; color:var(--ap-text); }
body[data-site-theme="white"] .feed-authoring, body[data-site-theme="white"] .article-page { --ap-text:#242935; --ap-muted:#788091; --ap-line:#e5e8ed; --ap-soft:#f4f6f8; --ap-accent:#315dc6; --ap-bg:#fff; }
.feed-authoring[hidden], .feed-authoring [hidden] { display:none!important; }
body.feed-modal-open { overflow:hidden; }
.feed-authoring *, .feed-discussion * { box-sizing:border-box; }
.feed-authoring__backdrop { position:absolute; inset:0; background:rgba(3,7,14,.72); backdrop-filter:blur(8px); }
.feed-authoring__dialog { position:relative; width:min(1180px,100%); max-height:calc(100dvh - 48px); display:flex; flex-direction:column; background:var(--ap-bg); border:1px solid var(--ap-line); border-radius:22px; box-shadow:0 24px 100px rgba(0,0,0,.3); overflow:hidden; }
.feed-authoring__header { padding:24px 30px 20px; display:flex; align-items:center; justify-content:space-between; gap:16px; border-bottom:1px solid var(--ap-line); }
.feed-authoring__eyebrow { color:var(--ap-muted); font-size:10px; text-transform:uppercase; letter-spacing:.12em; }
.feed-authoring__header h2 { font-size:22px; font-weight:600; letter-spacing:-.03em; margin:7px 0 0; }
.feed-icon-button { width:36px; height:36px; display:grid; place-items:center; background:transparent; border:0; border-radius:50%; color:var(--ap-muted); cursor:pointer; flex-shrink:0; }
.feed-icon-button:hover { background:var(--ap-soft); color:var(--ap-text); }
.feed-icon-button svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.7; }
.feed-authoring form[data-authoring-form] { display:flex; flex-direction:column; min-height:0; margin:0; }
.feed-authoring__scroll { display:grid; grid-template-columns:minmax(0,1fr) 270px; gap:32px; padding:30px; overflow-y:auto; overscroll-behavior:contain; }
.feed-authoring__main { min-width:0; }
.feed-authoring__settings { border-left:1px solid var(--ap-line); padding-left:26px; display:flex; flex-direction:column; gap:20px; }
.feed-authoring__settings h3 { margin:0; font-size:14px; font-weight:600; }
.feed-field { display:flex; flex-direction:column; gap:8px; font-size:12px; color:var(--ap-muted); margin:0; }
.feed-field-label { display:block; font-size:12px; color:var(--ap-muted); margin-bottom:10px; }
.feed-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .feed-field select, .feed-rich-popover input { background:var(--ap-soft); color:var(--ap-text); border:1px solid var(--ap-line); border-radius:9px; padding:11px 12px; width:100%; font:inherit; font-size:13px; min-height:42px; }
.feed-field input:focus, .feed-field select:focus, .feed-rich-popover input:focus { outline:2px solid var(--ap-accent); outline-offset:1px; }
.feed-field--title { margin-bottom:26px; }
.feed-field--title input { background:transparent!important; border:0!important; border-bottom:1px solid var(--ap-line)!important; border-radius:0!important; padding:4px 0 16px!important; font-size:30px!important; font-weight:600!important; letter-spacing:-.03em; }
.feed-authoring select option { background:var(--ap-bg); color:var(--ap-text); }
.feed-authoring .feed-author-choice { border:0; padding:0; margin:0; display:block; }
.feed-author-choice legend { font-size:12px; color:var(--ap-muted); margin-bottom:9px; }
.feed-author-choice div { margin-bottom:7px; }
.feed-author-choice label, .feed-check { display:flex; align-items:center; gap:8px; font-size:12px; color:var(--ap-text); cursor:pointer; }
.feed-check input, .feed-author-choice input { accent-color:var(--ap-accent); width:15px; height:15px; margin:0; }
.feed-category-details { font-size:12px; border-top:1px solid var(--ap-line); padding-top:16px; }
.feed-category-details summary { cursor:pointer; color:var(--ap-muted); }
.feed-category-details .feed-field { margin-top:14px; }
.feed-category-details .feed-check { margin-top:14px; }
.feed-field input[type="color"] { padding:4px; max-width:64px; }
.feed-cover-drop { display:flex; position:relative; align-items:center; justify-content:center; min-height:130px; border:1px dashed var(--ap-line); border-radius:12px; cursor:pointer; overflow:hidden; background:var(--ap-soft); }
.feed-cover-drop input[type="file"] { position:absolute; width:1px; height:1px; clip-path:inset(50%); overflow:hidden; }
.feed-cover-drop.has-preview .feed-cover-drop__empty { display:none; }
.feed-cover-drop [data-cover-preview] { width:100%; aspect-ratio:16/10; max-height:180px; object-fit:cover; display:block; }
.feed-cover-drop__empty { display:grid; place-items:center; gap:7px; text-align:center; padding:18px 10px; }
.feed-cover-drop__empty svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.5; }
.feed-cover-drop__empty strong { font-size:12px; font-weight:500; }
.feed-cover-drop__empty small { font-size:10px; max-width:180px; line-height:1.6; opacity:.7; }
.feed-cover-drop.is-dragover, .feed-cover-drop:focus-within, .feed-cover-drop:focus-visible { border-color:var(--ap-accent); outline:none; }
[data-cover-filename] { font-size:11px; overflow-wrap:anywhere; }
.feed-authoring__footer { flex-shrink:0; border-top:1px solid var(--ap-line); padding:18px 30px; display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.feed-authoring__footer > div:last-child { display:flex; gap:8px; margin-left:auto; }
.feed-authoring__errors { color:#e07878; font-size:13px; white-space:pre-line; width:100%; }
.feed-authoring__save-state { font-size:11px; color:var(--ap-muted); }
.feed-button { min-height:38px; border:1px solid transparent; border-radius:9px; font-family:inherit; font-size:12px; font-weight:500; padding:9px 16px; cursor:pointer; }
.feed-button--quiet { background:transparent; color:var(--ap-muted); }
.feed-button--quiet:hover { background:var(--ap-soft); color:var(--ap-text); }
.feed-button--primary { background:var(--ap-accent); color:#0d1830; }
body[data-site-theme="white"] .feed-button--primary { color:#fff; }
.feed-button:hover { filter:brightness(1.08); }
.feed-button:disabled { opacity:.45; cursor:wait; }
.feed-button:focus-visible, .feed-icon-button:focus-visible { outline:2px solid var(--ap-accent); outline-offset:3px; }
.feed-authoring .markdown-editor-textarea { display:none; }
.feed-rich-editor { position:relative; }
.feed-rich-toolbar { display:flex; gap:3px; align-items:center; flex-wrap:wrap; padding:9px; border:1px solid var(--ap-line); border-radius:12px 12px 0 0; background:var(--ap-soft); }
.feed-rich-toolbar button, .feed-rich-toolbar select { background:transparent; color:var(--ap-muted); border:0; border-radius:6px; min-width:30px; height:30px; padding:4px 7px; font:inherit; font-size:12px; cursor:pointer; }
.feed-rich-toolbar button:hover, .feed-rich-toolbar button.is-active { background:color-mix(in srgb,var(--ap-accent) 12%,transparent); color:var(--ap-accent); }
.feed-rich-toolbar button:focus-visible, .feed-rich-toolbar select:focus-visible { outline:2px solid var(--ap-accent); }
.feed-rich-toolbar [data-rich-command="bold"] { font-weight:800; }
.feed-rich-toolbar [data-rich-command="italic"] { font-style:italic; }
.feed-rich-toolbar [data-rich-command="underline"] { text-decoration:underline; }
.feed-rich-toolbar [data-rich-command="strikeThrough"] { text-decoration:line-through; }
.feed-rich-toolbar [data-rich-command="justifyCenter"] { text-align:center; border-left:1px solid var(--ap-line); }
.feed-rich-toolbar [data-rich-command="justifyRight"] { text-align:right; }
.feed-rich-color { position:relative; display:grid; place-items:center; width:30px; height:30px; color:var(--ap-accent); cursor:pointer; border-bottom:2px solid currentColor; font-size:13px; }
.feed-rich-color input { position:absolute; inset:0; opacity:0; width:100%; height:100%; cursor:pointer; }
.feed-authoring [data-rich-surface] { min-height:340px; border:1px solid var(--ap-line); border-radius:0 0 12px 12px; outline:none; padding:24px; background:transparent; color:var(--ap-text); line-height:1.8; font-size:15px; overflow-wrap:anywhere; }
.feed-authoring [data-rich-surface]:focus { border-color:color-mix(in srgb,var(--ap-accent) 60%,var(--ap-line)); }
.feed-authoring [data-rich-surface]:empty:before { content:attr(data-placeholder); color:var(--ap-muted); pointer-events:none; }
.feed-authoring [data-rich-surface] p { margin:0 0 14px; }
.feed-authoring [data-rich-surface] h1, .feed-authoring [data-rich-surface] h2, .feed-authoring [data-rich-surface] h3 { color:var(--ap-text); line-height:1.25; letter-spacing:-.025em; }
.feed-authoring [data-rich-surface] a { color:var(--ap-accent); }
.feed-authoring [data-rich-surface] blockquote { border-left:2px solid var(--ap-accent); margin-left:0; padding-left:16px; color:var(--ap-muted); }
.feed-authoring [data-rich-surface] img, .feed-authoring [data-rich-surface] video { max-width:100%; height:auto; border-radius:8px; }
.feed-authoring [data-rich-surface] audio { max-width:100%; }
.feed-authoring [data-rich-surface] figure { margin:16px 0; }
.feed-authoring [data-rich-surface] table { border-collapse:collapse; max-width:100%; width:100%; }
.feed-authoring [data-rich-surface] td, .feed-authoring [data-rich-surface] th { border:1px solid var(--ap-line); padding:8px; }
.feed-authoring [data-rich-surface] pre { background:var(--ap-soft); padding:14px; overflow-x:auto; }
.feed-rich-editor__hint { margin-top:10px; color:var(--ap-muted); font-size:10px; line-height:1.65; }
.feed-authoring .feed-media-toolbar { margin:0; border-inline:1px solid var(--ap-line); padding:9px 12px; display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.feed-media-toolbar__button { border:0; padding:4px 0; color:var(--ap-accent); background:transparent; font:inherit; font-size:11px; cursor:pointer; }
.feed-media-toolbar__status { font-size:11px; color:var(--ap-muted); overflow-wrap:anywhere; }
.feed-media-toolbar__status.has-error { color:#e07878; }
.feed-rich-popover { border:1px solid var(--ap-line); border-radius:12px; padding:16px; display:flex; align-items:end; gap:8px; background:var(--ap-bg); margin-top:12px; flex-wrap:wrap; box-shadow:0 8px 24px rgba(0,0,0,.1); }
.feed-rich-popover label { font-size:12px; color:var(--ap-muted); flex:1; min-width:180px; }
.feed-rich-popover input { margin-top:7px; }
.feed-rich-popover > input { width:90px; }
.feed-rich-popover [role="alert"] { color:#e07878; font-size:12px; }
.feed-rich-context { position:fixed; z-index:1210; display:grid; min-width:190px; padding:6px; border:1px solid var(--ap-line); border-radius:12px; background:var(--ap-bg); box-shadow:0 12px 45px rgba(0,0,0,.3); }
.feed-rich-context button { border:0; border-radius:6px; background:transparent; color:var(--ap-text); padding:9px 12px; font:inherit; font-size:12px; text-align:left; cursor:pointer; }
.feed-rich-context button:hover, .feed-rich-context button:focus-visible { background:var(--ap-soft); }
.feed-authoring .errorlist { list-style:none; margin:0; padding:0; color:#e07878; font-size:12px; }
@media(max-width:900px) { .feed-authoring__scroll { grid-template-columns:minmax(0,1fr) 220px; gap:22px; padding:24px; } .feed-authoring__settings { padding-left:20px; } }
@media(max-width:720px) { .feed-authoring { padding:0; } .feed-authoring__dialog { width:100%; height:100dvh; max-height:100dvh; border-radius:0; border:0; } .feed-authoring__header { padding:18px 16px; } .feed-authoring__header h2 { font-size:19px; } .feed-authoring__scroll { grid-template-columns:1fr; padding:20px 16px; gap:28px; } .feed-authoring__settings { border-left:0; border-top:1px solid var(--ap-line); padding:22px 0 0; } .feed-field--title input { font-size:24px!important; } .feed-authoring [data-rich-surface] { min-height:300px; padding:18px; } .feed-rich-toolbar { gap:2px; } .feed-authoring__footer { padding:14px 16px; } .feed-authoring__save-state { display:none; } }
.feed-authoring__scroll--text-only { grid-template-columns:minmax(0,1fr); }
.feed-authoring__dialog { width:min(1040px,100%); }
body.feed-modal-open { overflow:hidden; }
.feed-composer [data-rich-editor] { position:relative; display:flex; flex-direction:column; align-items:stretch; padding:10px 14px; gap:8px; border-radius:14px!important; }
.feed-format-toggle { width:max-content; margin-left:30px; padding:4px 2px; color:var(--ap-muted); background:none; border:0; font:inherit; font-size:11px; cursor:pointer; }
.feed-format-toggle:hover, .feed-format-toggle[aria-expanded="true"] { color:var(--ap-accent); }
.feed-composer .feed-rich-toolbar { display:none; padding:7px; border-radius:9px; flex-shrink:0; }
.feed-composer .is-formatting .feed-rich-toolbar { display:flex; }
.feed-composer .feed-rich-popover, .feed-composer .feed-rich-context { color:var(--ap-text); }
.feed-composer__add-dropdown-wrap { position:absolute; left:10px; top:9px; }
.feed-composer [data-rich-editor] > .markdown-editor-surface { width:100%; max-height:180px; min-height:32px; padding:3px 0; border:0; border-radius:0; font-size:14px; line-height:1.65; color:var(--ap-text); background:none; }
.feed-composer .markdown-editor-surface p { margin:0 0 8px; }
.feed-composer .markdown-editor-surface h1, .feed-composer .markdown-editor-surface h2, .feed-composer .markdown-editor-surface h3 { line-height:1.2; margin:10px 0; }
.feed-composer .markdown-editor-surface table { border-collapse:collapse; max-width:100%; }
.feed-composer .markdown-editor-surface td, .feed-composer .markdown-editor-surface th { border:1px solid var(--ap-line); padding:6px; }
.feed-composer .markdown-editor-surface img, .feed-composer .markdown-editor-surface video { max-width:100%; }
.feed-composer .feed-rich-context[hidden], .feed-composer .feed-rich-popover[hidden] { display:none!important; }
.feed-composer__surface { max-height:45dvh; overflow-y:auto; }

.feed-compose-error { margin:8px 16px; color:#e07878; font-size:12px; }
.feed-compose-error[hidden] { display:none; }
