/* ==========================================================================
   Medicine, Science and Education — Design System
   Style: Accessible & Ethical (WCAG-AAA leaning, high contrast)
   Color: deep teal-blue + scholarly amber accent
   Type:  PT Serif (headings) + Inter (body) — full RU/KK Cyrillic
   ========================================================================== */

:root {
  /* --- Brand color tokens (logo: azure blue + gold) --- */
  --primary:        #0A6EB6;   /* logo azure */
  --primary-700:    #08578F;
  --primary-800:    #0B2E54;   /* deep navy — topbar/footer */
  --primary-300:    #6EB2DD;
  --primary-100:    #CFE6F6;
  --primary-50:     #EAF4FC;
  --on-primary:     #FFFFFF;

  --accent:         #C0901C;   /* logo gold */
  --accent-600:     #8F6710;   /* darker gold for text on white */
  --accent-100:     #F6E9CC;
  --accent-50:      #FBF4E4;
  --on-accent:      #14252B;   /* dark text reads on gold */

  /* --- Neutrals --- */
  --ink:            #14252B;   /* foreground */
  --ink-soft:       #3C4D54;
  --muted:          #5A6B72;   /* secondary text */
  --bg:             #FFFFFF;
  --surface:        #FFFFFF;
  --surface-2:      #F4F7F8;   /* cool light panel */
  --surface-warm:   #FBF8F4;
  --border:         #DDE6E9;
  --border-strong:  #C4D2D6;

  /* --- Semantic --- */
  --success:        #0F766E;
  --danger:         #DC2626;
  --warning:        #B45309;
  --ring:           rgba(10, 110, 182, 0.45);

  /* --- Typography --- */
  --font-serif: 'PT Serif', Georgia, 'Times New Roman', serif;
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* --- Spacing scale (4/8) --- */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px;

  /* --- Radius --- */
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-xl: 24px; --r-pill: 999px;

  /* --- Elevation --- */
  --shadow-xs: 0 1px 2px rgba(7, 48, 57, 0.06);
  --shadow-sm: 0 2px 8px rgba(7, 48, 57, 0.07);
  --shadow-md: 0 8px 24px rgba(7, 48, 57, 0.10);
  --shadow-lg: 0 18px 48px rgba(7, 48, 57, 0.14);

  --container: 1180px;
  --header-h: 72px;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

html, body { overflow-x: clip; }   /* hard stop against any horizontal scroll */

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-wrap: break-word;   /* long words / URLs never overflow their box */
}

h1, h2, h3, h4 { font-family: var(--font-serif); line-height: 1.2; font-weight: 700; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.45rem, 1.05rem + 1.5vw, 2.1rem); }
h3 { font-size: clamp(1.12rem, 1rem + .5vw, 1.3rem); }
h4 { font-size: 1.08rem; }

p { line-height: 1.7; text-wrap: pretty; }

/* Anchors land below the sticky header */
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

/* Flex/grid children may shrink below content size so text can wrap instead of overflow */
.grid > *, .flex > * { min-width: 0; }
a { color: var(--primary); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--accent-600); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.25rem; }

:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--primary); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--r-md) 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--sp-5); }
.section { padding-block: var(--sp-8); }
.section--tight { padding-block: var(--sp-7); }
main { flex: 1 0 auto; }

.grid { display: grid; gap: var(--sp-5); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--sp-2); } .gap-3 { gap: var(--sp-3); } .gap-4 { gap: var(--sp-4); }
.wrap { flex-wrap: wrap; }
.text-muted { color: var(--muted); }
.tabular { font-variant-numeric: tabular-nums; }
.mt-2{margin-top:var(--sp-2)} .mt-3{margin-top:var(--sp-3)} .mt-4{margin-top:var(--sp-4)} .mt-5{margin-top:var(--sp-5)} .mt-6{margin-top:var(--sp-6)}

