/* ===========================
   ЛОКАЛЬНЫЕ ШРИФТЫ
   =========================== */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/inter-v20-cyrillic_latin-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/inter-v20-cyrillic_latin-500.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/inter-v20-cyrillic_latin-600.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/inter-v20-cyrillic_latin-700.woff2') format('woff2');
}
@font-face {
    font-family: 'Merriweather';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/merriweather-v33-cyrillic_latin-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Merriweather';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/merriweather-v33-cyrillic_latin-700.woff2') format('woff2');
}


/* ===========================
   ГЛОБАЛЬНЫЕ НАСТРОЙКИ
   =========================== */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: #f8f9fa;
  color: #212529;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Merriweather', 'Georgia', serif;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.3;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}
h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.5rem; }

/* Ссылки — тёмно-серые, при наведении оранжевые */
a {
  color: #2c3e50;
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: #FDA83D;
  text-decoration: underline;
}

/* ===========================
   ШАПКА И МЕНЮ
   =========================== */
.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  padding: 1rem 2rem;
  box-sizing: border-box;
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  position: relative;
  z-index: 1000;
}

#main-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-grow: 1;
  background: transparent;
  font-weight: 500;
}

#main-menu li {
  margin-right: 2rem;
  font-size: 1.05rem;
}

#main-menu li a {
  color: #495057;
  text-decoration: none;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
#main-menu li a:hover {
  color: #212529;
  border-bottom-color: #FDA83D;
}

#main-menu li.active a,
#main-menu li.active a:hover {
  color: #FDA83D;
  border-bottom-color: #FDA83D;
  font-weight: 600;
}

#main-menu li.last {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Гамбургер-кнопка */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
  margin-right: 1rem;
  z-index: 1001;
}
.menu-toggle .bar {
  display: block;
  width: 30px;
  height: 3px;
  margin: 3px 0;
  background-color: #333;
  border-radius: 2px;
  transition: all 0.3s ease;
}
.menu-toggle.open .bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.open .bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle.open .bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===========================
   ОСНОВНОЙ КОНТЕНТ
   =========================== */
