:root {
  --ink: #e8eef7;
  --ink-strong: #ffffff;
  --muted: #9aa6b2;
  --muted-2: #6b7683;
  --accent: #4a92f3;
  --accent-2: #2b6de6;
  --bg: #060910;
  --card: #0b0e17;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --paper-bg: #ffffff;
  --paper-bg-soft: #f7f8fa;
  --paper-ink: #2a2a31;
  --paper-ink-strong: #0b0b0f;
  --paper-ink-muted: #6a6a72;
  --paper-ink-faint: #9aa0a8;
  --paper-border: rgba(10, 10, 15, 0.08);
  --paper-border-strong: rgba(10, 10, 15, 0.14);
  --paper-accent: #0a84ff;

  --green: #7fd58d;

  --radius: 16px;
  --radius-lg: 20px;
  --radius-paper: 28px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sidebar-w: 220px;
  --gap: 56px;
  --max-w: 1200px;

  --fs-body: 17px;
  --fs-lead: 1.15em;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Golos Text", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; }

::selection { color: #fff; background: var(--accent-2); }
.article-body ::selection { color: #fff; background: rgba(10, 132, 255, 0.85); }

.font-control,
.copy-link { display: none; }

html.js .font-control { display: flex; }
html.js .copy-link { display: inline-flex; }

.article-cta-reveal {
  margin-top: 28px;
}

.article-cta {
  display: block;
}

.article-container {
  width: min(calc(100% - 48px), var(--max-w));
  margin-inline: auto;
}
@media (min-width: 1440px) { .article-container { max-width: 1260px; } }

.article-top { padding: 120px 0 0; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}
.breadcrumb a { color: var(--muted); transition: color 0.3s var(--ease); }
.breadcrumb a:hover { color: var(--ink-strong); }
.breadcrumb .sep {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.4;
  color: var(--muted);
}
.breadcrumb .sep svg { width: 12px; height: 12px; stroke-width: 1.8; display: block; }
.breadcrumb .current {
  color: rgba(232, 238, 247, 0.85);
  max-width: 400px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: var(--gap);
  align-items: start;
  margin-top: 48px;
  padding-bottom: 80px;
}

/* ============ SIDEBAR — flex-колонка со скроллом в TOC ============ */
.article-sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 120px);
}

/* ============ SIDEBAR HERO ============ */
.sidebar-hero {
  flex-shrink: 0;
  max-height: 0;
  margin-bottom: 0;
  overflow: hidden;
  opacity: 0;
  border-radius: 12px;
  border: 1px solid transparent;
  transform: translateY(-6px);
  transition:
    max-height 0.5s var(--ease),
    margin-bottom 0.5s var(--ease),
    opacity 0.35s var(--ease),
    transform 0.45s var(--ease),
    border-color 0.4s var(--ease);
  will-change: max-height, opacity, transform;
  pointer-events: none;
}
.sidebar-hero.is-visible {
  max-height: 150px;
  margin-bottom: 18px;
  opacity: 1;
  transform: translateY(0);
  border-color: var(--border);
  pointer-events: auto;
}

.sidebar-hero__thumb {
  position: relative;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  background: #0a0d16;
  border-radius: 11px;
}
.sidebar-hero__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  display: block;
  filter: saturate(0.9) contrast(1.02);
}
.sidebar-hero__thumb::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 60%;
  background: linear-gradient(to bottom, transparent 0%, rgba(11, 14, 23, 0.75) 100%);
  pointer-events: none;
}

.sidebar-hero__badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 4px 9px;
  border-radius: 100px;
  background: rgba(11, 14, 23, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  z-index: 2;
}

.sidebar-hero__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  z-index: 1;
}
.sidebar-hero__bar-fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transition: width 0.15s linear;
}

/* ============ SIDEBAR TOC ============ */
.sidebar-toc {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-toc__label {
  flex-shrink: 0;
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted-2);
  letter-spacing: 0;
  margin-bottom: 10px;
}

.sidebar-toc__list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;

  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
  scroll-behavior: smooth;
}

.sidebar-toc__list::-webkit-scrollbar {
  width: 4px;
}
.sidebar-toc__list::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-toc__list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}
.sidebar-toc__list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
}

.sidebar-toc__list li { margin: 0; }
.sidebar-toc__list a {
  position: relative;
  display: block;
  padding: 5px 0 5px 12px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
  letter-spacing: 0;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
  border-left: 2px solid transparent;
  margin-left: -2px;
  border-radius: 0 6px 6px 0;
}
.sidebar-toc__list a:hover { color: var(--ink); }
.sidebar-toc__list a.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
  background: rgba(74, 146, 243, 0.08);
}

