/* ---------- Токены: светлая тема по умолчанию, тёмная — по системе или выбору ---------- */
:root {
  --bg: #fbfbfd;
  --bg-alt: #f2f2f6;
  --surface: #ffffff;
  --border: #e2e2ea;
  --text: #1d1d24;
  --muted: #6b6b7a;
  --accent: #6d4aff;
  --accent-hover: #5a37ee;
  --accent-soft: rgba(109, 74, 255, 0.1);
  --accent-contrast: #ffffff;
  --danger: #d63b3b;
  --ok-bg: #e8f7ee;
  --ok-text: #1c6b3c;
  --err-bg: #fdecec;
  --err-text: #9b2323;
  --warn: #b7791f;
  --code-bg: #f3f2f8;
  --bubble-user: #6d4aff;
  --bubble-user-text: #ffffff;
  --shadow: 0 1px 2px rgba(20, 20, 40, 0.06), 0 4px 16px rgba(20, 20, 40, 0.05);
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17171c; --bg-alt: #1e1e25; --surface: #202028; --border: #2f2f3a; --text: #e6e6ee;
    --muted: #9a9aab; --accent: #8f73ff; --accent-hover: #a58fff; --accent-soft: rgba(143, 115, 255, 0.14);
    --accent-contrast: #ffffff; --danger: #ff6b6b; --ok-bg: #173424; --ok-text: #8fe0ad; --err-bg: #3a1a1d;
    --err-text: #ffb3b3; --warn: #f0b75a; --code-bg: #262631; --bubble-user: #5b3fe0; --bubble-user-text: #ffffff;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #17171c; --bg-alt: #1e1e25; --surface: #202028; --border: #2f2f3a; --text: #e6e6ee;
  --muted: #9a9aab; --accent: #8f73ff; --accent-hover: #a58fff; --accent-soft: rgba(143, 115, 255, 0.14);
  --accent-contrast: #ffffff; --danger: #ff6b6b; --ok-bg: #173424; --ok-text: #8fe0ad; --err-bg: #3a1a1d;
  --err-text: #ffb3b3; --warn: #f0b75a; --code-bg: #262631; --bubble-user: #5b3fe0; --bubble-user-text: #ffffff;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.25);
  color-scheme: dark;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text); font: 16px/1.6 var(--font);
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: 1.8rem; margin: 0 0 1rem; }
h2 { font-size: 1.25rem; margin: 1.5rem 0 0.75rem; }
code, pre, .mono { font-family: var(--mono); font-size: 0.9em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.inline { display: inline; }
.float-right { float: right; }
.spacer { flex: 1; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.container { width: 100%; max-width: 1040px; margin: 0 auto; padding: 2rem 16px; flex: 1; }
.narrow { max-width: 760px; margin: 0 auto; }

/* ---------- Шапка ---------- */
.topbar {
  display: flex; align-items: center; gap: 1rem; padding: 0.6rem 16px;
  border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 700; color: var(--text); font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.nav { display: flex; align-items: center; gap: 1.1rem; margin-left: auto; }
.nav a { color: var(--muted); font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); text-decoration: none; }
.nav a.btn { color: var(--accent-contrast); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; color: var(--text); font-size: 1.4rem; cursor: pointer; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: 0.95rem; cursor: pointer; }
.link-btn:hover { color: var(--text); }
.theme-toggle {
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: 999px; width: 34px; height: 34px;
  color: var(--text); cursor: pointer; display: grid; place-items: center; font-size: 1rem;
}
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: inline; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.footer { padding: 1.5rem 16px; color: var(--muted); font-size: 0.85rem; text-align: center; border-top: 1px solid var(--border); }

/* ---------- Кнопки и формы ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  background: var(--accent); color: var(--accent-contrast); border: 1px solid transparent;
  border-radius: 8px; padding: 0.55rem 1.1rem; font: inherit; font-weight: 500; cursor: pointer;
  transition: background 0.15s;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-alt); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--border); }
.btn-danger:hover { background: var(--err-bg); }
.btn-small { padding: 0.3rem 0.7rem; font-size: 0.85rem; }
.btn-wide { width: 100%; }

input[type="text"], input[type="search"], input[type="password"], input[type="number"], input:not([type]), textarea {
  width: 100%; background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.55rem 0.75rem; font: inherit;
}
textarea { resize: vertical; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.9rem; color: var(--muted); }
label.checkbox { flex-direction: row; align-items: center; gap: 0.5rem; }
label.checkbox input { width: auto; }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.row { display: flex; gap: 0.75rem; align-items: flex-end; }
.row.wrap { flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; }
.narrow-form { max-width: 420px; }

.alert { padding: 0.75rem 1rem; border-radius: 8px; margin-bottom: 1rem; overflow-wrap: anywhere; }
.alert-error { background: var(--err-bg); color: var(--err-text); }
.alert-ok { background: var(--ok-bg); color: var(--ok-text); }
.badge { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 0.78rem; }
.badge-warn { background: rgba(183, 121, 31, 0.15); color: var(--warn); }

.auth-card {
  max-width: 400px; margin: 2rem auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow);
}
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 1.5rem; }
.panel h2 { margin-top: 0; }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 500; }
td.actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.tabs { display: flex; flex-wrap: wrap; gap: 0.25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.tabs a { padding: 0.5rem 0.9rem; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; display: flex; flex-direction: column; }
.stat-value { font-size: 1.6rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: 0.85rem; }

.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.error-code { font-size: 4rem; font-weight: 700; color: var(--accent); margin: 0; }

/* ---------- Главная ---------- */
.hero { padding: 3rem 0 2rem; }
.hero h1 { font-size: 2.4rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.card {
  display: flex; flex-direction: column; gap: 0.3rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.1rem; color: var(--text); transition: border-color 0.15s;
}
.card:hover { border-color: var(--accent); text-decoration: none; }
.card-title { font-weight: 600; }
.card-text { color: var(--muted); font-size: 0.9rem; }

/* ---------- Типографика markdown ---------- */
.prose { overflow-wrap: anywhere; }
.prose img { max-width: 100%; border-radius: 8px; }
.prose pre { background: var(--code-bg); padding: 0.9rem 1rem; border-radius: 8px; overflow-x: auto; }
.prose :not(pre) > code { background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 4px; }
.prose blockquote { margin: 1rem 0; padding: 0.25rem 1rem; border-left: 3px solid var(--accent); color: var(--muted); background: var(--bg-alt); border-radius: 0 8px 8px 0; }
.prose table { margin: 1rem 0; }
.prose ul.contains-task-list { list-style: none; padding-left: 1rem; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
.wikilink { background: var(--accent-soft); padding: 0 0.25em; border-radius: 4px; }
.wikilink.missing { color: var(--muted); background: transparent; border-bottom: 1px dashed var(--muted); border-radius: 0; }
.tag { display: inline-block; font-size: 0.85em; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 0 0.55em; }
.tag:hover { text-decoration: none; filter: brightness(1.1); }
.tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1rem; }

/* ---------- База знаний ---------- */
.kb-layout { display: grid; grid-template-columns: 270px 1fr; flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; }
.kb-sidebar { border-right: 1px solid var(--border); padding: 1.25rem 16px; background: var(--bg-alt); min-height: 100%; }
.kb-search input { margin-bottom: 0.75rem; }
.kb-actions { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.kb-tree ul { list-style: none; margin: 0; padding: 0 0 0 0.25rem; }
.kb-tree li a { display: block; padding: 0.2rem 0.5rem; border-radius: 6px; color: var(--text); font-size: 0.92rem; }
.kb-tree li a:hover { background: var(--accent-soft); text-decoration: none; }
.kb-tree li a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.kb-tree details { margin-bottom: 0.25rem; }
.kb-tree summary { cursor: pointer; color: var(--muted); font-size: 0.85rem; padding: 0.25rem 0; }
.kb-tree details ul { padding-left: 0.75rem; border-left: 1px solid var(--border); margin-left: 0.3rem; }
.draft { opacity: 0.6; font-style: italic; }
.kb-main { padding: 2rem clamp(16px, 4vw, 3rem); min-width: 0; max-width: 860px; }
.note-meta { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.note-title { font-size: 2rem; margin-bottom: 0.5rem; }
.note-list { list-style: none; padding: 0; }
.note-list li { padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.backlinks { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.backlinks h2 { font-size: 1rem; color: var(--muted); }
.graph { width: 100%; height: 70vh; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); touch-action: none; cursor: grab; }

/* ---------- Чат ---------- */
.chat-layout { display: grid; grid-template-columns: 260px 1fr; flex: 1; min-height: 0; height: calc(100vh - 55px); }
.chat-sidebar { border-right: 1px solid var(--border); background: var(--bg-alt); padding: 1rem 12px; display: flex; flex-direction: column; gap: 1rem; overflow-y: auto; }
.conv-list { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.conv-list a { padding: 0.45rem 0.6rem; border-radius: 6px; color: var(--text); font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-list a:hover { background: var(--accent-soft); text-decoration: none; }
.conv-list a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.chat-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-header { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1.5rem; border-bottom: 1px solid var(--border); }
.chat-title { font-size: 1.05rem; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.messages { flex: 1; overflow-y: auto; padding: 1.5rem clamp(12px, 4vw, 3rem); display: flex; flex-direction: column; gap: 1rem; }
.msg { display: flex; }
.msg-user { justify-content: flex-end; }
.bubble { max-width: min(760px, 90%); padding: 0.7rem 1rem; border-radius: 14px; }
.msg-user .bubble { background: var(--bubble-user); color: var(--bubble-user-text); white-space: pre-wrap; border-bottom-right-radius: 4px; overflow-wrap: anywhere; }
.msg-assistant .bubble { background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.msg-assistant .bubble > :first-child { margin-top: 0; }
.msg-assistant .bubble > :last-child { margin-bottom: 0; }
.bubble.streaming { white-space: pre-wrap; }
.msg-status { color: var(--muted); font-size: 0.85rem; font-style: italic; }
.msg-error .bubble { background: var(--err-bg); color: var(--err-text); border: 0; }
.composer { display: flex; gap: 0.75rem; padding: 1rem clamp(12px, 4vw, 3rem); border-top: 1px solid var(--border); background: var(--surface); align-items: flex-end; }
.composer textarea { max-height: 40vh; min-height: 44px; }

/* ---------- Мобильная вёрстка ---------- */
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
         gap: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 0.5rem 16px; }
  .nav.open { display: flex; }
  .nav > * { padding: 0.6rem 0; }
  .theme-toggle { margin-top: 0.3rem; }
  .hero h1 { font-size: 1.8rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .kb-layout { grid-template-columns: 1fr; }
  .kb-sidebar { border-right: 0; border-bottom: 1px solid var(--border); min-height: 0; }
  .kb-tree { max-height: 30vh; overflow-y: auto; }
  .chat-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .chat-sidebar { border-right: 0; border-bottom: 1px solid var(--border); max-height: 28vh; }
  .auth-card { padding: 1.5rem; margin: 1rem auto; }
  .float-right { float: none; margin-bottom: 1rem; }
}

/* ---------- Файлы и редактор ---------- */
.page-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.page-head h1 { margin-bottom: 0.25rem; flex: 1; }
.quota { display: flex; flex-direction: column; align-items: flex-end; gap: 0.25rem; min-width: 220px; }
.quota-bar { width: 100%; height: 8px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--border); overflow: hidden; }
.quota-fill { height: 100%; width: 0; background: var(--accent); transition: width 0.3s; }
.quota-fill.quota-high { background: var(--danger); }
.files-actions { grid-template-columns: 1fr 1fr; align-items: start; margin-bottom: 0.5rem; }
.files-actions .panel h2 { margin: 0; }
.dropzone {
  border: 2px dashed var(--border); border-radius: var(--radius); padding: 1.25rem; text-align: center;
  cursor: pointer; color: var(--muted); position: relative; transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-table td.indent { padding-left: 1.75rem; }
.folder-row td { color: var(--muted); font-size: 0.85rem; background: var(--bg-alt); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1rem; margin: 1rem 0 1.5rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.top-gap { margin-top: 1rem; }
select {
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 8px;
  padding: 0.45rem 0.6rem; font: inherit;
}
.role-form select { padding: 0.25rem 0.4rem; font-size: 0.88rem; }
.ok-text { color: var(--ok-text); }
.err-text { color: var(--err-text); }

.container-wide { max-width: 1400px; padding-top: 1.5rem; padding-bottom: 2rem; }
.editor-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem 1.5rem; margin-bottom: 1.25rem;
}
.editor-group { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; min-width: 0; }
.editor-path { flex: 1 1 480px; }
.rename-form { display: flex; gap: 0.75rem; align-items: center; flex: 1 1 280px; min-width: 0; max-width: 640px; }
.rename-form input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 0.9rem; padding: 0.4rem 0.7rem; }
.editor-head + .alert { margin-bottom: 1.25rem; }
.editor-shell { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.editor-shell .CodeMirror {
  height: calc(100vh - 270px); min-height: 320px; font-family: var(--mono); font-size: 14px; line-height: 1.5;
  background: var(--surface); color: var(--text);  /* перебивает белый фон из codemirror.css */
}
.editor-shell .CodeMirror-lines { padding: 0.75rem 0; }
.editor-shell .CodeMirror pre.CodeMirror-line, .editor-shell .CodeMirror pre.CodeMirror-line-like { padding: 0 1rem; }
.editor-shell .CodeMirror-gutters { background: var(--bg-alt); border-right: 1px solid var(--border); }
.editor-shell .CodeMirror-linenumber { padding: 0 0.75rem 0 1rem; }
.editor-shell .CodeMirror-activeline-background { background: var(--accent-soft); }
.editor-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin-top: 1.25rem; }
.editor-status { margin-left: auto; }

/* Тема CodeMirror на токенах сайта (светлая/тёмная) */
.CodeMirror { background: var(--surface); color: var(--text); }
.CodeMirror-gutters { background: var(--bg-alt); border-right: 1px solid var(--border); }
.CodeMirror-linenumber { color: var(--muted); }
.CodeMirror-cursor { border-left-color: var(--text); }
.CodeMirror-activeline-background { background: var(--accent-soft); }
.CodeMirror-selected, .CodeMirror-focused .CodeMirror-selected { background: rgba(109, 74, 255, 0.22); }
.CodeMirror-matchingbracket { color: var(--accent) !important; text-decoration: underline; }
.cm-s-default .cm-keyword { color: #8a3ffc; }
.cm-s-default .cm-def { color: #0f62fe; }
.cm-s-default .cm-variable-2, .cm-s-default .cm-variable-3, .cm-s-default .cm-type { color: #007d79; }
.cm-s-default .cm-string, .cm-s-default .cm-string-2 { color: #198038; }
.cm-s-default .cm-number, .cm-s-default .cm-atom { color: #b28600; }
.cm-s-default .cm-comment { color: var(--muted); font-style: italic; }
.cm-s-default .cm-tag { color: #da1e28; }
.cm-s-default .cm-attribute, .cm-s-default .cm-property { color: #0072c3; }
.cm-s-default .cm-builtin { color: #d02670; }
.cm-s-default .cm-meta, .cm-s-default .cm-qualifier { color: #6f6f6f; }
:root[data-theme="dark"] .cm-s-default .cm-keyword { color: #c792ea; }
:root[data-theme="dark"] .cm-s-default .cm-def { color: #82aaff; }
:root[data-theme="dark"] .cm-s-default .cm-variable-2,
:root[data-theme="dark"] .cm-s-default .cm-variable-3,
:root[data-theme="dark"] .cm-s-default .cm-type { color: #89ddff; }
:root[data-theme="dark"] .cm-s-default .cm-string,
:root[data-theme="dark"] .cm-s-default .cm-string-2 { color: #c3e88d; }
:root[data-theme="dark"] .cm-s-default .cm-number,
:root[data-theme="dark"] .cm-s-default .cm-atom { color: #f78c6c; }
:root[data-theme="dark"] .cm-s-default .cm-tag { color: #f07178; }
:root[data-theme="dark"] .cm-s-default .cm-attribute,
:root[data-theme="dark"] .cm-s-default .cm-property { color: #ffcb6b; }
:root[data-theme="dark"] .cm-s-default .cm-builtin { color: #ff9cac; }
:root[data-theme="dark"] .cm-s-default .cm-meta,
:root[data-theme="dark"] .cm-s-default .cm-qualifier { color: #a0a0b4; }
:root[data-theme="dark"] .cm-s-default .cm-variable,
:root[data-theme="dark"] .cm-s-default .cm-operator { color: var(--text); }
:root[data-theme="dark"] .cm-s-default .cm-header { color: #82aaff; }

/* Чат: блоки кода и файлы агента */
.prose pre { position: relative; }
.code-save { position: absolute; top: 0.4rem; right: 0.4rem; opacity: 0; transition: opacity 0.15s; background: var(--surface); }
.prose pre:hover .code-save, .code-save:focus-visible, a.code-save { opacity: 1; }
a.code-save { color: var(--accent-contrast); background: var(--accent); }
.msg-file { justify-content: flex-start; }
.file-chip {
  display: inline-block; padding: 0.35rem 0.75rem; border-radius: 999px; border: 1px solid var(--border);
  background: var(--accent-soft); font-size: 0.88rem; font-family: var(--mono);
}

@media (max-width: 760px) {
  .files-actions { grid-template-columns: 1fr; }
  .quota { align-items: stretch; width: 100%; }
  .editor-shell .CodeMirror { height: 60vh; }
  .editor-head { gap: 0.75rem; }
  .editor-path, .rename-form { flex-basis: 100%; }
  .editor-status { margin-left: 0; flex-basis: 100%; }
  .code-save { opacity: 1; }
}
