/* Article prose styles - журнальный стиль */
.article-prose {
  color: #1f2937;
  letter-spacing: -0.01em;
  font-size: 15px;
  line-height: 1.8;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 768px) {
  .article-prose {
    font-size: 16px;
    line-height: 1.85;
  }
}

/* Enhanced scientific article styles - inspired by academic journals */
.prose-article {
  font-family: 'Georgia', 'Times New Roman', serif;
  color: #000;
  font-size: 12px;
  line-height: 1.6;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

@media (min-width: 768px) {
  .prose-article {
    font-size: 13px;
    line-height: 1.65;
  }
}

.prose-article p {
  margin: 0.6em 0;
  text-indent: 0;
}

.prose-article strong {
  font-weight: 700;
  color: #000;
}

.prose-article em {
  font-style: italic;
  color: #000;
  background: transparent;
  padding: 0;
}

.prose-article sup,
.prose-article sub {
  font-size: 0.7em;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

.prose-article sup {
  top: -0.5em;
}

.prose-article sub {
  bottom: -0.25em;
}

.prose-article em {
  font-style: italic;
  color: #4b5563;
  font-size: 0.95em;
  line-height: 1.7;
}

.prose-article strong {
  font-weight: 700;
  color: #111827;
}

/* Inline formulas and physical/statistical values in journal articles */
.article-prose .journal-formula-inline {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  letter-spacing: 0.02em;
  font-family: "Latin Modern Roman", "Times New Roman", Georgia, serif;
  font-style: italic;
  padding: 0.08em 0.28em;
  background: rgba(15, 23, 42, 0.05);
  border-radius: 3px;
  font-size: 0.98em;
}
.article-prose .journal-formula-inline sup,
.article-prose .journal-formula-inline sub {
  font-size: 0.72em;
  line-height: 0;
  font-style: normal;
}
.article-prose .journal-formula-inline sup { vertical-align: 0.35em; }
.article-prose .journal-formula-inline sub { vertical-align: -0.2em; }

.prose-article sub,
.prose-article sup {
  font-size: 0.75em;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

.prose-article sup {
  top: -0.5em;
}

.prose-article sub {
  bottom: -0.25em;
}

@media (min-width: 768px) {
  .prose-article {
    font-size: 16px;
    line-height: 1.85;
  }
}

.article-prose > * + * {
  margin-top: 14px;
}

.article-prose h2,
.article-prose h3 {
  color: #000;
  letter-spacing: -0.03em;
  margin-top: 28px;
  margin-bottom: 10px;
  scroll-margin-top: 96px;
}

.article-prose h2 {
  text-transform: none;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
}

@media (min-width: 768px) {
  .article-prose h2 {
    font-size: 20px;
  }
}

.article-prose h3 {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
}

.article-prose a {
  color: #000;
  text-underline-offset: 4px;
  text-decoration: underline;
}

.article-prose a:hover {
  opacity: 0.75;
}

.article-prose strong {
  color: #000;
  font-weight: 800;
}

.article-prose ul,
.article-prose ol {
  padding-left: 18px;
}

.article-prose ul {
  list-style-type: disc;
}

.article-prose li {
  margin: 6px 0;
}

.article-prose figure {
  margin-top: 18px;
  margin-bottom: 18px;
}

.article-prose figcaption {
  color: #6b7280;
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.4;
}

.article-prose img {
  max-width: 100%;
  height: auto;
  width: auto;
  max-height: 560px;
  object-fit: contain;
}

/* Article table styles */
.article-table-wrap {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  width: 100%;
  overflow-x: auto;
  margin: 2rem 0;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.article-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 480px;
}

.article-table thead {
  background: #f9fafb;
}

.article-table tbody tr {
  transition: background-color 0.15s ease;
}

.article-table tbody tr:hover {
  background-color: #f9fafb;
}

.article-table tbody tr:last-child td {
  border-bottom: 0;
}

.article-table th,
.article-table td {
  vertical-align: middle;
  color: #374151;
  border-bottom: 1px solid #f3f4f6;
  border-right: 1px solid #f3f4f6;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.4;
  text-align: left;
}

.article-table th:last-child,
.article-table td:last-child {
  border-right: 0;
}

.article-table th {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #111827;
  background: #f9fafb;
  font-size: 10px;
  font-weight: 700;
  border-bottom: 2px solid #e5e7eb;
}

.article-table td {
  color: #4b5563;
}

.article-table tbody tr:first-child td {
  border-top: 1px solid #f3f4f6;
}

.article-prose table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  line-height: 1.4;
}

.article-prose td,
.article-prose th {
  vertical-align: top;
  border-bottom: 1px solid #f3f4f6;
  padding: 8px 10px;
}

.article-prose table img {
  display: inline-block;
}
/* Figure reference links */
.figure-ref {
  color: #0066cc;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s;
  border-bottom: 1px dotted #0066cc;
}

.figure-ref:hover {
  color: #004499;
  text-decoration: none;
  border-bottom: 1px solid #004499;
  background-color: rgba(0, 102, 204, 0.05);
}

/* Figure styling */
figure[id^="figure-"] {
  scroll-margin-top: 100px;
  transition: transform 0.2s;
}

figure[id^="figure-"]:hover {
  transform: scale(1.02);
}/* ========================================
   ПРОФЕССИОНАЛЬНЫЙ ЖУРНАЛЬНЫЙ СТИЛЬ
   Для научных статей с SEO оптимизацией
   ======================================== */

/* Импорт шрифтов */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Lora:ital,wght@0,400;0,700;1,400&family=Source+Sans+3:wght@300;400;600;700&display=swap');

/* Journal Banner */
.journal-banner {
  background: #1e293b;
  color: #94a3b8;
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin: -2rem -2rem 2rem;
}

.journal-name {
  color: #cbd5e1;
}

.journal-issn {
  color: #64748b;
}

/* Article Badge */
.article-badge {
  margin-bottom: 2rem;
}

.badge-primary {
  background: #ccfbf1;
  color: #115e59;
  padding: 0.5rem 1rem;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  border-radius: 9999px;
  display: inline-block;
}

/* Article Title - журнальный стиль */
.article-title-journal {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  margin: 1.5rem 0;
  color: #0f172a;
}

@media (min-width: 768px) {
  .article-title-journal {
    font-size: 5rem;
  }
}

@media (min-width: 1024px) {
  .article-title-journal {
    font-size: 6rem;
  }
}

.article-title-journal .title-emphasis {
  color: #0d9488;
  font-style: italic;
}

/* Author Section */
.article-author-section {
  margin: 2rem 0;
}

.author-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: #0f172a;
}

.author-affiliation {
  color: #64748b;
  font-style: italic;
  font-family: 'Lora', Georgia, serif;
  font-size: 1rem;
}

/* Contacts */
.article-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Keywords Sidebar */
.article-keywords-sidebar {
  border-left: 4px solid #14b8a6;
  padding-left: 1rem;
  margin: 2rem 0;
  font-size: 0.875rem;
}

.keywords-label {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.keywords-text {
  color: #475569;
  font-style: italic;
  font-family: 'Lora', Georgia, serif;
  line-height: 1.6;
}

/* Abstract with drop cap */
.article-abstract-journal {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.25rem;
  line-height: 1.75;
  color: #1e293b;
  margin: 3rem 0;
  padding-bottom: 3rem;
  border-bottom: 2px solid #f1f5f9;
}

@media (min-width: 768px) {
  .article-abstract-journal {
    font-size: 1.5rem;
  }
}

.drop-cap::first-letter {
  float: left;
  font-size: 4.5rem;
  line-height: 0.8;
  padding-right: 0.5rem;
  font-weight: 700;
  font-family: 'Playfair Display', Georgia, serif;
  color: #14b8a6;
}

/* 2-Column Content */
.article-content-columns {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.75;
  color: #334155;
  text-align: justify;
}

@media (min-width: 768px) {
  .article-content-columns {
    columns: 2;
    column-gap: 3rem;
  }
}

/* Section Headings */
.section-heading-journal {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #0f172a;
  margin: 3rem 0 1.5rem;
  padding-left: 1rem;
  border-left: 4px solid #14b8a6;
  break-after: avoid;
}

.subsection-heading-journal {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  margin: 2rem 0 1rem;
  padding-left: 1rem;
  border-left: 4px solid #14b8a6;
  break-after: avoid;
}

/* Paragraphs: только нижний отступ, чтобы между блоками не было двойного зазора */
.article-prose .journal-paragraph,
.article-prose p.journal-paragraph {
  margin: 0 0 0.6rem 0;
  hyphens: none;
  -webkit-hyphens: none;
}

/* Figure References - кликабельные */
.figure-ref-journal {
  color: #0d9488;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px dotted #14b8a6;
  cursor: pointer;
  transition: all 0.2s;
}

.figure-ref-journal:hover {
  color: #0f766e;
  background-color: rgba(20, 184, 166, 0.05);
  border-bottom-color: #0f766e;
  border-bottom-style: solid;
}

/* =============================
   Article v2 unified styling
   ============================= */
.article-v2 {
  max-width: 46rem;
  margin: 0 auto;
  color: #1f2937;
  font-family: 'Lora', Georgia, serif;
  font-size: 14.5px;
  line-height: 1.68;
}

.article-v2-header {
  max-width: 46rem;
  margin: 0 auto 1.25rem;
}

.article-v2-title {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #0f172a;
}

.article-v2-heading {
  margin-top: 1.6rem;
  margin-bottom: 0.6rem;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: 'Source Sans 3', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #0f766e;
  border-left: 3px solid #14b8a6;
  padding-left: 0.6rem;
}

.article-v2-paragraph {
  margin: 0 0 0.95rem 0;
  color: #374151;
  text-align: left;
}

.article-v2-figure {
  margin: 1.75rem auto;
  text-align: center;
}

.article-v2-figure img {
  display: block;
  max-width: 100%;
  max-height: 340px;
  width: auto;
  height: auto;
  margin: 0 auto;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  object-fit: contain;
}

.article-v2-figure figcaption {
  margin: 0.65rem auto 0;
  max-width: 90%;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12.5px;
  line-height: 1.45;
  text-align: center;
  color: #6b7280;
}

.article-v2-table {
  margin: 1.5rem 0;
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

.article-v2-table table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12px;
  line-height: 1.4;
}

.article-v2-table th,
.article-v2-table td {
  padding: 7px 10px;
  border: 1px solid #eef2f6;
  text-align: left;
  vertical-align: top;
}

.article-v2-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #334155;
}

.article-v2-table tr:nth-child(even) td {
  background: #fcfdfe;
}

.article-v2-equation {
  margin: 1.1rem 0;
  padding: 0.6rem 1rem;
  border-left: 3px solid #14b8a6;
  background: #f8fafc;
  border-radius: 0 6px 6px 0;
  font-style: normal;
  overflow-x: auto;
}

.article-v2-equation .katex-display {
  margin: 0;
}

.article-v2-paragraph .katex,
.article-v2-equation .katex {
  font-size: 1em;
}

.article-v2-list {
  margin: 0.6rem 0 1rem;
  padding-left: 1.4rem;
}

.article-v2-list li {
  margin: 0.35rem 0;
  padding-left: 0.2rem;
}

.article-v2-html {
  margin: 0.75rem 0;
}

@media (min-width: 768px) {
  .article-v2 {
    font-size: 15.5px;
    line-height: 1.72;
  }

  .article-v2-title {
    font-size: 2rem;
  }
}

/* Symbols / notation list in journal articles */
.article-prose .symbols-list.journal-list,
.article-prose ul.symbols-list {
  list-style: none;
  padding-left: 0;
  margin: 1rem 0 1.5rem;
}
.article-prose .symbols-list li {
  padding: 0.25rem 0;
  padding-left: 1rem;
  border-left: 2px solid #e2e8f0;
  margin-bottom: 0.35rem;
}
.article-prose .symbols-list li strong {
  color: #0f172a;
  margin-right: 0.25rem;
}

/* Formula block: always on its own line, with spacing so blocks don't overlap */
.article-prose .journal-equation {
  display: block;
  font-family: ui-monospace, monospace;
  font-size: 0.9em;
  padding: 0.75rem 1rem;
  margin: 0.75rem 0 1rem 0;
  background: #f1f5f9;
  border-radius: 0.375rem;
  border-left: 3px solid #0d9488;
  break-inside: avoid;
}

/* Extra spacing after paragraphs that contain formulas */
.article-prose p:has(> .journal-equation) {
  margin-bottom: 0.25rem;
}

/* Standalone equation block wrapper (e.g. "According to the research data" formula) */
.article-prose .journal-equation-block,
.journal-equation-block {
  display: block;
  font-family: "Latin Modern Roman", "Times New Roman", Georgia, serif;
  font-size: 1em;
  font-style: italic;
  text-align: center;
  padding: 0.85rem 1.25rem;
  margin: 0.75rem 0 1.25rem 0;
  background: linear-gradient(to right, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 0.375rem;
  border-left: 4px solid #0d9488;
  break-inside: avoid;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.journal-equation-block .journal-formula-inline {
  background: transparent;
  padding: 0;
  font-style: italic;
}

/* Figures - журнальный стиль */
.figure-journal {
  break-inside: avoid;
  margin: 2rem 0;
  padding: 0.5rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.figure-journal img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: contain;
  display: block;
  border-radius: 0.25rem;
  margin: 0 auto;
}

.figure-journal figcaption {
  margin-top: 0.75rem;
  padding: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #0d9488;
}

figure[id^="figure-"] {
  scroll-margin-top: 100px;
  transition: transform 0.2s;
}

figure[id^="figure-"]:hover {
  transform: scale(1.01);
}

/* Tables */
.table-wrapper-journal {
  break-inside: avoid;
  margin: 2rem 0;
  overflow-x: auto;
  background: #f8fafc;
  padding: 0.75rem;
  border-radius: 0.5rem;
}

.table-wrapper-journal table {
  width: 100%;
  font-size: 0.8rem;
  border-collapse: collapse;
}

.table-wrapper-journal th {
  background: #1e293b;
  color: white;
  padding: 0.5rem 0.6rem;
  text-align: left;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}

.table-wrapper-journal td {
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid #e2e8f0;
}

.table-wrapper-journal tr:hover {
  background: white;
}

/* Responsive - убрать колонки на мобильных */
@media (max-width: 767px) {
  .article-content-columns {
    columns: 1;
  }
  
  .article-title-journal {
    font-size: 2.5rem;
  }
  
  .journal-banner {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

/* Print styles для SEO/PDF */
@media print {
  .article-content-columns {
    columns: 2;
    font-size: 10pt;
  }
  
  .figure-journal {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  
  .section-heading-journal {
    break-after: avoid;
    page-break-after: avoid;
  }
}

/* =============================
   Study (content_v3) data table
   ============================= */
.study-table table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
}
.study-table th,
.study-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid #eef2f6;
  white-space: nowrap;
}
.study-table thead th {
  background: #f8fafc;
  font-weight: 600;
  color: #334155;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.study-table tbody tr:last-child td {
  border-bottom: none;
}
.study-table tbody tr:hover td {
  background: #f8fafc;
}
