/* ============================================================
   Averon Insurance — стили страниц статей (база знаний).

   Источник: Figma «Article №0001» (Device=Desktop/Tablet/Mobile).
   Брейкпоинты соответствуют вариантам компонента:
     Mobile   < 768px   (макет 360)
     Tablet   768–1023  (макет 768)
     Desktop  ≥ 1024px  (макет 1440)

   Все правила скоупятся классом .article (и .article-page на <body>).
   Цвета и шрифт — из core/css/tokens.css.
   ============================================================ */

/* --- Токены -------------------------------------------------
   Объявлены на <body class="article-page">. Цвета — из tokens.css.
   Геометрия и типографика — Desktop 1440.
   ----------------------------------------------------------- */
.article-page {
  /* геометрия */
  --pad-y: 96px;
  --pad-x: 120px;
  --col: 720px;
  --gap-section: 64px;
  --card-pad-y: 48px;
  --card-pad-x: 64px;
  --avatar: 60px;

  /* типографика */
  --fs-h1: 36px;
  --lh-h1: 44px;
  --fs-h2: 28px;
  --lh-h2: 36px;
  --fs-lead: 22px;
  --lh-lead: 30px; /* eyebrow / вопрос FAQ */
  --fs-body: 16px;
  --lh-body: 24px;
  --fs-cap: 13px;
  --lh-cap: 18px;
  --fs-btn: 16px;
  --lh-btn: 22px;

  background-color: var(--c-page);
}

@media (max-width: 1023px) {
  /* Tablet 768 */
  .article-page {
    --pad-y: 72px;
    --pad-x: 40px;
    --col: none; /* контент занимает всю ширину минус отступы 40 */
    --gap-section: 48px;
    --card-pad-y: 32px;
    --card-pad-x: 48px;
    --avatar: 55px;

    --fs-h1: 28px;
    --lh-h1: 36px;
    --fs-h2: 22px;
    --lh-h2: 30px;
    --fs-lead: 20px;
    --lh-lead: 30px;
    --fs-body: 15px;
    --lh-body: 22px;
    --fs-cap: 12px;
    --lh-cap: 16px;
    --fs-btn: 15px;
    --lh-btn: 22px;
  }
}

@media (max-width: 767px) {
  /* Mobile 360 */
  .article-page {
    --pad-y: 56px;
    --pad-x: 20px;
    --col: none; /* контент занимает всю ширину минус отступы 20 */
    --gap-section: 40px;
    --card-pad-y: 24px;
    --card-pad-x: 32px;
    --avatar: 50px;

    --fs-h1: 22px;
    --lh-h1: 28px;
    --fs-h2: 18px;
    --lh-h2: 24px;
    --fs-lead: 18px;
    --lh-lead: 30px;
    --fs-body: 14px;
    --lh-body: 20px;
    --fs-cap: 11px;
    --lh-cap: 14px;
    --fs-btn: 14px;
    --lh-btn: 18px;
  }
}

/* --- Нейтрализация глобальных стилей ------------------------
   base.css задаёт элементам собственные размеры и отступы
   (section { margin-top: 12rem }, h1/h2 в rem, p 2rem и т.д.).
   Внутри статьи они гасятся, дальше типографику задают классы.
   ----------------------------------------------------------- */
.article *,
.article *::before,
.article *::after {
  box-sizing: border-box;
}

.article section,
.article header,
.article aside,
.article article {
  margin: 0;
  padding: 0;
  overflow: visible;
}

.article h1,
.article h2,
.article h3,
.article h4,
.article p,
.article ul,
.article ol,
.article li {
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  font-weight: inherit;
  color: inherit;
}

.article ul,
.article ol {
  list-style: none;
}

.article a {
  color: inherit;
  font-size: inherit;
  text-decoration: none;
}

.article img {
  display: block;
  max-width: 100%;
  object-fit: initial;
  object-position: initial;
}

/* --- Каркас страницы --------------------------------------- */
.article {
  padding: var(--pad-y) var(--pad-x);
  background-color: var(--c-page);
  color: var(--c-body);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.article__col {
  width: 100%;
  max-width: var(--col);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--gap-section);
}

/* --- Секция ------------------------------------------------ */
.article .section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article .section--head {
  gap: 32px;
}

.article .section__group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article .section__group--wide {
  gap: 32px;
}

/* --- Типографика ------------------------------------------- */
.article .h1 {
  margin: 0;
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--c-body);
}

.article .h2 {
  margin: 0;
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  font-weight: 600;
  color: var(--c-body);
}

.article .p {
  margin: 0;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--c-body);
}

.article .p--muted {
  color: var(--c-muted);
}

/* Текстовые ссылки внутри абзацев и списков (перелинковка на продукты) */
.article .p a,
.article .list__text a {
  color: var(--c-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.25s ease-out;
}

.article .p a:hover,
.article .list__text a:hover {
  color: var(--c-primary-hover);
}

/* --- Разделители ------------------------------------------- */
.article .rule {
  height: 2px;
  border: 0;
  margin: 0;
  border-radius: 2px;
  background: var(--c-border);
  flex: none;
}

.article .hairline {
  height: 1px;
  border: 0;
  margin: 0;
  border-radius: 1px;
  background: var(--c-hairline);
  flex: none;
}

/* --- Шапка статьи: мета-строка ----------------------------- */
.article .meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.article .meta__author {
  display: flex;
  align-items: center;
  gap: 16px;
}

.article .meta__avatar {
  width: var(--avatar);
  height: var(--avatar);
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  background: var(--c-border);
  border: 1px solid var(--c-border);
}

.article .meta__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article .meta__facts {
  display: flex;
  align-items: center;
  gap: 32px;
}

.article .meta__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.article .meta__item--right {
  align-items: flex-end;
  text-align: right;
}

.article .meta__label {
  font-size: var(--fs-cap);
  line-height: var(--lh-cap);
  letter-spacing: 0.01em;
  color: var(--c-muted);
}

.article .meta__value {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--c-body);
}

/* «Время чтения» в мобильном варианте макета отсутствует */
@media (max-width: 767px) {
  .article .meta__item--reading {
    display: none;
  }
}

/* --- Иллюстрации ------------------------------------------- */
.article .media {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--c-surface);
}

/* Герой статьи №0003: та же картинка, но края мягко уходят в фон
   страницы сверху и снизу (Figma, node 957:1922 — радиальные градиенты
   у верхней и нижней кромки). */
.article .hero {
  position: relative;
  width: 100%;
}