.hr_big_shadow {
  max-width: 1200px;
  margin: 0 auto;
  border: 0;
  height: 1px;
  background: linear-gradient(to right, #dee2e6, #adb5bd, #dee2e6);
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.main_block {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2rem 3rem;
  font-size: 1.15rem;
  line-height: 1.7;
  color: #212529;
  text-align: justify;
  background-color: transparent;
}

.main_block h2 {
  font-size: 1.7rem;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid #e9ecef;
  color: #1a1a1a;
}

.main_block h3 {
  font-size: 1.4rem;
  margin-top: 1.8rem;
  margin-bottom: 0.6rem;
  color: #2c3e50;
}

.main_block p {
  margin-bottom: 1.2rem;
}

.main_block ul, .main_block ol {
  margin: 0.8rem 0 1.2rem 1.8rem;
  padding-left: 0;
}

.main_block li {
  margin-bottom: 0.5rem;
}

.main_block table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 1rem;
}

.main_block th {
  background: #f1f3f5;
  font-weight: 600;
  padding: 0.7rem;
  border: 1px solid #dee2e6;
  text-align: left;
}

.main_block td {
  padding: 0.7rem;
  border: 1px solid #dee2e6;
}

.main_block tr:nth-child(even) td {
  background: #f8f9fa;
}

/* ===========================
   КАРТОЧКИ И КОНТЕЙНЕРЫ (АВТОР)
   =========================== */
.author-container {
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  box-sizing: border-box;
  border: 1px solid #e9ecef;
  gap: 0;
}

.author-container > *:not(:last-child) {
  margin-bottom: 0.8rem;
}

.author-container.row-flex {
  flex-direction: row;
}

.author-container ul {
  margin-top: 0;
  margin-bottom: 0;
}

.author-container p.highlight {
  margin-top: 0;
  margin-bottom: 0;
}

.author-container ul li:last-child {
  margin-bottom: 0;
}

.science_my_track {
  margin: 0;
  padding: 0;
}

.image {
  flex: 1 1 250px;
  text-align: center;
}

.my_photo {
  max-width: 330px !important;
  width: 100%;
  height: auto !important;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.about_me_main {
  flex: 2 1 300px;
  padding: 0rem 0rem 0rem 0.5rem;
}

.info-block {
  margin-bottom: 1.5rem;
}

.info-block h4 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6c757d;
  margin: 0 0 0.3rem;
  border-bottom: 1px solid #e9ecef;
  padding-bottom: 0.2rem;
}

.info-block p {
  margin: 0.3rem 0;
  font-size: 1.05rem;
}

.section-title {
  font-size: 2rem;
  text-align: center;
  margin: 2.5rem 0 1.5rem;
  color: #212529;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: #FDA83D;
  margin: 0.8rem auto 0;
  border-radius: 2px;
}

.science_my_track ul {
  padding-left: 1.5rem;
  margin: 0.5rem 0 1.5rem;
}

.science_my_track ul li,
.author-container ul li {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.highlight {
  font-weight: 600;
  font-size: 1.15rem;
  color: #343a40;
}

.author-container li strong + strong {
  white-space: nowrap;
}

/* ===========================
   АККОРДЕОНЫ АВТОРА
   =========================== */
.author-page {
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

.author-accordion {
  margin-bottom: 2.5rem;
}

.author-acc {
  border: 1px solid #e9ecef;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.author-acc-header {
  background: transparent;
  font-family: 'Merriweather', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #212529;
  padding: 1.5rem 2rem 0.8rem;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
  position: relative;
  border-radius: 12px 12px 0 0;
  text-align: center;
}

.author-acc-header::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: #FDA83D;
  margin: 0.5rem auto 0;
  border-radius: 2px;
  transition: width 0.2s;
}

.author-acc-header:hover {
  color: #FDA83D;
}

.author-acc-header:hover::after {
  width: 80px;
}

.author-acc-body {
  display: none;
  padding: 0 2rem 2rem;
  border-top: none;
}

.author-acc-body.active {
  display: block;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border-radius: 12px;
  margin: 0;
  padding: 1.5rem 2rem 2rem;
  border: 1px solid #e9ecef;
}

/* ===========================
   НАУКА (АККОРДЕОН)
   =========================== */
button.label {
  cursor: pointer;
  width: 100%;
  border: 1px solid #e9ecef;
  text-align: left;
  outline: none;
  font-size: 1.15rem;
  font-weight: 500;
  color: #212529;
  background-color: #ffffff;
  border-radius: 8px;
  padding: 0.9rem 1.2rem;
  margin: 0.4rem 0;
  transition: background-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

button.label:hover {
  background-color: #f1f3f5;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

div.box {
  padding: 0 18px;
  display: none;
  overflow-x: hidden;
}

.science_style {
  list-style: none;
  padding-left: 0;
}

.science_style li {
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.science_style li p {
  word-break: break-word;
  overflow-wrap: break-word;
}

/* ===========================
   МОБИЛЬНАЯ АДАПТАЦИЯ (общая)
   =========================== */
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  .header-container {
    padding: 1rem;
  }
  .menu-toggle {
    display: flex;
  }
  #main-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #ffffff;
    position: absolute;
    top: 100%;
    left: 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    padding: 1rem 0;
    z-index: 999;
    border-radius: 0 0 12px 12px;
  }
  #main-menu.active {
    display: flex;
  }
  #main-menu li {
    margin: 0;
    padding: 0.75rem 2rem;
    width: 100%;
    box-sizing: border-box;
  }
  #main-menu li.last {
    margin-left: 0;
  }
  .main_block {
    padding: 1.5rem 1rem;
    text-align: left;
  }
  .author-container {
    flex-direction: column;
    padding: 1.5rem;
  }
  .section-title {
    font-size: 1.6rem;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
  .main_block {
    font-size: 1rem;
  }
  button.label {
    font-size: 1rem;
    padding: 0.7rem 1rem;
  }
}

/* ===========================
   ХРОНИКА И ДНЕВНИК (список)
   =========================== */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.news-card {
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border-radius: 12px;
  border: 1px solid #e9ecef;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.news-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.news-image img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  display: block;
}

.news-content {
  padding: 1.5rem 2rem;
}

.news-content h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

/* Заголовок в карточке — тёмный, при hover оранжевый */
.news-content h2 a {
  color: #1a1a1a;
  text-decoration: none;
  transition: color 0.2s;
}
.news-content h2 a:hover {
  color: #FDA83D;
  text-decoration: none;
}

.news-date {
  font-size: 0.9rem;
  color: #6c757d;
  margin-bottom: 1rem;
}

.read-more {
  display: inline-block;
  margin-top: 1rem;
  color: #2c3e50;
  font-weight: 500;
}
.read-more:hover {
  color: #FDA83D;
  text-decoration: underline;
}

.pagination {
  margin-top: 2rem;
  text-align: center;
}
.pagination a, .pagination .current {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  margin: 0 0.2rem;
  border-radius: 6px;
  border: 1px solid #e9ecef;
  color: #2c3e50;
  text-decoration: none;
}
.pagination .current {
  background-color: #FDA83D;
  color: #fff;
  border-color: #FDA83D;
}
.pagination a:hover {
  background-color: #f1f3f5;
  border-color: #dee2e6;
  color: #FDA83D;
}

.news-detail h1 {
  margin-bottom: 0.5rem;
}
.news-body {
  margin-top: 2rem;
  line-height: 1.7;
}

/* Кнопка «Добавить» — оранжевая, единый стиль */
.btn-add {
  display: inline-block;
  margin-bottom: 1.5rem;
  padding: 0.6rem 1.2rem;
  background-color: #FDA83D;
  color: #ffffff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s;
  border: none;
}
.btn-add:hover {
  background-color: #e8941e;
  text-decoration: none;
  color: #ffffff;
}

.news-body,
.news-content {
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    line-height: 1.6;
    text-align: justify;
}

.news-body p,
.news-content p {
    margin-bottom: 1em;
}

.news-body ul, .news-body ol,
.news-content ul, .news-content ol {
    margin: 0.5em 0 1em 1.8em;
    padding-left: 0;
}
.news-body li,
.news-content li {
    margin-bottom: 0.5em;
}

.news-body h1, .news-body h2, .news-body h3,
.news-content h1, .news-content h2, .news-content h3 {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    color: #1a1a1a;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

/* ===========================
   АДАПТИВНЫЕ ИЗОБРАЖЕНИЯ
   =========================== */
.main_block img {
  max-width: 100%;
  height: auto;
  display: block;
  box-sizing: border-box;
}

.main_block img[style*="height"] {
  width: auto !important;
}

.image-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 1rem;
  margin: 1.5rem 0;
}

.image-row img {
  max-width: 100%;
  height: auto;
}

.main_block img.center {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .main_block img,
  .image-row img {
    height: auto !important;
    width: auto !important;
    max-width: 100% !important;
  }
}

/* ===========================
   БЕЙДЖИ И МЕТКИ
   =========================== */
.badge {
    display: inline-block;
    padding: 2px 8px;
    margin-left: 4px;
    font-size: 0.8rem;
    border-radius: 6px;
    background: #e9ecef;
    color: #495057;
    font-weight: 500;
    vertical-align: middle;
}
.badge-scopus { background: #ff6b00; color: white; }
.badge-wos { background: #3a5a99; color: white; }
.badge-вак { background: #dc3545; color: white; }
.badge-rsci { background: #6f42c1; color: white; }
.badge-бс { background: #20c997; color: white; }
.badge-self {
    background: #f0ad4e;
    color: white;
    margin-left: 4px;
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 6px;
}
/* ИЗМЕНЕНО: «Черновик» стал мягким */
.badge-warning {
    background-color: #fff8e1;
    color: #856404;
    border: 1px solid #ffe69c;
    margin-left: 0.5rem;
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 6px;
}
.badge-lecture {
    background-color: #e8f4fd;
    color: #0c4a6e;
    border: 1px solid #b6d4fe;
    padding: 0.1rem 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}
.badge-science {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    padding: 0.1rem 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}
.badge-difficulty-basic {
    background-color: #ecfdf5; color: #065f46;
    border: 1px solid #a7f3d0;
    padding: 0.1rem 0.5rem; border-radius: 6px;
    font-size: 0.8rem; margin-left: 0.3rem;
}
.badge-difficulty-medium {
    background-color: #fff8e1; color: #856404;
    border: 1px solid #ffe69c;
    padding: 0.1rem 0.5rem; border-radius: 6px;
    font-size: 0.8rem; margin-left: 0.3rem;
}
.badge-difficulty-hard {
    background-color: #fff0e6; color: #a3470a;
    border: 1px solid #ffd6b0;
    padding: 0.1rem 0.5rem; border-radius: 6px;
    font-size: 0.8rem; margin-left: 0.3rem;
}
.badge-difficulty-advanced {
    background-color: #fdecea; color: #721c24;
    border: 1px solid #f5c2c7;
    padding: 0.1rem 0.5rem; border-radius: 6px;
    font-size: 0.8rem; margin-left: 0.3rem;
}

.citation-count {
    margin-left: 8px;
    cursor: pointer;
    color: #2c3e50;
    font-weight: 600;
}
.citation-count a {
    color: inherit;
    text-decoration: none;
}
.citation-count a:hover {
    color: #FDA83D;
    text-decoration: underline;
}

/* ===========================
   НАУКОМЕТРИЯ
   =========================== */
.metrics-grid {
  display: grid;
  gap: 1rem;
  margin-top: 0.5rem;
}
.metric-item {
  text-align: center;
  padding: 0.8rem 0.5rem;
  background: #f8f9fa;
  border-radius: 8px;
}
.metric-label {
  display: block;
  font-size: 0.85rem;
  color: #6c757d;
  margin-bottom: 0.4rem;
  line-height: 1.3;
}
.metric-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #212529;
  line-height: 1.2;
}

/* ===========================
   ПЕРЕКЛЮЧАТЕЛЬ ЯЗЫКА
   =========================== */
.lang-switch {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}
.lang-form {
    display: inline;
    margin: 0;
    padding: 0;
}
.lang-link {
    background: none;
    border: none;
    color: #495057;
    font-size: 1rem;
    font-family: inherit;
    font-weight: normal;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    text-decoration: none;
    transition: color 0.2s, background-color 0.2s;
    border-radius: 4px;
}
.lang-link:hover {
    text-decoration: underline;
    color: #212529;
}
.lang-link.active {
    color: #FDA83D;
    font-weight: bold;
    text-decoration: none;
    background-color: transparent;
}
.lang-separator {
    color: #6c757d;
    margin: 0 0.1rem;
}

/* ===========================
   ЭКСПОРТ БИБЛИОГРАФИИ
   =========================== */
.export-block {
    margin-top: 2rem;
    padding: 1.2rem 1.5rem;
    background: #f1f3f5;
    border-radius: 12px;
}
.export-block h3 {
    margin-top: 0;
}
.export-block label {
    margin-right: 1rem;
}
/* ИЗМЕНЕНО: оранжевая кнопка */
.btn-submit {
    background-color: #FDA83D;
    color: #fff;
    border: none;
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.btn-submit:hover {
    background-color: #e8941e;
}

/* ===========================
   АВТОРИЗАЦИЯ
   =========================== */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem 1rem;
}
.auth-card {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 420px;
    border: 1px solid #e9ecef;
}
.auth-title {
    font-family: 'Merriweather', serif;
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #212529;
}
.auth-errors {
    background: #fdecea;
    border-left: 4px solid #dc3545;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}
.error-msg {
    color: #721c24;
    font-size: 0.95rem;
    margin: 0.2rem 0;
}
.form-group {
    margin-bottom: 1.2rem;
}
.form-group label {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.3rem;
}
.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #ced4da;
    border-radius: 8px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}
.form-group input:focus {
    border-color: #FDA83D;
    box-shadow: 0 0 0 3px rgba(253, 168, 61, 0.2);
    outline: none;
}
.btn-auth {
    display: inline-block;
    width: auto;
    padding: 0.75rem 1.5rem;
    background-color: #FDA83D;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 0.5rem;
}
.btn-auth:hover {
    background-color: #e8941e;
}
.auth-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: #6c757d;
}
.auth-link a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
}
.auth-link a:hover {
    color: #FDA83D;
    text-decoration: underline;
}

/* ===========================
   ОФОРМЛЕНИЕ КОНСПЕКТОВ
   =========================== */
.box-definition {
  border: 1px solid #b6d4fe;
  border-left: 4px solid #2c3e50;
  background: #f0f6ff;
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 6px;
}
.box-theorem {
  border: 1px solid #a7f3d0;
  border-left: 4px solid #146c43;
  background: #f0faf4;
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 6px;
}
.box-example {
  margin: 1.5rem 0;
}
.box-note {
  border: 1px solid #ffe69c;
  border-left: 4px solid #ffc107;
  background: #fff9e6;
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
  border-radius: 6px;
}
.box-steps {
  border: 1px solid #d1b3ff;
  border-left: 4px solid #6f42c1;
  background: #faf5ff;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 6px;
}
.box-steps ol {
  margin: 0.5rem 0 0 1.2rem;
}
.table-striped {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}
.table-striped th, .table-striped td {
  border: 1px solid #dee2e6;
  padding: 0.5rem;
  text-align: left;
}
.table-striped tr:nth-child(even) {
  background: #f8f9fa;
}

/* Центрирование изображений (CKEditor 5) */
.image-style-align-center {
    display: block;
    margin-left: auto;
    margin-right: auto;
    float: none !important;
}
.image-style-align-left {
    float: left;
    margin-right: 1rem;
}
.image-style-align-right {
    float: right;
    margin-left: 1rem;
}

/* ===========================
   АККОРДЕОНЫ (универсальные)
   =========================== */
.accordion {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin: 1.5rem 0;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.accordion-header {
    background: #f8f9fa;
    padding: 0.7rem 1.2rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 8px 8px 0 0;
    user-select: none;
    transition: background 0.2s;
    color: #212529;
}
.accordion-header:hover {
    background: #e9ecef;
}
.accordion-body {
    display: none;
    padding: 1.2rem 1.5rem;
    border-top: 1px solid #dee2e6;
    font-size: 1.05rem;
    line-height: 1.6;
}
.accordion-body.active {
    display: block;
}

/* Имя автора на странице автора */
.name {
  text-align: center;
  font-size: 2.2rem;
  font-family: 'Merriweather', serif;
  font-weight: 700;
  color: #1a1a1a;
  margin: 2rem 0 1.5rem;
}
.badge-review {
    background-color: #6f42c1;
    color: white;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Таблица метрик автора */
.metrics-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    font-size: 1.05rem;
}
.metrics-table th {
    background: #f1f3f5;
    padding: 0.8rem 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}
.metrics-table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #e9ecef;
}
.metrics-table tr:hover td {
    background: #f8f9fa;
}
.metrics-table td:nth-child(2),
.metrics-table td:nth-child(3),
.metrics-table th:nth-child(2),
.metrics-table th:nth-child(3) {
    text-align: center;
    font-weight: 600;
}
.metrics-general {
    margin-top: 1.5rem;
    padding: 1rem 1.2rem;
    background: #f8f9fa;
    border-radius: 8px;
}
.metrics-general p {
    margin: 0.4rem 0;
}

/* ===========================
   СТАТИСТИКА (НАУКА)
   =========================== */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}
.stats-block {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 1.5rem;
    box-sizing: border-box;
    height: 420px;
    display: flex;
    flex-direction: column;
}
.stats-block-wide {
    grid-column: 1 / -1;
    height: auto;
}
.stats-block h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    color: #212529;
}
.stats-block canvas {
    flex-grow: 1;
    max-height: 300px;
}
.stats-switch {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}
.stats-switch button {
    background: #f1f3f5;
    border: 1px solid #dee2e6;
    padding: 0.3rem 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #495057;
    transition: background 0.2s, color 0.2s;
}
.stats-switch button.active {
    background: #FDA83D;
    color: white;
    border-color: #FDA83D;
}
.stats-switch button:hover:not(.active) {
    background: #e9ecef;
}

/* График 4 */
.cvp-container {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 1.5rem;
    margin-top: 1rem;
}
.cvp-chart-wrapper {
    position: relative;
    min-height: 500px;
}
.cvp-chart-wrapper canvas {
    max-height: 500px;
}
.cvp-note {
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}
.cvp-list-wrapper {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.8rem;
    background: #f8f9fa;
}
.cvp-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.cvp-list li {
    padding: 0.5rem 0.3rem;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.9rem;
    line-height: 1.4;
}
.cvp-list li:last-child {
    border-bottom: none;
}
.cvp-num {
    font-weight: 700;
    color: #FDA83D;
    margin-right: 0.4rem;
}
.cvp-ref {
    font-weight: 600;
    color: #212529;
}
.cvp-title {
    color: #495057;
    font-style: italic;
}
.cvp-cit-count {
    color: #2c3e50;
    font-weight: 700;
    text-decoration: none;
}
.cvp-cit-count:hover {
    color: #FDA83D;
    text-decoration: underline;
}

/* График 5 */
.journals-scroll {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}
.journals-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.journals-table th {
    position: sticky;
    top: 0;
    background: #f1f3f5;
    padding: 0.6rem 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    z-index: 1;
}
.journals-table td {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #e9ecef;
}
.journals-table tr:hover td {
    background: #f8f9fa;
}
.journals-table td:last-child,
.journals-table th:last-child {
    text-align: right;
    font-weight: 600;
}

@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .cvp-container {
        grid-template-columns: 1fr;
    }
    .cvp-chart-wrapper {
        min-height: 350px;
    }
    .cvp-chart-wrapper canvas {
        max-height: 350px;
    }
    .cvp-list-wrapper {
        max-height: 300px;
    }
}

