:root {
  --ink: #1b2330;
  --ink-2: #4a5566;
  --muted: #6b7686;
  --line: #dfe3ea;
  --paper: #fbfaf7;
  --card: #ffffff;
  --accent: #1f3a5f;
  --accent-2: #2d5a8c;
  --accent-soft: #e8eef6;
  --gold: #b0892f;
  --review-bg: #fff3c4;
  --review-ink: #7a5a00;
  --review-line: #f0cf5a;
  --ok-bg: #e3f3e8;
  --ok-ink: #1e6b3a;
  --bad-bg: #fde7e7;
  --bad-ink: #a12a2a;
  --serif: "Noto Serif", "PT Serif", Georgia, "Times New Roman", serif;
  --sans: "Noto Sans", "PT Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 6px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--sans); }
a { color: var(--accent-2); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); line-height: 1.25; font-weight: 700; }
h1 { font-size: 1.9rem; margin: .4em 0 .6em; }
h2 { font-size: 1.4rem; margin: 1.4em 0 .6em; }
h3 { font-size: 1.1rem; margin: 0 0 .3em; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.main { min-height: 60vh; padding-top: 20px; padding-bottom: 48px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.right { text-align: right; }
.center { text-align: center; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
mark { background: #fff0a8; padding: 0 2px; }

/* ---------- header ---------- */
.site-header { background: var(--accent); color: #fff; }
.header-row { display: flex; align-items: center; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; min-width: 0; }
.brand:hover { color: #fff; }
.brand-mark { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; letter-spacing: .06em; border: 2px solid var(--gold); color: #f3e2b5; padding: 4px 8px; border-radius: 3px; white-space: nowrap; }
.brand-text { font-family: var(--serif); font-size: 1.12rem; line-height: 1.2; display: flex; flex-direction: column; }
.brand-text small { font-family: var(--sans); font-size: .72rem; opacity: .7; letter-spacing: .04em; }
.header-search { flex: 1; max-width: 360px; margin-left: auto; }
.header-search input { width: 100%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.1); color: #fff; padding: 7px 12px; border-radius: 20px; font: inherit; font-size: .92rem; }
.header-search input::placeholder { color: rgba(255,255,255,.65); }
.header-tools { display: flex; align-items: center; gap: 12px; }
.lang a { color: rgba(255,255,255,.7); text-decoration: none; font-size: .8rem; padding: 2px 4px; }
.lang a.active { color: #fff; font-weight: 700; border-bottom: 2px solid var(--gold); }
.msg-link { color: #fff; text-decoration: none; position: relative; font-size: 1.15rem; }
.count { display: inline-block; min-width: 18px; height: 18px; line-height: 18px; text-align: center; background: #e2483d; color: #fff; border-radius: 9px; font-size: .7rem; font-weight: 700; padding: 0 5px; vertical-align: top; }
.msg-link .count { position: absolute; top: -6px; right: -12px; }
.user-menu { position: relative; }
.user-menu summary { cursor: pointer; list-style: none; color: #fff; font-size: .9rem; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu summary::after { content: " ▾"; opacity: .7; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu .menu { position: absolute; right: 0; top: 130%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.12); min-width: 210px; z-index: 50; padding: 6px 0; }
.user-menu .menu a, .user-menu .menu .linklike { display: block; padding: 8px 16px; color: var(--ink); text-decoration: none; font-size: .92rem; width: 100%; text-align: left; }
.user-menu .menu a:hover, .user-menu .menu .linklike:hover { background: var(--accent-soft); }
.main-nav { background: #172d4a; }
.main-nav .wrap { display: flex; flex-wrap: wrap; gap: 2px 4px; }
.main-nav a { color: rgba(255,255,255,.85); text-decoration: none; padding: 9px 10px; font-size: .92rem; }
.main-nav a:hover { color: #fff; background: rgba(255,255,255,.07); }
.main-nav .nav-cta { margin-left: auto; color: #f3e2b5; font-weight: 600; }
.nav-toggle { display: none; }

/* ---------- common ---------- */
.btn { display: inline-block; background: var(--accent); color: #fff; border: 1px solid var(--accent); padding: 9px 18px; border-radius: var(--radius); font: inherit; font-size: .95rem; cursor: pointer; text-decoration: none; line-height: 1.3; }
.btn:hover { background: var(--accent-2); color: #fff; }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.site-header .btn-ghost { color: #fff; }
.btn-light { background: #fff; color: var(--accent); border-color: var(--line); }
.btn-light:hover { background: var(--accent-soft); color: var(--accent); }
.btn-ok { background: #1e6b3a; border-color: #1e6b3a; }
.btn-warn { background: #a36b00; border-color: #a36b00; }
.btn-danger { background: #a12a2a; border-color: #a12a2a; }
.btn-small { padding: 5px 12px; font-size: .85rem; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-2); cursor: pointer; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; }
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; }
.grid-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.stack > * + * { margin-top: 12px; }
.flashes { margin-bottom: 16px; }
.flash { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 8px; border: 1px solid; }
.flash-success { background: var(--ok-bg); color: var(--ok-ink); border-color: #b9dfc6; }
.flash-error { background: var(--bad-bg); color: var(--bad-ink); border-color: #f2b9b9; }
.flash-info, .flash-message { background: var(--accent-soft); border-color: #c8d6e8; }

.badge { display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .02em; padding: 2px 9px; border-radius: 3px; text-transform: uppercase; vertical-align: middle; }
.badge-review { background: var(--review-bg); color: var(--review-ink); border: 1px solid var(--review-line); }
.badge-ok { background: var(--ok-bg); color: var(--ok-ink); }
.badge-bad { background: var(--bad-bg); color: var(--bad-ink); }
.st-review, .st-offered { background: var(--review-bg); color: var(--review-ink); }
.st-admin { background: #ffe0cc; color: #8a3b00; }
.st-revision { background: #e6e0f7; color: #4b3690; }
.st-accepted, .st-completed { background: var(--ok-bg); color: var(--ok-ink); }
.st-rejected, .st-expired, .st-declined, .st-cancelled { background: var(--bad-bg); color: var(--bad-ink); }
.tag { display: inline-block; font-size: .78rem; color: var(--ink-2); background: var(--accent-soft); padding: 1px 8px; border-radius: 10px; text-decoration: none; margin: 0 2px; }
.review-banner { background: var(--review-bg); border: 1px solid var(--review-line); color: var(--review-ink); padding: 12px 16px; border-radius: var(--radius); margin-bottom: 18px; font-weight: 500; }

.article-card h3 { margin-top: 8px; font-size: 1.12rem; }
.article-card h3 a { color: var(--ink); text-decoration: none; }
.article-card h3 a:hover { color: var(--accent-2); text-decoration: underline; }
.article-card .authors { margin: 0 0 6px; color: var(--ink-2); font-size: .93rem; }
.article-card .abstract-snippet { margin: 0 0 6px; color: var(--ink-2); font-size: .92rem; }
.article-card .meta { margin: 0; font-size: .82rem; color: var(--muted); }
.card-top { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }

/* ---------- article page ---------- */
.article-head .kicker { font-size: .85rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.article-head h1 { font-size: 1.85rem; }
.article-head .alt-title { font-family: var(--serif); color: var(--ink-2); font-size: 1.1rem; margin-top: -8px; }
.author-list { list-style: none; padding: 0; margin: 0 0 14px; }
.author-list li { margin-bottom: 4px; }
.author-list .org { color: var(--muted); font-size: .9rem; }
.orcid { display: inline-block; font-size: .72rem; background: #a6ce39; color: #fff; border-radius: 3px; padding: 0 5px; text-decoration: none; font-weight: 700; vertical-align: middle; }
.abstract { font-family: var(--serif); font-size: 1.02rem; line-height: 1.7; }
.side-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; font-size: .92rem; }
.side-box h3 { font-size: .95rem; margin-bottom: 8px; }
.side-box dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; }
.side-box dt { color: var(--muted); }
.side-box dd { margin: 0; }
.cite { font-size: .88rem; background: #f6f6f2; border-left: 3px solid var(--gold); padding: 8px 10px; margin: 6px 0 12px; word-break: break-word; }

/* ---------- issue / archive ---------- */
.cover { aspect-ratio: 210 / 297; background: linear-gradient(160deg, #1f3a5f, #0f2238); color: #fff; border-radius: 4px; padding: 18px; display: flex; flex-direction: column; justify-content: space-between; text-decoration: none; box-shadow: 0 6px 18px rgba(20,30,50,.25); background-size: cover; background-position: center; position: relative; overflow: hidden; }
.cover::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,34,56,.25), rgba(15,34,56,.85)); }
.cover > * { position: relative; }
.cover:hover { color: #fff; transform: translateY(-2px); transition: transform .15s; }
.cover .c-name { font-family: var(--serif); font-size: 1rem; line-height: 1.2; border-top: 2px solid var(--gold); padding-top: 8px; }
.cover .c-num { font-family: var(--serif); font-size: 2.1rem; font-weight: 700; }
.cover .c-year { opacity: .8; font-size: .85rem; }
.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; }
.toc { list-style: none; padding: 0; margin: 0; }
.toc li { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px dotted var(--line); }
.toc .pages { font-family: var(--serif); color: var(--muted); white-space: nowrap; }
.toc .t { font-family: var(--serif); font-weight: 600; }
.toc .a { color: var(--ink-2); font-size: .9rem; }
.toc-section { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gold); margin-top: 24px; }

/* ---------- forms ---------- */
form.form { max-width: 760px; }
label { display: block; font-weight: 600; font-size: .92rem; margin: 14px 0 4px; }
label.check { font-weight: 400; display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; }
label.check input { margin-top: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=search], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid #c9ced8; border-radius: var(--radius); font: inherit; background: #fff; color: var(--ink);
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid #b8cbe4; border-color: var(--accent-2); }
.hint { font-size: .82rem; color: var(--muted); margin: 3px 0 0; font-weight: 400; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.checkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 16px; max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 12px; background: #fff; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 16px 16px; margin: 18px 0; background: #fff; }
legend { font-family: var(--serif); font-weight: 700; padding: 0 6px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-top: 10px; }
.tabs button { background: none; border: 1px solid transparent; border-bottom: 0; padding: 6px 14px; cursor: pointer; font: inherit; color: var(--muted); border-radius: var(--radius) var(--radius) 0 0; }
.tabs button.active { background: #fff; border-color: var(--line); color: var(--ink); margin-bottom: -1px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.author-row { border: 1px dashed var(--line); padding: 4px 12px 12px; border-radius: var(--radius); margin-bottom: 10px; position: relative; }
.author-row .remove { position: absolute; top: 6px; right: 10px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; align-items: center; }
.warnings { background: var(--review-bg); border: 1px solid var(--review-line); padding: 10px 14px 10px 32px; border-radius: var(--radius); color: var(--review-ink); font-size: .92rem; }
.captcha { display: flex; align-items: center; gap: 10px; }
.captcha span { font-weight: 700; white-space: nowrap; }
.captcha input { max-width: 120px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; background: #fff; font-size: .9rem; }
table.data th, table.data td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.data th { background: #f3f4f7; font-weight: 600; font-size: .82rem; color: var(--ink-2); white-space: nowrap; }
table.data tr:hover td { background: #fafbfd; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-decoration: none; color: var(--ink); display: block; }
.stat b { display: block; font-size: 1.7rem; font-family: var(--serif); color: var(--accent); }
.stat span { font-size: .85rem; color: var(--muted); }
.admin-nav { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.admin-nav a { padding: 5px 10px; border-radius: var(--radius); text-decoration: none; font-size: .9rem; color: var(--ink-2); }
.admin-nav a.active, .admin-nav a:hover { background: var(--accent-soft); color: var(--accent); }

/* ---------- messages ---------- */
.thread { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 80%; padding: 10px 14px; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.msg.mine { align-self: flex-end; background: var(--accent-soft); }
.msg .who { font-size: .78rem; color: var(--muted); margin-bottom: 4px; }
.notes { list-style: none; padding: 0; margin: 0; }
.notes li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.notes li.unread { font-weight: 600; }
.notes time { color: var(--muted); font-size: .8rem; margin-right: 8px; }

.pagination { display: flex; gap: 4px; flex-wrap: wrap; margin: 20px 0; }
.pagination a, .pagination span { padding: 5px 11px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: #fff; font-size: .9rem; }
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }

.page-body { font-family: var(--serif); font-size: 1.03rem; line-height: 1.75; max-width: 800px; }
.page-body h2 { font-size: 1.25rem; }
.hero { background: linear-gradient(135deg, #fff, var(--accent-soft)); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; margin-bottom: 26px; display: grid; grid-template-columns: 1fr 170px; gap: 24px; align-items: center; }
.hero h1 { margin-top: 0; }
.hero p { color: var(--ink-2); margin: 0 0 14px; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--accent); margin: 28px 0 14px; }
.section-title h2 { margin: 0 0 6px; }

/* ---------- footer ---------- */
.site-footer { background: #10233b; color: rgba(255,255,255,.75); padding: 28px 0; font-size: .88rem; }
.site-footer a { color: #d7e3f3; }
.footer-grid { display: grid; grid-template-columns: 2fr 2fr 1fr; gap: 20px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; align-content: flex-start; }
.site-footer .muted { color: rgba(255,255,255,.5); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .grid-2, .hero { grid-template-columns: 1fr; }
  .hero .cover { max-width: 170px; }
  .header-row { flex-wrap: wrap; }
  .header-search { order: 3; max-width: none; flex-basis: 100%; }
  .header-tools { margin-left: auto; }
  .brand-text { font-size: .98rem; }
  .nav-toggle { display: block; color: #fff; padding-bottom: 8px; }
  .nav-toggle summary { cursor: pointer; list-style: none; font-size: .95rem; }
  .main-nav { display: none; }
  .nav-toggle[open] + .main-nav { display: block; }
  .main-nav .wrap { flex-direction: column; }
  .main-nav .nav-cta { margin-left: 0; }
  .row, .row-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  h1 { font-size: 1.5rem; }
  .article-head h1 { font-size: 1.45rem; }
  .msg { max-width: 95%; }
}

/* ---------- редколлегия ---------- */
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.person { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: start; margin: 0; }
.person .photo { width: 96px; height: 128px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); }
.person .photo-empty { display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); font-family: var(--serif); font-size: 2.2rem; }
.thumb { width: 36px; height: 48px; object-fit: cover; border-radius: 3px; vertical-align: middle; }
@media (max-width: 420px) { .board-grid { grid-template-columns: 1fr; } .person { grid-template-columns: 72px 1fr; } .person .photo { width: 72px; height: 96px; } }
.cite-dl { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