.article .hero__img {
  width: 100%;
  height: auto;
  aspect-ratio: 1536 / 1024;
  object-fit: cover;
  background: var(--c-surface);
}

.article .hero::before,
.article .hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 72px;
  pointer-events: none;
}

.article .hero::before {
  top: 0;
  background: linear-gradient(to bottom, var(--c-page), color-mix(in srgb, var(--c-page) 0%, transparent));
}

.article .hero::after {
  bottom: 0;
  background: linear-gradient(to top, var(--c-page), color-mix(in srgb, var(--c-page) 0%, transparent));
}

/* --- Списки ------------------------------------------------ */
.article .list {
  list-style: none;
  margin: 0;
  padding: 0 0 0 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* список с симметричным отступом (p 0/32/0/32) */
.article .list--inset {
  padding-right: 32px;
}

/* нумерованный список (p 16/0/0/32, gap 32) */
.article .list--steps {
  padding-top: 16px;
  gap: 32px;
}

.article .list__item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.article .list__dot {
  width: 8px;
  height: 8px;
  flex: none;
}

.article .list__text {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--c-body);
}

/* --- Иконки ------------------------------------------------ */
/* Файлы из landing/icons/articles — 24x24, заливка задана внутри SVG */
.article .icon {
  width: 24px;
  height: 24px;
  flex: none;
  display: block;
}

/* --- Заметка (акцентная строка с иконкой) ------------------ */
.article .note {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-radius: 2px;
}

.article .note__text {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 700;
  color: var(--c-body);
}

/* --- Чек-лист ---------------------------------------------- */
.article .checklist {
  list-style: none;
  margin: 0;
  padding: 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* --- Карточки ---------------------------------------------- */
.article .card {
  background: var(--c-white);
  border-radius: 16px;
  padding: var(--card-pad-y) var(--card-pad-x);
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.article .card--promo {
  border: 1px solid var(--c-hairline);
}

.article .card__stack {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.article .card__head {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article .card__title-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.article .eyebrow {
  margin: 0;
  font-size: var(--fs-lead);
  line-height: var(--lh-lead);
  font-weight: 500;
  color: var(--c-primary);
}

.article .card__title {
  margin: 0;
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  font-weight: 600;
  color: var(--c-body);
}

.article .card__title--sm {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
}

.article .card__benefits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article .card__benefit {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--c-body);
}

/* --- Кнопки ------------------------------------------------
   .btn--primary также существует в base.css (сине-серая кнопка
   сайта). Правила ниже специфичнее (.article .btn…), поэтому
   внутри статьи побеждают; height/box-shadow сбрасываются явно,
   так как их задаёт только глобальный вариант.
   ----------------------------------------------------------- */
.article .btn-row {
  display: flex;
  gap: 16px;
}

.article .btn-row .btn {
  flex: 1 1 0;
  min-width: 0;
}

@media (max-width: 767px) {
  .article .btn-row {
    flex-direction: column;
  }
}

.article .btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: auto;
  padding: 15px 32px;
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: none;
  font-family: inherit;
  font-size: var(--fs-btn);
  line-height: var(--lh-btn);
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.25s ease-out, border-color 0.25s ease-out,
    color 0.25s ease-out, transform 0.25s ease-out;
}

.article .btn:active {
  transform: translateY(1px);
}

.article .btn--primary {
  background-color: var(--c-primary);
  color: var(--c-white);
}

.article .btn--primary:hover {
  background-color: var(--c-primary-hover);
  color: var(--c-white);
}

.article .btn--primary:active {
  background-color: var(--c-primary-dark);
  color: var(--c-white);
}

.article .btn--ghost {
  background-color: transparent;
  border-color: var(--c-primary);
  color: var(--c-primary);
}

.article .btn--ghost:hover {
  background-color: var(--c-primary-soft);
  border-color: var(--c-primary-hover);
  color: var(--c-primary-hover);
}

.article .btn--ghost:active {
  color: var(--c-primary-dark);
  border-color: var(--c-primary-dark);
}

.article .btn:focus-visible {
  outline: 2px solid var(--c-primary-dark);
  outline-offset: 2px;
}

/* --- FAQ --------------------------------------------------- */
.article .faq {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.article .faq__item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.article .faq__caret {
  padding: 4px 0;
  flex: none;
}

.article .faq__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article .faq__q {
  margin: 0;
  font-size: var(--fs-lead);
  line-height: var(--lh-lead);
  font-weight: 500;
  color: var(--c-body);
}

@media (max-width: 1023px) {
  .article .faq__q {
    font-size: 18px;
    line-height: 26px;
  }
}

@media (max-width: 767px) {
  .article .faq__q {
    font-size: 16px;
    line-height: 22px;
  }
}

/* ============================================================
   Таблица цен (статья №0003 «…стал не по карману», node 1046:1454).
   Три колонки: услуга слева, две суммы справа. Группы — прописные
   подзаголовки. Итоговая строка отделена сплошной чертой.
   ============================================================ */
.article .ptable {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

.article .ptable th,
.article .ptable td {
  padding: 0;
  border: 0;
  text-align: left;
  vertical-align: top;
  font-weight: inherit;
}

.article .ptable__head {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--c-border);
  font-size: var(--fs-cap);
  line-height: var(--lh-cap);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-muted);
}

.article .ptable__head--num {
  text-align: right;
  width: 28%;
}

.article .ptable__group-label {
  padding: 20px 0 6px;
  font-size: var(--fs-cap);
  line-height: var(--lh-cap);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-muted);
}

.article .ptable__row + .ptable__row td {
  border-top: 1px solid color-mix(in srgb, var(--c-border) 70%, transparent);
}

.article .ptable__row td {
  padding: 12px 0;
}

.article .ptable__service {
  color: var(--c-body);
  padding-right: 16px;
}

.article .ptable__cell {
  text-align: right;
  white-space: nowrap;
}

.article .ptable__value {
  display: block;
  font-weight: 600;
  color: var(--c-body);
}

.article .ptable__sub {
  display: block;
  font-size: var(--fs-cap);
  line-height: var(--lh-cap);
  color: var(--c-muted);
}

.article .ptable__row--total td {
  border-top: 2px solid var(--c-border);
  padding-top: 16px;
}

.article .ptable__row--total .ptable__service {
  font-weight: 600;
}

.article .ptable__source {
  font-size: var(--fs-cap);
  line-height: 16px;
}

@media (max-width: 767px) {
  .article .ptable,
  .article .ptable__source {
    font-size: 13px;
  }

  .article .ptable__head--num {
    width: 32%;
  }
}

/* ============================================================
   Блоки, заимствованные со страницы продукта Health ProtectorGuard.
   Обёртка .article-embed несёт классы .hpg .hpg-page, поэтому токены
   и правила health-protector-guard.css работают внутри статьи. Здесь
   гасится только то, что относится к полноэкранной секции продукта:
   горизонтальные поля, фон-подложка и вертикальный ритм — их в статье
   задаёт .article__col (gap) и правило ниже.
   ============================================================ */
.article .article-embed {
  --pad-x: 0px;
  --pad-y: 0px;
  width: 100%;
}

.article .article-embed > section {
  padding: 24px 0;
  background: none;
}

/* Ширину заимствованным блокам не режем: колонка статьи (--col: 720px)
   для них не ограничение. Блок выходит из колонки на всю контентную
   область .article — страница минус --pad-x, — а внутренние обёртки
   сохраняют собственные пределы продукта (--wide-w 1024, --chart-w 700).
   Пропорции получаются те же, что на странице Health ProtectorGuard.

   100vw шире контентной области на ширину полосы прокрутки (~15px), то
   есть блок заходит на ~7px в поле страницы с каждой стороны. Поле — 120px,
   поэтому за край страницы блок не выходит и прокрутки по горизонтали
   не появляется.

   Ниже 1024px правило не нужно: там --col: none, и колонка статьи уже
   занимает всю ширину контентной области.

   --embed-w объявлена на .article, а не на самом блоке: var() в значении
   пользовательского свойства подставляется там, где свойство объявлено,
   а на .article-embed --pad-x уже обнулена. */
.article {
  --embed-w: calc(100vw - 2 * var(--pad-x));
}

@media (min-width: 1024px) {
  .article .article-embed {
    width: var(--embed-w);
    margin-inline: calc((100% - var(--embed-w)) / 2);
  }
}

/* Соединительная линия шагов идёт по краю блока, а не за пределы
   страницы (в продукте она уходит на всю ширину секции). */
.article .article-embed .hpg-steps__line {
  left: 0;
  right: 0;
}

/* Карта: заголовочная группа и метрики из продукта не переносятся,
   остаётся только название штата под курсором — держим ему место,
   чтобы карта не подпрыгивала, и центрируем. */
.article .article-embed--map .hpg-map__swap {
  min-height: 44px;
  width: 100%;
}

.article .article-embed--map .hpg-map__state {
  align-items: center;
  text-align: center;
}

/* ============================================================
   Статья №0004 «Открытая регистрация 2027» (Figma, node 1950:1454).
   ============================================================ */

/* --- Карточки-переходы «CTA · ACA Marketplace» и «CTA · Подбор
   в чатформе»: без рамки, с тенью Shadow/Premium. */
.article .card--cta {
  box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.12);
}