/* Круговая диаграмма квартилей */
.quartiles-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
    align-items: center;
    min-height: 350px;
}
.quartiles-chart-wrapper {
    position: relative;
    height: 350px;
}
.quartiles-info {
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
    text-align: left;
    padding-left: 1rem;
    border-left: 3px solid #FDA83D;
}

.q-cell {
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
}
.q-q1 { color: #28a745; }
.q-q2 { color: #17a2b8; }
.q-q3 { color: #d39e00; }
.q-q4 { color: #dc3545; }
.q-none { color: #adb5bd; }

@media (max-width: 768px) {
    .quartiles-container {
        grid-template-columns: 1fr;
    }
    .quartiles-chart-wrapper {
        height: 280px;
    }
}

/* Недоступные конспекты в списке тем */
.no-access,
.no-access:visited {
    color: #dc3545;
    font-weight: 600;
}
.no-access:hover {
    color: #a71d2a;
    text-decoration: underline;
}

/* ===========================
   ХЛЕБНЫЕ КРОШКИ
   =========================== */
.breadcrumbs {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}
.breadcrumbs a {
    color: #2c3e50;
    text-decoration: none;
}
.breadcrumbs a:hover {
    color: #FDA83D;
    text-decoration: underline;
}
.breadcrumb-sep {
    color: #adb5bd;
    font-size: 1rem;
}
.breadcrumb-current {
    color: #495057;
}

/* ===========================
   ВРЕМЯ ЧТЕНИЯ И ЛОКАЦИЯ
   =========================== */
.reading-time {
    color: #6c757d;
    font-size: 0.9rem;
    margin-left: 0.3rem;
}
.post-location {
    color: #6c757d;
    font-size: 0.9rem;
    margin-left: 0.3rem;
}

/* Подсказка со slug (видна только суперюзеру) */
.post-slug-hint {
    margin: 0.3rem 0 1.5rem;
    padding: 0;
    background: transparent;
    display: inline-block;
}
.post-slug-hint small {
    color: #adb5bd;
    font-size: 0.8rem;
}
.post-slug-hint a {
    color: #adb5bd;
    text-decoration: none;
}
.post-slug-hint a:hover {
    color: #FDA83D;
    text-decoration: underline;
}

@media (max-width: 480px) {
    .breadcrumbs {
        font-size: 0.85rem;
    }
    .breadcrumb-current {
        display: none;
    }
    .post-location {
        display: block;
        margin-left: 0;
        margin-top: 0.2rem;
    }
}

/* ===========================
   КАРУСЕЛЬ ИЗОБРАЖЕНИЙ
   =========================== */
.carousel {
    position: relative;
    margin: 2rem 0;
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    outline: none;
}
.carousel:focus {
    box-shadow: 0 0 0 3px rgba(253, 168, 61, 0.3);
}
.carousel-slides {
    position: relative;
    width: 100%;
    height: 500px;
    background: #e9ecef;
}
.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
}
.carousel-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}
.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.8rem 1.2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: #ffffff;
    font-size: 0.95rem;
    text-align: center;
}
.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.85);
    color: #212529;
    font-size: 2rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: background 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0 4px 0;
    z-index: 2;
}
.carousel-prev { left: 1rem; }
.carousel-next { right: 1rem; }
.carousel-prev:hover,
.carousel-next:hover {
    background: #FDA83D;
    color: #ffffff;
    transform: translateY(-50%) scale(1.05);
}
.carousel-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 2;
}
.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    padding: 0;
}
.carousel-dot.active {
    background: #FDA83D;
    transform: scale(1.3);
}
.carousel-dot:hover:not(.active) {
    background: rgba(255, 255, 255, 0.9);
}
.carousel-counter {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.3rem 0.7rem;
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    font-size: 0.85rem;
    border-radius: 20px;
    z-index: 2;
}

