:root {
  --bg: #faf6f4;
  --surface: #ffffff;
  --ink: #353431;
  --ink-2: #5f5c58;
  --line: #ebe4df;
  --accent: #e13336;
  --accent-hover: #bd131f;
  --accent-ink: #ffffff;
  --wine: #93010f;
  --wine-deep: #660007;
  --berry: #b5424c;
  --pink: #ffdbd6;
  --pink-soft: #ffeeeb;
  --mint: #e9f7f4;
  --mint-ink: #00382e;
  --lilac: #f2f1fe;
  --lilac-ink: #26247a;
  --sky: #ebf1ff;
  --sky-ink: #003061;
  --chat-bg: #f4eeea;
  --bubble-in: #ffffff;
  --bubble-out: #ffdbd6;

  --sans: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --radius: 24px;
  --radius-lg: 32px;
  --container: 1160px;
  --gutter: 20px;

  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Типографика */

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.02;
}

h2 {
  font-size: clamp(30px, 4.6vw, 52px);
  line-height: 1.08;
}

h3 {
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

em.serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 1.14em;
  line-height: 0.9;
  letter-spacing: -0.01em;
  color: var(--wine);
}

.lead {
  font-size: clamp(18px, 2vw, 21px);
  color: var(--ink-2);
  max-width: 34em;
  margin: 0;
  text-wrap: pretty;
}

.small {
  font-size: 15px;
  color: var(--ink-2);
}

/* ---------- Кнопки */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 28px;
  border-radius: 100px;
  border: 1.5px solid transparent;
  font: 600 17px/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: 3px solid var(--wine);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn-secondary:hover {
  background: var(--ink);
  color: var(--bg);
}

.btn-sm {
  min-height: 44px;
  padding: 0 20px;
  font-size: 15px;
}

.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Шапка */

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
}

/* ---------- Hero */

.hero {
  padding: 32px 0 96px;
}

.hero .container {
  display: grid;
  gap: 48px;
  align-items: center;
}

.hero-copy {
  display: grid;
  gap: 24px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  padding: 8px 14px;
  border-radius: 100px;
  background: var(--pink-soft);
  color: var(--wine);
  font-size: 15px;
  font-weight: 500;
}

.chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.fit {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fit li {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 15px;
  color: var(--ink-2);
  background: var(--surface);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.stat b {
  display: block;
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.stat span {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.3;
  display: block;
  margin-top: 4px;
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  padding: 24px 0;
}

.hero-visual::before {
  content: '';
  position: absolute;
  inset: 8% 4%;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--pink) 0%, transparent 100%);
  opacity: 0.9;
}

/* ---------- Телефон и чат */

.phone {
  position: relative;
  width: min(320px, 82vw);
  aspect-ratio: 9 / 18.6;
  border-radius: 48px;
  background: #1b1918;
  padding: 11px;
  box-shadow:
    0 0 0 1.5px #3b3735 inset,
    0 30px 60px -20px rgb(102 0 7 / 0.28);
}

.phone::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 50%;
  translate: -50% 0;
  width: 92px;
  height: 26px;
  border-radius: 20px;
  background: #1b1918;
  z-index: 2;
}