/* --- Главная иллюстрация: календарь -------------------------
   Inline SVG (partials/_hero_calendar.html). Без анимации показан
   итоговый кадр: верхний лист «Ноябрь» убран, число 15 обведено.

   Цикл повторяет прототип Figma (State 1 → 2 → 3 → 1), 5.6 с:
     0.0–1.2 с   пауза на «1 ноября»;
     1.2–2.1 с   лист улетает вверх-влево с поворотом и тает;
     2.1–2.2 с   пауза;
     2.2–2.9 с   обводка рисуется вокруг «15»;
     2.9–5.1 с   пауза на итоговом кадре;
     5.1–5.6 с   растворение обратно в «1 ноября».
   Включает цикл article.js (.calendar--animated), он же ставит его
   на паузу, пока рисунок вне экрана (.calendar--paused). */
.article .calendar {
  margin: 0;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: var(--c-page);
}

.article .calendar__svg {
  display: block;
  width: 100%;
  height: auto;
}

.article .calendar__month {
  font-size: 30px;
  font-weight: 600;
  fill: var(--c-white);
  text-anchor: middle;
}

.article .calendar__day {
  font-size: 150px;
  font-weight: 600;
  fill: var(--c-body);
  text-anchor: middle;
}

.article .calendar__sheet--top {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
}

.article .calendar__mark {
  transform-box: fill-box;
  transform-origin: center;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .article .calendar--animated .calendar__sheet--top {
    animation: calendar-sheet 5.6s infinite;
  }

  .article .calendar--animated .calendar__mark {
    animation: calendar-mark 5.6s infinite;
  }

  .article .calendar--paused .calendar__sheet--top,
  .article .calendar--paused .calendar__mark {
    animation-play-state: paused;
  }
}

/* Ease-in-out — EASE_IN_AND_OUT прототипа Figma */
@keyframes calendar-sheet {
  0%,
  21.43% {
    transform: none;
    opacity: 1;
    animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  }
  37.5%,
  91.07% {
    transform: translate(-25px, -256px) rotate(-14deg);
    opacity: 0;
  }
  91.08% {
    transform: none;
    opacity: 0;
    animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  }
  100% {
    transform: none;
    opacity: 1;
  }
}

@keyframes calendar-mark {
  0%,
  39.29% {
    transform: scale(0.8);
    stroke-dashoffset: 1;
    opacity: 0;
    animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  }
  42% {
    opacity: 1;
  }
  51.79%,
  91.07% {
    transform: none;
    stroke-dashoffset: 0;
    opacity: 1;
    animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  }
  100% {
    transform: none;
    stroke-dashoffset: 0;
    opacity: 0;
  }
}

/* ============================================================
   Статья №0010 «Не успели к 15 декабря» (Figma, node 1974:1958).
   ============================================================ */

/* --- Главная иллюстрация: календарь с плашкой ----------------
   Тот же календарь (partials/_hero_calendar.html с badge): лист
   «16 декабря» улетает, «15 января» обводится зелёным, затем снизу
   всплывает плашка «ещё не поздно» (State 1 → 3 прототипа: из y 380
   в y 350, из прозрачной в непрозрачную). Без анимации плашка видна.

   Ход плашки в общем цикле календаря 5.6 с:
     0.0–2.9 с   скрыта, пока улетает лист и рисуется обводка;
     2.9–3.4 с   всплывает на 30px макета и проявляется;
     3.4–5.1 с   пауза на итоговом кадре;
     5.1–5.6 с   растворяется вместе с обводкой. */
.article .calendar--badge {
  position: relative;
  container-type: inline-size;
}

.article .calendar--badge .calendar__mark {
  stroke: var(--c-success);
}