@media (max-width: 768px) {
    .carousel-slides {
        height: 300px;
    }
    .carousel-prev,
    .carousel-next {
        width: 40px;
        height: 40px;
        font-size: 1.6rem;
    }
    .carousel-prev { left: 0.5rem; }
    .carousel-next { right: 0.5rem; }
    .carousel-counter {
        top: 0.5rem;
        right: 0.5rem;
        font-size: 0.8rem;
    }
    .carousel-caption {
        font-size: 0.85rem;
        padding: 0.5rem 0.8rem;
    }
}

@media (max-width: 480px) {
    .carousel-slides {
        height: 220px;
    }
}

/* ===========================
   УПРАВЛЕНИЕ НАУКОЙ
   =========================== */
.manage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}
.manage-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 1.5rem 2rem;
}
.manage-card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    color: #212529;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}
.manage-card ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}
.manage-card ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f3f5;
    font-size: 1rem;
}
.manage-card ul li:last-child {
    border-bottom: none;
}
.manage-card ul li a {
    color: #2c3e50;
    text-decoration: none;
}
.manage-card ul li a:hover {
    color: #FDA83D;
    text-decoration: underline;
}

.manage-pub-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
}
.manage-pub-card h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    border-bottom: 2px solid #FDA83D;
    padding-bottom: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Блок автора в импорте */