/* ============ SIDEBAR AUTHOR ============ */
.sidebar-author {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.sidebar-author__avatar {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 9px;
  background: #fff;
  padding: 3px;
}
.sidebar-author__name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-strong);
  letter-spacing: 0;
  line-height: 1.2;
}
.sidebar-author__role {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.25;
  margin-top: 2px;
  letter-spacing: 0;
}

.sidebar-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  border-radius: 100px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0;
  color: #fff;
  background: var(--accent);
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.sidebar-cta svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  stroke-width: 2;
  transition: transform 0.3s var(--ease);
}
.sidebar-cta:hover { background: #5aa0f5; transform: translateY(-1px); }
.sidebar-cta:hover svg { transform: translateX(2px); }

/* ============ САЙДБАР НА НИЗКИХ ЭКРАНАХ ============ */
@media (max-height: 700px) {
  .article-sidebar {
    top: 84px;
    max-height: calc(100vh - 104px);
  }
  .sidebar-hero.is-visible {
    max-height: 130px;
    margin-bottom: 14px;
  }
  .sidebar-toc {
    margin-bottom: 14px;
    padding-bottom: 14px;
  }
  .sidebar-author {
    margin-bottom: 14px;
  }
}

@media (max-height: 560px) {
  .article-sidebar {
    top: 72px;
    max-height: calc(100vh - 88px);
  }
  .sidebar-hero.is-visible {
    max-height: 110px;
    margin-bottom: 12px;
  }
  .sidebar-toc {
    margin-bottom: 12px;
    padding-bottom: 12px;
  }
  .sidebar-toc__label {
    margin-bottom: 8px;
  }
  .sidebar-toc__list a {
    padding: 4px 0 4px 12px;
    font-size: 12.5px;
  }
  .sidebar-author {
    display: none;
  }
  .sidebar-cta {
    padding: 8px 14px;
    font-size: 12px;
  }
}

@media (max-height: 460px) {
  .article-sidebar {
    top: 64px;
    max-height: calc(100vh - 80px);
  }
  .sidebar-toc {
    display: none;
  }
  .sidebar-hero.is-visible {
    max-height: 100px;
    margin-bottom: 10px;
  }
}

.article-main { min-width: 0; }

.article-paper {
  position: relative;
  z-index: 2;
  background: var(--paper-bg);
  border-radius: var(--radius-paper);
  padding: 64px 56px 60px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 24px 60px -20px rgba(0, 0, 0, 0.55),
    0 4px 12px rgba(0, 0, 0, 0.25);
  color: var(--paper-ink);
}

.article-paper > .article-body,
.article-paper > .article-head { max-width: 880px; }

/* ============ ARTICLE COVER — от края до края paper ============ */
.article-cover {
  margin: -64px -56px 40px;
  border-radius: calc(var(--radius-paper) - 1px) calc(var(--radius-paper) - 1px) 0 0;
  overflow: hidden;
  background: #0a0d16;
}

.article-cover img {
  width: 100%;
  height: clamp(220px, 26vw, 340px);
  object-fit: cover;
  object-position: center;
  display: block;
}

.article-head {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--paper-border);
}
.article-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.article-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }

.kicker-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 10px;
  border-radius: 100px;
  background: rgba(10, 132, 255, 0.07);
  border: 1px solid rgba(10, 132, 255, 0.22);
  color: var(--paper-accent);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}
.kicker-badge svg { width: 13px; height: 13px; flex-shrink: 0; stroke-width: 2; opacity: 0.95; }

.font-control {
  gap: 0;
  padding: 3px;
  border-radius: 100px;
  background: var(--paper-bg-soft);
  border: 1px solid var(--paper-border);
  flex-shrink: 0;
}
.font-control button {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  border-radius: 100px;
  color: var(--paper-ink-muted);
  cursor: pointer;
  font-weight: 600;
  line-height: 1;
  padding: 0;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.font-control button[data-fs="s"] { font-size: 11px; }
.font-control button[data-fs="m"] { font-size: 13px; }
.font-control button[data-fs="l"] { font-size: 15px; }
.font-control button:hover { color: var(--paper-ink-strong); }
.font-control button.is-active {
  background: #fff;
  color: var(--paper-ink-strong);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.article-title {
  font-size: clamp(28px, 5.6vw, 44px);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.038em;
  color: var(--paper-ink-strong);
  margin: 0 0 24px;
  max-width: 18em;
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
  word-break: normal;
  text-wrap: pretty;
  text-wrap: balance;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--paper-ink-muted);
  font-size: 13.5px;
}
.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--paper-ink-muted);
  line-height: 1.2;
  white-space: nowrap;
  letter-spacing: 0;
}
.meta-item svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.55;
  color: currentColor;
  stroke-width: 1.9;
}
.meta-item strong { color: var(--paper-ink); font-weight: 500; }
.meta-sep {
  width: 1px;
  height: 12px;
  background: var(--paper-border-strong);
  flex-shrink: 0;
  opacity: 0.6;
}