.article .calendar__badge {
  position: absolute;
  top: 72.917%;
  right: 8.333%;
  display: flex;
  align-items: center;
  gap: 1.667cqw;
  margin: 0;
  padding: 2.222cqw 3.889cqw 2.222cqw 3.333cqw;
  border-radius: 999px;
  background: var(--c-success);
  box-shadow: 0 1.667cqw 4.444cqw color-mix(in srgb, var(--c-body) 10%, transparent);
  font-size: 3.333cqw;
  font-weight: 600;
  line-height: 1.2;
  color: var(--c-white);
  white-space: nowrap;
  pointer-events: none;
}

.article .calendar__check {
  flex: none;
  width: 3.056cqw;
  height: 2.361cqw;
  overflow: visible;
}

@media (prefers-reduced-motion: no-preference) {
  .article .calendar--animated .calendar__badge {
    animation: calendar-badge 5.6s infinite both;
  }

  .article .calendar--paused .calendar__badge {
    animation-play-state: paused;
  }
}

@keyframes calendar-badge {
  0%,
  51.79% {
    opacity: 0;
    transform: translateY(4.167cqw);
    animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  60.71%,
  91.07% {
    opacity: 1;
    transform: none;
    animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  }
  100% {
    opacity: 0;
    transform: none;
  }
}

/* ============================================================
   Статья №0005 «Автопродление плана» (Figma, node 1962:1562).
   ============================================================ */

/* --- Главная иллюстрация: карточка плана --------------------
   Inline SVG (partials/_hero_plan_renewal.html). Без анимации показан
   итоговый кадр (State=3): 2027, «$ 500», красные вопросы. Бейдж
   обновления, как в макете, на 4px выходит за верхний край рисунка,
   поэтому overflow у рисунка видимый, а фон скругляет сам SVG.

   Цикл 8 с (State 1 → 3 и обратно):
     0.0–1.2 с   пауза на 2026 / $180 / галочках;
     1.2–2.0 с   иконка проворачивается, от бейджа расходится кольцо;
     1.8–2.4 с   год 2026 → 2027;
     2.2–2.8 с   взнос $180 → «$ ?»;
     2.8–3.9 с   галочки по очереди сменяются вопросами;
     3.8–4.4 с   «$ ?» → «$ 500»;
     4.4–7.3 с   пауза на итоговом кадре;
     7.3–7.9 с   всё возвращается к 2026.
   Включает цикл article.js (.renewal--animated), он же ставит его
   на паузу, пока рисунок вне экрана (.renewal--paused). */
.article .renewal {
  margin: 0;
  width: 100%;
}

.article .renewal__svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.article .renewal__caption {
  font-size: 20px;
  fill: var(--c-muted);
}

.article .renewal__year-text {
  font-size: 44px;
  font-weight: 600;
  fill: var(--c-body);
}

.article .renewal__price-text {
  font-size: 68px;
  font-weight: 600;
  fill: var(--c-body);
}

.article .renewal__price-text--new {
  fill: var(--c-primary);
}

.article .renewal__item {
  font-size: 22px;
  fill: var(--c-body);
}

.article .renewal__ask-text {
  font-size: 18px;
  font-weight: 600;
  fill: var(--c-white);
  text-anchor: middle;
}

/* Итоговый кадр */
.article .renewal__year {
  transform: translateY(-56px);
}

.article .renewal__price {
  transform: translateY(-168px);
}

.article .renewal__ok,
.article .renewal__ask,
.article .renewal__pulse,
.article .renewal__icon {
  transform-box: fill-box;
  transform-origin: center;
}

.article .renewal__ok {
  transform: scale(0);
}

.article .renewal__pulse {
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .article .renewal--animated .renewal__icon {
    animation: renewal-icon 8s infinite both;
  }

  .article .renewal--animated .renewal__pulse {
    animation: renewal-pulse 8s infinite both;
  }

  .article .renewal--animated .renewal__year {
    animation: renewal-year 8s infinite both;
  }

  .article .renewal--animated .renewal__price {
    animation: renewal-price 8s infinite both;
  }

  .article .renewal--animated .renewal__ok {
    animation: renewal-ok 8s infinite both;
  }

  .article .renewal--animated .renewal__ask {
    animation: renewal-ask 8s infinite both;
  }

  /* Пункты сменяются по очереди */
  .article .renewal--animated .renewal__row--2 > g {
    animation-delay: 0.15s;
  }

  .article .renewal--animated .renewal__row--3 > g {
    animation-delay: 0.3s;
  }

  .article .renewal--paused .renewal__icon,
  .article .renewal--paused .renewal__pulse,
  .article .renewal--paused .renewal__year,
  .article .renewal--paused .renewal__price,
  .article .renewal--paused .renewal__ok,
  .article .renewal--paused .renewal__ask {
    animation-play-state: paused;
  }
}

/* Ease-in-out — EASE_IN_AND_OUT, как в прототипах Figma */
@keyframes renewal-icon {
  0%,
  15% {
    transform: rotate(0deg);
    animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  }
  25%,
  100% {
    transform: rotate(360deg);
  }
}

@keyframes renewal-pulse {
  0%,
  15% {
    transform: scale(1);
    opacity: 0;
  }
  15.1% {
    transform: scale(1);
    opacity: 1;
    animation-timing-function: cubic-bezier(0, 0, 0.58, 1);
  }
  30%,
  100% {
    transform: scale(1.77);
    opacity: 0;
  }
}

@keyframes renewal-year {
  0%,
  22.5% {
    transform: none;
    animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  }
  30%,
  91.25% {
    transform: translateY(-56px);
    animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  }
  98.75%,
  100% {
    transform: none;
  }
}

@keyframes renewal-price {
  0%,
  27.5% {
    transform: none;
    animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  }
  35%,
  47.5% {
    transform: translateY(-84px);
    animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  }
  55%,
  91.25% {
    transform: translateY(-168px);
    animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  }
  98.75%,
  100% {
    transform: none;
  }
}

@keyframes renewal-ok {
  0%,
  35% {
    transform: none;
    animation-timing-function: cubic-bezier(0.42, 0, 1, 1);
  }
  39%,
  92% {
    transform: scale(0);
    animation-timing-function: cubic-bezier(0, 0, 0.58, 1);
  }
  97%,
  100% {
    transform: none;
  }
}

@keyframes renewal-ask {
  0%,
  38% {
    transform: scale(0);
    animation-timing-function: cubic-bezier(0, 0, 0.58, 1);
  }
  43% {
    transform: scale(1.18);
    animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  }
  46%,
  91.25% {
    transform: none;
    animation-timing-function: cubic-bezier(0.42, 0, 1, 1);
  }
  95%,
  100% {
    transform: scale(0);
  }
}

/* --- Карточка «Консультация» ------------------------------
   Белая карточка с рамкой и мягкой тенью. */
.article .consult-cta {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 32px;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: 16px;
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.1);
}

