/* ═══════════════════════════════════════════════════════════════
   ARTICLE PAGE — полный редизайн
   CSS vars из main.css: --navy #0d1b2e · --teal #0b6e5e
   Шрифты: --font-display (Playfair) · --font-body (Lora) · --font-ui (Inter)
═══════════════════════════════════════════════════════════════ */

/* ── Hero ─────────────────────────────────────────────────────── */
.art-hero {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: var(--navy);
  color: #fff;
  padding: 1.75rem 0 1.5rem;
}

.art-hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Категории */
.art-cats {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: .75rem;
}
.art-cat-pill {
  display: inline-block;
  padding: .2rem .7rem;
  border-radius: 3px;
  background: rgba(11,110,94,.3);
  border: 1px solid rgba(11,110,94,.5);
  color: #7de8d8;
  font-family: var(--font-ui);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .15s;
}
.art-cat-pill:hover { background: rgba(11,110,94,.5); color: #fff; text-decoration: none; }
.art-cat-pill--sm   { font-size: .62rem; }

/* Заголовок */
.art-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  letter-spacing: -.015em;
  margin-bottom: .5rem;
}

.art-subtitle {
  font-size: 1.05rem;
  color: rgba(255,255,255,.6);
  margin-bottom: .6rem;
  font-family: var(--font-ui);
  line-height: 1.5;
}

/* Авторы */
.art-byline {
  font-family: var(--font-ui);
  font-size: .9rem;
  color: rgba(255,255,255,.65);
  margin-bottom: 0;
  line-height: 1.5;
}
.art-byline-author { font-weight: 500; color: rgba(255,255,255,.85); }
.art-byline-sep    { color: rgba(255,255,255,.3); }

/* ── Мета-панель ────────────────────────────────────────────── */
.art-meta-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 1.1rem;
  border-top: 1px solid rgba(255,255,255,.1);
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.art-meta-cell {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: .6rem 1.25rem .6rem 0;
  margin-right: 1.25rem;
  border-right: 1px solid rgba(255,255,255,.1);
}
.art-meta-cell:last-child {
  border-right: none;
  margin-right: 0;
}
.art-meta-cell--doi {
  flex: 1; /* DOI растягивается чтобы занять оставшееся место */
}

.art-meta-label {
  font-family: var(--font-ui);
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
}

.art-meta-value {
  font-family: var(--font-ui);
  font-size: .88rem;
  color: rgba(255,255,255,.8);
  line-height: 1.35;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}
.art-meta-value svg { opacity: .55; }

.art-meta-doi {
  font-family: var(--font-ui);
  font-size: .83rem;
  color: #7de8d8;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  transition: color .15s;
}
.art-meta-doi:hover { color: #fff; text-decoration: none; }
.art-meta-doi svg   { opacity: .6; flex-shrink: 0; }

/* ── Теги в hero ─────────────────────────────────────────────── */
.art-hero-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  padding: .7rem 0 .9rem;
}
.art-hero-tags-label {
  font-family: var(--font-ui);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
}
.art-hero-tags-list { display: flex; flex-wrap: wrap; gap: .35rem; }

.art-tag-hero {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 20px;
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 500;
  color: rgba(255,255,255,.55);
  border: 1px solid rgba(255,255,255,.15);
  text-decoration: none;
  transition: all .15s;
}
.art-tag-hero:hover {
  color: #fff;
  border-color: rgba(255,255,255,.4);
  background: rgba(255,255,255,.08);
  text-decoration: none;
}

/* ── Wrap (тело статьи) ──────────────────────────────────────── */
.art-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.75rem 2rem 4rem;
}

/* Обложка на всю ширину */
.art-cover {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2.5rem;
}
.art-cover img { width: 100%; display: block; }

/* ── Двухколоночный лайаут ───────────────────────────────────── */
.art-columns {
  display: block; /* single column by default (no resume) */
}
.art-columns.has-resume {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3.5rem;
  align-items: start;
}

/* ── Основной текст ──────────────────────────────────────────── */
.art-main { min-width: 0; }

/* Lead (аннотация) — слегка крупнее, без декора */
.art-lead {
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.88;
  color: var(--ink-2);
  margin-bottom: 1.75rem;
}
.art-lead p { margin-bottom: 1.1rem; }
.art-lead p:last-child { margin-bottom: 0; }