.screen {
  height: 100%;
  border-radius: 38px;
  background: var(--chat-bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Реальный скриншот Telegram: опускаем под вырез, полоса над ним цвета шапки Telegram */
.screen.has-shot {
  background: #242d39;
  padding-top: 36px;
}

.screen .shot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 54px 16px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.chat-head .logo-mark {
  width: 34px;
  height: 34px;
}

.chat-head b {
  display: block;
  font-size: 14px;
  line-height: 1.2;
}

.chat-head span {
  font-size: 12px;
  color: var(--ink-2);
}

.chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px;
  font-size: 13px;
  line-height: 1.38;
}

.bubble {
  max-width: 86%;
  padding: 9px 12px;
  border-radius: 16px;
  background: var(--bubble-in);
  border-bottom-left-radius: 6px;
}

.bubble.out {
  align-self: flex-end;
  background: var(--bubble-out);
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 6px;
}

.bubble .sum {
  display: block;
  margin: 2px 0 6px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.bubble ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 3px;
}

.bubble li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.bubble li span:last-child {
  font-weight: 600;
  white-space: nowrap;
}

.bubble .gem {
  color: var(--wine);
}

.chat-btn {
  align-self: stretch;
  text-align: center;
  padding: 9px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chips span {
  padding: 6px 10px;
  border-radius: 100px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 500;
}

/* ---------- Секции */

section {
  scroll-margin-top: 80px;
}

.section {
  padding: 96px 0;
}

.section-head {
  display: grid;
  gap: 16px;
  margin-bottom: 48px;
  max-width: 760px;
}

.kicker {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wine);
}

/* Боли */

.pains {
  background: var(--pink-soft);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
}

.pains .section-head {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  justify-items: center;
}

.pain-list {
  display: grid;
  gap: 12px;
  max-width: 820px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.pain-list li {
  padding: 20px 22px;
  background: var(--surface);
  border-radius: 20px;
  font-size: 19px;
  line-height: 1.4;
}

.pain-list q {
  quotes: '«' '»' '„' '“';
}

.pain-list q::before,
.pain-list q::after {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 1.4em;
  line-height: 0;
  color: var(--accent);
}

.pain-list q::before {
  margin-right: 0.08em;
}

.pain-list q::after {
  margin-left: 0.08em;
}

.pains-outro {
  margin: 32px auto 0;
  text-align: center;
  font-size: 20px;
  font-weight: 500;
  max-width: 30em;
}

/* Про продукт */

.how {
  display: grid;
  gap: 40px;
  align-items: center;
}

.steps {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  display: grid;
  gap: 8px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
}

.step-num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 30px;
  line-height: 1;
  color: var(--wine);
}

.step p {
  margin: 0;
  color: var(--ink-2);
  font-size: 16px;
}

.step.result {
  background: var(--accent);
  color: #fff;
}

.step.result .step-num,
.step.result p {
  color: rgb(255 255 255 / 0.88);
}

.how .phone {
  justify-self: center;
}

/* Фичи */

.bento {
  display: grid;
  gap: 16px;
}

.card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 24px;
  padding: 28px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card h3 {
  margin-bottom: 10px;
}

.card p {
  margin: 0;
  font-size: 16px;
  opacity: 0.86;
}

.card-visual {
  align-self: end;
  border-radius: 20px;
  background: var(--surface);
  padding: 18px;
  font-size: 14px;
  color: var(--ink);
}

.card.pink {
  background: var(--pink);
  color: var(--wine-deep);
}

.card.mint {
  background: var(--mint);
  color: var(--mint-ink);
}

.card.lilac {
  background: var(--lilac);
  color: var(--lilac-ink);
}

.card.sky {
  background: var(--sky);
  color: var(--sky-ink);
}

.formula {
  display: grid;
  gap: 10px;
}

.formula-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}

.formula-row:last-child {
  border: 0;
  padding: 0;
}

.formula-row span:first-child {
  color: var(--ink-2);
}

.formula-row b {
  white-space: nowrap;
}

.law {
  display: inline-block;
  margin-top: 2px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--sky);
  color: var(--sky-ink);
  font-size: 12px;
  font-weight: 600;
}

.doc {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  align-items: center;
}

.doc-thumb {
  height: 80px;
  border-radius: 8px;
  background:
    repeating-linear-gradient(to bottom, var(--line) 0 2px, transparent 2px 9px) 10px 14px / calc(100% - 20px) 56px no-repeat,
    var(--bg);
  border: 1px solid var(--line);
}

.doc-fields {
  display: grid;
  gap: 6px;
}

.timeline {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 16px;
  margin: 0;
  padding: 6px 18px;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.timeline li:last-child {
  border: 0;
}

.timeline b {
  color: var(--accent);
  white-space: nowrap;
}

.region-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.region-chips span {
  padding: 8px 12px;
  border-radius: 100px;
  background: var(--lilac);
  color: var(--lilac-ink);
  font-weight: 500;
  font-size: 14px;
}

/* CTA */

.final {
  padding: 56px 24px;
  border-radius: var(--radius-lg);
  background: var(--berry);
  color: #fff;
  text-align: center;
  display: grid;
  gap: 20px;
  justify-items: center;
}

.final em.serif {
  color: var(--pink);
}

.final .lead {
  color: rgb(255 255 255 / 0.82);
}

.final .btn-secondary {
  color: #fff;
  border-color: rgb(255 255 255 / 0.7);
}

.final .btn-primary {
  background: #fff;
  color: var(--berry);
}

.final .btn-primary:hover {
  background: var(--pink);
}

.final .btn-secondary:hover {
  background: #fff;
  color: var(--berry);
}

.final .small {
  color: rgb(255 255 255 / 0.7);
  max-width: 36em;
}

.final .cta-row {
  justify-content: center;
}

/* Ассистент: широкая карточка с примером диалога */

.card.assistant {
  background: var(--surface);
  border: 1px solid var(--line);
}

.card.assistant .kicker {
  display: block;
  margin-bottom: 10px;
}

.card.assistant h3 em.serif {
  color: var(--wine);
}

.card.assistant .chat {
  background: var(--chat-bg);
  font-size: 14px;
}

/* Тарифы */

.prices {
  display: grid;
  gap: 16px;
}

.price-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}

