/* Shared visual language for the existing author portal and CMS. */
:root{--paper:#fff;--bg:#f4f3ef;--ink:#202c2a;--muted:#53615c;--line:#cbd5ca;--accent:#244c40;--white:#fff;--sand:#c6d3bf}
body{background:var(--bg);color:var(--ink)}.rail{background:#e2e8dc;border:0}.rail nav a{border:0;border-radius:12px}.rail nav a.active{border:0;background:#244c40;color:white}.brand small{letter-spacing:.5px}.btn{border-radius:999px;background:var(--accent);border-color:var(--accent);transition:transform 160ms,background 160ms}.btn:hover{transform:translateY(-2px);filter:none;background:#18392e}.btn.secondary{background:#e2e8dc;color:var(--accent);border-color:transparent}.panel,.stat{border:0;border-radius:18px}.stat{background:#e2e8dc}.stat:first-child{background:#244c40;color:white}.stat:first-child span{color:#dce7d5}.demo{background:#e2e8dc;color:#354b3e;border-left-color:#819a78;font-size:13px;border-radius:10px}.badge{background:#dce7d5;color:#244c40;border-radius:999px}.kicker{text-transform:none;letter-spacing:0;font-size:13px}.panel h2{font-size:27px}.field span,.help p,.help a,.meta{font-size:14px}.toast{border-radius:12px;background:var(--ink)}input:not([type=checkbox]),textarea,select{background:white;border-radius:10px;color:var(--ink);font-size:16px}.top{border:0}.empty .seal{color:var(--accent)}.login{border-radius:24px}.login .btn{width:100%}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #587b4d;outline-offset:3px}
.langs{flex-shrink:0}.langs a{white-space:nowrap;min-width:40px}.login-page{background:var(--bg)}.login-card{border:0;border-radius:22px;box-shadow:none}.login-logo{color:var(--accent)}.login-logo span{background:#e2e8dc;color:var(--muted)}.login-back{color:var(--accent)}.admin-page .rail{background:var(--ink);color:#dce7d5}.admin-page .rail nav a{color:#dce7d5}.admin-page .rail nav a:hover{background:#354b42}.admin-page .rail nav a.active{background:#47634f;color:white}.admin-page .admin-mark{background:#47634f}.admin-page .rail .bottom,.admin-page .rail .bottom p,.admin-page .brand small,.admin-page .nav-label,.admin-page .rail nav a span{color:#b7cbb4}.admin-page .rail .bottom a{color:#e0ead9}
@media(max-width:700px){.heading{flex-wrap:wrap}.content{padding-inline:20px}.panel{padding:22px}.form-grid{grid-template-columns:minmax(0,1fr)}.heading h1{font-size:34px}.top{flex-wrap:wrap;padding-block:14px;gap:10px}.top .langs{margin-left:auto}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

.document-toolbar{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}.document-toolbar button{padding:10px 14px;border:1px solid var(--line);border-radius:8px;background:white;color:var(--ink);min-height:44px;cursor:pointer}.document-editor{margin-top:12px;min-height:60vh;max-height:75vh;overflow:auto;border:1px solid var(--line);border-radius:12px;padding:24px;background:white;font-size:16px;line-height:1.65;overflow-wrap:anywhere}.document-editor:focus{outline:3px solid #587b4d;outline-offset:3px}.document-editor h2{margin:25px 0 14px}.document-editor li{margin-bottom:8px}.document-editor p{margin:14px 0}.document-editor details{padding:14px;background:#f4f3ef;margin:14px 0}.document-editor a{color:var(--accent);text-decoration:underline}.document-editor a.btn{color:white}.document-editor a.btn.light{color:var(--ink)}

.document-toolbar select{width:auto;min-width:100px;min-height:44px;padding:8px;font-size:14px}.document-toolbar{position:sticky;top:0;z-index:2;background:#f4f3ef;padding:10px;border-radius:10px}.compact-editor{min-height:100px;max-height:360px;width:100%;padding:14px}.field:has(.compact-editor){display:block;min-width:0}.document-toolbar button{font-size:13px}.document-editor [style*="font-size"]{line-height:1.4}.form-grid>*{min-width:0}

.document-editor h2,.document-editor h3{font-weight:400}.document-editor{font-weight:400}.document-editor strong,.document-editor b{font-weight:700}

/* Compact, shared icon toolbar for all CMS text editors. */
.document-toolbar{gap:4px;padding:6px;align-items:center}
.document-toolbar button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 36px;width:36px;min-height:36px;height:36px;padding:7px;border-color:transparent;border-radius:6px;background:transparent;touch-action:manipulation}
.document-toolbar button svg{display:block;flex-shrink:0;pointer-events:none}
.document-toolbar button:hover{background:#e2e8dc;border-color:var(--line)}
.document-toolbar button:active{background:#c6d3bf}
.document-toolbar button[aria-pressed="true"]{background:var(--accent);color:white;border-color:var(--accent);box-shadow:inset 0 -3px 0 #b7cbb4}
.document-toolbar button[aria-pressed="mixed"]{background:#e2e8dc;border-color:var(--accent);border-style:dashed}
.document-toolbar select{min-height:36px;height:36px;padding:4px 6px;min-width:0;max-width:100%;font-size:14px}
.document-toolbar select[aria-label="Размер текста"]{width:96px;margin-right:4px}
@media(pointer:coarse),(max-width:700px){.document-toolbar{gap:8px}.document-toolbar button{flex-basis:44px;width:44px;height:44px;min-height:44px}.document-toolbar select{height:44px;min-height:44px;font-size:16px}}


.document-toolbar select[aria-label="Шрифт"]{width:170px;max-width:100%}
.issue-cover-preview{width:150px;height:212px;object-fit:cover;display:block;margin-bottom:16px}
.article-edit summary,.manuscript summary{cursor:pointer;font-size:18px;font-weight:600;overflow-wrap:anywhere;padding:12px 0}
.article-fields{padding-top:20px}.article-fields .form-grid{align-items:start}
[hidden]{display:none!important}.translations{min-width:0}.admin-toolbar p{margin:0;flex:1}
#upload-status{position:sticky;bottom:90px;background:var(--paper);padding:12px;border-radius:8px}#upload-status:empty{display:none}#upload-status progress{width:min(100%,300px);margin-right:12px}
.actions{flex-wrap:wrap}.actions>button:not(.btn){min-width:44px;min-height:44px;border:1px solid var(--line);background:white;border-radius:8px;cursor:pointer}
.manuscript p,.manuscript li{overflow-wrap:anywhere}#server-status{margin-bottom:20px;overflow-wrap:anywhere}#server-status button{margin:8px 8px 0 0}
@media(max-width:700px){.article-edit{padding:14px}.document-toolbar{position:static}.article-fields .form-grid{grid-template-columns:minmax(0,1fr)}.admin-toolbar{padding:12px}.admin-toolbar .field{min-width:0;max-width:100%}}

@media(max-width:700px){.admin-toolbar{flex-direction:column;align-items:stretch}.admin-toolbar .field{width:100%}.admin-toolbar p{font-size:14px}}

.pdf-current a{color:var(--accent);text-decoration:underline;text-underline-offset:3px}.pdf-current span{display:inline-block;margin-left:8px;overflow-wrap:anywhere}