/* Дроп-кэп на первом абзаце аннотации */
.art-lead p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 3.6rem;
  font-weight: 900;
  float: left;
  line-height: .82;
  margin-right: .06em;
  margin-top: .07em;
  color: var(--navy);
}

/* Body — последующий текст */
.art-body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.82;
  color: var(--ink-3);
}
.art-body p  { margin-bottom: 1.2rem; }
.art-body p:last-child { margin-bottom: 0; }
.art-body a  { color: var(--teal); font-weight: 500; }
.art-body a:hover { color: var(--teal-lt); }

.art-body h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
  margin: 2.25rem 0 .85rem;
  letter-spacing: -.01em;
}
.art-body h3 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--navy);
  margin: 1.75rem 0 .65rem;
}
.art-body ul, .art-body ol { margin: .75rem 0 1.2rem 1.4rem; }
.art-body li { margin-bottom: .4rem; }
.art-body blockquote {
  margin: 1.5rem 0;
  padding: .85rem 1.25rem;
  border-left: 2px solid var(--border);
  color: var(--muted);
  font-style: italic;
}
.art-body sup, .art-body sub { font-size: .72em; }
.art-body strong { color: var(--ink-2); }

/* Таблицы */
.art-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.art-table-wrap table { margin: 0; border-collapse: collapse; width: 100%; font-size: .875rem; font-family: var(--font-ui); }
.art-table-wrap th { background: var(--navy); color: #fff; padding: .55rem .9rem; text-align: left; font-weight: 600; font-size: .78rem; }
.art-table-wrap td { padding: .5rem .9rem; border-bottom: 1px solid var(--border-lt); }
.art-table-wrap tr:last-child td { border-bottom: none; }
.art-table-wrap tr:nth-child(even) td { background: var(--bg); }

/* Embed */
.art-embed { position: relative; padding-top: 56.25%; margin: 1.75rem 0; border-radius: var(--radius-lg); overflow: hidden; }
.art-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

/* Документ */
.art-doc-link {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1rem;
  border-radius: var(--radius);
  background: var(--teal-bg);
  color: var(--teal);
  font-family: var(--font-ui); font-size: .85rem; font-weight: 600;
  text-decoration: none;
  transition: all .15s;
}
.art-doc-link:hover { background: var(--teal); color: #fff; }

/* ── Резюме (правая колонка) ─────────────────────────────────── */
.art-resume {
  position: sticky;
  top: 88px;
  align-self: start;
}

.art-resume-card {
  background: #f4faf8;
  border-top: 3px solid var(--teal);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 1.4rem 1.5rem 1.5rem;
}

.art-resume-title {
  font-family: var(--font-ui);
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid rgba(11,110,94,.15);
}

.art-resume-item { margin-bottom: .75rem; }
.art-resume-item:last-child { margin-bottom: 0; }

.art-resume-subtitle {
  font-family: var(--font-ui);
  font-size: .8rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .4rem;
  letter-spacing: -.01em;
}

.art-resume-body {
  font-family: var(--font-body);
  font-size: .88rem;
  line-height: 1.75;
  color: var(--ink-2);
}
.art-resume-body p { margin-bottom: .65rem; }
.art-resume-body p:last-child { margin-bottom: 0; }
.art-resume-body a { color: var(--teal); }
.art-resume-body strong { color: var(--ink-2); }
.art-resume-body ul, .art-resume-body ol { margin: .5rem 0 .75rem 1.2rem; }
.art-resume-body li { margin-bottom: .3rem; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 860px) {
  .art-wrap { padding: 2rem 1.25rem 3rem; }
  .art-hero-inner { padding: 0 1.25rem; }

  .art-columns.has-resume {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* На мобайле Резюме идёт ПОСЛЕ основного текста */
  .art-main   { order: 1; }
  .art-resume { order: 2; position: static; }

  .art-meta-panel {
    gap: 0;
    flex-wrap: wrap;
  }
  .art-meta-cell {
    flex: 0 0 50%;
    padding: .75rem 0 .75rem;
    margin-right: 0;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .art-meta-cell:nth-child(odd) { padding-right: 1rem; }
  .art-meta-cell--doi { flex: 0 0 100%; border-bottom: none; }
}

@media (max-width: 540px) {
  .art-title { font-size: 1.45rem; }
  .art-hero  { padding-top: 2rem; }

  .art-lead p:first-of-type::first-letter {
    font-size: 2.8rem;
  }

  .art-meta-cell { flex: 0 0 100%; }

  .art-resume-card { border-radius: var(--radius); }
}
