/* ==========================================================================
   CommunicationBase.info — стили сайта
   Структура:
   1. Токены и сброс
   2. Типографика и базовые элементы
   3. Шапка и навигация
   4. Кнопки, метки, ссылки
   5. Главная: hero, блоки, карточки
   6. Списки статей, сайдбар, пагинация
   7. Категории
   8. Страница статьи
   9. Подвал
   10. Реклама, 404, служебное
   11. Адаптив
   ========================================================================== */

/* 1. Токены и сброс ------------------------------------------------------- */
:root {
  --bg: #f6f7fd;
  --surface: #ffffff;
  --surface-soft: #f4f5fe;
  --ink: #141b34;
  --ink-soft: #33415f;
  --muted: #5d6883;
  --line: #e2e6f3;
  --line-strong: #cfd6ea;

  --accent: #6d4dff;
  --accent-dark: #4f38d6;
  --accent2: #16b8bd;
  --accent-tint: #efebff;
  --gradient: linear-gradient(135deg, var(--accent), var(--accent2));

  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;

  --shadow-sm: 0 1px 2px rgba(20, 27, 52, .05), 0 4px 14px rgba(20, 27, 52, .05);
  --shadow: 0 2px 4px rgba(20, 27, 52, .04), 0 18px 48px rgba(31, 42, 90, .09);
  --shadow-hover: 0 4px 8px rgba(20, 27, 52, .05), 0 26px 60px rgba(31, 42, 90, .16);

  --font-body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: Manrope, Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(900px 500px at 8% -8%, rgba(109, 77, 255, .09), transparent 60%),
    radial-gradient(800px 480px at 100% 0%, rgba(22, 184, 189, .09), transparent 60%),
    var(--bg);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--accent-dark); }

:focus-visible {
  outline: 3px solid rgba(109, 77, 255, .45);
  outline-offset: 3px;
  border-radius: 8px;
}

::selection { background: rgba(109, 77, 255, .22); }

.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

/* 2. Типографика ---------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -.02em;
  text-wrap: balance;
}
h3 { font-size: 20px; margin: 0 0 8px; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
time { white-space: nowrap; }

/* 3. Шапка ---------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 247, 253, .82);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid rgba(207, 214, 234, .7);
}
.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand-logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand-logo img { width: auto; height: 44px; }

.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  padding: 9px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  font-size: 15px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav a:hover { background: var(--surface); color: var(--accent-dark); box-shadow: var(--shadow-sm); }

.header-ad { max-width: 1180px; margin: 0 auto; padding: 0 20px; color: #8c94aa; font-size: 13px; text-align: center; }
.header-ad:empty { display: none; }

/* 4. Кнопки, метки, ссылки ------------------------------------------------ */
.button, .button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.button {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 12px 28px rgba(83, 79, 255, .28);
}
.button:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 18px 34px rgba(83, 79, 255, .34); }
.button-secondary { background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink); }
.button-secondary:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent-dark); box-shadow: var(--shadow-sm); }

.eyebrow, .category-pill, .meta__category, .section-kicker {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-tint);
  color: var(--accent-dark);
  font-weight: 800;
  font-size: 11.5px;
  line-height: 1.3;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.read-link, .card-link, .back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 15px;
  color: var(--accent-dark);
}
.read-link:hover, .card-link:hover, .back-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }

/* 5. Главная -------------------------------------------------------------- */
.page-main, .category-page, .section { padding: 32px 0 72px; }
main.container.section { padding-inline: 0; }