/* Section heading */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-6); flex-wrap: wrap; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans); font-size: .82rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent-600);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--accent); border-radius: 2px; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-sans); font-weight: 600; font-size: .95rem;
  padding: 12px 22px; border-radius: var(--r-md); border: 1.5px solid transparent;
  cursor: pointer; transition: background .18s ease, transform .12s ease, box-shadow .18s ease, color .18s;
  min-height: 44px; line-height: 1; text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--primary); color: var(--on-primary); }
.btn--primary:hover { background: var(--primary-700); color: #fff; box-shadow: var(--shadow-sm); }
.btn--accent { background: var(--accent); color: var(--on-accent); }
.btn--accent:hover { background: #AD8016; color: var(--on-accent); box-shadow: var(--shadow-sm); }
.btn--ghost { background: transparent; color: var(--primary); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--primary-50); border-color: var(--primary-300); }
.btn--light { background: #fff; color: var(--primary); }
.btn--light:hover { background: var(--primary-50); }
.btn--sm { padding: 8px 14px; min-height: 38px; font-size: .88rem; }
.btn--block { width: 100%; }
.btn svg { width: 18px; height: 18px; }

/* ==========================================================================
   Header
   ========================================================================== */
.topbar { background: var(--primary-800); color: #cfe2e6; font-size: .82rem; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; min-height: 38px; padding-block: 7px; gap: var(--sp-4); }
.topbar a { color: #cfe2e6; }
.topbar a:hover { color: #fff; }
.topbar__meta { display: flex; gap: var(--sp-5); flex-wrap: wrap; }
.topbar__meta span { display: inline-flex; align-items: center; gap: 6px; }

.langs { display: inline-flex; gap: 2px; background: rgba(255,255,255,.08); padding: 3px; border-radius: var(--r-pill); }
.langs a {
  padding: 3px 11px; border-radius: var(--r-pill); font-weight: 600; font-size: .78rem;
  color: #cfe2e6; line-height: 1.6;
}
.langs a.is-active { background: var(--accent); color: #fff; }

.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; gap: var(--sp-4); min-height: var(--header-h); max-width: 1360px; }

.brand { display: flex; align-items: center; gap: var(--sp-3); flex-shrink: 0; margin-right: var(--sp-4); }
.brand__mark { width: 46px; height: 46px; flex-shrink: 0; }
img.brand__mark { object-fit: contain; border-radius: 10px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-family: var(--font-serif); font-weight: 700; font-size: 1.1rem; color: var(--ink); white-space: nowrap; }
.brand__sub { font-size: .72rem; color: var(--muted); letter-spacing: .02em; white-space: nowrap; }

.main-nav { margin-left: auto; }
.main-nav ul { display: flex; align-items: center; gap: 2px; list-style: none; padding: 0; margin: 0; }
.main-nav a {
  display: inline-flex; align-items: center; height: 44px; padding: 0 10px; border-radius: var(--r-md);
  font-weight: 500; color: var(--ink-soft); font-size: .9rem; position: relative; white-space: nowrap;
}
.main-nav a:hover { background: var(--primary-50); color: var(--primary-700); }
.main-nav a.is-active { color: var(--primary-700); font-weight: 600; }
.main-nav a.is-active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 2px;
  background: var(--accent); border-radius: 2px;
}

.header-actions { display: flex; align-items: center; gap: var(--sp-2); flex-shrink: 0; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: var(--r-md); border: none; background: transparent; color: var(--ink-soft); cursor: pointer;
}
.icon-btn:hover { background: var(--primary-50); color: var(--primary-700); }
.icon-btn svg { width: 22px; height: 22px; }

/* Dropdown ("Для авторов") */
.main-nav .sub-toggle {
  display: inline-flex; align-items: center; gap: 5px; height: 44px; padding: 0 10px; border: none;
  background: transparent; font: inherit; font-weight: 500; font-size: .9rem; color: var(--ink-soft);
  cursor: pointer; border-radius: var(--r-md); white-space: nowrap;
}
.main-nav .sub-toggle:hover { background: var(--primary-50); color: var(--primary-700); }
.main-nav .sub-toggle .caret { font-size: .7em; opacity: .7; transition: transform .2s; }
.main-nav .has-sub { position: relative; }
.main-nav .sub-menu {
  position: absolute; top: calc(100% - 4px); left: 0; min-width: 240px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-lg);
  padding: 6px; margin: 0; list-style: none; display: none; z-index: 60;
}
.main-nav .has-sub:hover .sub-menu,
.main-nav .has-sub:focus-within .sub-menu,
.main-nav .has-sub.open .sub-menu { display: block; }
.main-nav .has-sub.open .caret { transform: rotate(180deg); }
.main-nav .sub-menu a { height: auto; padding: 9px 12px; white-space: normal; }

.nav-toggle { display: none; }
@media (max-width: 760px) { .header-cta { display: none; } }
@media (max-width: 600px) { .brand__sub { display: none; } }

/* Mobile nav — collapse to a drawer before the multilingual nav can crowd */
@media (max-width: 1300px) {
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; background: #fff; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg); transform: translateY(-120%); transition: transform .25s ease; margin: 0;
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav ul { flex-direction: column; align-items: stretch; padding: var(--sp-3); gap: 2px; }
  .main-nav a { height: 48px; padding: 0 16px; }
  .main-nav a.is-active::after { display: none; }
  .main-nav a.is-active { background: var(--primary-50); }
  .nav-toggle { display: inline-flex; }
  /* Dropdown becomes an inline expandable block on mobile */
  .main-nav .sub-toggle { width: 100%; height: 48px; padding: 0 16px; justify-content: space-between; }
  .main-nav .sub-menu { position: static; box-shadow: none; border: 0; padding: 0 0 4px 14px; min-width: 0; }
  .main-nav .has-sub:hover .sub-menu, .main-nav .has-sub:focus-within .sub-menu { display: none; }
  .main-nav .has-sub.open .sub-menu { display: block; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative; overflow: hidden; color: #eaf4f6;
  background:
    radial-gradient(120% 120% at 85% -10%, rgba(192,144,24,.30), transparent 45%),
    radial-gradient(120% 140% at 0% 120%, rgba(80,150,205,.34), transparent 55%),
    linear-gradient(160deg, var(--primary-800), var(--primary) 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.10) 1px, transparent 1.4px);
  background-size: 22px 22px; mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.25fr .9fr; gap: var(--sp-7); align-items: center; padding-block: var(--sp-9); }
.hero__badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); color: #eaf4f6;
  font-size: .82rem; font-weight: 600; letter-spacing: .02em;
}
.hero__badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #7ee3c0; box-shadow: 0 0 0 4px rgba(126,227,192,.25); }
.hero h1 { color: #fff; margin-top: var(--sp-4); }
.hero__lead { color: #d2e6ea; font-size: 1.12rem; margin-top: var(--sp-4); max-width: 56ch; }
.hero__cta { display: flex; gap: var(--sp-3); margin-top: var(--sp-6); flex-wrap: wrap; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: var(--sp-4) 0 0; color: #cfe6ea; font-size: .9rem; }
.hero__facts span { display: inline-flex; align-items: center; }
.hero__facts span + span::before { content: "·"; margin-right: 18px; opacity: .5; }
.hero__stats { display: flex; gap: var(--sp-6); margin-top: var(--sp-6); flex-wrap: wrap; }
.hero__stat .n { font-family: var(--font-serif); font-size: 1.9rem; font-weight: 700; color: #fff; }
.hero__stat .l { font-size: .82rem; color: #b9d4d9; }

/* Hero issue card */
.issue-card {
  background: #fff; border-radius: var(--r-lg); padding: var(--sp-4); box-shadow: var(--shadow-lg);
  color: var(--ink); display: flex; flex-direction: column; gap: var(--sp-3);
}
.issue-card__cover {
  aspect-ratio: 3/4; border-radius: var(--r-md); overflow: hidden; background:
    linear-gradient(150deg, var(--primary), var(--primary-800));
  display: flex; flex-direction: column; justify-content: space-between; padding: var(--sp-5); color: #fff; position: relative;
}
.issue-card__cover::after {
  content:""; position:absolute; inset:0; background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1.4px); background-size:18px 18px; opacity:.6;
}
.issue-card__cover .label { font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; opacity: .85; position: relative; }
.issue-card__cover .ttl { font-family: var(--font-serif); font-size: 1.35rem; line-height: 1.25; position: relative; }
.issue-card__cover .yr { font-size: 2.6rem; font-family: var(--font-serif); font-weight: 700; position: relative; }
.issue-card__meta { display: flex; align-items: center; justify-content: space-between; font-size: .85rem; color: var(--muted); }

@media (max-width: 880px) {
  .hero .container { grid-template-columns: 1fr; padding-block: var(--sp-7); }
  .hero__media { max-width: 320px; }
}

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--sp-5); transition: border-color .18s, box-shadow .18s, transform .18s;
  display: flex; flex-direction: column; gap: var(--sp-3); height: 100%;
}
.card:hover { border-color: var(--primary-300); box-shadow: var(--shadow-md); }
.card--link:hover { transform: translateY(-3px); }

.tag {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  font-size: .76rem; font-weight: 600; letter-spacing: .02em;
  padding: 4px 11px; border-radius: var(--r-pill);
  background: var(--accent-50); color: var(--accent-600); border: 1px solid var(--accent-100);
}
.tag--muted { background: var(--surface-2); color: var(--muted); border-color: var(--border); }

/* Article card */
.article-card { gap: var(--sp-3); }
.article-card h3 { font-size: 1.12rem; line-height: 1.35; }
.article-card h3 a { color: var(--ink); }
.article-card h3 a:hover { color: var(--primary-700); }
.article-card .authors { color: var(--muted); font-size: .9rem; font-style: italic; }
.article-card .meta { display: flex; flex-wrap: wrap; gap: var(--sp-3); font-size: .8rem; color: var(--muted); margin-top: auto; padding-top: var(--sp-3); border-top: 1px dashed var(--border); }
.article-card .meta b { color: var(--ink-soft); font-weight: 600; }
.kv { display: inline-flex; align-items: center; gap: 5px; }
.kv svg { width: 15px; height: 15px; color: var(--primary-300); }

/* Section / category card */
.cat-card { display: flex; gap: var(--sp-4); align-items: flex-start; }
.cat-card__icon {
  width: 48px; height: 48px; border-radius: var(--r-md); flex-shrink: 0;
  background: var(--primary-50); color: var(--primary); display: flex; align-items: center; justify-content: center;
}
.cat-card__icon svg { width: 24px; height: 24px; }
.cat-card h3 { font-size: 1.05rem; }
.cat-card .count { font-size: .82rem; color: var(--muted); }

/* News card */
.news-card { overflow: hidden; padding: 0; }
.news-card__img { aspect-ratio: 16/9; background: var(--surface-2); overflow: hidden; }
.news-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.news-card:hover .news-card__img img { transform: scale(1.04); }
.news-card__body { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-2); flex: 1; }
.news-card time { font-size: .8rem; color: var(--accent-600); font-weight: 600; }
.news-card h3 { font-size: 1.1rem; }
.news-card h3 a { color: var(--ink); }

/* ==========================================================================
   Page header (interior pages)
   ========================================================================== */
.page-head { background: var(--surface-2); border-bottom: 1px solid var(--border); }
.page-head .container { padding-block: var(--sp-7); }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .85rem; color: var(--muted); margin-bottom: var(--sp-3); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .sep { opacity: .5; }
.page-head h1 { color: var(--ink); }
.page-head p { color: var(--muted); margin-top: var(--sp-2); max-width: 70ch; }

/* ==========================================================================
   Article (single) layout
   ========================================================================== */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--sp-7); align-items: start; }