.author-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.8rem 1rem;
    margin-bottom: 0.8rem;
    align-items: start;
}
.author-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding-top: 0.3rem;
}
.author-btn {
    background: #ffffff;
    border: 1px solid #dee2e6;
    color: #495057;
    border-radius: 4px;
    width: 28px;
    height: 26px;
    font-size: 0.8rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: background 0.15s;
}
.author-btn:hover {
    background: #e9ecef;
}
.author-remove {
    color: #dc3545;
    border-color: #f5c2c7;
}
.author-remove:hover {
    background: #fdecea;
}
.author-body {
    flex-grow: 1;
}
.author-match-hint {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}
.author-match-hint strong {
    color: #28a745;
}

input[list] {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4z' fill='%236c757d'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    padding-right: 1.5rem;
}

.flags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    padding: 0.5rem 0;
}
.flags-row label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
    cursor: pointer;
    color: #495057;
}

.btn-add-author {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f1f3f5;
    border: 1px dashed #adb5bd;
    border-radius: 8px;
    color: #495057;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.btn-add-author:hover {
    background: #e9ecef;
    border-color: #6c757d;
    color: #212529;
}

.authors-container {
    margin-top: 0.5rem;
}

/* ===========================
   СООБЩЕНИЯ
   =========================== */
.messages-block {
    margin-bottom: 1.5rem;
}
.messages-block .alert {
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    margin-bottom: 0.6rem;
    border-left: 4px solid #dee2e6;
    background: #f8f9fa;
    font-size: 0.98rem;
}
.messages-block .alert-success {
    border-left-color: #28a745;
    background: #ecfdf5;
    color: #065f46;
}
.messages-block .alert-error,
.messages-block .alert-danger {
    border-left-color: #dc3545;
    background: #fdecea;
    color: #721c24;
}
.messages-block .alert-warning {
    border-left-color: #ffc107;
    background: #fff8e1;
    color: #856404;
}
.messages-block .alert-info {
    border-left-color: #17a2b8;
    background: #e8f4f8;
    color: #0c5460;
}