.article-toc-mobile {
  display: none;
  margin: 0 0 32px;
  border: 1px solid var(--paper-border);
  border-radius: 14px;
  background: var(--paper-bg-soft);
  overflow: hidden;
}
.article-toc-mobile__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--paper-border);
}
.article-toc-mobile__label {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--paper-ink-muted);
}
.article-toc-mobile__list { list-style: none; margin: 0; padding: 0 16px 6px; }
.article-toc-mobile__list li { border-bottom: 1px solid var(--paper-border); }
.article-toc-mobile__list li:last-child { border-bottom: none; }
.article-toc-mobile__list a {
  display: block;
  padding: 11px 0;
  color: var(--paper-ink);
  font-size: 14.5px;
  line-height: 1.4;
  letter-spacing: 0;
  transition: color 0.2s var(--ease);
}
.article-toc-mobile__list a:hover { color: var(--paper-accent); }
.article-toc-mobile__list a.is-active { color: var(--paper-accent); font-weight: 500; }
.article-toc-mobile__list li.is-hidden { display: none; }
.article-toc-mobile__more {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-top: 1px solid var(--paper-border);
  background: transparent;
  color: var(--paper-accent);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s var(--ease);
}
.article-toc-mobile__more:hover { background: rgba(10, 132, 255, 0.05); }
.article-toc-mobile__more[hidden] { display: none; }
.article-toc-mobile__more-count { color: var(--paper-ink-faint); font-weight: 400; }

.article-body {
  font-size: var(--fs-body);
  line-height: 1.78;
  color: var(--paper-ink);
  letter-spacing: 0;
  transition: font-size 0.2s var(--ease);
}
.article-body > p:first-of-type {
  font-size: var(--fs-lead);
  line-height: 1.62;
  color: var(--paper-ink-strong);
  letter-spacing: -0.008em;
  margin-bottom: 1.6em;
}
.article-body p { margin: 0 0 1.4em; }
.article-body h2 {
  position: relative;
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.022em;
  color: var(--paper-ink-strong);
  margin: 2.3em 0 0.75em;
  scroll-margin-top: 110px;
}
.article-body h2:first-child { margin-top: 0; }
.heading-anchor {
  position: absolute;
  left: -30px;
  top: 0.02em;
  width: 24px;
  color: var(--paper-ink-faint);
  font-weight: 400;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s;
  text-decoration: none;
  border-bottom: 0;
  text-align: center;
}
.article-body h2:hover .heading-anchor { opacity: 1; }
.heading-anchor:hover { color: var(--paper-accent); }
.article-body h3 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--paper-ink-strong);
  margin: 1.8em 0 0.55em;
  scroll-margin-top: 110px;
}
.article-body ul,
.article-body ol { margin: 0 0 1.45em; padding-left: 1.3em; }
.article-body li { margin-bottom: 0.55em; padding-left: 4px; }
.article-body li::marker { color: var(--paper-accent); font-weight: 600; }
.article-body blockquote {
  margin: 2em 0;
  padding: 8px 0 8px 24px;
  border-left: 3px solid var(--paper-accent);
  font-size: 1.12em;
  line-height: 1.55;
  color: var(--paper-ink-strong);
  font-style: italic;
  letter-spacing: -0.008em;
}
.article-body blockquote p:last-child { margin-bottom: 0; }

.article-body p a.article-link {
  color: #0a84ff !important;
  font-weight: 600 !important;
  background: rgba(10, 132, 255, 0.10) !important;
  padding: 2px 8px !important;
  border-radius: 6px !important;
  border-bottom: 1px solid #0a84ff !important;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.article-body p a.article-link:hover {
  background: rgba(10, 132, 255, 0.20) !important;
  color: #0066d6 !important;
  border-color: #0066d6 !important;
}

.article-body strong { color: var(--paper-ink-strong); font-weight: 600; }
.article-body em { font-style: italic; color: var(--paper-ink); }

.article-body code {
  font-family: ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, monospace;
  font-size: 0.87em;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--paper-bg-soft);
  color: #1a4b8a;
  border: 1px solid var(--paper-border);
  letter-spacing: 0;
}

/* ============ TOOLTIPS ============ */
.tooltip-wrap {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  margin: 0 2px;
}

