/*
Theme Name: Promyshlenny Zhurnal
Theme URI: http://127.0.0.1:8108/
Author: Agent-08
Description: Контентная статья-тема: билет как экспертная статья с разбором. Чернильный + красный. Serif для вопросов, TOC, пояснения, social-кнопки, похожие материалы.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: promysl
*/

/* ===== ПЕРЕМЕННЫЕ ДИЗАЙНА (чернильный + красный, тёплый белый) ===== */
:root {
  --ink: #1c1917;          /* чернильный основной */
  --ink-2: #292524;        /* текст */
  --ink-3: #44403c;        /* приглушённый */
  --ink-soft: #57534e;     /* метаданные */
  --muted: #78716c;        /* мелкое */
  --accent: #dc2626;       /* насыщенный красный */
  --accent-d: #b91c1c;     /* красный тёмный */
  --accent-l: #fee2e2;     /* красный светлый фон */
  --accent-soft: #fef2f2;  /* ещё светлее */
  --bg: #fefce8;           /* тёплый белый фон */
  --paper: #fffef5;        /* "бумага" для карточек */
  --paper-2: #fffdf0;
  --line: #e7e5e4;         /* границы тёплые */
  --line-2: #d6d3d1;
  --ok: #15803d;           /* правильный — но в нашей теме используем КРАСНЫЙ акцент */
  --warn: #b45309;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.06), 0 1px 3px rgba(28, 25, 23, 0.04);
  --shadow: 0 4px 16px -2px rgba(28, 25, 23, 0.08);
  --shadow-lg: 0 16px 50px -8px rgba(28, 25, 23, 0.18);
  --serif: 'Lora', 'PT Serif', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --maxw: 1240px;
  --content-w: 760px;
}