/* ===========================
   СТРАНИЦЫ ОШИБОК (404, 500)
   =========================== */
.error-page {
    max-width: 640px;
    margin: 4rem auto;
    padding: 2rem;
    text-align: center;
}
.error-code {
    font-family: 'Merriweather', 'Georgia', serif;
    font-size: 6rem;
    font-weight: 700;
    line-height: 1;
    color: #FDA83D;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}
.error-title {
    font-family: 'Merriweather', 'Georgia', serif;
    font-size: 1.8rem;
    color: #212529;
    margin-top: 0;
    margin-bottom: 1rem;
}
.error-message {
    font-size: 1.1rem;
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 2rem;
}
.error-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.error-actions .btn-auth {
    display: inline-block;
    width: auto;
    padding: 0.7rem 1.5rem;
    margin: 0;
}
.btn-secondary-link {
    color: #495057;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.7rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}
.btn-secondary-link:hover {
    color: #FDA83D;
    border-bottom-color: #FDA83D;
    text-decoration: none;
}
@media (max-width: 480px) {
    .error-code {
        font-size: 4rem;
    }
    .error-title {
        font-size: 1.4rem;
    }
    .error-message {
        font-size: 1rem;
    }
}


/* Сетка счётчиков публикаций в наукометрии */
.metrics-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    margin: 0 0 1.5rem;
}

.metrics-summary .metric-item {
    background: #ffffff;
    border: 1px solid #e9ecef;
    text-align: center;
    padding: 0.9rem 0.5rem;
}

.metrics-summary .metric-value {
    font-size: 1.6rem;
}

@media (max-width: 600px) {
    .metrics-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}/* ===========================
   ТАБЛИЦЫ НА МОБИЛЬНЫХ
   ===========================
   Широкие таблицы на узких экранах превращаются в горизонтальный скролл.
*/

/* Обёртка для скролла — используется в шаблонах */
.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    margin: 1rem 0;
}