.tooltip-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--paper-bg-soft);
  border: 1px solid var(--paper-border-strong);
  color: var(--paper-ink-muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  cursor: help;
  user-select: none;
  vertical-align: middle;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.tooltip-trigger:hover,
.tooltip-trigger:focus-visible {
  background: var(--paper-accent);
  border-color: var(--paper-accent);
  color: #fff;
  outline: none;
}

.tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: max-content;
  max-width: 300px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #0b0e17;
  color: #e8eef7;
  font-size: 12.5px;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 0;
  text-align: left;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  z-index: 100;
}

.tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #0b0e17;
}

.tooltip code {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #b8d4ff;
  font-size: 11.5px;
}

.tooltip-wrap:hover .tooltip,
.tooltip-trigger:focus-visible ~ .tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* На мобилке тултип превращается в фиксированный «тост» внизу экрана —
   открывается по тапу, закрывается тапом в любое место */
@media (max-width: 700px) {
  .tooltip {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    top: auto;
    width: auto;
    max-width: none;
    transform: translateY(8px);
    border-radius: 14px;
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.45;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  }
  .tooltip::after {
    display: none;
  }
  .tooltip code {
    font-size: 12px;
  }

  /* Отключаем hover — на тач-устройствах он «залипает» */
  .tooltip-wrap:hover .tooltip {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
  }

  /* Показываем только когда триггер в фокусе */
  .tooltip-trigger:focus ~ .tooltip {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============ БЛОК «Полезные ссылки» ============ */
.article-useful {
  margin-top: 56px;
  padding: 28px 32px;
  border: 1px solid var(--paper-border);
  border-radius: 20px;
  background: var(--paper-bg-soft);
  max-width: 880px;
}
.article-useful__title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-ink-faint);
  margin: 0 0 16px;
}
.article-useful__item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  margin-bottom: 12px;
  background: #ffffff;
  border: 1px solid var(--paper-border);
  border-radius: 14px;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.article-useful__item:last-child { margin-bottom: 0; }
.article-useful__item:hover {
  border-color: var(--paper-accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -8px rgba(10, 132, 255, 0.25);
}
.article-useful__text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.article-useful__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--paper-ink-strong);
  margin-bottom: 4px;
  line-height: 1.25;
  transition: color 0.25s var(--ease);
}
.article-useful__item:hover .article-useful__name {
  color: var(--paper-accent);
}
.article-useful__url {
  font-size: 12px;
  color: var(--paper-ink-muted);
  word-break: break-all;
}
.article-useful__arrow {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--paper-ink-faint);
  transition: color 0.25s var(--ease), transform 0.25s var(--ease);
}
.article-useful__arrow svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.8;
  display: block;
}
.article-useful__item:hover .article-useful__arrow {
  color: var(--paper-accent);
  transform: translate(3px, -3px);
}

.article-foot {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--paper-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  max-width: 880px;
}
.article-foot__author {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.article-foot__avatar {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  background: #fff;
  padding: 3px;
  border: 1px solid var(--paper-border);
}
.article-foot__name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--paper-ink-strong);
  letter-spacing: 0;
  line-height: 1.2;
}
.article-foot__role {
  font-size: 12.5px;
  color: var(--paper-ink-muted);
  line-height: 1.3;
  margin-top: 2px;
  letter-spacing: 0;
}

.copy-link {
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 18px;
  border-radius: 100px;
  background: var(--paper-bg-soft);
  border: 1px solid var(--paper-border);
  color: var(--paper-ink);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.copy-link:hover {
  background: #fff;
  color: var(--paper-ink-strong);
  border-color: var(--paper-border-strong);
  transform: translateY(-1px);
}
.copy-link svg { width: 15px; height: 15px; }
.copy-link.is-copied {
  background: var(--paper-accent);
  color: #fff;
  border-color: var(--paper-accent);
}

.article-cta__inner {
  position: relative;
  overflow: hidden;
  padding: 36px 36px 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  text-align: center;
  isolation: isolate;
}
.article-cta__inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--cta-bg, url('/articles/img/design-system-cover.png'));
  background-size: cover;
  background-position: center;
  opacity: 0.22;
  filter: blur(1.5px) saturate(0.7);
  -webkit-mask-image: radial-gradient(ellipse 125% 115% at 50% 50%, transparent 18%, rgba(0, 0, 0, 0.55) 55%, #000 100%);
  mask-image: radial-gradient(ellipse 125% 115% at 50% 50%, transparent 18%, rgba(0, 0, 0, 0.55) 55%, #000 100%);
  z-index: 0;
  pointer-events: none;
}
.article-cta__inner > * { position: relative; z-index: 1; }
.article-cta__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  border: 1px solid rgba(127, 213, 141, 0.28);
  border-radius: 100px;
  color: #b8e6c1;
  background: rgba(11, 14, 23, 0.55);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  margin-bottom: 16px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.article-cta__dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}