/* ===== РЕСЕТ ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--accent-d); text-decoration: underline; text-decoration-color: rgba(220, 38, 38, 0.25); text-underline-offset: 3px; transition: color .15s, text-decoration-color .15s; }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; color: var(--ink); letter-spacing: -0.2px; }
h1 { font-family: var(--serif); }

/* ===== ХЕДЕР (чернильный, газетный) ===== */
.site-header {
  background: var(--ink);
  color: #fafaf9;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #292524;
  box-shadow: 0 2px 0 0 var(--accent);
}
.site-header .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #fafaf9;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.1;
}
.site-brand:hover { color: #fff; text-decoration: none; }
.site-brand .logo-mark {
  width: 42px; height: 42px;
  background: #fffef5;
  border: 1px solid rgba(220, 38, 38, 0.22);
  border-radius: 10px;
  display: grid; place-items: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(220, 38, 38, 0.30);
  transition: transform .18s, box-shadow .18s;
}
.site-brand:hover .logo-mark {
  transform: translateY(-1px) rotate(-3deg);
  box-shadow: 0 5px 16px rgba(220, 38, 38, 0.45);
}
.site-brand .logo-mark svg { width: 28px; height: 28px; display: block; }
.site-brand .brand-text { display: flex; flex-direction: column; gap: 1px; }
.site-brand .brand-text em {
  font-style: normal;
  color: var(--accent);
  font-weight: 700;
}
.site-brand .brand-tag {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  color: #a8a29e;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.main-nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.main-nav a {
  color: #d6d3d1;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 7px;
  text-decoration: none;
  transition: all .15s;
}
.main-nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.header-search { position: relative; }
.header-search input {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 8px 12px 8px 34px;
  color: #fafaf9;
  font-size: 14px;
  width: 200px;
  font-family: inherit;
  transition: all .2s;
}
.header-search input::placeholder { color: #a8a29e; }
.header-search input:focus { outline: none; background: rgba(255,255,255,0.14); border-color: var(--accent); width: 240px; }
.header-search .hs-icon {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: #a8a29e; font-size: 14px; pointer-events: none;
}

/* ===== LAYOUT ===== */
.site-main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px 24px 60px;
}

/* ===== ХЛЕБНЫЕ КРОШКИ ===== */
.breadcrumbs {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.breadcrumbs a { color: var(--ink-soft); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { opacity: 0.4; }
.breadcrumbs .current { color: var(--ink-2); font-weight: 600; max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== СТАТЬЯ-БИЛЕТ: layout (TOC слева + контент) ===== */
.article-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 220px;
  gap: 36px;
  align-items: start;
}
.article-aside-left { position: sticky; top: 84px; }
.article-aside-right { position: sticky; top: 84px; }
.article-main { min-width: 0; max-width: var(--content-w); }

/* ===== ЗАГОЛОВОК СТАТЬИ-БИЛЕТА ===== */
.article-head { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 3px double var(--line-2); }
.article-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 700; color: var(--accent-d);
  text-transform: uppercase; letter-spacing: 1.2px;
  margin-bottom: 14px;
}
.article-eyebrow::before {
  content: ''; width: 24px; height: 2px; background: var(--accent);
}
.article-title {
  font-family: var(--serif);
  font-size: clamp(28px, 4.5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.8px;
  line-height: 1.15;
  margin: 0 0 14px;
  color: var(--ink);
}
.article-title .num-tag {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 8px;
  letter-spacing: 0;
}
.article-lead {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-3);
  font-style: italic;
  margin: 0 0 18px;
  font-weight: 400;
}
.article-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  align-items: center;
  font-size: 13.5px;
  color: var(--ink-soft);
  padding-top: 4px;
}
.article-byline .b-item { display: flex; align-items: center; gap: 6px; }
.article-byline .b-item svg, .article-byline .b-ico { width: 15px; height: 15px; opacity: 0.75; }
.article-byline strong { color: var(--ink-2); font-weight: 600; }
.article-byline .updated-badge {
  background: var(--accent-l);
  color: var(--accent-d);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

/* ===== ОГЛАВЛЕНИЕ (TOC) СЛЕВА ===== */
.toc-block {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: var(--shadow-sm);
}
.toc-block .toc-title {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-d);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 12px;
  display: flex; align-items: center; gap: 6px;
}
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  counter-reset: tocnum;
}
.toc-list li { counter-increment: tocnum; }
.toc-list a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-3);
  text-decoration: none;
  transition: all .12s;
}
.toc-list a::before {
  content: counter(tocnum, decimal-leading-zero);
  font-family: var(--serif);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  min-width: 20px;
  flex-shrink: 0;
}
.toc-list a:hover { background: var(--accent-soft); color: var(--ink); }
.toc-list a .toc-qshort {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* social-кнопки справа */
.share-block {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 14px;
  text-align: center;
}
.share-block .share-title {
  font-size: 11px; font-weight: 700; color: var(--accent-d);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px;
}
.share-buttons { display: flex; flex-direction: column; gap: 7px; }
.share-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  transition: all .15s;
}
.share-btn:hover { transform: translateY(-1px); text-decoration: none; }
.share-btn.s-tg:hover { background: #0088cc; color: #fff; border-color: #0088cc; }
.share-btn.s-vk:hover { background: #0077ff; color: #fff; border-color: #0077ff; }
.share-btn.s-wa:hover { background: #25d366; color: #fff; border-color: #25d366; }
.share-btn.s-copy:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ===== БЛОК ВОПРОСА (serif) ===== */
.entry-content { font-size: 16.5px; }
.entry-content > .q-block {
  margin: 0 0 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 90px;
}
.entry-content > .q-block:last-of-type { border-bottom: none; }
.q-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}
.q-number {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  flex-shrink: 0;
  padding-top: 2px;
}
.q-text {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.1px;
}

/* ===== ВАРИАНТЫ ОТВЕТОВ ===== */
ul.answers {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: grid;
  gap: 8px;
}
ul.answers li {
  position: relative;
  background: var(--paper);
  border: 1.5px solid var(--line);
  padding: 12px 16px 12px 44px;
  border-radius: var(--radius-sm);
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-2);
  transition: all .15s;
  counter-increment: answ;
}
ul.answers { counter-reset: answ; }
ul.answers li::before {
  content: counter(answ, upper-alpha);
  position: absolute;
  left: 13px; top: 12px;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
}
ul.answers li:hover { border-color: var(--line-2); background: var(--paper-2); }
/* ===== ПРАВИЛЬНЫЙ ОТВЕТ: КРАСНАЯ звёздочка + «✓ Правильный ответ» ===== */
ul.answers li.correct {
  background: linear-gradient(0deg, var(--accent-soft), var(--accent-soft)), #fff;
  border: 2px solid var(--accent);
  font-weight: 600;
  color: var(--ink);
  padding-left: 44px;
  box-shadow: 0 2px 8px -2px rgba(220, 38, 38, 0.25);
}
ul.answers li.correct::before {
  content: '★';
  background: var(--accent);
  border-color: var(--accent-d);
  color: #fff;
  font-size: 13px;
}
ul.answers li.correct .answer-mark {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--accent);
  color: #fff;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* ===== БЛОК «ПОЯСНЕНИЕ» ===== */
.explain-block {
  background: var(--paper);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px;
  margin: 14px 0 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-3);
}
.explain-block .explain-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent-d);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.explain-block .explain-label::before { content: '◆'; font-size: 10px; }