@media (max-width: 767px) {
  .article .consult-cta {
    gap: 24px;
    padding: 24px 20px;
  }
}

/* --- Превью чатформы в карточке «Подбор в чатформе» ---------
   Первые реплики чата: вопрос ассистента слева, ответ клиента
   справа, выбранное направление — акцентным цветом. */
.article .chat-preview {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article .chat-preview__message {
  display: flex;
  align-items: flex-end;
  gap: 16px;
}

.article .chat-preview__message--client {
  justify-content: flex-end;
}

.article .chat-preview__bubble {
  max-width: 348px;
  padding: 16px 24px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 20px;
  color: var(--c-body);
}

.article .chat-preview__message--assistant .chat-preview__bubble {
  background: var(--c-surface);
  border-bottom-left-radius: 0;
}

.article .chat-preview__message--client .chat-preview__bubble {
  background: var(--c-primary-soft);
  border-bottom-right-radius: 0;
}

.article .chat-preview__pick {
  color: var(--c-primary);
}

.article .chat-preview__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: none;
  border: 1px solid var(--c-border);
  border-radius: 50%;
  background: var(--c-white);
}

.article .chat-preview__avatar img {
  width: 16px;
  height: 16px;
}

/* Подписи полей формы: в макете их роль играет подсказка, label
   остаётся только для скринридера. */
.article .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Консультация: шапка по центру, поля, кнопка, согласие */
.article .consult-cta__head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
}

.article .consult-cta__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article .consult-cta__fields {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.article .consult-cta__field {
  flex: 1 1 100%;
  min-width: 0;
}

.article .consult-cta__field--half {
  flex: 1 1 240px;
}

.article .consult-cta__input {
  width: 100%;
  height: 52px;
  margin: 0;
  padding: 0 24px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: var(--c-white);
  font-family: inherit;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--c-body);
  transition: border-color 0.25s ease-out;
}

.article .consult-cta__input::placeholder {
  font-size: var(--fs-cap);
  letter-spacing: 0.01em;
  color: var(--c-muted);
}

.article .consult-cta__input:hover,
.article .consult-cta__input:focus {
  border-color: var(--c-primary);
  outline: none;
}