.article-layout > * { min-width: 0; }   /* let columns shrink so long content wraps instead of overflowing */
@media (max-width: 980px) { .article-layout { grid-template-columns: 1fr; } }

.prose { max-width: 75ch; }
.prose p { margin-bottom: var(--sp-4); }
.prose h2 { margin: var(--sp-6) 0 var(--sp-3); }
.prose h3 { margin: var(--sp-5) 0 var(--sp-2); }
.prose ul, .prose ol { margin-bottom: var(--sp-4); }
.prose li { margin-bottom: 6px; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose hr { border: 0; border-top: 2px solid var(--border); margin: var(--sp-5) 0; }
.prose blockquote { margin: var(--sp-4) 0; padding: 6px 16px; border-left: 3px solid var(--accent); color: var(--text-muted); }
.prose sup, .prose sub { font-size: .75em; }

/* Errata / correction / retraction banner on the article page */
.article-notice { border-radius: var(--r-md); padding: 14px 18px; margin: 0 0 var(--sp-5); border: 1px solid; }
.article-notice--warn { background: #FEF6EC; border-color: #F3D9B5; color: #7a4708; }
.article-notice--danger { background: #FCECEC; border-color: #F0BCBC; color: #8f1d1d; }
.article-notice__head { display: flex; align-items: center; gap: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; font-size: .84rem; }
.article-notice__head svg { width: 18px; height: 18px; flex-shrink: 0; }
.article-notice__date { margin-left: auto; font-weight: 600; text-transform: none; letter-spacing: 0; opacity: .8; }
.article-notice__title { font-weight: 600; margin: 8px 0 4px; }
.article-notice__body { font-size: .94rem; }
.article-notice__body p:last-child { margin-bottom: 0; }
.article-notice--danger .article-notice__body a, .article-notice--warn .article-notice__body a { color: inherit; }

.article-title { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); }
.article-authors { font-size: 1.05rem; color: var(--primary-700); font-weight: 600; margin-top: var(--sp-3); }
.article-affiliation { color: var(--muted); font-size: .92rem; margin-top: 4px; }

.meta-strip { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); padding: var(--sp-4) 0; margin: var(--sp-4) 0; border-block: 1px solid var(--border); font-size: .88rem; }
.meta-strip .kv b { color: var(--ink-soft); }

.abstract-box { background: var(--surface-2); border-left: 3px solid var(--accent); border-radius: 0 var(--r-md) var(--r-md) 0; padding: var(--sp-5); margin: var(--sp-5) 0; }
.abstract-box h2 { font-size: 1.1rem; margin-bottom: var(--sp-2); }
.abstract-box p { overflow-wrap: anywhere; word-break: break-word; }

.keywords { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--sp-3); }