/* ===== БЛОК «О КУРСЕ» ===== */
.course-about {
  background: var(--ink);
  color: #e7e5e4;
  padding: 28px 30px;
  border-radius: var(--radius);
  margin: 36px 0 24px;
  position: relative;
  overflow: hidden;
}
.course-about::before {
  content: ''; position: absolute; top: 0; left: 0; width: 5px; height: 100%; background: var(--accent);
}
.course-about h2 {
  color: #fff;
  font-family: var(--serif);
  font-size: 22px;
  margin: 0 0 12px;
}
.course-about p { color: #d6d3d1; line-height: 1.75; margin: 0 0 12px; font-size: 15px; }
.course-about p:last-child { margin-bottom: 0; }
.course-about strong { color: #fff; }
.course-about .about-stats {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px;
}
.course-about .about-stat {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 5px 11px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: #fafaf9;
}

/* ===== SOCIAL-CAPTION внизу статьи ===== */
.article-foot {
  margin: 28px 0 8px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
}
.article-foot .foot-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.article-foot .tag-chip {
  font-size: 12.5px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 4px 10px;
  border-radius: 999px;
  text-decoration: none;
  transition: all .15s;
}
.article-foot .tag-chip:hover { background: var(--accent); color: #fff; border-color: var(--accent); text-decoration: none; }

/* ===== ПОХОЖИЕ МАТЕРИАЛЫ ===== */
.related-section { margin: 40px 0 0; }
.related-section h2 {
  font-family: var(--serif);
  font-size: 24px;
  margin: 0 0 16px;
  display: flex; align-items: center; gap: 12px;
}
.related-section h2::before { content: ''; width: 36px; height: 3px; background: var(--accent); }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.related-card {
  display: block;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-decoration: none;
  transition: all .18s;
  box-shadow: var(--shadow-sm);
}
.related-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.related-card .rc-num {
  font-family: var(--serif); font-size: 12px; font-weight: 700;
  color: var(--accent); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px;
}
.related-card .rc-title { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.related-card .rc-meta { font-size: 12.5px; color: var(--muted); margin-top: 8px; }

/* ===== НАВИГАЦИЯ ПО БИЛЕТАМ ===== */
.ticket-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  margin: 32px 0;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.ticket-nav a {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all .15s;
}
.ticket-nav a:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-d); text-decoration: none; }
.ticket-nav a.nav-prev { text-align: left; }
.ticket-nav a.nav-next { text-align: right; }
.ticket-nav a.nav-all { text-align: center; }
.ticket-nav a .nav-label { font-size: 11px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.6px; }
.ticket-nav .nav-spacer { }

/* ===== АРХИВ / КАТАЛОГ ===== */
.archive-head {
  background: var(--ink);
  color: #fafaf9;
  padding: 40px 36px;
  border-radius: var(--radius);
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}
.archive-head::after {
  content: ''; position: absolute; top: 0; right: 0; width: 6px; height: 100%; background: var(--accent);
}
.archive-head h1 {
  color: #fff;
  font-family: var(--serif);
  font-size: clamp(26px, 4vw, 36px);
  margin: 0 0 8px;
  letter-spacing: -0.5px;
}
.archive-head .archive-lead {
  color: #d6d3d1;
  font-size: 16px;
  margin: 6px 0 0;
  max-width: 760px;
  line-height: 1.6;
}
.archive-head .archive-stats { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.archive-head .stat {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #fafaf9;
}
.archive-head .stat strong { color: var(--accent); font-weight: 700; }

.bilets-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.bilet-card {
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-decoration: none;
  transition: all .18s;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.bilet-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.bilet-card .bc-num {
  font-family: var(--serif); font-size: 13px; font-weight: 700;
  color: var(--accent-d); margin-bottom: 4px; letter-spacing: 0.3px;
}
.bilet-card .bc-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.bilet-card .bc-meta { font-size: 12.5px; color: var(--muted); margin-top: 10px; display: flex; gap: 10px; align-items: center; }
.bilet-card .bc-read {
  position: absolute; top: 14px; right: 14px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-l); color: var(--accent-d);
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
}

/* ===== ГЛАВНАЯ (журнал-обложка) ===== */
.journal-hero {
  background:
    radial-gradient(circle at 85% 15%, rgba(220,38,38,0.18), transparent 45%),
    linear-gradient(135deg, var(--ink) 0%, #292524 100%);
  color: #fafaf9;
  border-radius: var(--radius-lg);
  padding: 56px 48px 48px;
  margin-bottom: 36px;
  position: relative;
  overflow: hidden;
}
.journal-hero::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--accent);
}
.journal-hero .hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans);
  font-size: 12px; font-weight: 700;
  color: var(--accent);
  text-transform: uppercase; letter-spacing: 1.6px;
  margin-bottom: 18px;
}
.journal-hero .hero-eyebrow::before { content: '●'; font-size: 8px; }
.journal-hero h1 {
  color: #fff;
  font-family: var(--serif);
  font-size: clamp(30px, 5.5vw, 48px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
  margin: 0 0 16px;
  max-width: 820px;
}
.journal-hero h1 em { font-style: italic; color: var(--accent); }
.journal-hero .hero-lead {
  font-family: var(--serif);
  font-size: 19px;
  color: #d6d3d1;
  line-height: 1.6;
  max-width: 640px;
  margin: 0 0 26px;
  font-style: italic;
}
.hero-search {
  max-width: 540px;
  position: relative;
  margin-bottom: 24px;
}
.hero-search input {
  width: 100%;
  padding: 15px 18px 15px 50px;
  font-size: 16px;
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.97);
  color: var(--ink);
  font-family: inherit;
}
.hero-search input:focus { outline: none; border-color: var(--accent); }
.hero-search .hs-icon {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  font-size: 18px; color: var(--muted);
}
.hero-quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13.5px; color: #a8a29e; }
.hero-quick span { margin-right: 4px; }
.hero-quick a {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  color: #fca5a5;
  padding: 5px 12px;
  border-radius: 7px;
  font-weight: 600;
  text-decoration: none;
  font-size: 13px;
}
.hero-quick a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.hero-stats {
  display: flex; gap: 36px; margin-top: 30px; flex-wrap: wrap;
  padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1);
}
.hero-stat { }
.hero-stat .num {
  font-family: var(--serif);
  font-size: 34px; font-weight: 700; color: var(--accent);
  display: block; line-height: 1;
}
.hero-stat .lbl { font-size: 13px; color: #a8a29e; margin-top: 4px; }

/* ===== Разделы каталога на главной ===== */
.catalog-section { margin-bottom: 40px; }
.catalog-section h2 {
  font-family: var(--serif);
  font-size: 26px;
  margin: 0 0 16px;
  display: flex; align-items: center; gap: 14px;
  scroll-margin-top: 90px;
}
.catalog-section h2::before { content: ''; width: 40px; height: 3px; background: var(--accent); flex-shrink: 0; }
.catalog-section h2 .sec-count {
  margin-left: auto;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 3px 12px;
  border-radius: 999px;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.course-card {
  display: block;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-decoration: none;
  transition: all .18s;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.course-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--accent); transform: scaleY(0); transform-origin: top; transition: transform .2s;
}
.course-card:hover { border-color: var(--line-2); transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.course-card:hover::before { transform: scaleY(1); }
.course-card .cc-code {
  font-family: var(--serif);
  font-size: 14px; font-weight: 700; color: var(--accent-d);
  letter-spacing: 0.2px; margin-bottom: 6px;
}
.course-card .cc-title { font-size: 14.5px; color: var(--ink-2); line-height: 1.45; font-weight: 500; }
.course-card .cc-meta { font-size: 12.5px; color: var(--muted); margin-top: 10px; display: flex; gap: 8px; align-items: center; }
.course-card .cc-meta .cc-answers { color: var(--accent-d); font-weight: 600; }

/* ===== ПЛИТКИ РАЗДЕЛОВ ===== */
.sections-tiles {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px;
  margin-bottom: 36px;
}
.section-tile {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 14px;
  text-decoration: none;
  transition: all .15s;
  box-shadow: var(--shadow-sm);
}
.section-tile:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; box-shadow: var(--shadow); }
.section-tile .st-name { font-family: var(--serif); font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.25; }
.section-tile .st-meta { font-size: 12px; color: var(--muted); }
.section-tile .st-arrow { color: var(--accent); font-size: 13px; font-weight: 700; margin-top: 4px; }

/* ===== ПАГИНАЦИЯ ===== */
.pagination, .nav-links {
  display: flex; justify-content: center; gap: 6px; margin: 32px 0; flex-wrap: wrap;
}
.pagination a, .pagination span, .nav-links a, .nav-links span {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-soft);
  text-decoration: none;
}
.pagination a:hover, .nav-links a:hover { border-color: var(--accent); color: var(--accent-d); text-decoration: none; }
.pagination .current, .nav-links .current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ===== SEO-БЛОК ===== */
.seo-block {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 36px;
  margin-top: 40px;
  box-shadow: var(--shadow-sm);
  line-height: 1.8;
}
.seo-block h2 { font-family: var(--serif); font-size: 24px; margin: 0 0 14px; }
.seo-block h3 { font-family: var(--serif); font-size: 19px; margin: 22px 0 10px; color: var(--accent-d); }
.seo-block p { color: var(--ink-3); font-size: 15.5px; margin: 0 0 14px; }
.seo-block strong { color: var(--ink); }