.article .consult-cta__submit {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article .consult-cta__consent {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: var(--fs-cap);
  line-height: var(--lh-cap);
  letter-spacing: 0.01em;
  color: var(--c-muted);
  cursor: pointer;
}

.article .consult-cta__consent a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article .consult-cta__checkbox {
  width: 16px;
  height: 16px;
  margin: 0;
  flex: none;
  accent-color: var(--c-primary);
  cursor: pointer;
}

.article .consult-cta__done {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
}

/* ============================================================
   Статья №0006 «Документы для ACA» (Figma, node 1968:1670).
   ============================================================ */

/* --- Главная иллюстрация: планшет с чек-листом ---------------
   Inline SVG (partials/_hero_documents_checklist.html) и HTML-плашка
   «Заявка готова» поверх него. Без анимации показан итоговый кадр
   (State=3): все галочки и плашка.

   Плашка прижата к правому краю (right 30px, top 392px в макете
   720×480) и растёт влево — подпись в языках разной длины. Размеры
   в cqw (1cqw = 7.2px макета), поэтому она масштабируется вместе
   с рисунком.

   Цикл 8 с (State 1 → 3 и обратно):
     0.0–0.6 с   пауза на пустых кружках;
     0.6–2.3 с   кружки по очереди (шаг 0.4 с) заполняются,
                 поверх прорисовывается галочка;
     2.5–3.0 с   снизу выезжает плашка «Заявка готова»;
     3.0–6.2 с   пауза на итоговом кадре;
     6.2–6.6 с   плашка уходит;
     6.6–8.0 с   отметки по очереди гаснут.
   Включает цикл article.js (.checklist--animated), он же ставит его
   на паузу, пока рисунок вне экрана (.checklist--paused). */
.article .checklist {
  position: relative;
  margin: 0;
  width: 100%;
  container-type: inline-size;
}

.article .checklist__svg {
  display: block;
  width: 100%;
  height: auto;
}

.article .checklist__item {
  font-size: 24px;
  fill: var(--c-body);
}

.article .checklist__dot {
  transform-box: fill-box;
  transform-origin: center;
}

.article .checklist__tick {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.article .checklist__badge {
  position: absolute;
  top: 81.667%;
  right: 4.167cqw;
  display: flex;
  align-items: center;
  gap: 1.667cqw;
  margin: 0;
  padding: 2.222cqw 3.889cqw 2.222cqw 3.333cqw;
  border-radius: 999px;
  background: var(--c-success);
  box-shadow: 0 1.667cqw 4.444cqw color-mix(in srgb, var(--c-body) 12%, transparent);
  font-size: 3.333cqw;
  font-weight: 600;
  line-height: 1.3;
  color: var(--c-white);
  white-space: nowrap;
}

.article .checklist__badge-icon {
  width: 3.056cqw;
  height: 2.361cqw;
  flex: none;
  overflow: visible;
}

@media (prefers-reduced-motion: no-preference) {
  .article .checklist--animated .checklist__dot {
    animation: checklist-dot 8s infinite both;
  }

  .article .checklist--animated .checklist__tick {
    animation: checklist-tick 8s infinite both;
  }

  .article .checklist--animated .checklist__badge {
    animation: checklist-badge 8s infinite both;
  }

  /* Пункты отмечаются по очереди */
  .article .checklist--animated .checklist__row--2 > * {
    animation-delay: 0.4s;
  }

  .article .checklist--animated .checklist__row--3 > * {
    animation-delay: 0.8s;
  }

  .article .checklist--animated .checklist__row--4 > * {
    animation-delay: 1.2s;
  }

  .article .checklist--paused .checklist__dot,
  .article .checklist--paused .checklist__tick,
  .article .checklist--paused .checklist__badge {
    animation-play-state: paused;
  }
}

@keyframes checklist-dot {
  0%,
  7.5% {
    transform: scale(0);
    animation-timing-function: cubic-bezier(0, 0, 0.58, 1);
  }
  11% {
    transform: scale(1.15);
    animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  }
  13.5%,
  82% {
    transform: none;
    animation-timing-function: cubic-bezier(0.42, 0, 1, 1);
  }
  85%,
  100% {
    transform: scale(0);
  }
}

/* Галочка белая: без зелёной отметки её не видно на белом листе,
   поэтому сбрасывается мгновенно, когда отметка уже погасла. */
@keyframes checklist-tick {
  0%,
  10% {
    stroke-dashoffset: 1;
    animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  }
  15%,
  86% {
    stroke-dashoffset: 0;
  }
  86.1%,
  100% {
    stroke-dashoffset: 1;
  }
}

@keyframes checklist-badge {
  0%,
  31% {
    opacity: 0;
    transform: translateY(3.333cqw);
    animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  37%,
  77.5% {
    opacity: 1;
    transform: none;
    animation-timing-function: cubic-bezier(0.42, 0, 1, 1);
  }
  82.5%,
  100% {
    opacity: 0;
    transform: translateY(3.333cqw);
  }
}

/* ============================================================
   Статья №0007 «Доход на 2027 год» (Figma, node 1969:1751).
   ============================================================ */

/* --- Главная иллюстрация: лист декларации со штампом ---------
   Inline SVG (partials/_hero_income_estimate.html) и HTML-штамп
   поверх него. Без анимации показан итоговый кадр (State=3): реальный
   доход и штамп «Вернуть всю субсидию».

   Центр штампа закреплён в точке макета (508.6, 398.9 из 720×480),
   штамп повёрнут на −10° и растёт в обе стороны — надпись в языках
   разной длины. Размеры в cqw (1cqw = 7.2px макета), поэтому штамп
   масштабируется вместе с рисунком.

   Цикл 8 с (State 1 → 3 и обратно):
     0.0–0.8 с   пауза: в декларации только доход из заявки;
     0.8–1.6 с   снизу проявляются «Реальный доход» и сумма;
     1.9–2.6 с   штамп с размаху опускается на лист, лист вздрагивает;
     2.6–6.7 с   пауза на итоговом кадре;
     6.7–7.4 с   штамп и реальный доход уходят.
   Включает цикл article.js (.income--animated), он же ставит его
   на паузу, пока рисунок вне экрана (.income--paused). */
.article .income {
  position: relative;
  margin: 0;
  width: 100%;
  container-type: inline-size;
}

.article .income__svg {
  display: block;
  width: 100%;
  height: auto;
}

.article .income__caption {
  font-size: 20px;
  fill: var(--c-muted);
}

.article .income__value {
  font-size: 44px;
  font-weight: 600;
  fill: var(--c-body);
}

.article .income__value--actual {
  fill: var(--c-primary);
}

.article .income__stamp {
  position: absolute;
  top: 83.104%;
  left: 70.639%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.278cqw;
  margin: 0;
  padding: 1.944cqw 3.056cqw;
  border: 0.694cqw solid var(--c-primary);
  border-radius: 1.667cqw;
  background: color-mix(in srgb, var(--c-white) 85%, transparent);
  font-size: 3.611cqw;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-primary);
  white-space: nowrap;
  transform: translate(-50%, -50%) rotate(-10deg);
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .article .income--animated .income__real {
    animation: income-real 8s infinite both;
  }

  /* Сумма проявляется следом за подписью */
  .article .income--animated .income__real--2 {
    animation-delay: 0.2s;
  }

  .article .income--animated .income__stamp {
    animation: income-stamp 8s infinite both;
  }

  .article .income--animated .income__sheet {
    animation: income-sheet 8s infinite both;
  }

  .article .income--paused .income__real,
  .article .income--paused .income__stamp,
  .article .income--paused .income__sheet {
    animation-play-state: paused;
  }
}

@keyframes income-real {
  0%,
  10% {
    opacity: 0;
    transform: translateY(24px);
    animation-timing-function: cubic-bezier(0, 0, 0.58, 1);
  }
  18%,
  84% {
    opacity: 1;
    transform: none;
    animation-timing-function: cubic-bezier(0.42, 0, 1, 1);
  }
  91%,
  100% {
    opacity: 0;
    transform: translateY(24px);
  }
}

/* Штамп опускается сверху (State=1 — на 36px выше) с увеличением,
   на ударе чуть сжимается и встаёт на место. */
@keyframes income-stamp {
  0%,
  24% {
    opacity: 0;
    transform: translate(-50%, calc(-50% - 5cqw)) rotate(-10deg) scale(1.6);
    animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45);
  }
  29% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(-10deg) scale(0.94);
    animation-timing-function: cubic-bezier(0, 0, 0.58, 1);
  }
  32.5%,
  84% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(-10deg);
    animation-timing-function: cubic-bezier(0.42, 0, 1, 1);
  }
  89%,
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-10deg) scale(1.04);
  }
}

/* Лист вздрагивает в момент удара штампа */
@keyframes income-sheet {
  0%,
  28.5% {
    transform: none;
    animation-timing-function: cubic-bezier(0, 0, 0.58, 1);
  }
  30% {
    transform: translateY(4px);
    animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  }
  33.5%,
  100% {
    transform: none;
  }
}

/* ============================================================
   Статья №0008 «Иммигрантам об ACA в 2027 году» (Figma, node 1970:1822).
   ============================================================ */

/* --- Главная иллюстрация: ценник с наклейкой «Субсидия» ------
   Inline SVG (partials/_hero_subsidy_price_tag.html), наклейка и плашка
   с датой — HTML поверх него. Без анимации показан итоговый кадр
   (State=3): взнос $560 и дата, наклейки нет.

   Центр наклейки закреплён в точке макета (548.1, 136.8 из 720×480),
   наклейка повёрнута на 8°; центр плашки с датой — (494, 400.5).
   Обе растут в обе стороны — надписи в языках разной длины. Размеры
   в cqw (1cqw = 7.2px макета), поэтому плашки масштабируются вместе
   с рисунком.

   Цикл 8 с (State 1 → 3 и обратно):
     0.0–0.8 с   пауза: взнос $120, на ценнике наклейка «Субсидия»;
     0.8–1.1 с   край наклейки приподнимается;
     1.1–1.9 с   наклейка срывается и падает вниз, кувыркаясь до 38°;
     1.8–2.3 с   взнос перекатывается с $120 на $560;
     1.8–3.0 с   ценник качается на отверстии;
     2.6–3.1 с   снизу всплывает плашка «с 1 января 2027»;
     3.1–6.7 с   пауза на итоговом кадре;
     6.7–7.4 с   плашка уходит, взнос возвращается к $120;
     7.2–7.6 с   наклейка снова прилипает к ценнику.
   Включает цикл article.js (.pricetag--animated), он же ставит его
   на паузу, пока рисунок вне экрана (.pricetag--paused). */