.price-card h3 {
  margin: 0;
}

.price {
  display: grid;
  gap: 2px;
  margin: 0;
}

.price b {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.price span {
  font-size: 15px;
  opacity: 0.8;
}

.price-card ul {
  display: grid;
  gap: 8px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 16px;
}

.price-card li {
  position: relative;
  padding-left: 22px;
}

.price-card li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

.price-card.pink {
  background: var(--pink);
  color: var(--wine-deep);
  border-color: transparent;
}

.price-card.mint {
  background: var(--mint);
  color: var(--mint-ink);
  border-color: transparent;
}

.price-card.featured {
  background: var(--berry);
  color: #fff;
  border-color: transparent;
}

.price-card.featured .price b {
  color: var(--pink);
}

/* Плашка в углу, вне потока: заголовок и цена Lifetime на одной линии с соседними карточками */
.price-badge {
  position: absolute;
  top: 26px;
  right: 24px;
  padding: 5px 12px;
  border-radius: 100px;
  background: #fff;
  color: var(--berry);
  font-size: 13px;
  font-weight: 600;
}

.prices-note {
  margin-top: 20px;
}

/* Футер */

.footer {
  padding: 48px 0 64px;
  font-size: 14px;
  color: var(--ink-2);
}

.footer p {
  margin: 0 0 12px;
  max-width: 64em;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 20px;
}

/* ---------- Анимация появления */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition:
      opacity 0.6s ease,
      transform 0.6s ease;
  }

  .reveal.in {
    opacity: 1;
    transform: none;
  }

  .hero .bubble {
    animation: pop 0.5s ease both;
  }

  .hero .bubble:nth-child(n + 5) {
    animation-delay: 0.3s;
  }

  .hero .bubble:nth-child(n + 6) {
    animation-delay: 0.6s;
  }

  .hero .bubble:nth-child(n + 7),
  .hero .chat-btn {
    animation-delay: 1s;
  }

  @keyframes pop {
    from {
      opacity: 0;
      transform: translateY(10px) scale(0.98);
    }
  }
}

/* ---------- Планшет и десктоп */

@media (min-width: 720px) {
  :root {
    --gutter: 32px;
  }

  .pains {
    padding: 72px 48px;
  }

  .bento {
    grid-template-columns: repeat(12, 1fr);
  }

  .bento .card:nth-child(1) {
    grid-column: span 5;
  }

  .bento .card:nth-child(2) {
    grid-column: span 7;
  }

  .bento .card:nth-child(3) {
    grid-column: span 7;
  }

  .bento .card:nth-child(4) {
    grid-column: span 5;
  }

  .bento .card.assistant {
    grid-column: span 12;
    grid-template-columns: 1fr 1.1fr;
    grid-template-rows: auto;
    align-items: center;
  }

  .final {
    padding: 88px 48px;
  }

  .prices {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 4 колонки только на широком экране: уже плашка «Выгоднее всего» налезает на заголовок Lifetime */
@media (min-width: 1120px) {
  .prices {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 980px) {
  .hero {
    padding: 48px 0 120px;
  }

  .hero .container {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .section {
    padding: 120px 0;
  }

  .how {
    grid-template-columns: 1fr auto 1fr;
    gap: 40px;
  }

  .steps {
    gap: 20px;
  }

  .step {
    background: transparent;
    padding: 0;
  }

  .step.result {
    background: var(--accent);
    padding: 24px;
  }

  .steps.left {
    text-align: right;
  }

  .steps.left .step {
    justify-items: end;
  }
}

@media (max-width: 719px) {
  .stats {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
  }

  .stat span {
    font-size: 13px;
  }

  .cta-row .btn {
    flex: 1 1 100%;
  }

  .header .btn {
    min-height: 40px;
    padding: 0 16px;
  }

  .how .phone {
    order: -1;
  }
}

/* ================= Блог ================= */

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--ink-2);
}

.breadcrumbs li:not(:last-child)::after {
  content: '/';
  margin-left: 6px;
  color: var(--line);
}

.breadcrumbs a {
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--accent);
}

/* Шапка статьи */

.article-head {
  display: grid;
  gap: 20px;
  max-width: 880px;
  padding: 24px 0 32px;
}

.article-head h1 {
  font-size: clamp(34px, 5.4vw, 60px);
  line-height: 1.06;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 14px;
  color: var(--ink-2);
}

.article-meta span + span::before {
  content: '·';
  margin-right: 16px;
  color: var(--line);
}

.cover {
  margin: 0 0 48px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--pink-soft);
  aspect-ratio: 3 / 2;
  max-height: 560px;
  width: 100%;
}

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