/* ===== ФУТЕР ===== */
.site-footer {
  background: var(--ink);
  color: #a8a29e;
  padding: 44px 24px 24px;
  margin-top: 60px;
  border-top: 4px solid var(--accent);
}
.site-footer .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 32px;
}
.footer-col h4 {
  color: #fff;
  font-family: var(--serif);
  font-size: 16px;
  margin-bottom: 14px;
  letter-spacing: 0.2px;
}
.footer-about p { color: #a8a29e; font-size: 14px; line-height: 1.7; }
.footer-about .fbrand {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
  font-family: var(--serif); font-size: 18px; font-weight: 700; color: #fff;
}
.footer-about .fbrand .logo-mark {
  width: 32px; height: 32px; background: var(--accent);
  border-radius: 8px; display: grid; place-items: center; font-size: 17px;
  font-family: var(--sans); color: #fff; font-weight: 800;
}
.footer-contacts .contact-item {
  color: #d6d3d1; font-size: 13.5px; margin: 0 0 9px; line-height: 1.55;
  display: flex; align-items: baseline; gap: 8px;
}
.footer-contacts .ci-label { color: #78716c; min-width: 70px; font-size: 12px; flex-shrink: 0; white-space: nowrap; }
.footer-contacts a { color: #fca5a5; }
.footer-contacts a:hover { color: #fff; }
.footer-links a, .footer-legal a {
  color: #d6d3d1; font-size: 14px; display: block; padding: 4px 0; text-decoration: none;
}
.footer-links a:hover, .footer-legal a:hover { color: var(--accent); }
.footer-disclaimer {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 28px; padding-top: 20px;
}
.footer-disclaimer p { text-align: center; font-size: 13px; color: #78716c; margin: 0 0 4px; }
.footer-disclaimer .disclaimer-text { font-size: 12px; color: #57534e; max-width: 760px; margin: 8px auto 0; line-height: 1.55; }

/* ===== 404 / SEARCH ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.empty-state h2 { font-family: var(--serif); font-size: 28px; margin: 0 0 10px; }
.empty-state p { color: var(--ink-soft); font-size: 16px; }

/* ===== АДАПТИВ ===== */
@media (max-width: 1080px) {
  .article-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 28px; }
  .article-aside-right { display: none; }
}
@media (max-width: 860px) {
  .article-layout { grid-template-columns: 1fr; gap: 0; }
  .article-aside-left { position: static; margin-bottom: 24px; }
  .toc-block { }
  .toc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 2px; }
  .site-main { padding: 18px 16px 50px; }
  .main-nav { display: none; }
  .header-search input { width: 100%; }
  .site-header .inner { gap: 10px; padding: 10px 16px; }
  .site-brand { font-size: 18px; }
  .site-brand .brand-tag { display: none; }
}
@media (max-width: 600px) {
  .article-title { font-size: 25px; }
  .article-lead { font-size: 17px; }
  .q-text { font-size: 18px; }
  .q-number { font-size: 12px; }
  ul.answers li { padding: 11px 12px 11px 40px; font-size: 14.5px; }
  ul.answers li::before { left: 10px; top: 10px; width: 20px; height: 20px; font-size: 11px; }
  ul.answers li.correct .answer-mark { font-size: 10.5px; padding: 2px 7px; }
  .journal-hero { padding: 32px 22px 28px; border-radius: var(--radius); }
  .journal-hero h1 { font-size: 26px; }
  .journal-hero .hero-lead { font-size: 16px; }
  .hero-stats { gap: 18px; }
  .hero-stat .num { font-size: 26px; }
  .archive-head { padding: 26px 20px; }
  .archive-head h1 { font-size: 22px; }
  .bilets-list { grid-template-columns: 1fr 1fr; gap: 10px; }
  .bilet-card { padding: 13px 14px; }
  .courses-grid { grid-template-columns: 1fr; }
  .sections-tiles { grid-template-columns: 1fr 1fr; }
  .catalog-section h2 { font-size: 21px; }
  .catalog-section h2 .sec-count { display: none; }
  .ticket-nav { grid-template-columns: 1fr; }
  .ticket-nav a.nav-next { text-align: left; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .seo-block { padding: 22px 18px; }
  .course-about { padding: 22px 20px; }
  .site-footer .inner { grid-template-columns: 1fr 1fr; gap: 24px; }
  .article-byline { font-size: 12.5px; gap: 10px 16px; }
}
@media (max-width: 380px) {
  .bilets-list { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .sections-tiles { grid-template-columns: 1fr; }
  .site-footer .inner { grid-template-columns: 1fr; }
  .article-title { font-size: 22px; }
  .toc-list { grid-template-columns: 1fr; }
}


/* PANELSU ANSWER BUTTON/OPTION SAFETY PATCH */
.entry-content ul.answers li,
ul.answers li,
.gts-answers li,
.gts-q-answers li,
.kf-answers li,
.kf-q-answers li,
.bilet-content .answers li,
.gm-answers li,
.a07-answers li,
.ak-answers li,
.sk-answers li {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.entry-content ul.answers li > span,
ul.answers li > span,
.gts-answers li > span,
.gts-q-answers li > span,
.kf-answers li > span,
.kf-q-answers li > span,
.bilet-content .answers li > span,
.gm-answers li > span,
.a07-answers li > span,
.ak-answers li > span,
.sk-answers li > span,
.kf-answers li .ans-text,
.kf-q-answers li .ans-text,
.entry-content ul.answers li > span.txt,
.gts-q-answers li > span:not(.letter):not(.badge),
.sk-answers li > span:not(.letter):not(.badge) {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.gts-q-answers li,
.kf-answers li,
.kf-q-answers li,
.gm-answers li,
.sk-answers li {
  align-items: flex-start;
}

.gts-q-answers li.correct .badge,
.kf-q-answers li.correct .badge,
.kf-answers li.correct .mark,
.gm-answers li.correct::after,
.sk-answers li .badge,
.entry-content ul.answers li.correct .answer-mark,
.bilet-content .answers li.correct .answer-mark,
ul.answers li.correct .answer-mark {
  max-width: 100%;
}

@media (max-width: 768px) {
  .gts-q-answers li,
  .kf-answers li,
  .kf-q-answers li,
  .gm-answers li,
  .sk-answers li {
    flex-wrap: wrap;
  }

  .gts-q-answers li.correct .badge,
  .kf-q-answers li.correct .badge,
  .kf-answers li.correct .mark,
  .sk-answers li .badge,
  .entry-content ul.answers li.correct .answer-mark,
  .bilet-content .answers li.correct .answer-mark,
  ul.answers li.correct .answer-mark {
    margin-left: 0;
    margin-top: 8px;
    white-space: normal;
  }
}