.article .pricetag {
  position: relative;
  margin: 0;
  width: 100%;
  container-type: inline-size;
}

.article .pricetag__svg {
  display: block;
  width: 100%;
  height: auto;
}

.article .pricetag__caption {
  font-size: 22px;
  fill: var(--c-muted);
}

.article .pricetag__price-text {
  font-size: 76px;
  font-weight: 600;
  fill: var(--c-body);
}

.article .pricetag__price-text--new {
  fill: var(--c-primary);
}

/* Итоговый кадр: видна вторая строка взноса */
.article .pricetag__price {
  transform: translateY(-92px);
}

.article .pricetag__tag {
  transform-box: view-box;
  transform-origin: 210px 240px;
}

.article .pricetag__sticker,
.article .pricetag__date {
  position: absolute;
  margin: 0;
  border-radius: 999px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--c-white);
  white-space: nowrap;
  box-shadow: 0 1.667cqw 4.444cqw color-mix(in srgb, var(--c-body) 12%, transparent);
  pointer-events: none;
}

/* Итоговый кадр: наклейка уже упала за нижний край и не видна */
.article .pricetag__sticker {
  top: 28.5%;
  left: 76.125%;
  padding: 1.944cqw 3.333cqw;
  background: var(--c-success);
  font-size: 3.333cqw;
  opacity: 0;
  transform: translate(-50%, calc(-50% + 46.889cqw)) rotate(38deg);
}

.article .pricetag__date {
  top: 83.438%;
  left: 68.611%;
  padding: 1.944cqw 3.333cqw;
  background: var(--c-body);
  font-size: 3.056cqw;
  transform: translate(-50%, -50%);
}

@media (prefers-reduced-motion: no-preference) {
  .article .pricetag--animated .pricetag__sticker {
    animation: pricetag-sticker 8s infinite both;
  }

  .article .pricetag--animated .pricetag__price {
    animation: pricetag-price 8s infinite both;
  }

  .article .pricetag--animated .pricetag__tag {
    animation: pricetag-swing 8s infinite both;
  }

  .article .pricetag--animated .pricetag__date {
    animation: pricetag-date 8s infinite both;
  }

  .article .pricetag--paused .pricetag__sticker,
  .article .pricetag--paused .pricetag__price,
  .article .pricetag--paused .pricetag__tag,
  .article .pricetag--paused .pricetag__date {
    animation-play-state: paused;
  }
}

/* Наклейка: приподнимается, срывается и падает; в конце цикла
   прилипает обратно с лёгким нажимом. */
@keyframes pricetag-sticker {
  0%,
  10% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(8deg);
    animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  }
  14% {
    opacity: 1;
    transform: translate(-50%, calc(-50% - 1.111cqw)) rotate(2deg) scale(1.06);
    animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45);
  }
  20% {
    opacity: 1;
  }
  24%,
  90% {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 46.889cqw)) rotate(38deg);
  }
  90.1% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(8deg) scale(1.3);
    animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45);
  }
  94% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(8deg) scale(0.96);
    animation-timing-function: cubic-bezier(0, 0, 0.58, 1);
  }
  96%,
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(8deg);
  }
}

@keyframes pricetag-price {
  0%,
  22.5% {
    transform: none;
    animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  }
  29%,
  86% {
    transform: translateY(-92px);
    animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  }
  92%,
  100% {
    transform: none;
  }
}

/* Ценник качается на отверстии, пока перекатывается взнос */
@keyframes pricetag-swing {
  0%,
  22.5% {
    transform: none;
    animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  }
  26.5% {
    transform: rotate(-3deg);
    animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  }
  31% {
    transform: rotate(1.8deg);
    animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  }
  34.5% {
    transform: rotate(-0.8deg);
    animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  }
  37.5%,
  100% {
    transform: none;
  }
}

@keyframes pricetag-date {
  0%,
  32.5% {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 2.778cqw));
    animation-timing-function: cubic-bezier(0, 0, 0.58, 1);
  }
  39%,
  84% {
    opacity: 1;
    transform: translate(-50%, -50%);
    animation-timing-function: cubic-bezier(0.42, 0, 1, 1);
  }
  89%,
  100% {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 2.778cqw));
  }
}

/* ============================================================
   Статья №0011 «Зубы и зрение в плане ACA» (Figma, node 1976:2032).
   ============================================================ */

/* --- Главная иллюстрация: зуб в очках -----------------------
   Inline SVG (partials/_hero_dental_vision.html) и HTML-плашка
   «+ к плану ACA» поверх него. Без анимации показан итоговый кадр
   (State=3): очки на зубе и плашка.

   Плашка в макете стоит с left 430px, top 340px (720×480) и
   кончается на 646px; в коде она прижата правым краем к этой точке
   (right 74px) и растёт влево — подпись в языках разной длины.
   Размеры в cqw (1cqw = 7.2px макета), поэтому она масштабируется
   вместе с рисунком.

   Цикл 8 с (State 1 → 3 и обратно):
     0.0–0.6 с   пауза на зубе без очков;
     0.6–1.4 с   очки падают сверху, слегка поворачиваясь;
     1.4–1.8 с   очки подпрыгивают, зуб пружинит от удара;
     2.2–2.7 с   снизу выезжает плашка «+ к плану ACA»;
     2.7–6.0 с   пауза на итоговом кадре;
     6.0–6.4 с   плашка уходит;
     6.4–7.0 с   очки поднимаются за верхний край.
   Включает цикл article.js (.tooth--animated), он же ставит его
   на паузу, пока рисунок вне экрана (.tooth--paused). */
.article .tooth {
  position: relative;
  margin: 0;
  width: 100%;
  container-type: inline-size;
}

.article .tooth__svg {
  display: block;
  width: 100%;
  height: auto;
}