/* Тонкий скроллбар для красоты */
.table-scroll::-webkit-scrollbar {
    height: 6px;
}
.table-scroll::-webkit-scrollbar-track {
    background: #f1f3f5;
    border-radius: 3px;
}
.table-scroll::-webkit-scrollbar-thumb {
    background: #ced4da;
    border-radius: 3px;
}
.table-scroll::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

/* Мобильная адаптация таблиц */
@media (max-width: 768px) {
    /* Публикации по журналам */
    .journals-table {
        font-size: 0.85rem;
        min-width: 560px;
    }
    .journals-table th,
    .journals-table td {
        padding: 0.4rem 0.6rem;
    }

    /* Наукометрия автора */
    .metrics-table {
        font-size: 0.9rem;
        min-width: 480px;
    }
    .metrics-table th,
    .metrics-table td {
        padding: 0.5rem 0.6rem;
    }

    /* Таблицы в контенте конспектов и новостей */
    .news-body table,
    .main_block table,
    .table-striped {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        min-width: 100%;
    }

    /* Заголовки статистики на мобильных — уменьшить */
    .stats-block h3 {
        font-size: 1.1rem;
    }
}

/* Очень узкие экраны */
@media (max-width: 480px) {
    .journals-table {
        font-size: 0.8rem;
        min-width: 500px;
    }
    .journals-table th,
    .journals-table td {
        padding: 0.35rem 0.5rem;
    }
    .metrics-table {
        font-size: 0.85rem;
        min-width: 440px;
    }
    .metrics-table th,
    .metrics-table td {
        padding: 0.4rem 0.5rem;
    }
}