/* Общие сетки */
.hero-shell, .feature-row, .sections-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 24px; }
.articles-layout, .category-shell { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.sections-grid, .feature-row { margin-top: 24px; }
.page-main .container > section + section { margin-top: 24px; }
.sections-grid > *, .feature-row > *, .hero-shell > * { min-width: 0; }

/* Базовые карточки */
.hero-panel, .hero-art-panel, .section-card, .highlight-card, .side-card, .article-card,
.resource-card, .category-card, .article, .article-aside, .category-hero, .footer-shell {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.hero-panel, .hero-art-panel, .section-card, .highlight-card, .category-hero, .article { border-radius: var(--radius-xl); }
.section-card, .side-card, .resource-card, .category-card, .article-aside { padding: 28px; }
.side-card, .resource-card, .category-card, .article-card, .article-aside { border-radius: var(--radius-lg); }

/* Hero */
.hero-panel {
  padding: 44px;
  background:
    radial-gradient(circle at 0% 0%, rgba(109, 77, 255, .16), transparent 38%),
    radial-gradient(circle at 100% 0%, rgba(22, 184, 189, .14), transparent 32%),
    var(--surface);
}
.hero-panel h1, .category-hero h1 {
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.06;
  letter-spacing: -.035em;
  margin: 20px 0 18px;
}
.hero-panel h1 em, .category-hero h1 em {
  font-style: normal;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-panel > p, .category-hero p { margin: 0 0 26px; color: var(--muted); font-size: 18px; max-width: 62ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 30px; }

.hero-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.metric-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  background: rgba(255, 255, 255, .8);
}
.metric-card strong { display: block; font-family: var(--font-head); font-size: 32px; line-height: 1; letter-spacing: -.02em; color: var(--accent-dark); }
.metric-card span { display: block; margin-top: 8px; color: var(--muted); font-size: 13.5px; line-height: 1.4; }

/* Тёмная панель с «чатом» */
.hero-art-panel {
  position: relative;
  overflow: hidden;
  padding: 24px;
  color: #fff;
  background: linear-gradient(160deg, #161f3e 0%, #1d2a52 100%);
  border-color: transparent;
}
.hero-art-panel::before, .hero-art-panel::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.hero-art-panel::before { width: 260px; height: 260px; right: -80px; top: -60px; background: rgba(22, 184, 189, .22); filter: blur(4px); }
.hero-art-panel::after { width: 240px; height: 240px; left: -70px; bottom: -60px; background: rgba(109, 77, 255, .3); filter: blur(4px); }
.hero-chat-stage { position: relative; z-index: 1; min-height: 430px; height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 36px; padding: 8px 4px; }

.bubble-large, .bubble-small, .bubble-note { position: relative; border-radius: 30px; box-shadow: 0 18px 34px rgba(0, 0, 0, .16); }
.bubble-large { align-self: flex-start; width: min(280px, 82%); height: 150px; padding: 28px; background: linear-gradient(135deg, #7357ff, #8d72ff); display: flex; align-items: center; gap: 10px; }
.bubble-large::after { content: ""; position: absolute; left: 40px; bottom: -18px; border: 20px solid transparent; border-top-color: #7f63ff; border-bottom: 0; border-left-width: 14px; }
.bubble-large .dot { width: 16px; height: 16px; border-radius: 50%; background: #fff; display: block; animation: dot-pulse 1.6s var(--ease) infinite; }
.bubble-large .dot:nth-child(2) { animation-delay: .2s; }
.bubble-large .dot:nth-child(3) { animation-delay: .4s; }
@keyframes dot-pulse { 0%, 60%, 100% { transform: translateY(0); opacity: .75; } 30% { transform: translateY(-6px); opacity: 1; } }

.bubble-small { align-self: flex-end; width: min(220px, 70%); padding: 24px; background: #fff; color: var(--ink); }
.bubble-small::after { content: ""; position: absolute; right: 34px; bottom: -16px; border: 16px solid transparent; border-top-color: #fff; border-bottom: 0; border-right-width: 10px; }
.bubble-small .line { display: block; height: 10px; border-radius: 999px; background: #a9c8ff; margin: 12px 0; }
.bubble-small .line:nth-child(1) { width: 100%; }
.bubble-small .line:nth-child(2) { width: 82%; }
.bubble-small .line:nth-child(3) { width: 64%; }

.bubble-note { align-self: stretch; padding: 22px 24px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.bubble-note h3 { margin: 0 0 8px; font-size: 18px; color: #fff; }
.bubble-note p { margin: 0; color: rgba(255, 255, 255, .82); font-size: 15px; }

/* Заголовки секций */
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.section-head h2, .highlight-body h2 { margin: 12px 0 0; font-size: clamp(26px, 3vw, 34px); line-height: 1.1; letter-spacing: -.03em; }
.section-head .muted { font-size: 14px; font-weight: 600; }

/* Сетки карточек */
.skill-grid, .articles-grid, .category-grid, .topic-band { display: grid; gap: 18px; }
.skill-grid, .articles-grid, .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.topic-band { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 24px 0; }

.skill-card, .topic-card, .path-item {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: 22px;
  padding: 22px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}
.skill-card:hover, .topic-card:hover { transform: translateY(-3px); background: var(--surface); box-shadow: var(--shadow); }
.skill-card strong { display: block; font-family: var(--font-head); font-size: 20px; margin: 0 0 8px; letter-spacing: -.01em; }
.skill-card p, .topic-card p, .category-card p, .resource-card p, .side-card p, .article-card p { margin: 0 0 14px; color: var(--muted); font-size: 15px; }

.skill-tag, .category-icon {
  width: 48px; height: 48px;
  border-radius: 16px;
  display: grid; place-items: center;
  margin-bottom: 14px;
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 10px 20px rgba(83, 79, 255, .22);
}

.topic-card { text-align: left; }
.topic-card > span { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 14px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); font-size: 24px; }
.topic-card h3 { margin-bottom: 6px; }
.topic-card p { margin: 0; }

.path-list { display: grid; gap: 14px; }
.path-item { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; padding: 18px 20px; }
.path-item strong { font-family: var(--font-head); font-size: 17px; }
.path-item .muted { font-size: 15px; margin-top: 2px; }
.path-number { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); }

/* Подборка: главная + боковые */
.highlight-card, .article-card { overflow: hidden; }
.highlight-card img, .article-card img { width: 100%; aspect-ratio: 1200 / 760; object-fit: cover; background: #eef0fa; transition: transform .5s var(--ease); }
.highlight-card:hover img, .article-card:hover img { transform: scale(1.03); }
.highlight-card > img, .article-card > a { display: block; overflow: hidden; }
.highlight-body { padding: 28px; }
.highlight-body p { color: var(--muted); font-size: 17px; }
.highlight-body h2 a:hover, .article-card h3 a:hover, .side-card strong a:hover { color: var(--accent-dark); }

.kicker-row, .article-meta, .meta, .breadcrumbs { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 14px; font-weight: 600; }

.side-stack, .sidebar { display: grid; gap: 18px; align-content: start; }
.side-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.side-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.side-card strong { font-family: var(--font-head); font-size: 18px; line-height: 1.25; letter-spacing: -.01em; }
.side-card p { margin: 0; }

/* 6. Списки статей, сайдбар, пагинация ------------------------------------ */
.article-card { display: flex; flex-direction: column; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.article-card-body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 24px; }
.article-card-body .article-meta { margin-bottom: 12px; font-size: 13px; }
.article-card h3 { font-size: 21px; line-height: 1.22; margin: 0 0 10px; }
.article-card p { flex: 1; }
.article-card .read-link { margin-top: auto; }

/* Карточки внутри белой секции чуть легче */
.section-card .article-card { box-shadow: var(--shadow-sm); }
.section-card .article-card:hover { box-shadow: var(--shadow-hover); }

.sidebar { position: sticky; top: calc(var(--header-h) + 20px); }
.resource-card h3 { font-size: 20px; margin: 12px 0 8px; }
.resource-card ul { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.resource-card li a { display: block; padding: 9px 12px; margin: 0 -12px; border-radius: 12px; color: var(--ink-soft); font-size: 15px; font-weight: 600; transition: background .2s var(--ease), color .2s var(--ease); }
.resource-card li a:hover { background: var(--accent-tint); color: var(--accent-dark); }

.pagination { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 32px; }
.pagination a, .pagination span {
  min-width: 44px; height: 44px; padding: 0 12px;
  border-radius: 14px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 700;
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.pagination a:hover { transform: translateY(-2px); border-color: var(--accent); }
.pagination .current { background: var(--gradient); color: #fff; border-color: transparent; box-shadow: 0 8px 18px rgba(83, 79, 255, .28); }

/* 7. Категории ------------------------------------------------------------ */
.category-hero {
  padding: 40px;
  margin-bottom: 28px;
  background:
    radial-gradient(circle at 100% 0%, rgba(22, 184, 189, .16), transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(109, 77, 255, .14), transparent 40%),
    var(--surface);
}
.category-hero .breadcrumbs { margin-bottom: 22px; }
.category-hero .breadcrumbs a { color: var(--accent-dark); }
.category-hero .breadcrumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.category-hero h1 { margin-top: 16px; max-width: 20ch; }
.category-hero p:last-child { margin-bottom: 0; }

.category-card { display: flex; flex-direction: column; align-items: flex-start; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.category-card h3 { font-size: 21px; margin: 0 0 8px; }
.category-card p { flex: 1; }
.section-card .category-card { box-shadow: var(--shadow-sm); background: var(--surface-soft); }
.section-card .category-card:hover { background: var(--surface); box-shadow: var(--shadow-hover); }

.empty-note { padding: 28px; border-radius: var(--radius-lg); background: var(--surface); border: 1px dashed var(--line-strong); color: var(--muted); text-align: center; }

/* 8. Страница статьи ------------------------------------------------------ */
.article { padding: clamp(24px, 4vw, 48px); }
.article .breadcrumbs { margin-bottom: 18px; font-size: 13.5px; }
.article .breadcrumbs a { color: var(--accent-dark); }
.article .breadcrumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.article .meta { margin-bottom: 4px; }
.article h1 { margin: 16px 0 18px; font-size: clamp(30px, 4vw, 46px); line-height: 1.08; letter-spacing: -.035em; }
.article h2 { margin: 40px 0 12px; font-size: clamp(22px, 2.6vw, 28px); line-height: 1.2; }
.article h3 { margin: 28px 0 8px; font-size: 21px; }
.article p, .article li { color: var(--ink-soft); font-size: 17.5px; line-height: 1.75; }
.article p { margin: 0 0 1.1em; }
.article .lead {
  margin: 0 0 24px;
  padding-left: 18px;
  border-left: 4px solid var(--accent);
  font-size: 20px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.article a:not(.button):not(.button-secondary) { color: var(--accent-dark); text-decoration: underline; text-decoration-color: rgba(109, 77, 255, .35); text-underline-offset: 3px; }
.article a:not(.button):hover { text-decoration-color: currentColor; }
.article figure { margin: 26px 0 24px; }
.article__hero, .hero-image { width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.image-caption, .article figcaption { margin-top: 10px; color: var(--muted); font-size: 14px; text-align: center; }

.article ol, .article ul { margin: 0 0 1.2em; padding-left: 1.4em; }
.article li { margin-bottom: .55em; padding-left: .2em; }
.article li::marker { color: var(--accent); font-weight: 800; }
.article ol { counter-reset: none; }

.article-header { margin-bottom: 24px; }
.article-content > :first-child { margin-top: 0; }

.article-aside { position: sticky; top: calc(var(--header-h) + 20px); padding: 0; background: none; border: 0; box-shadow: none; border-radius: 0; }

/* Дополнительные блоки внутри статей */
.pullquote, .article blockquote {
  margin: 28px 0;
  padding: 22px 26px;
  border-radius: var(--radius-md);
  background: var(--accent-tint);
  border-left: 4px solid var(--accent);
  font-family: var(--font-head);
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink);
}
.pullquote p, .article blockquote p { margin: 0; font-size: inherit; color: inherit; }
.highlight-box, .exercise-step, .checklist {
  margin: 24px 0;
  padding: 22px 24px;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}
.highlight-box { background: linear-gradient(135deg, rgba(109, 77, 255, .08), rgba(22, 184, 189, .1)); }
.highlight-box > :last-child, .exercise-step > :last-child, .checklist > :last-child { margin-bottom: 0; }
.checklist { list-style: none; }
.checklist li { position: relative; padding-left: 30px; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--accent2); font-weight: 800; }
.stat-block { display: flex; align-items: baseline; gap: 14px; margin: 24px 0; padding: 20px 24px; border-radius: var(--radius-md); background: var(--surface-soft); border: 1px solid var(--line); }
.stat-number { font-family: var(--font-head); font-size: 44px; font-weight: 800; line-height: 1; letter-spacing: -.03em; color: var(--accent-dark); }

/* 9. Подвал --------------------------------------------------------------- */
.site-footer { padding: 8px 0 36px; }
.footer-shell { border-radius: var(--radius-xl); padding: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr .7fr 1fr; gap: 40px; }
.footer-brand { margin-bottom: 10px; font-family: var(--font-head); font-size: 26px; font-weight: 800; letter-spacing: -.02em; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content; }
.footer-grid p { margin: 0; color: var(--muted); font-size: 15px; max-width: 46ch; }
.footer-title { margin-bottom: 14px; font-family: var(--font-head); font-weight: 800; font-size: 13px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink); }
.footer-links { display: grid; gap: 4px; justify-items: start; }
.footer-links a { padding: 4px 0; color: var(--muted); font-weight: 600; font-size: 15px; }
.footer-links a:hover { color: var(--accent-dark); transform: translateX(3px); }
.footer-bottom, .footer-note { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

/* 10. Реклама, 404, служебное -------------------------------------------- */
.ad-placement { display: block; max-width: 100%; overflow: hidden; }
.ad-placement:empty { display: none; }
.ad-placement--ad-in-article-top,
.ad-placement--ad-in-article-middle,
.ad-placement--ad-in-article-after-image { margin: 24px 0; }
.sidebar .ad-placement--ad-sidebar { min-width: 0; }
.ad-placement iframe, .ad-placement img { max-width: 100%; }

.category-hero .button { margin-top: 4px; }
.category-hero + .articles-grid { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* 11. Адаптив ------------------------------------------------------------- */
@media (max-width: 1100px) {
  .hero-shell, .feature-row, .sections-grid, .category-shell, .article-layout, .articles-layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar, .article-aside { position: static; }
  .hero-chat-stage { min-height: 380px; }
  .topic-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  :root { --header-h: 116px; }
  .header-inner { flex-direction: column; justify-content: center; gap: 8px; padding: 12px 0; min-height: var(--header-h); }
  .brand-logo img { height: 38px; }
  .nav { justify-content: center; gap: 2px; }
  .nav a { padding: 8px 14px; font-size: 14px; }

  .page-main, .category-page, .section { padding: 20px 0 48px; }
  .hero-panel, .section-card, .highlight-body, .category-hero, .footer-shell { padding: 24px; }
  .hero-art-panel { padding: 16px; }
  .hero-panel > p, .category-hero p { font-size: 16.5px; }
  .hero-metrics { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .metric-card { padding: 14px 12px; }
  .metric-card strong { font-size: 26px; }
  .metric-card span { font-size: 12.5px; }

  .skill-grid, .articles-grid, .category-grid { grid-template-columns: minmax(0, 1fr); }
  .article-card h3 { font-size: 20px; }
  .section-card, .side-card, .resource-card, .category-card { padding: 22px; }
}

@media (max-width: 560px) {
  .container { width: calc(100% - 24px); }
  .hero-metrics { grid-template-columns: 1fr; }
  .metric-card { display: flex; align-items: baseline; gap: 12px; }
  .metric-card span { margin-top: 0; }
  .hero-actions .button, .hero-actions .button-secondary { flex: 1 1 100%; }
  .topic-band { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hero-chat-stage { min-height: 0; gap: 30px; padding: 8px 0; }
  .bubble-large { height: 120px; padding: 22px; }
  .bubble-small { padding: 18px; }
  .bubble-note { padding: 18px; }
  .article { padding: 22px 18px; }
  .article p, .article li { font-size: 16.5px; }
  .article .lead { font-size: 18px; }
}
