/* ============================================================
   XML Library — UI stylesheet
   ============================================================ */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --hairline: #d2d2d7;
  --hairline-soft: #ececf0;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --link: #0066cc;
  --red: #ff3b30;
  --green: #34c759;
  --radius: 18px;
  --radius-s: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,.07);
  --shadow-hover: 0 12px 40px rgba(0,0,0,.13);
  --focus: 0 0 0 3px rgba(0,113,227,.35);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.modal-open { overflow: hidden; }
/* «hidden» обязан работать даже там, где у элемента задан свой display (img.drop-preview, .modal-body) */
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
/* видимый фокус для клавиатуры (Tab), без рамок при клике мышью */
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.btn:focus-visible, .pdf-badge:focus-visible, .lang-switch a:focus-visible { border-radius: 980px; }
.container { max-width: 1024px; margin: 0 auto; padding: 0 22px; }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 300;
  background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; font-size: .9rem;
  transition: top .15s;
}
.skip:focus { top: 10px; outline: none; }
.empty-state { text-align: center; color: var(--text-2); padding: 40px 0; }
.empty-state h1 { font-size: 1.6rem; margin-bottom: 14px; color: var(--text); }
.hide-sm, .hide-lg { }

/* ---------------- nav ---------------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: rgba(255,255,255,.82);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s ease, background .3s ease, border-color .3s ease;
}
.nav.scrolled { border-bottom-color: rgba(0,0,0,.08); background: rgba(255,255,255,.92); }
.nav-inner {
  max-width: 1024px; margin: 0 auto; padding: 0 22px;
  height: 54px; display: flex; align-items: center; gap: 24px;
}
.nav-logo {
  display: flex; align-items: center; gap: 8px; flex: none; white-space: nowrap;
  font-size: 17px; font-weight: 600; color: var(--text); letter-spacing: -.01em;
}
.nav-logo svg { flex: none; }
.nav-logo:hover { text-decoration: none; }
.nav-links { display: flex; gap: 22px; flex: 1; min-width: 0; }
.nav-links a {
  font-size: 14px; color: rgba(29,29,31,.8); padding: 4px 0; white-space: nowrap;
  transition: color .2s;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-right { display: flex; align-items: center; gap: 12px; flex: none; }
.nav-search {
  display: flex; align-items: center; gap: 6px;
  background: rgba(0,0,0,.05); border-radius: 980px; padding: 0 12px; height: 34px; width: 220px;
  transition: width .2s ease, background .2s, box-shadow .2s;
}
.nav-search:focus-within { background: #fff; box-shadow: 0 0 0 1px var(--hairline), var(--focus); width: 280px; }
.nav-search-ico { display: flex; color: var(--text-3); flex: none; }
.nav-search input {
  flex: 1; min-width: 0; border: none; background: transparent; font-family: inherit; font-size: 14px;
  color: var(--text); outline: none; height: 100%;
}
.nav-search input::placeholder { color: var(--text-3); }
.nav-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.nav-search-link { display: none; color: rgba(29,29,31,.8); padding: 6px; border-radius: 50%; }
.nav-search-link:hover { color: var(--text); background: rgba(0,0,0,.05); }
.lang-switch {
  display: flex; background: rgba(0,0,0,.06); border-radius: 980px; padding: 2px; flex: none;
}
.lang-switch a {
  font-size: 12px; font-weight: 600; color: var(--text-2);
  padding: 5px 10px; border-radius: 980px; transition: all .2s; line-height: 1.2;
}
.lang-switch a:hover { text-decoration: none; color: var(--text); }
.lang-switch a.on { background: #fff; color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.15); }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 980px;
  font-size: 16px; font-weight: 500; line-height: 1.2;
  padding: 12px 24px; transition: all .2s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: rgba(0,113,227,.08); color: var(--accent); }
.btn-secondary:hover { background: rgba(0,113,227,.14); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; transform: none !important; }
.btn-pdf { background: var(--red); color: #fff; font-size: 15px; padding: 11px 22px; }
.btn-pdf:hover { background: #e8342a; }
.link-arrow { font-size: 17px; color: var(--link); white-space: nowrap; }
.link-arrow::after { content: " ›"; }
.link-back { font-size: .95rem; }

/* PDF badge (compact, in lists) */
.pdf-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,59,48,.09); color: var(--red);
  border: none; border-radius: 980px;
  font-size: 13px; font-weight: 600; letter-spacing: .01em;
  padding: 7px 14px; transition: all .2s ease; white-space: nowrap;
}
.pdf-badge:hover { background: var(--red); color: #fff; }

/* ---------------- hero ---------------- */
.hero { text-align: center; padding: 64px 22px 56px; }
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  font-weight: 700; letter-spacing: -.018em; line-height: 1.1;
  max-width: 780px; margin: 0 auto;
}
.hero .sub {
  font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--text-2);
  max-width: 640px; margin: 16px auto 0; font-weight: 400; letter-spacing: -.005em;
}
.hero-search { margin-top: 30px; }
.hero .search-hint { margin-top: 12px; }
.hero-cta { margin-top: 26px; display: flex; gap: 22px; justify-content: center; align-items: center; flex-wrap: wrap; }
.hero-stats {
  margin-top: 44px; display: flex; justify-content: center; gap: 48px; flex-wrap: wrap;
}
.hero-stats div { text-align: center; }
.hero-stats b { display: block; font-size: 1.8rem; font-weight: 700; letter-spacing: -.02em; }
.hero-stats span { font-size: .92rem; color: var(--text-2); }