.article-cta__dot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--green);
  animation: ctaDotPing 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes ctaDotPing {
  0%   { opacity: 0.6; transform: scale(1); }
  75%  { opacity: 0;   transform: scale(2.4); }
  100% { opacity: 0;   transform: scale(2.4); }
}
.article-cta h3 {
  font-size: clamp(20px, 2.4vw, 24px);
  font-weight: 500;
  letter-spacing: -0.028em;
  line-height: 1.2;
  color: var(--ink-strong);
  margin: 0 0 10px;
  text-wrap: balance;
  text-shadow: 0 1px 8px rgba(6, 9, 16, 0.35);
}
.article-cta p {
  color: var(--muted);
  max-width: 460px;
  margin: 0 auto 22px;
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: 0;
  text-shadow: 0 1px 6px rgba(6, 9, 16, 0.3);
}
.article-cta__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
  border: 1px solid transparent;
  cursor: pointer;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; stroke-width: 1.9; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #5aa0f5; transform: translateY(-2px); }

.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(20, 24, 34, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-strong);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  z-index: 900;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), background 0.2s, border-color 0.2s;
}
.to-top:hover { background: rgba(30, 36, 50, 0.95); border-color: var(--accent); }
.to-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* ============ MOBILE BAR ============ */
.mobile-bar {
  display: none;
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 900;
  align-items: stretch;
  height: 52px;
  border-radius: 100px;
  background: rgba(20, 24, 34, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-strong);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  will-change: transform, opacity;
}
.mobile-bar.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.mobile-bar__up {
  flex: 0 0 52px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
}
.mobile-bar__up:active { background: rgba(255, 255, 255, 0.08); }
.mobile-bar__up svg { width: 18px; height: 18px; stroke-width: 2; display: block; }

