/* Общий слой статей блога: типографика поста, оглавление, врезки,
   шапка и футер облегчённой раскладки. Своё у статьи — в её <style>. */

  /* Страница оферты. Собрана отдельной статикой, поэтому шапка и футер
     повторены разметкой — числа и цвета те же, что в блоках лендинга. */

  :root {
    --page: #F4F4F5;
    --soft-bg: #FAFAFA;
    --card: #FFF;
    --ink: #151617;
    --heading: #323538;
    --secondary: #494F5C;
    --tertiary: #6F6F6F;
    --line: #E7E7E9;
    --soft: #F0F0F0;
    --radius-sheet: 40px;
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
            "SF Pro", "Inter Variable", "Inter", "Segoe UI", sans-serif;
  }

  * { box-sizing: border-box; }

  html { -webkit-text-size-adjust: 100%; background: var(--card); }

  body {
    margin: 0;
    color: var(--secondary);
    background: var(--card);
    font: 400 16px/1.6 var(--font);
    /* На лендинге это стоит в base.css. Без него тот же вес 500 в шапке
       рендерится subpixel-ом и выглядит заметно жирнее. */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  a { color: var(--ink); }

  .wrap { max-width: 1440px; margin: 0 auto; padding: 0 clamp(20px, 3.5vw, 50px); }

  /* ── шапка ─────────────────────────────────────────────── */

  .nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 76px;
  }

  .nav__links { display: flex; gap: 28px; justify-self: start; }
  .nav__actions { display: flex; align-items: center; gap: 28px; justify-self: end; }

  .nav__brand {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    justify-self: center;
    color: var(--ink);
    text-decoration: none;
  }

  .nav__brand span { font-weight: 600; font-size: 19.4px; line-height: 1; letter-spacing: -.09em; }
  .nav__brand img { width: 20px; height: 20px; }

  .nav__link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--heading);
    font: 500 14px/1 var(--font);
    letter-spacing: -.03em;
    text-decoration: none;
    transition: opacity .18s ease;
  }

  .nav__link:hover { opacity: .6; }

  .nav__button {
    display: inline-flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 40px;
    color: var(--tertiary);
    background: var(--soft);
    font: 600 12px/1 var(--font);
    letter-spacing: -.03em;
    white-space: nowrap;
    text-decoration: none;
    transition: background .18s ease;
  }

  .nav__button:hover { background: var(--line); }
  .nav__button img { width: 16px; height: 16px; }

  @media (max-width: 1080px) {
    .nav { grid-template-columns: auto 1fr; }
    .nav__links, .nav__actions .nav__link { display: none; }
    .nav__brand { justify-self: start; }
  }

  /* ── текст оферты ──────────────────────────────────────── */

  .doc {
    max-width: 820px;
    margin: 0 auto;
    padding: clamp(32px, 6vh, 64px) 0 clamp(64px, 12vh, 120px);
  }

  h1 {
    margin: 0;
    color: var(--ink);
    font-weight: 500;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.12;
    letter-spacing: -.03em;
  }

  .updated { margin-top: 14px; color: var(--tertiary); font-size: 15px; }

  .lead { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }

  h2 {
    margin: 52px 0 18px;
    color: var(--ink);
    font-weight: 500;
    font-size: clamp(20px, 2.2vw, 26px);
    line-height: 1.2;
    letter-spacing: -.02em;
    scroll-margin-top: 24px;
  }

  h3 { margin: 32px 0 12px; color: var(--heading); font-weight: 500; font-size: 17px; }

  p { margin: 0 0 14px; }
  ul { margin: 0 0 14px; padding-left: 22px; }
  li { margin-bottom: 8px; }
  b, strong { color: var(--heading); font-weight: 500; }

  .toc {
    margin-top: 36px;
    padding: 24px 26px;
    border: 1px solid var(--line);
    border-radius: 18px;
  }

  .toc h2 { margin: 0 0 14px; font-size: 15px; color: var(--tertiary); font-weight: 400; }
  .toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; }
  .toc li { margin-bottom: 7px; }
  .toc a { color: var(--secondary); text-decoration: none; }
  .toc a:hover { color: var(--ink); text-decoration: underline; }

  @media (max-width: 620px) { .toc ol { columns: 1; } }

  .todo {
    margin: 28px 0;
    padding: 18px 22px;
    border-left: 3px solid #0064FF;
    border-radius: 14px;
    background: #EEF4FF;
    color: var(--heading);
    font-size: 15px;
  }

  .todo b { color: #0050CC; }

  mark {
    padding: 1px 6px;
    border-radius: 5px;
    background: #DEE9FF;
    color: #0050CC;
    font-weight: 500;
  }

  .req { margin-top: 8px; color: var(--heading); }
  .req span { display: block; }


  /* ── статья ────────────────────────────────────────────── */

  .post {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) 280px;
    gap: clamp(28px, 4vw, 64px);
    align-items: start;
    max-width: 1320px;
    margin: 0 auto;
    padding: clamp(24px, 4vh, 44px) 0 clamp(64px, 12vh, 120px);
  }

  @media (max-width: 1180px) {
    .post { grid-template-columns: 240px minmax(0, 1fr); }
    .post .promo { display: none; }
  }

  @media (max-width: 900px) {
    .post { grid-template-columns: 1fr; }
    .post .toc { position: static; order: -1; }
  }

  .toc { position: sticky; top: 24px; }

  .toc h2 {
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    color: var(--tertiary);
    font: 500 12px/1 var(--font);
    letter-spacing: .12em;
    text-transform: uppercase;
  }

  .toc ol { margin: 0; padding: 0; list-style: none; }
  .toc li { margin-bottom: 12px; }

  .toc a {
    color: var(--tertiary);
    font-size: 15px;
    line-height: 1.35;
    text-decoration: none;
    transition: color .18s ease;
  }

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

  .promo {
    position: sticky;
    top: 24px;
    padding: 22px 22px 24px;
    border: 1px solid var(--line);
    border-radius: 18px;
  }

  .promo b { display: block; color: var(--ink); font-weight: 500; font-size: 17px; line-height: 1.3; }
  .promo p { margin: 10px 0 16px; font-size: 15px; }

  .promo a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #0064FF;
    font-weight: 500;
    font-size: 15px;
    text-decoration: none;
  }

  .body h1 {
    margin: 10px 0 0;
    color: var(--ink);
    font-weight: 500;
    font-size: clamp(30px, 3.8vw, 46px);
    line-height: 1.1;
    letter-spacing: -.03em;
    text-wrap: balance;
  }

  .kicker { margin: 0; color: var(--tertiary); font-size: 15px; }

  .meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 34px 0 0;
    padding-bottom: 0;
    color: var(--tertiary);
    font-size: 15px;
  }

  .meta img {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-pill, 999px);
    object-fit: cover;
  }

  .meta b { color: var(--ink); font-weight: 500; }

  .hero {
    display: grid;
    align-content: end;
    min-height: clamp(220px, 26vw, 340px);
    margin: 28px 0 32px;
    padding: clamp(24px, 3vw, 40px);
    border-radius: 22px;
    background: linear-gradient(150deg, #0B3FD6, #0064FF 60%, #3D86FF);
    color: #fff;
  }

  .hero span {
    font-weight: 500;
    font-size: clamp(28px, 4vw, 52px);
    line-height: 1.05;
    letter-spacing: -.03em;
    color: rgba(255, 255, 255, .92);
  }

  .body h2 {
    margin: 46px 0 14px;
    color: var(--ink);
    font-weight: 500;
    font-size: clamp(23px, 2.8vw, 30px);
    line-height: 1.18;
    letter-spacing: -.025em;
    scroll-margin-top: 20px;
  }

  .body h3 { margin: 30px 0 10px; color: var(--ink); font-weight: 500; font-size: 18px; }

  .body p { margin: 0 0 15px; }
  .body ul, .body ol { margin: 0 0 18px; padding-left: 22px; }
  .body li { margin-bottom: 9px; }
  .body b { color: var(--ink); font-weight: 500; }

  .body figure { margin: 26px 0; }
  .body figure img { display: block; width: 100%; height: auto; border-radius: 18px; }
  .body figcaption { margin-top: 10px; color: var(--tertiary); font-size: 14px; }

  .pull {
    margin: 26px 0;
    padding: 2px 0 2px 22px;
    border-left: 3px solid #0064FF;
    color: var(--ink);
    font-size: 19px;
    line-height: 1.5;
    letter-spacing: -.01em;
  }

  .nums {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1px;
    margin: 26px 0;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--line);
    overflow: hidden;
  }

  .nums div { padding: 20px 18px; background: var(--card); }

  .nums b {
    display: block;
    color: var(--ink);
    font-weight: 400;
    font-size: 32px;
    line-height: 1;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
  }

  .nums span { display: block; margin-top: 8px; color: var(--tertiary); font-size: 14px; line-height: 1.35; }

  .inline-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 32px 0;
    padding: 24px 26px;
    border: 1px solid var(--line);
    border-radius: 18px;
  }

  .inline-cta b { display: block; color: var(--ink); font-weight: 500; font-size: 17px; }
  .inline-cta p { margin: 8px 0 0; font-size: 15px; max-width: 46ch; }

  .inline-cta a {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    padding: 12px 20px;
    border-radius: 40px;
    background: var(--ink);
    color: #fff;
    font-weight: 500;
    font-size: 15px;
    text-decoration: none;
  }

  .faq h3 { margin: 26px 0 8px; font-size: 19px; }


  /* Класс .toc есть и в оферте — там это карточка в две колонки.
     Здесь гасим её и делаем простой список. */
  .post .toc {
    margin: 0;
    border: 0;
    padding: 0;
    border-radius: 0;
  }

  /* без заголовка список начинается с той же линии, что и текст статьи */
  .post .toc ol { margin-top: 0; }
  .post .toc li:first-child { margin-top: 0; }

  .post .toc ol { columns: auto; }

  .post .toc li { position: relative; }

  .post .toc a {
    display: block;
    padding-left: 18px;
  }

  /* стрелка появляется у раздела, который сейчас на экране */
  .post .toc a::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #0064FF;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity .2s ease, transform .2s ease;
  }

  .post .toc a.is-current {
    color: var(--ink);
    font-weight: 500;
  }

  .post .toc a.is-current::before { opacity: 1; transform: none; }


  /* подчёркивание появляется только на наведении */
  .meta .author {
    color: var(--ink);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color .18s ease;
  }

  .meta .author:hover { border-bottom-color: var(--ink); }

  .share {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
  }

  .share__btn {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-pill, 999px);
    background: none;
    color: var(--tertiary);
    cursor: pointer;
    transition: color .18s ease, background .18s ease;
  }

  .share__btn:hover { color: var(--ink); background: var(--soft-bg); }

  .share__btn svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  /* короткое подтверждение вместо всплывашки */
  .share__btn.is-copied { color: #0064FF; }

  /* ── футер ─────────────────────────────────────────────── */

  .page {
    position: relative;
    z-index: 1;
    border-radius: 0 0 var(--radius-sheet) var(--radius-sheet);
    background: var(--card);
  }

  /* под скруглениями — цвет футера, иначе в углах просвечивает белое */
  .page::after {
    content: "";
    position: absolute;
    z-index: -1;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--radius-sheet);
    background: var(--soft-bg);
  }

  .foot { background: var(--soft-bg); color: var(--heading); }

  .foot__inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: clamp(56px, 9vh, 96px) clamp(20px, 3.5vw, 50px) clamp(28px, 4vh, 40px);
  }

  .foot__top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
  }

  .foot__mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font: 500 clamp(22px, 2vw, 28px)/1 var(--font);
    letter-spacing: -.03em;
    text-decoration: none;
  }

  .foot__mark img { width: 32px; height: 32px; }

  .foot__tagline { margin: 14px 0 0; color: var(--secondary); font-size: 16px; }

  .foot__support { display: flex; flex-direction: column; gap: 12px; }

  .foot__label { margin: 0; color: var(--tertiary); font: 400 14px/1.3 var(--font); }

  .foot__mail {
    color: var(--ink);
    font: 500 clamp(26px, 3.4vw, 46px)/1.05 var(--font);
    letter-spacing: -.035em;
    text-decoration: none;
  }

  .foot__columns {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(24px, 3vw, 48px);
    margin-top: clamp(48px, 7vh, 84px);
  }

  .foot__col ul { margin: 18px 0 0; padding: 0; list-style: none; }
  .foot__col li + li { margin-top: 12px; }

  .foot__col a {
    color: var(--ink);
    font: 400 16px/1.35 var(--font);
    text-decoration: none;
  }

  .foot__col a:hover { color: var(--secondary); }

  .foot__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: clamp(56px, 10vh, 120px);
    color: var(--tertiary);
    font-size: 14px;
  }

  .foot__legal { display: flex; flex-wrap: wrap; gap: clamp(16px, 2vw, 32px); }
  .foot__legal a { color: inherit; text-decoration: none; }
  .foot__legal a:hover { color: var(--ink); }

  @media (max-width: 860px) { .foot__columns { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

  @media (max-width: 520px) {
    .foot__columns { grid-template-columns: 1fr; }
    .foot__bottom { flex-direction: column; align-items: flex-start; }
  }