.article .tooth__body {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.article .tooth__glasses {
  transform-box: fill-box;
  transform-origin: center;
}

.article .tooth__badge {
  position: absolute;
  top: 70.833%;
  right: 10.278cqw;
  margin: 0;
  padding: 1.944cqw 3.333cqw;
  border-radius: 999px;
  background: var(--c-success);
  box-shadow: 0 1.944cqw 4.444cqw color-mix(in srgb, var(--c-body) 14%, transparent);
  font-size: 3.333cqw;
  font-weight: 600;
  line-height: 1.3;
  color: var(--c-white);
  white-space: nowrap;
}

@media (prefers-reduced-motion: no-preference) {
  .article .tooth--animated .tooth__glasses {
    animation: tooth-glasses 8s infinite both;
  }

  .article .tooth--animated .tooth__body {
    animation: tooth-body 8s infinite both;
  }

  .article .tooth--animated .tooth__badge {
    animation: tooth-badge 8s infinite both;
  }

  .article .tooth--paused .tooth__glasses,
  .article .tooth--paused .tooth__body,
  .article .tooth--paused .tooth__badge {
    animation-play-state: paused;
  }
}

/* Очки в State=1 на 248px выше (top −130 вместо 118) — полностью
   за верхним краем рисунка. Падение ускоряется, как под тяжестью. */
@keyframes tooth-glasses {
  0%,
  7.5% {
    transform: translateY(-248px) rotate(-8deg);
    animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45);
  }
  17.5% {
    transform: none;
    animation-timing-function: cubic-bezier(0, 0, 0.58, 1);
  }
  20% {
    transform: translateY(-14px) rotate(2deg);
    animation-timing-function: cubic-bezier(0.42, 0, 1, 1);
  }
  22.5%,
  80% {
    transform: none;
    animation-timing-function: cubic-bezier(0.42, 0, 1, 1);
  }
  87.5%,
  100% {
    transform: translateY(-248px) rotate(-8deg);
  }
}

/* Зуб пружинит в момент, когда на него падают очки */
@keyframes tooth-body {
  0%,
  17.5% {
    transform: none;
    animation-timing-function: cubic-bezier(0, 0, 0.58, 1);
  }
  19% {
    transform: scale(1.03, 0.96);
    animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  }
  21.5% {
    transform: scale(0.99, 1.01);
    animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  }
  23.5%,
  100% {
    transform: none;
  }
}

/* Плашка в State=1 на 24px ниже и прозрачная */
@keyframes tooth-badge {
  0%,
  27.5% {
    opacity: 0;
    transform: translateY(3.333cqw);
    animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  33.75%,
  75% {
    opacity: 1;
    transform: none;
    animation-timing-function: cubic-bezier(0.42, 0, 1, 1);
  }
  80%,
  100% {
    opacity: 0;
    transform: translateY(3.333cqw);
  }
}

/* ============================================================
   Статья №0009 «Низкий доход в Техасе: дыра в покрытии»
   (Figma, node 1971:1894).
   ============================================================ */

/* --- Главная иллюстрация: щит с дырой -----------------------
   Inline SVG (partials/_hero_coverage_gap.html). Без анимации
   показан итоговый кадр (State=3): зелёный блок закрывает дыру
   в щите, на блоке галочка.

   В State=1 блок стоит у правого нижнего угла: left 532px,
   top 355px, повёрнут на 20° вокруг своего угла. Его центр там —
   (566.7, 429.3), в дыре — (360, 253), отсюда сдвиг
   translate(206.66px, 176.34px) rotate(20deg) при повороте
   вокруг центра. Галочка рисуется обводкой (pathLength="1").

   Цикл 8 с (State 1 → 3 и обратно):
     0.0–0.6 с   пауза на щите с дырой;
     0.6–0.8 с   блок проявляется у правого нижнего угла;
     0.8–1.6 с   блок по дуге влетает в дыру, выравниваясь;
     1.6–2.0 с   блок защёлкивается, щит пружинит от удара;
     2.0–2.5 с   прорисовывается галочка;
     2.5–6.0 с   пауза на итоговом кадре;
     6.0–6.3 с   галочка стирается;
     6.3–7.2 с   блок уходит обратно и гаснет.
   Включает цикл article.js (.coverage--animated), он же ставит его
   на паузу, пока рисунок вне экрана (.coverage--paused). */
.article .coverage {
  margin: 0;
  width: 100%;
}

.article .coverage__svg {
  display: block;
  width: 100%;
  height: auto;
}

.article .coverage__shield {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.article .coverage__piece {
  transform-box: fill-box;
  transform-origin: center;
}

@media (prefers-reduced-motion: no-preference) {
  .article .coverage--animated .coverage__piece {
    animation: coverage-piece 8s infinite both;
  }

  .article .coverage--animated .coverage__shield {
    animation: coverage-shield 8s infinite both;
  }

  .article .coverage--animated .coverage__check {
    stroke-dasharray: 1;
    animation: coverage-check 8s infinite both;
  }

  .article .coverage--paused .coverage__piece,
  .article .coverage--paused .coverage__shield,
  .article .coverage--paused .coverage__check {
    animation-play-state: paused;
  }
}

/* Блок летит по дуге: промежуточный кадр выше прямой между
   углом и дырой, с лёгким обратным поворотом */
@keyframes coverage-piece {
  0%,
  7.5% {
    opacity: 0;
    transform: translate(206.66px, 176.34px) rotate(20deg) scale(0.9);
    animation-timing-function: cubic-bezier(0, 0, 0.58, 1);
  }
  10% {
    opacity: 1;
    transform: translate(206.66px, 176.34px) rotate(20deg);
    animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  }
  15% {
    opacity: 1;
    transform: translate(96px, 52px) rotate(-6deg);
    animation-timing-function: cubic-bezier(0.42, 0, 1, 1);
  }
  20% {
    opacity: 1;
    transform: scale(1.06);
    animation-timing-function: cubic-bezier(0, 0, 0.58, 1);
  }
  22.5% {
    opacity: 1;
    transform: scale(0.97);
    animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  }
  25%,
  78.75% {
    opacity: 1;
    transform: none;
    animation-timing-function: cubic-bezier(0.42, 0, 1, 1);
  }
  90%,
  100% {
    opacity: 0;
    transform: translate(206.66px, 176.34px) rotate(20deg) scale(0.9);
  }
}

/* Щит пружинит в момент, когда блок встаёт в дыру */
@keyframes coverage-shield {
  0%,
  20% {
    transform: none;
    animation-timing-function: cubic-bezier(0, 0, 0.58, 1);
  }
  21.5% {
    transform: scale(1.02, 0.98);
    animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  }
  23.5% {
    transform: scale(0.995, 1.005);
    animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  }
  25%,
  100% {
    transform: none;
  }
}

/* Галочка в State=1 не нарисована */
@keyframes coverage-check {
  0%,
  25% {
    stroke-dashoffset: 1;
    animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  }
  31.25%,
  75% {
    stroke-dashoffset: 0;
    animation-timing-function: cubic-bezier(0.42, 0, 1, 1);
  }
  78.75%,
  100% {
    stroke-dashoffset: 1;
  }
}

/* --- Доступность ------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .article * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