/* Sidebar */
.sidebar { position: sticky; top: calc(var(--header-h) + 16px); display: flex; flex-direction: column; gap: var(--sp-4); }
.sidebar-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-5); }
.sidebar-card h4 { font-family: var(--font-sans); font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: var(--sp-3); }
.dl { display: flex; flex-direction: column; gap: var(--sp-3); }
.dl > div { display: flex; justify-content: space-between; gap: var(--sp-3); font-size: .9rem; }
.dl dt { color: var(--muted); } .dl dd { color: var(--ink-soft); font-weight: 600; text-align: right; }

/* ==========================================================================
   Indexing strip
   ========================================================================== */
.indexing { background: var(--surface-warm); border-block: 1px solid var(--border); }
.index-grid { display: flex; flex-wrap: wrap; gap: var(--sp-4); justify-content: center; }
.index-chip {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--r-pill); font-weight: 600; color: var(--ink-soft); font-size: .92rem;
  box-shadow: var(--shadow-xs);
}
.index-chip svg { width: 22px; height: 22px; color: var(--primary); }

/* ==========================================================================
   Search
   ========================================================================== */
.searchbar { display: flex; gap: var(--sp-2); max-width: 640px; }
.searchbar input {
  flex: 1; height: 48px; padding: 0 18px; border: 1.5px solid var(--border-strong); border-radius: var(--r-md);
  font-size: 1rem; font-family: var(--font-sans); color: var(--ink); background: #fff;
}
.searchbar input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: var(--sp-7); flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--r-md); color: var(--ink-soft); font-weight: 600; background: #fff;
}
.pagination a:hover { border-color: var(--primary-300); background: var(--primary-50); }
.pagination .is-active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ==========================================================================
   Forms (public)
   ========================================================================== */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--sp-4); }