.mobile-bar__cta {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.mobile-bar__cta:active { background: #5aa0f5; }
.mobile-bar__cta svg { width: 14px; height: 14px; stroke-width: 2; flex-shrink: 0; }

.toast {
  position: fixed;
  bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 22px;
  border-radius: 100px;
  background: #0b0e17;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  border: 1px solid var(--border-strong);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.sel-popover {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9500;
  display: flex;
  align-items: stretch;
  gap: 2px;
  padding: 4px;
  border-radius: 100px;
  background: rgba(11, 14, 23, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-strong);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55), 0 4px 12px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s var(--ease), transform 0.16s var(--ease);
  will-change: transform, opacity;
}
.sel-popover.is-visible { opacity: 1; pointer-events: auto; }
.sel-popover__btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border: 0;
  border-radius: 100px;
  background: transparent;
  color: #e8eef7;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.sel-popover__btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.sel-popover__btn:active { background: rgba(74, 146, 243, 0.25); color: #fff; }
.sel-popover__btn svg { width: 13px; height: 13px; flex-shrink: 0; opacity: 0.9; }
.sel-popover__btn.is-copied { background: rgba(10, 132, 255, 0.22); color: #fff; }
.sel-popover__divider { width: 1px; margin: 4px 2px; background: rgba(255, 255, 255, 0.08); flex-shrink: 0; }

.footer {
  position: relative;
  padding: 60px 20px;
  background: #060910;
  overflow: hidden;
  color: var(--muted);
}
.footer::after {
  content: "";
  position: absolute;
  bottom: -80px;
  right: -100px;
  width: 800px;
  height: 600px;
  background: radial-gradient(70% 60% at 90% 100%, rgba(59, 91, 140, 0.35) 0%, rgba(59, 91, 140, 0.15) 40%, rgba(59, 91, 140, 0.1) 70%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}
.footer-content { max-width: 1200px; margin: 0 auto; position: relative; z-index: 1; }
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 40px;
}
.footer-logo img { width: 60px; height: 60px; border-radius: 16px; background: #fff; padding: 6px; }
.footer-menu { display: flex; gap: 32px; font-size: 16px; flex-wrap: wrap; }
.footer-menu a { color: #b0b8c2; transition: 0.3s; letter-spacing: 0; }
.footer-menu a:hover { font-weight: 600; color: #fff; }
.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin: 50px 0 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 40px;
}
.footer-col h4 { color: #fff; font-size: 18px; font-weight: 600; margin: 0 0 20px; letter-spacing: 0; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: #b0b8c2; font-size: 14px; display: inline-block; transition: 0.2s; letter-spacing: 0; }
.footer-col a:hover { color: #fff; transform: translateX(3px); }
.footer-cta h2 { font-size: 24px; font-weight: 600; margin: 0 0 20px; color: #fff; letter-spacing: -0.015em; }
.footer-buttons { display: flex; flex-wrap: wrap; gap: 16px; }
.footer .button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  background: #11141a;
  border: 1px solid #2a2b2e;
  color: #fff;
  font-size: 15px;
  transition: 0.2s;
  letter-spacing: 0;
}
.footer .button:hover { background: #2b2c31; }
.footer .button img { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 60px;
  border-top: 1px solid #2a2a2d;
  padding-top: 20px;
  font-size: 14px;
  letter-spacing: 0;
}
.crafted { display: flex; align-items: center; gap: 10px; }
.crafted img { height: 40px; }
.scroll-top {
  position: absolute;
  right: 0;
  bottom: 125px;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 12px 24px;
  border-radius: 9999px;
  font-size: 15px;
  letter-spacing: 0;
  transition: background 0.3s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.scroll-top:hover { background: #2a2b30; }

.scroll-progress-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #4a92f3, #0a84ff);
  z-index: 9999;
  transition: width 0.1s linear, opacity 0.2s ease;
  box-shadow: 0 -2px 8px rgba(74, 146, 243, 0.3);
  pointer-events: none;
}

@media (max-width: 1100px) {
  :root { --sidebar-w: 200px; --gap: 40px; }
  .article-paper { padding: 52px 44px 48px; }

  .article-cover {
    margin: -52px -44px 36px;
  }
}

@media (max-width: 860px) {
  .article-layout { grid-template-columns: 1fr; gap: 0; margin-top: 0; }
  .article-sidebar { display: none; }
  .article-paper {
    border-radius: var(--radius-paper);
    padding: 36px 32px 40px;
    box-shadow: 0 24px 40px -16px rgba(0, 0, 0, 0.55);
  }
  .article-toc-mobile { display: block; }
  .heading-anchor { display: none; }
  .article-foot { flex-direction: column; align-items: flex-start; gap: 20px; }
  .article-useful { padding: 22px 20px; }

  .article-cover {
    margin: -36px -32px 32px;
  }

  /* На узких экранах сдвигаем видимую область картинки влево,
     чтобы текст обложки не съедался по бокам */
  .article-cover img {
    object-position: left center;
  }
  .sidebar-hero__thumb img {
    object-position: left center;
  }

  .mobile-bar { display: flex; }
  .to-top { display: none !important; }

  /* Больше воздуха от хлебных крошек до контента */
  .article-layout { margin-top: 32px; }
}

@media (max-width: 700px) {
  .article-container { width: min(calc(100% - 32px), var(--max-w)); }
  .article-top { padding-top: 96px; }
  .breadcrumb { font-size: 12px; }
  .breadcrumb .current { max-width: 160px; }
  .breadcrumb .sep svg { width: 11px; height: 11px; }

  /* Отступ от крошек до paper */
  .article-layout {
    margin-top: 24px;
  }

  .article-cover {
    margin: -24px -22px 26px;
    border-radius: 21px 21px 0 0;
  }
  .article-cover img { height: 200px; object-position: left center; }

  .article-paper { padding: 24px 22px 32px; border-radius: 22px; box-shadow: 0 18px 32px -14px rgba(0, 0, 0, 0.55); }
  .article-head-top { gap: 12px; margin-bottom: 18px; }
  .article-title { font-size: clamp(26px, 7.2vw, 36px); margin-bottom: 20px; }
  .article-head { margin-bottom: 24px; padding-bottom: 22px; }

  .article-kicker { margin-bottom: 0; }
  .kicker-badge { font-size: 11.5px; padding: 5px 11px 5px 9px; gap: 6px; }
  .kicker-badge svg { width: 12px; height: 12px; }

  .font-control { padding: 2px; }
  .font-control button { width: 28px; height: 28px; }
  .font-control button[data-fs="s"] { font-size: 10px; }
  .font-control button[data-fs="m"] { font-size: 12px; }
  .font-control button[data-fs="l"] { font-size: 14px; }

  .article-meta { gap: 6px 12px; font-size: 12.5px; }
  .meta-sep { display: none; }
  .meta-item { font-size: 12.5px; gap: 6px; }
  .meta-item svg { width: 13px; height: 13px; }

  .article-toc-mobile { margin-bottom: 26px; border-radius: 12px; }
  .article-toc-mobile__head { padding: 11px 14px; }
  .article-toc-mobile__label { font-size: 12px; }
  .article-toc-mobile__list { padding: 0 14px 4px; }
  .article-toc-mobile__list a { padding: 10px 0; font-size: 14px; }
  .article-toc-mobile__more { padding: 11px 14px; font-size: 13px; }

  .article-body { line-height: 1.72; }
  .article-body h2 { margin-top: 1.9em; }

  .article-body p a.article-link { white-space: normal; padding: 2px 6px !important; }

  .article-useful { padding: 20px 16px; border-radius: 16px; margin-top: 40px; }
  .article-useful__item { padding: 14px 16px; gap: 12px; }
  .article-useful__name { font-size: 14px; }
  .article-useful__url { font-size: 11px; }
  .article-useful__arrow { width: 18px; height: 18px; }

  .article-cta__inner { padding: 30px 22px 28px; }
  .article-cta__inner::before { opacity: 0.14; filter: blur(2px) saturate(0.6); }
  .article-cta h3 { font-size: 19px; }
  .article-cta__actions { flex-direction: column; }
  .article-cta__actions .btn { justify-content: center; width: 100%; }

  .to-top { right: 16px; bottom: 16px; width: 42px; height: 42px; font-size: 16px; }

  .footer { padding: 40px 16px; text-align: center; }
  .footer-top { flex-direction: column; align-items: center; gap: 24px; }
  .footer-menu { flex-direction: column; gap: 12px; font-size: 17px; }
  .footer-links-grid { grid-template-columns: repeat(2, 1fr); gap: 30px 20px; }
  .footer-cta h2 { font-size: 20px; }
  .footer-buttons { flex-direction: column; align-items: center; gap: 14px; margin-top: 20px; }
  .footer .button { width: 100%; max-width: 300px; justify-content: center; padding: 16px 24px; }
  .footer-bottom { flex-direction: column; align-items: center; gap: 16px; margin-top: 40px; padding-top: 16px; text-align: center; }
  .crafted img { height: 32px; }
  .scroll-top { position: static; margin: 28px auto 0; width: 100%; max-width: 200px; display: block; }
  .sel-popover { display: none !important; }
}

@media (max-width: 500px) {
  .footer-links-grid { grid-template-columns: 1fr; gap: 25px; }
  .footer-col { border-bottom: 1px solid rgba(255, 255, 255, 0.05); padding-bottom: 15px; }
  .footer-col:last-child { border-bottom: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .sidebar-hero { transition: none; }
  .mobile-bar { transition: none; }
}

@media print {
  html, body { background: #fff !important; color: #000 !important; }
  #header-placeholder, .scroll-progress-bar, .article-sidebar, .article-cover, .article-toc-mobile, .article-useful, .footer, .to-top, .mobile-bar, .toast, .font-control, .copy-link, .heading-anchor, .sel-popover, .tooltip-wrap { display: none !important; }
  .article-layout { display: block; margin: 0; padding: 0; }
  .article-container { width: 100%; max-width: 100%; padding: 0; }
  .article-paper { background: #fff !important; box-shadow: none !important; border-radius: 0 !important; padding: 0 !important; }
  .article-paper > .article-body, .article-paper > .article-head { max-width: 100% !important; }
  .article-title, .article-body h2, .article-body h3, .article-body strong, .article-body > p:first-of-type { color: #000 !important; }
  .article-body, .article-body p, .article-body li { color: #1a1a1a !important; }
  .article-body p a.article-link { color: #000 !important; background: transparent !important; padding: 0 !important; border-bottom: 1px solid #999 !important; font-weight: 400 !important; }
  .article-body code { background: #f0f0f0 !important; color: #000 !important; border-color: #ddd !important; }
  .article-body blockquote { border-left-color: #000 !important; }
  .article-foot { border-top-color: #ddd !important; page-break-inside: avoid; }
  .article-foot__name { color: #000 !important; }
  .article-foot__role { color: #444 !important; }
  .kicker-badge { color: #444 !important; border-color: #ddd !important; background: #f5f5f5 !important; }
}

/* ============ БЛОК «Глоссарий» ============ */
.article-glossary {
  margin-top: 56px;
  padding: 28px 32px;
  border: 1px solid var(--paper-border);
  border-radius: 20px;
  background: var(--paper-bg-soft);
  max-width: 880px;
}

.article-glossary__title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-ink-faint);
  margin: 0 0 20px;
}

.article-glossary__list {
  margin: 0;
  padding: 0;
}

.article-glossary__item {
  padding: 16px 0;
  border-bottom: 1px solid var(--paper-border);
}
.article-glossary__item:first-child { padding-top: 0; }
.article-glossary__item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.article-glossary__item dt {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--paper-ink-strong);
  letter-spacing: -0.005em;
  margin-bottom: 6px;
  line-height: 1.3;
}

.article-glossary__item dd {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--paper-ink);
  letter-spacing: 0;
}

@media (max-width: 700px) {
  .article-glossary {
    padding: 22px 20px;
    border-radius: 16px;
    margin-top: 40px;
  }
  .article-glossary__title { margin-bottom: 16px; }
  .article-glossary__item { padding: 14px 0; }
  .article-glossary__item dt { font-size: 14px; }
  .article-glossary__item dd { font-size: 13.5px; line-height: 1.6; }
}

/* ============ ТАБЛИЦА В СТАТЬЕ ============ */
.article-table-wrap {
  max-width: 880px;
  margin: 0 0 1.6em;
  overflow-x: auto;
  border: 1px solid var(--paper-border);
  border-radius: 14px;
  -webkit-overflow-scrolling: touch;
}

.article-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--paper-ink);
}

.article-table thead {
  background: var(--paper-bg-soft);
}

.article-table th {
  text-align: left;
  font-weight: 600;
  color: var(--paper-ink-strong);
  padding: 14px 18px;
  border-bottom: 1px solid var(--paper-border);
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.article-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--paper-border);
  vertical-align: top;
}

.article-table tr:last-child td {
  border-bottom: 0;
}

.article-table tbody tr:nth-child(even) {
  background: rgba(10, 10, 15, 0.015);
}

.article-table code {
  font-size: 0.9em;
  padding: 1px 6px;
}

@media (max-width: 700px) {
  .article-table-wrap {
    border-radius: 12px;
    margin-bottom: 1.4em;
  }
  .article-table {
    font-size: 13.5px;
  }
  .article-table th,
  .article-table td {
    padding: 12px 14px;
  }
  .article-table th {
    font-size: 12px;
  }
}

/* ============ БЛОК КОДА (pre) ============ */
.article-body pre {
  margin: 1.4em 0;
  padding: 16px 20px;
  border-radius: 12px;
  background: var(--paper-bg-soft);
  border: 1px solid var(--paper-border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.article-body pre code {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 13.5px;
  line-height: 1.55;
  white-space: pre;
  color: #1a4b8a;
}

@media (max-width: 700px) {
  .article-body pre {
    padding: 14px 16px;
    font-size: 12.5px;
  }
  .article-body pre code {
    font-size: 12.5px;
  }
}

/* ============ БЛОК «Краткий ответ» (GEO) ============ */
.article-answer {
  max-width: 880px;
  margin: 0 0 36px;
  padding: 22px 26px;
  border: 1px solid var(--paper-border);
  border-left: 3px solid var(--paper-accent);
  border-radius: 12px;
  background: var(--paper-bg-soft);
}

.article-answer__label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-accent);
  margin: 0 0 10px;
}

.article-answer p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.62;
  color: var(--paper-ink-strong);
  letter-spacing: -0.005em;
}

@media (max-width: 700px) {
  .article-answer {
    margin-bottom: 26px;
    padding: 18px 18px;
    border-radius: 10px;
  }
  .article-answer__label { margin-bottom: 8px; }
  .article-answer p { font-size: 14.5px; line-height: 1.6; }
}

@media print {
  .article-answer { display: none !important; }
}

/* ============ БЛОК «Частые вопросы» (GEO FAQ) ============ */
.article-faq {
  margin-top: 56px;
  padding: 28px 32px;
  border: 1px solid var(--paper-border);
  border-radius: 20px;
  background: var(--paper-bg-soft);
  max-width: 880px;
}

.article-faq h2 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--paper-ink-strong);
  margin: 0 0 18px;
  scroll-margin-top: 110px;
}

.article-faq__item {
  padding: 18px 0;
  border-top: 1px solid var(--paper-border);
}
.article-faq__item:first-of-type {
  padding-top: 0;
  border-top: 0;
}
.article-faq__item:last-of-type {
  padding-bottom: 0;
}

.article-faq__item h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--paper-ink-strong);
  letter-spacing: -0.005em;
  margin: 0 0 8px;
  line-height: 1.35;
}

.article-faq__item p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--paper-ink);
  letter-spacing: 0;
}

@media (max-width: 700px) {
  .article-faq {
    margin-top: 40px;
    padding: 22px 20px;
    border-radius: 16px;
  }
  .article-faq h2 { font-size: 18px; margin-bottom: 14px; }
  .article-faq__item { padding: 14px 0; }
  .article-faq__item h3 { font-size: 14px; margin-bottom: 6px; }
  .article-faq__item p { font-size: 13.5px; line-height: 1.6; }
}

@media print {
  .article-faq { display: none !important; }
}