/* Текст статьи */

.prose {
  max-width: 720px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.65;
}

.prose > * {
  margin: 0 0 20px;
}

.prose h2 {
  margin: 56px 0 18px;
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.15;
  scroll-margin-top: 84px;
}

.prose h3 {
  margin: 32px 0 12px;
  font-size: 21px;
}

.prose p {
  text-wrap: pretty;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li {
  margin-bottom: 8px;
}

.prose li::marker {
  color: var(--accent);
}

.prose a {
  color: var(--wine);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose a:hover {
  color: var(--accent);
}

.prose strong {
  font-weight: 600;
}

/* Ссылка на норму рядом с цифрой */
.prose .npa {
  font-size: 14px;
  white-space: nowrap;
}

/* Таблицы: на мобильном прокручиваются внутри обёртки, страница не ездит */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 1.4;
}

.prose th,
.prose td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.prose th {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--bg);
}

.prose tr:last-child td {
  border-bottom: 0;
}

.prose td.num,
.prose th.num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Коротко о главном */
.summary {
  padding: 24px 28px;
  border-radius: var(--radius);
  background: var(--mint);
  color: var(--mint-ink);
}

.summary b.title {
  display: block;
  margin-bottom: 10px;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.summary ul {
  margin: 0;
  padding-left: 1.2em;
}

.summary li:last-child {
  margin-bottom: 0;
}

.summary li::marker {
  color: var(--mint-ink);
}

/* Содержание */
.toc {
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 16px;
}

.toc b {
  display: block;
  margin-bottom: 8px;
}

.toc ol {
  margin: 0;
  padding-left: 1.3em;
}

.toc li {
  margin-bottom: 4px;
}

.toc a {
  color: var(--ink);
  text-decoration: none;
}

.toc a:hover {
  color: var(--accent);
}

/* Врезки: важно (розовая), пример (голубая) */
.callout {
  padding: 20px 24px;
  border-radius: 20px;
  background: var(--pink-soft);
  color: var(--wine-deep);
  font-size: 17px;
}

.callout b.title {
  display: block;
  margin-bottom: 6px;
}

.callout.example {
  background: var(--sky);
  color: var(--sky-ink);
}

.callout > :last-child {
  margin-bottom: 0;
}

.callout p {
  margin: 0 0 10px;
}

/* Цифры-итоги в ряд */
.figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.figure-tile {
  padding: 18px 20px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.figure-tile b {
  display: block;
  font-size: clamp(26px, 3.2vw, 34px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.figure-tile.accent b {
  color: var(--accent);
}

.figure-tile span {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink-2);
}

/* Графики: SVG внутри figure, подписи текстовыми токенами */
.chart {
  margin: 8px 0 28px;
  padding: 20px 20px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.chart-title {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}

.chart-sub {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--ink-2);
}

/* Горизонтальные столбцы: длина = --v (доля от максимума), значение у конца столбца.
   Подсказка при наведении: title на строке */
.hbars {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hbar {
  display: grid;
  gap: 6px;
}

.hbar-label {
  font-size: 15px;
  line-height: 1.3;
  color: var(--ink);
}

.hbar-track {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hbar-fill {
  flex: none;
  width: calc((100% - 120px) * var(--v, 0));
  min-width: 4px;
  height: 22px;
  border-radius: 0 4px 4px 0;
  background: var(--accent);
}

.hbar-value {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Вертикальные столбцы: высота = --v, подпись года снизу, значение над столбцом */
.vbars {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  align-items: end;
  gap: 2px;
  height: 240px;
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line);
}

.vbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  height: 100%;
}

.vbar-fill {
  width: min(24px, 60%);
  height: calc((100% - 28px) * var(--v, 0));
  border-radius: 4px 4px 0 0;
  background: var(--accent);
}

.vbar-value {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.vbar-axis {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 2px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--ink-2);
  text-align: center;
}

/* Цвета рядов: base — то, что платите или «было», accent — деньги к получению */
.hbar-fill.base,
.vbar-fill.base {
  background: #b9b2ac;
}

.hbar-fill.wine,
.vbar-fill.wine {
  background: var(--wine);
}

.hbar-fill.mint,
.vbar-fill.mint {
  background: #3e9e8a;
}

.hbar:hover .hbar-fill,
.vbar:hover .vbar-fill {
  opacity: 0.82;
}

.chart figcaption {
  margin-top: 12px;
  font-size: 14px;
  color: var(--ink-2);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--ink-2);
}

.legend li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--accent);
}

.legend i.base {
  background: #b9b2ac;
}

.legend i.wine {
  background: var(--wine);
}

.legend i.mint {
  background: #3e9e8a;
}

/* Сроки по шагам */
.steps-dates {
  display: grid;
  gap: 0;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  border-left: 2px solid var(--pink);
}

.steps-dates li {
  position: relative;
  padding: 0 0 20px 24px;
  margin: 0;
}

.steps-dates li::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 7px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--bg);
}