.field label { font-weight: 600; font-size: .9rem; color: var(--ink-soft); }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border-strong); border-radius: var(--r-md);
  font: inherit; font-size: 1rem; color: var(--ink); background: #fff; min-height: 44px;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
.field .hint { font-size: .82rem; color: var(--muted); }

.alert { padding: 14px 18px; border-radius: var(--r-md); font-weight: 500; margin-bottom: var(--sp-4); }
.alert--success { background: #E6F4F1; color: #0F5C52; border: 1px solid #A7D7CE; }
.alert--error { background: #FCE9E9; color: #9B1C1C; border: 1px solid #F3C0C0; }

/* ==========================================================================
   Empty state
   ========================================================================== */
.empty { text-align: center; padding: var(--sp-8) var(--sp-4); color: var(--muted); }
.empty svg { width: 56px; height: 56px; color: var(--border-strong); margin-bottom: var(--sp-3); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--primary-800); color: #b9d4d9; }
.site-footer a { color: #cfe2e6; }
.site-footer a:hover { color: #fff; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: var(--sp-6); padding-block: var(--sp-8); }
@media (max-width: 880px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-top { grid-template-columns: 1fr; } }
.footer-brand .brand__name { color: #fff; }
.footer-brand .brand__sub { color: #91b6bd; }
.footer-about { font-size: .9rem; line-height: 1.7; margin-top: var(--sp-3); color: #a9c8ce; max-width: 38ch; }
.footer-col h4 { font-family: var(--font-sans); color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: var(--sp-4); }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: .92rem; }
.footer-contact { font-size: .92rem; line-height: 1.8; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-block: var(--sp-4); display: flex; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; font-size: .85rem; color: #8fb4bb; }

/* ==========================================================================
   Utilities
   ========================================================================== */
.divider { height: 1px; background: var(--border); border: 0; margin-block: var(--sp-6); }

/* Split row (collapses on mobile) */
.row-split { display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--sp-7); align-items: center; }
@media (max-width: 760px) {
  .row-split { grid-template-columns: 1fr; gap: var(--sp-5); }
  .row-split .row-split__end { justify-content: flex-start !important; }
}

/* ==========================================================================
   Author cabinet & submission statuses
   ========================================================================== */
.auth-wrap { max-width: 460px; margin-inline: auto; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-6); box-shadow: var(--shadow-sm); }
.auth-card h1 { font-size: 1.5rem; }
.auth-switch { text-align: center; margin-top: var(--sp-4); color: var(--muted); font-size: .92rem; }

.account-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-4) var(--sp-5); margin-bottom: var(--sp-6); }
.account-bar .who { display: flex; align-items: center; gap: var(--sp-3); }
.account-bar .ava { width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--font-serif); }

.sbadge { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; padding: 4px 11px; border-radius: var(--r-pill); white-space: nowrap; }
.sbadge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-submitted { background: #EEF2F4; color: #45616A; }
.st-review    { background: #FEF3E2; color: #9A4407; }
.st-revision  { background: #FBEAF0; color: #993556; }
.st-accepted  { background: #E6F4F1; color: #0F5C52; }
.st-rejected  { background: #FCE9E9; color: #9B1C1C; }

.sub-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--border); border-radius: var(--r-md); background: #fff; transition: border-color .15s, box-shadow .15s; }
.sub-row:hover { border-color: var(--primary-300); box-shadow: var(--shadow-sm); }
.sub-row + .sub-row { margin-top: var(--sp-3); }
.sub-row h3 { font-size: 1.05rem; }
.sub-row .sub-meta { font-size: .82rem; color: var(--muted); margin-top: 4px; display: flex; gap: var(--sp-3); flex-wrap: wrap; }

.timeline { display: flex; flex-direction: column; gap: 0; margin: var(--sp-4) 0; }
.timeline .step { display: flex; gap: var(--sp-3); padding-bottom: var(--sp-4); position: relative; }
.timeline .step:not(:last-child)::before { content: ""; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: var(--border); }
.timeline .dot { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--muted); border: 2px solid var(--border); z-index: 1; }
.timeline .dot svg { width: 14px; height: 14px; }
.timeline .step.done .dot { background: var(--primary); color: #fff; border-color: var(--primary); }
.timeline .step.active .dot { background: var(--accent); color: #fff; border-color: var(--accent); }
.timeline .step.reject .dot { background: var(--danger); color: #fff; border-color: var(--danger); }
.timeline .step .lbl { font-weight: 600; font-size: .95rem; }
.timeline .step.todo .lbl { color: var(--muted); font-weight: 500; }

/* Citation / license / references (article indexing block) */
.cite-box { margin-top: var(--sp-6); padding: var(--sp-5); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface-2); }
.cite-box p { overflow-wrap: anywhere; }
.license-box { margin-top: var(--sp-4); padding: var(--sp-4); border: 1px dashed var(--border-strong); border-radius: var(--r-md);
  display: flex; align-items: center; gap: var(--sp-3); font-size: .9rem; color: var(--muted); }
.cc-badge { flex-shrink: 0; font-weight: 700; font-size: .78rem; letter-spacing: .04em; color: #fff; background: var(--primary);
  padding: 4px 10px; border-radius: var(--r-sm); }
.references { margin: 0; padding-left: 1.4rem; display: flex; flex-direction: column; gap: 8px; }
.references li { font-size: .9rem; color: var(--ink-soft); line-height: 1.55; overflow-wrap: anywhere; }

/* Footer indexing badges */
.footer-indexing { display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--sp-4); }
.footer-indexing .idx { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); font-size: .8rem; font-weight: 600; color: #cfe2e6; }
.footer-indexing a.idx:hover { background: rgba(255,255,255,.16); color: #fff; }

/* Cookie consent bar */
.cookie-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 200; background: var(--primary-800); color: #eaf4f6;
  display: flex; align-items: center; justify-content: center; gap: var(--sp-4); padding: 14px var(--sp-5);
  flex-wrap: wrap; box-shadow: 0 -4px 20px rgba(0,0,0,.2); font-size: .9rem; }
.cookie-bar a { color: #fff; text-decoration: underline; }
.cookie-bar[hidden] { display: none; }

/* Reveal-on-scroll */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
[data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; } }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ==========================================================================
   Responsive & overflow hardening (multi-locale RU / KK / EN)
   ========================================================================== */

/* Long tokens (DOI, e-mail, УДК, URLs) must never break the layout */
.dl dd, .meta-strip .kv, .kv b, .footer-contact, .index-chip, .breadcrumbs { overflow-wrap: anywhere; }
.dl > div { gap: var(--sp-4); }
.dl dd { word-break: break-word; }

/* Components whose flex children hold wrapping text */
.cat-card > span, .article-card, .news-card__body, .sub-row > div:first-child,
.account-bar .who, .account-bar .who > span { min-width: 0; }
.account-bar .ava, .cat-card__icon, .stat__icon { flex-shrink: 0; }
.cat-card h3, .sub-row h3 { overflow-wrap: anywhere; }

/* Tables: horizontal scroll on small screens instead of breaking the page */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Topbar: drop the meta on small screens, keep the language switcher reachable */
@media (max-width: 600px) {
  .topbar__meta { display: none; }
  .topbar .container { justify-content: flex-end; }
}

/* Mobile spacing rhythm — tighten generous desktop padding on phones */
@media (max-width: 760px) {
  :root { --header-h: 64px; }
  .section { padding-block: var(--sp-7); }
  .section--tight { padding-block: var(--sp-6); }
  .hero .container { padding-block: var(--sp-7); gap: var(--sp-6); }
  .page-head .container { padding-block: var(--sp-6); }
  .hero__stats { gap: var(--sp-5); }
  .section-head { margin-bottom: var(--sp-5); }
}
@media (max-width: 420px) {
  .container { padding-inline: var(--sp-4); }
  .hero__stat .n { font-size: 1.6rem; }
  .card { padding: var(--sp-4); }
}

/* Account bar + submission rows stack cleanly on narrow screens */
@media (max-width: 560px) {
  .account-bar { flex-direction: column; align-items: stretch; }
  .account-bar .flex { justify-content: stretch; }
  .account-bar .btn { flex: 1; }
  .sub-row { flex-direction: column; align-items: flex-start; }
  .sub-row > .flex { width: 100%; justify-content: space-between; }
  .meta-strip { gap: var(--sp-2) var(--sp-4); }
}

/* Two-column inner content (article + sidebar) keeps a sane sidebar width */
@media (min-width: 981px) and (max-width: 1100px) {
  .article-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: var(--sp-6); }
}

/* Buttons: don't let an icon+label combo overflow a narrow container */
.btn { max-width: 100%; }
.btn--block { white-space: normal; }

/* Icons must keep their size inside flex rows (never squish when text wraps) */
.flex svg, .btn svg, .kv svg, .tag svg, .index-chip svg, .eyebrow::before { flex-shrink: 0; }

/* Larger, comfortable tap targets for the mobile nav and language pills */
@media (max-width: 1300px) { .main-nav a { font-size: 1rem; } }
.langs a { min-height: 28px; display: inline-flex; align-items: center; }

/* Author shortcuts: only inside the mobile drawer (desktop uses header icons/CTA) */
.nav-extra { display: none; }
.nav-extra a { gap: 10px; }
@media (max-width: 1300px) {
  .nav-extra { display: block; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 6px; }
  .nav-extra + .nav-extra { border-top: 0; margin-top: 0; padding-top: 0; }
  .nav-extra a { color: var(--primary-700); font-weight: 600; }
}

/* Article type badge + structured authors + declarations */
.tag--type { background: var(--primary-800); color: #fff; font-weight: 600; }
.article-authors--struct { list-style: none; padding: 0; margin: var(--sp-3) 0 0; display: flex; flex-direction: column; gap: 8px; }
.article-authors--struct li { font-size: .98rem; }
.article-authors--struct .au-name { font-weight: 600; color: var(--ink); }
.article-authors--struct .au-corr { color: var(--accent); margin-left: 4px; }
.article-authors--struct .au-orcid { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-left: 6px; border-radius: 4px; background: #A6CE39; color: #fff; font-size: .68rem; font-weight: 700; vertical-align: middle; }
.article-authors--struct .au-aff { display: block; font-size: .85rem; color: var(--text-muted); margin-top: 1px; }
.declarations { margin: var(--sp-6) 0; padding: var(--sp-4) var(--sp-5); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); }
.declarations dl { margin: 0; }
.declarations dt { font-weight: 600; color: var(--ink); font-size: .92rem; margin-top: 12px; }
.declarations dt:first-child { margin-top: 0; }
.declarations dd { margin: 2px 0 0; font-size: .92rem; color: var(--text-muted); line-height: 1.55; }

/* Editorial board cards (T7) */
.ed-card { display: flex; flex-direction: column; }
.ed-photo { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.ed-photo img { width: 100%; height: 100%; object-fit: cover; }
.ed-photo span { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.ed-country { display: inline-flex; align-items: center; gap: 3px; font-size: .8rem; color: var(--text-muted); }
.ed-country svg { width: 13px; height: 13px; }
.ed-expertise { font-size: .82rem; color: var(--primary-700); background: var(--primary-50); border-radius: var(--r-sm); padding: 4px 8px; margin-top: var(--sp-2); display: inline-block; }
.ed-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: var(--sp-3); }
.ed-link { font-size: .74rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text-muted); }
.ed-link:hover { border-color: var(--primary-300); color: var(--primary); }
.ed-link--orcid { border-color: #A6CE39; color: #6a8a12; }