/* ---------------- sections ---------------- */
.section { padding: 72px 0; }
.section-tight { padding-top: 24px; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head-left { text-align: left; margin-bottom: 26px; }
.section-head h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.3rem); font-weight: 700; letter-spacing: -.016em;
}
.section-head h2.h2-small { font-size: 1.45rem; }
.h2-dim { color: var(--text-3); font-weight: 500; font-size: .85em; }
.section-head p { color: var(--text-2); font-size: 1.15rem; margin-top: 10px; }
.section-head .link-arrow { display: inline-block; margin-top: 10px; }

/* ---------------- cards / grids ---------------- */
.grid-journals {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px;
}
.jcard {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px;
  display: flex; flex-direction: column; gap: 12px;
  transition: transform .25s ease, box-shadow .25s ease;
  color: var(--text);
  border: 1px solid rgba(0,0,0,.04);
}
a.jcard:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.section-alt .jcard { box-shadow: 0 2px 14px rgba(0,0,0,.05); }
.jcard-cover {
  width: 92px; aspect-ratio: 210 / 287; border-radius: 8px; overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.14); background: var(--bg-alt);
}
.jcard h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -.012em; line-height: 1.25; }
.jcard .jmeta { font-size: .9rem; color: var(--text-2); line-height: 1.55; }
.jcard .jcount { margin-top: auto; font-size: .95rem; color: var(--link); font-weight: 500; }

.grid-issues {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 26px;
}
.icard { color: var(--text); display: block; }
.icard:hover { text-decoration: none; }
.cover-wrap {
  border-radius: var(--radius-s); overflow: hidden;
  box-shadow: 0 3px 16px rgba(0,0,0,.12);
  transition: transform .25s ease, box-shadow .25s ease;
  aspect-ratio: 210 / 287; background: var(--bg-alt);
}
.icard:hover .cover-wrap { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(0,0,0,.2); }
.icard:hover .ic-title { color: var(--link); }
.cover-img { width: 100%; height: 100%; object-fit: cover; }
.cover-ph {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  justify-content: space-between; padding: 14px; color: #fff;
}
.cover-ph-title { font-size: .9rem; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; overflow-wrap: anywhere; }
.cover-ph-num { font-size: .8rem; opacity: .85; font-weight: 500; }
.icard .ic-title { margin-top: 12px; font-size: .98rem; font-weight: 600; line-height: 1.3; letter-spacing: -.008em; }
.icard .ic-meta { font-size: .85rem; color: var(--text-2); margin-top: 2px; }