.steps-dates b {
  display: block;
  color: var(--accent);
}

.steps-dates li:last-child {
  padding-bottom: 0;
}

/* Призыв внутри статьи */
.inline-cta {
  display: grid;
  gap: 14px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--pink);
  color: var(--wine-deep);
}

.inline-cta h2,
.inline-cta .h {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.inline-cta p {
  margin: 0;
  font-size: 17px;
}

.inline-cta .cta-row {
  margin-top: 4px;
}

/* FAQ */
.faq {
  display: grid;
  gap: 10px;
}

.faq details {
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 52px 18px 22px;
  position: relative;
  font-weight: 600;
  line-height: 1.35;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  position: absolute;
  right: 22px;
  top: 14px;
  font-size: 24px;
  font-weight: 400;
  color: var(--accent);
}

.faq details[open] summary::after {
  content: '−';
}

.faq details > div {
  padding: 0 22px 18px;
  color: var(--ink-2);
  font-size: 17px;
}

.faq details > div p {
  margin: 0 0 10px;
}

.faq details > div > :last-child {
  margin-bottom: 0;
}

/* Источники */
.sources {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
}

.sources ol {
  padding-left: 1.3em;
}

.sources li {
  margin-bottom: 10px;
}

.sources a {
  color: var(--wine);
}

.article-note {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-2);
}

/* Карточки статей: главная, список блога, «читайте также» */

.post-grid {
  display: grid;
  gap: 16px;
}

.post-card {
  display: grid;
  grid-template-rows: auto 1fr;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.post-card:hover {
  transform: translateY(-3px);
  border-color: var(--pink);
}

.post-card:focus-visible {
  outline: 3px solid var(--wine);
  outline-offset: 3px;
}

/* height: auto, иначе атрибут height="800" перебивает aspect-ratio */
.post-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--pink-soft);
}

.post-card-body {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 20px 22px 24px;
}

.post-card .kicker {
  font-size: 13px;
}

.post-card h2,
.post-card h3 {
  font-size: 21px;
  line-height: 1.25;
}

.post-card p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-2);
}

.blog-more {
  margin-top: 28px;
}

/* Только вертикальные отступы: эти блоки сами .container, боковые поля задаёт он */
.blog-head {
  padding-top: 24px;
  padding-bottom: 48px;
}

.related {
  padding-top: 96px;
}

.related h2 {
  margin-bottom: 32px;
}

@media (min-width: 720px) {
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .inline-cta {
    padding: 36px 40px;
  }

  .post-grid.featured-first .post-card:first-child {
    grid-column: 1 / -1;
    grid-template-columns: 1.2fr 1fr;
    grid-template-rows: auto;
  }

  .post-grid.featured-first .post-card:first-child img {
    height: 100%;
  }

  .post-grid.featured-first .post-card:first-child .post-card-body {
    align-content: center;
    padding: 36px;
  }

  .post-grid.featured-first .post-card:first-child h2,
  .post-grid.featured-first .post-card:first-child h3 {
    font-size: clamp(26px, 3vw, 34px);
  }
}

@media (min-width: 1020px) {
  .post-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* В статье шапка стоит по колонке текста, обложка шире неё */
article .article-head {
  max-width: 720px;
  margin: 0 auto;
}

article .article-head h1 {
  font-size: clamp(34px, 5vw, 54px);
}

/* Широкие таблицы на десктопе выходят за колонку текста, чтобы 4 колонки помещались без прокрутки */
@media (min-width: 1100px) {
  .prose .table-wrap {
    margin-left: -120px;
    margin-right: -120px;
  }
}

/* Баннер cookies (landing/site.js): показывается, только если подключена Метрика */
.cookie-banner {
  position: fixed;
  z-index: 50;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 8px 32px rgb(53 52 49 / 0.12);
}
.cookie-banner p {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink-2);
}
.cookie-banner a {
  color: var(--wine);
  text-underline-offset: 3px;
}
.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.cookie-actions .btn {
  flex: 1 1 140px;
}