/* ===========================
   СТАТИСТИКА НА МОБИЛЬНЫХ (перекрывает прежние правила)
   ===========================
   Причина проблемы: у grid-элементов нет min-width: 0,
   поэтому широкое содержимое (таблицы, canvas) не сжимается,
   а растягивает страницу вширь.
*/

/* Критично для grid: разрешаем элементам сжиматься */
.stats-grid > *,
.stats-block,
.stats-block-wide,
.cvp-container > *,
.cvp-chart-wrapper,
.cvp-list-wrapper,
.quartiles-container > *,
.quartiles-chart-wrapper,
.journals-scroll {
    min-width: 0;
}

/* Родитель не должен вылезать за экран */
.stats-grid,
.stats-block,
.cvp-container,
.quartiles-container,
.journals-scroll,
.table-scroll {
    max-width: 100%;
    box-sizing: border-box;
}

/* Canvas подстраивается под родителя */
.stats-block canvas,
.cvp-chart-wrapper canvas,
.quartiles-chart-wrapper canvas {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
}

/* Таблица внутри скролл-контейнера не расширяет родителя */
.journals-scroll {
    overflow-x: hidden;
}

@media (max-width: 768px) {
    /* Сетка статистики — в одну колонку */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 1rem 0;
    }

    /* Блоки статистики — автовысота, без фиксированных 420px */
    .stats-block {
        height: auto;
        min-height: 320px;
        padding: 1rem 0.9rem;
    }

    .stats-block h3 {
        font-size: 1.05rem;
        margin-bottom: 0.6rem;
    }

    /* График «Цитирования vs публикации» */
    .cvp-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .cvp-chart-wrapper {
        min-height: 260px;
        height: auto;
    }
    .cvp-chart-wrapper canvas {
        max-height: 260px !important;
    }
    .cvp-list-wrapper {
        max-height: 260px;
    }
    .cvp-list li {
        font-size: 0.85rem;
    }

    /* Круговая диаграмма квартилей */
    .quartiles-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        min-height: 0;
    }
    .quartiles-chart-wrapper {
        height: 260px;
    }
    .quartiles-info {
        padding-left: 0.8rem;
        font-size: 1rem;
    }

    /* Таблица журналов — уменьшить шрифт и паддинги */
    .journals-table {
        font-size: 0.8rem;
    }
    .journals-table th,
    .journals-table td {
        padding: 0.4rem 0.5rem;
    }

    /* Кнопки-переключатели статистики */
    .stats-switch {
        flex-wrap: wrap;
        gap: 0.3rem;
    }
    .stats-switch button {
        font-size: 0.85rem;
        padding: 0.25rem 0.7rem;
    }

    /* Блок экспорта библиографии */
    .export-block {
        padding: 1rem;
    }
    .export-block label {
        display: block;
        margin-right: 0;
        margin-bottom: 0.3rem;
    }
    .btn-submit {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stats-block {
        min-height: 280px;
        padding: 0.9rem 0.7rem;
    }
    .stats-block h3 {
        font-size: 1rem;
    }
    .cvp-chart-wrapper {
        min-height: 220px;
    }
    .cvp-chart-wrapper canvas {
        max-height: 220px !important;
    }
    .cvp-list-wrapper {
        max-height: 220px;
    }
    .quartiles-chart-wrapper {
        height: 220px;
    }
    .journals-table {
        font-size: 0.75rem;
    }
    .journals-table th,
    .journals-table td {
        padding: 0.3rem 0.4rem;
    }
}
/* Диапазон годов в блоке экспорта */
.export-year-range {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.export-year-range label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
    color: #495057;
}

.export-year-range input {
    width: 70px;
    padding: 0.4rem 0.6rem;
    font-size: 1rem;
    border: 1px solid #ced4da;
    border-radius: 6px;
    text-align: center;
    box-sizing: border-box;
}

.export-year-range input:focus {
    border-color: #FDA83D;
    outline: none;
    box-shadow: 0 0 0 3px rgba(253, 168, 61, 0.15);
}

@media (max-width: 480px) {
    .export-year-range {
        gap: 0.8rem;
    }
    .export-year-range input {
        width: 60px;
    }
}