/* ---------------- how it works ---------------- */
.grid-how { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.how-card {
  background: #fff; border-radius: var(--radius); padding: 30px 26px;
  box-shadow: 0 2px 14px rgba(0,0,0,.05); text-align: left;
}
.how-num {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 700; margin-bottom: 16px;
}
.how-card:nth-child(2) .how-num { background: #5e5ce6; }
.how-card:nth-child(3) .how-num { background: #248a3d; }
.how-card h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; margin-bottom: 8px; }
.how-card p { color: var(--text-2); font-size: 1rem; }

/* ---------------- access band ---------------- */
.band { text-align: center; padding: 72px 22px; background: #1d1d1f; color: #f5f5f7; }
.band h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 700; letter-spacing: -.016em; }
.band p { color: rgba(245,245,247,.78); max-width: 640px; margin: 16px auto 0; font-size: 1.12rem; }
.band .pdf-demo {
  margin: 30px auto 0; display: inline-flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.1); border-radius: 980px; padding: 12px 26px;
  color: #fff; font-weight: 600;
}
.band .pdf-demo svg { color: #ff6961; }

/* ---------------- FAQ ---------------- */
.faq { max-width: 720px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--hairline); padding: 4px 0; }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  font-size: 1.12rem; font-weight: 600; letter-spacing: -.01em; padding: 16px 0;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-size: 1.5rem; font-weight: 300; color: var(--text-2);
  transition: transform .25s ease; margin-left: 16px; flex: none;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-a { color: var(--text-2); padding: 0 40px 18px 0; font-size: 1.02rem; }

/* ---------------- breadcrumbs / page heads ---------------- */
.page-head { padding: 40px 0 26px; }
.page-head-crumbs { padding-bottom: 0; }
.crumbs { font-size: .9rem; color: var(--text-2); margin-bottom: 14px; display: flex; flex-wrap: wrap; align-items: center; }
.crumbs a { color: var(--text-2); }
.crumbs a:hover { color: var(--link); }
.crumbs span { margin: 0 7px; color: var(--text-3); }
.page-head h1 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); font-weight: 700; letter-spacing: -.016em; line-height: 1.15; }
.page-head .sub { color: var(--text-2); font-size: 1.08rem; margin-top: 8px; }
.page-head .meta-line { font-size: .95rem; margin-top: 12px; }
.page-head .meta-line .dot { color: var(--text-3); margin: 0 2px; }
.page-head .journal-desc { max-width: 720px; margin-top: 14px; font-size: 1rem; line-height: 1.6; }

/* ---------------- issue page ---------------- */
.issue-layout { display: grid; grid-template-columns: 240px 1fr; gap: 48px; align-items: start; }
.issue-side { position: sticky; top: 76px; }
.issue-side .cover-wrap { box-shadow: 0 8px 30px rgba(0,0,0,.16); }
.issue-side .side-meta { margin-top: 18px; font-size: .95rem; color: var(--text-2); line-height: 1.7; }
.issue-side .side-meta b { color: var(--text); font-weight: 600; }
.issue-side .side-links { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; font-size: .95rem; }
.side-nav {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--hairline-soft);
  display: flex; flex-direction: column; gap: 6px; font-size: .9rem;
}
.side-nav a { color: var(--text-2); }
.side-nav a:hover { color: var(--link); }

.toc-section {
  font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-3); margin: 34px 0 4px;
}
.toc-section:first-child { margin-top: 0; }
.art-row {
  display: flex; gap: 20px; align-items: flex-start;
  padding: 18px 0; border-bottom: 1px solid var(--hairline-soft);
}
.art-row:last-child { border-bottom: none; }
.art-row .art-info { flex: 1; min-width: 0; }
.art-row h3 { font-size: 1.06rem; font-weight: 600; letter-spacing: -.008em; line-height: 1.35; }
.art-row h3 a { color: var(--text); }
.art-row h3 a:hover { color: var(--link); }
.art-row .art-authors { font-size: .92rem; color: var(--text-2); margin-top: 5px; }
.art-row .art-meta { font-size: .84rem; color: var(--text-3); margin-top: 5px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.art-row .art-meta a { color: var(--text-3); }
.art-row .art-meta a:hover { color: var(--link); }
.art-row .art-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }

/* ---------------- article page ---------------- */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
.article-main { min-width: 0; }
.art-type-chip {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); background: rgba(0,113,227,.08); border-radius: 980px; padding: 5px 12px; margin-bottom: 14px;
}
.article-title { font-size: clamp(1.5rem, 3.2vw, 2.1rem); font-weight: 700; letter-spacing: -.015em; line-height: 1.2; overflow-wrap: anywhere; }
.article-title-alt { font-size: 1.1rem; color: var(--text-2); margin-top: 10px; font-weight: 500; line-height: 1.35; }
.article-authors { margin-top: 18px; font-size: 1.02rem; }
.article-authors .a-name { font-weight: 600; }
.article-source { margin-top: 6px; font-size: .95rem; color: var(--text-2); }
.pdf-inline-cta { display: none; margin-top: 18px; align-items: center; gap: 12px; flex-wrap: wrap; }
.pdf-inline-note { font-size: .85rem; color: #248a3d; font-weight: 600; }
.notice-inline { margin-top: 16px; }
.authors-detail .auth-group + .auth-group { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--hairline-soft); }
.auth-item { font-size: .95rem; line-height: 1.55; color: var(--text-2); margin-bottom: 8px; overflow-wrap: anywhere; }
.auth-item:last-child { margin-bottom: 0; }
.auth-item b { color: var(--text); font-weight: 600; }
.auth-orcid, .auth-mail { font-size: .85rem; white-space: nowrap; margin-left: 4px; }
.article-block { margin-top: 36px; }
.article-block-first { margin-top: 26px; }
.article-block h2 {
  font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 12px;
}
.article-block .ab-text { font-size: 1.02rem; line-height: 1.65; }
.article-block .ab-text + .ab-text { margin-top: 14px; color: var(--text-2); }
.kw-list { display: flex; flex-wrap: wrap; gap: 8px; }
.kw {
  font-size: .85rem; background: var(--bg-alt); color: var(--text-2);
  border-radius: 980px; padding: 6px 13px; transition: all .15s;
}
a.kw:hover { background: rgba(0,113,227,.1); color: var(--accent); text-decoration: none; }
.refs { font-size: .92rem; color: var(--text-2); line-height: 1.6; padding-left: 20px; }
.refs li { margin-bottom: 9px; overflow-wrap: anywhere; }
.cite-box {
  background: var(--bg-alt); border-radius: var(--radius-s); padding: 16px 20px;
  font-size: .92rem; color: var(--text-2); line-height: 1.55;
  display: flex; gap: 14px; align-items: flex-start; justify-content: space-between;
}
.cite-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.copy-btn {
  flex: none; background: #fff; border: 1px solid var(--hairline); border-radius: 980px;
  font-size: .78rem; font-weight: 600; color: var(--text-2); padding: 5px 12px;
  transition: all .2s;
}
.copy-btn:hover { color: var(--text); border-color: var(--text-3); }
.copy-btn.copied, .copy-url.copied { color: #248a3d; border-color: #248a3d; }
.art-nav {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--hairline);
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.art-nav a { color: var(--text); display: flex; flex-direction: column; gap: 4px; }
.art-nav a:hover { text-decoration: none; color: var(--link); }
.art-nav small { font-size: .8rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.art-nav span { font-size: .95rem; line-height: 1.35; }
.art-nav-next { text-align: right; align-items: flex-end; }

.art-sidebar { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 18px; }
.pdf-card {
  background: #fff; border: 1px solid rgba(0,0,0,.06); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px; text-align: center;
}
.pdf-card .pdf-big { color: var(--red); margin: 0 auto 12px; width: 46px; }
.pdf-card h3 { font-size: 1.06rem; font-weight: 700; letter-spacing: -.01em; }
.pdf-card .free-chip {
  display: inline-block; margin: 10px 0 12px; font-size: .8rem; font-weight: 700;
  color: #248a3d; background: rgba(52,199,89,.14); border-radius: 980px; padding: 4px 12px;
}
.pdf-card p { font-size: .9rem; color: var(--text-2); margin-bottom: 16px; }
.pdf-card-form { text-align: left; }
.pdf-card-form h3 { margin-bottom: 4px; }
.pdf-card-form p { margin-bottom: 12px; }
.meta-card {
  background: var(--bg-alt); border-radius: var(--radius); padding: 22px 24px;
  font-size: .92rem;
}
.meta-card h4 { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 12px; }
.meta-card dl { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; }
.meta-card dt { color: var(--text-2); }
.meta-card dd { font-weight: 500; overflow-wrap: anywhere; }
.xml-link { display: flex; align-items: center; gap: 8px; font-size: .92rem; }

/* ---------------- search ---------------- */
.search-hero { padding: 48px 0 20px; text-align: center; }
.search-hero h1 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); font-weight: 700; letter-spacing: -.016em; }
.search-box { max-width: 640px; margin: 26px auto 0; display: flex; gap: 10px; }
.search-box input {
  flex: 1; min-width: 0; font-family: inherit; font-size: 1.05rem;
  border: 1px solid var(--hairline); border-radius: 980px;
  padding: 12px 22px; outline: none; transition: all .2s; background: #fff;
}
.search-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0,113,227,.14); }
.search-box input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-hint { color: var(--text-3); font-size: .92rem; margin-top: 14px; }
.search-hint-warn { color: #b25e00; }
.results-count { color: var(--text-2); margin: 8px 0 26px; }
.res-group-title { font-size: 1.3rem; font-weight: 700; letter-spacing: -.012em; margin: 30px 0 6px; }
.res-grid { margin-top: 18px; }
.res-list .art-row:first-child { padding-top: 8px; }

/* ---------------- notices ---------------- */
.notice { border-radius: var(--radius-s); padding: 14px 18px; font-size: .92rem; margin-bottom: 20px; line-height: 1.5; }
.notice-ok { background: rgba(52,199,89,.12); color: #187a38; }
.notice-err { background: rgba(255,59,48,.09); color: #c62d23; }
.notice-warn { background: rgba(255,159,10,.13); color: #9a6b00; }
.notice a { color: inherit; text-decoration: underline; }

/* ---------------- modal ---------------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.42);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; transition: opacity .25s ease;
}
.modal-overlay.open { opacity: 1; }
.modal {
  background: #fff; border-radius: 22px; max-width: 470px; width: 100%;
  max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
  position: relative;
  transform: scale(.96) translateY(8px); transition: transform .25s cubic-bezier(.32,.72,.36,1);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-body { padding: 34px 34px 30px; }
.modal-x {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-alt); border: none; color: var(--text-2);
  display: flex; align-items: center; justify-content: center; transition: all .2s;
}
.modal-x:hover { background: #e8e8ed; color: var(--text); }
.modal-ico { color: var(--red); margin-bottom: 10px; }
.modal h3 { font-size: 1.4rem; font-weight: 700; letter-spacing: -.014em; padding-right: 30px; }
.modal-sub { color: var(--text-2); font-size: .95rem; margin-top: 6px; }
.modal-art {
  margin-top: 14px; font-size: .9rem; font-weight: 600; line-height: 1.4;
  background: var(--bg-alt); border-radius: 12px; padding: 12px 16px;
}
.modal-art small { display: block; font-weight: 400; color: var(--text-2); margin-top: 3px; }
#pdf-form { margin-top: 18px; }
.field { display: block; margin-bottom: 13px; }
.field span { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.field em { color: var(--text-3); font-weight: 400; font-style: normal; }
.field input, .field textarea {
  width: 100%; font-family: inherit; font-size: 1rem;
  border: 1px solid var(--hairline); border-radius: 12px;
  padding: 11px 14px; outline: none; transition: all .2s; background: #fff;
  resize: vertical;
}
.field input:focus, .field textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0,113,227,.14);
}
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; color: var(--text-2); margin: 16px 0; cursor: pointer; }
.consent input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.form-error { color: var(--red); font-size: .9rem; margin-bottom: 12px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.modal-success { text-align: center; }
.ok-circle {
  width: 64px; height: 64px; border-radius: 50%; background: var(--green);
  display: flex; align-items: center; justify-content: center; margin: 6px auto 18px;
  animation: pop .4s cubic-bezier(.32,.72,.36,1);
}
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.modal-success .btn { margin-top: 20px; }

/* ---------------- footer ---------------- */
.footer { background: var(--bg-alt); padding: 44px 0 26px; font-size: .85rem; color: var(--text-2); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 40px; padding-bottom: 26px; border-bottom: 1px solid var(--hairline); }
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); font-size: 1rem; margin-bottom: 12px; }
.footer-col h4 { font-size: .85rem; color: var(--text); margin-bottom: 12px; }
.footer-col a { display: block; color: var(--text-2); margin-bottom: 8px; }
.footer-col a:hover { color: var(--text); }
.footer-about p { margin-bottom: 10px; max-width: 380px; }
.footer-dim { color: var(--text-3); }
.footer-mail { font-weight: 600; color: var(--link) !important; overflow-wrap: anywhere; }
.footer-bottom { padding-top: 20px; color: var(--text-3); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer-admin { color: var(--text-3); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}

/* ---------------- admin ---------------- */
.admin-body { background: var(--bg-alt); min-height: 100vh; }
.admin-top { background: #fff; border-bottom: 1px solid var(--hairline); position: sticky; top: 0; z-index: 50; }
.admin-top-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 22px; min-height: 54px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.admin-top .nav-logo span em { font-style: normal; color: var(--text-3); font-weight: 400; }
.admin-tabs { display: flex; gap: 4px; flex: 1; }
.admin-tabs a {
  font-size: .9rem; font-weight: 500; color: var(--text-2);
  padding: 7px 14px; border-radius: 980px; transition: all .2s; white-space: nowrap;
}
.admin-tabs a:hover { color: var(--text); text-decoration: none; background: var(--bg-alt); }
.admin-tabs a.on { background: var(--text); color: #fff; }
.admin-tabs a .cnt {
  background: var(--red); color: #fff; font-size: .72rem; border-radius: 980px;
  padding: 1px 7px; margin-left: 5px; font-weight: 700;
}
.admin-main { max-width: 1100px; margin: 0 auto; padding: 30px 22px 80px; }
.admin-h1 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.014em; margin-bottom: 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.acard { background: #fff; border-radius: var(--radius); box-shadow: 0 2px 12px rgba(0,0,0,.05); padding: 26px; margin-bottom: 22px; }
.acard h2 { font-size: 1.12rem; font-weight: 700; margin-bottom: 16px; letter-spacing: -.01em; }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 26px; }
.stat { background: #fff; border-radius: var(--radius-s); padding: 18px 22px; box-shadow: 0 2px 12px rgba(0,0,0,.05); }
.stat b { display: block; font-size: 1.7rem; font-weight: 700; letter-spacing: -.02em; }
.stat span { font-size: .85rem; color: var(--text-2); }
.stat.warn b { color: var(--red); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -8px; padding: 0 8px; }
.atable { width: 100%; border-collapse: collapse; font-size: .92rem; }
.atable th {
  text-align: left; font-size: .74rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-3); padding: 10px 12px; border-bottom: 1px solid var(--hairline); white-space: nowrap;
}
.atable td { padding: 12px; border-bottom: 1px solid var(--hairline-soft); vertical-align: middle; }
.atable tr:last-child td { border-bottom: none; }
.atable tr:hover td { background: #fafafc; }
.atable .thumb { width: 44px; border-radius: 6px; overflow: hidden; aspect-ratio: 210/287; background: var(--bg-alt); }
.atable .thumb img, .atable .thumb .cover-ph { width: 100%; height: 100%; object-fit: cover; }
.atable .thumb .cover-ph { padding: 4px; }
.atable .thumb .cover-ph-title { font-size: .3rem; }
.atable .thumb .cover-ph-num { display: none; }
.pill {
  display: inline-block; font-size: .78rem; font-weight: 700; border-radius: 980px; padding: 4px 11px; white-space: nowrap;
}
.pill-new { background: rgba(0,113,227,.1); color: var(--accent); }
.pill-done { background: rgba(52,199,89,.14); color: #1d9d47; }
.pill-err { background: rgba(255,59,48,.1); color: var(--red); }
.btn-sm { font-size: .85rem; padding: 7px 15px; }
.btn-ghost { background: var(--bg-alt); color: var(--text); }
.btn-ghost:hover { background: #e8e8ed; }
.btn-danger { background: rgba(255,59,48,.09); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-danger:disabled:hover { background: rgba(255,59,48,.09); color: var(--red); }
.aform label { display: block; margin-bottom: 15px; }
.aform label > span { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.aform input[type=text], .aform input[type=email], .aform input[type=password], .aform input[type=number],
.aform input[type=url], .aform select, .aform textarea {
  width: 100%; font-family: inherit; font-size: .98rem;
  border: 1px solid var(--hairline); border-radius: 12px; background: #fff;
  padding: 10px 14px; outline: none; transition: all .2s;
}
.aform input:focus, .aform select:focus, .aform textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0,113,227,.14);
}
.aform .hint { font-size: .82rem; color: var(--text-3); margin-top: 5px; font-weight: 400; }
.aform .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.aform .check { display: flex; gap: 10px; align-items: center; font-size: .95rem; cursor: pointer; }
.aform .check input { accent-color: var(--accent); width: 17px; height: 17px; }
.file-drop {
  position: relative;
  border: 2px dashed var(--hairline); border-radius: var(--radius-s);
  padding: 24px; text-align: center; color: var(--text-2); font-size: .95rem;
  transition: all .2s; background: #fafafc; cursor: pointer; display: block;
}
.file-drop:hover, .file-drop.drag, .file-drop.focus { border-color: var(--accent); background: rgba(0,113,227,.04); }
/* Поле файла не прячем через display:none — иначе браузер не может показать
   сообщение «выберите файл» для required и форма молча не отправляется. */
.file-drop input[type=file] {
  position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden;
  left: 0; top: 0; pointer-events: none;
}
.file-drop .fname { color: var(--text); font-weight: 600; }
.file-drop.has-file { border-style: solid; border-color: var(--accent); }
.file-drop .drop-preview {
  display: block; margin: 0 auto 10px; max-height: 170px; max-width: 100%;
  border-radius: 8px; box-shadow: 0 3px 14px rgba(0,0,0,.18);
}
.file-drop.has-preview { border-style: solid; border-color: #248a3d; background: rgba(52,199,89,.05); }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--bg-alt); }
.login-card {
  background: #fff; border-radius: 22px; box-shadow: 0 12px 48px rgba(0,0,0,.1);
  padding: 40px; width: 100%; max-width: 380px; text-align: center;
}
.login-card > svg { margin: 0 auto; }
.login-card h1 { font-size: 1.4rem; font-weight: 700; margin: 14px 0 4px; }
.login-card .sub { color: var(--text-2); font-size: .9rem; margin-bottom: 24px; }
.login-card form { text-align: left; }
.copy-url {
  font-size: .78rem; background: var(--bg-alt); border: none; border-radius: 8px;
  padding: 5px 10px; color: var(--text-2); font-weight: 600; white-space: nowrap;
}
.copy-url:hover { color: var(--text); background: #e8e8ed; }

/* ---------------- responsive ---------------- */
@media (max-width: 900px) {
  .nav-search { width: 170px; }
  .nav-search:focus-within { width: 200px; }
}
@media (max-width: 860px) {
  .issue-layout { grid-template-columns: 1fr; gap: 30px; }
  .issue-side { position: static; display: flex; gap: 22px; align-items: flex-start; }
  .issue-side > div:first-child { width: 140px; flex: none; }
  .issue-side > div:last-child { flex: 1; min-width: 0; }
  .article-layout { grid-template-columns: 1fr; gap: 34px; }
  .art-sidebar { position: static; }
  .art-sidebar .pdf-card:first-child { display: none; }   /* кнопка уже показана под заголовком */
  .pdf-inline-cta { display: flex; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
}
@media (max-width: 760px) {
  .nav-search { display: none; }
  .nav-search-link { display: flex; }
}
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .nav-inner { gap: 14px; padding: 0 16px; }
  .nav-links { gap: 14px; }
  .container { padding: 0 16px; }
  .hero { padding: 44px 16px 40px; }
  .hero-stats { gap: 28px; }
  .section { padding: 52px 0; }
  .section-tight { padding-top: 16px; }
  .page-head { padding: 26px 0 20px; }
  .art-row { flex-direction: column; gap: 10px; }
  .art-row .art-side { flex-direction: row; align-items: center; }
  .art-nav { grid-template-columns: 1fr; }
  .art-nav-next { text-align: left; align-items: flex-start; }
  .cite-box { flex-direction: column; }
  .search-box { flex-direction: column; }
  .search-box .btn { width: 100%; }
  .modal-body { padding: 28px 22px 24px; }
  .aform .row2 { grid-template-columns: 1fr; }
  .atable { font-size: .85rem; }
  .atable .hide-m { display: none; }
  .admin-tabs a { padding: 6px 10px; font-size: .85rem; }
  .grid-issues { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 18px; }
}

/* ---------------- admin: extra UI helpers ---------------- */
.admin-link { font-size: .85rem; color: var(--text-2); white-space: nowrap; }
.admin-link:hover { color: var(--text); }
.admin-link-out { color: var(--red); }
.admin-link-out:hover { color: #c62d23; }
.admin-h1 .seg { margin-left: auto; }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--hairline); border-radius: 980px; padding: 3px; gap: 2px; }
.seg a { font-size: .85rem; font-weight: 500; color: var(--text-2); padding: 6px 14px; border-radius: 980px; white-space: nowrap; }
.seg a:hover { text-decoration: none; color: var(--text); background: var(--bg-alt); }
.seg a.on { background: var(--text); color: #fff; }
.acard-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.acard-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.acard-text { font-size: .9rem; color: var(--text-2); line-height: 1.6; margin-bottom: 12px; }
.acard-text:last-child { margin-bottom: 0; }
.acard-danger h2 { color: var(--red); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.cell-dim { color: var(--text-3); font-size: .8rem; margin-top: 2px; }
.cell-nowrap { white-space: nowrap; }
.cell-actions { text-align: right; white-space: nowrap; }
.cell-title { font-weight: 600; color: var(--text); }
.cell-mail { font-size: .85rem; }
.cell-msg { max-width: 220px; font-size: .85rem; color: var(--text-2); }
.cell-article { max-width: 280px; }
.pill-btn { border: none; cursor: pointer; font-family: inherit; }
.pill-btn:hover { filter: brightness(.93); }
.btn-x { color: var(--red); }
.btn-x:hover { background: rgba(255,59,48,.12); color: var(--red); }
.thumb-lg { width: 170px; border-radius: 10px; overflow: hidden; aspect-ratio: 210/287; box-shadow: 0 3px 14px rgba(0,0,0,.15); margin-bottom: 16px; }
.issue-admin-grid { display: grid; grid-template-columns: 340px 1fr; gap: 22px; align-items: start; }
@media (max-width: 900px) { .issue-admin-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .admin-top-inner { padding: 8px 16px; gap: 10px; }
  .admin-tabs { order: 3; width: 100%; overflow-x: auto; }
  .admin-main { padding: 22px 16px 60px; }
  .acard { padding: 18px; }
  .admin-h1 .seg { margin-left: 0; }
}

/* ---------------- print ---------------- */
@media print {
  .nav, .footer, .art-sidebar, .pdf-inline-cta, .art-nav, .modal-overlay, .art-side, .skip { display: none !important; }
  .article-layout, .issue-layout { grid-template-columns: 1fr; }
  body { font-size: 12pt; }
  a { color: inherit; }
}
