/* ============================================================
   images-styles.css — стили изображений для pillar-страницы
   Blikteka. Палитра и переменные наследуются из основного
   inline-CSS в <head> index.html (--muted, --radius, --shadow-*,
   --muted-text, --content-width). Файл не переопределяет
   компоненты, только дополняет оформление figure/img.
   ============================================================ */

/* Контекстные изображения статьи */
:root {
      --bg: #fbfafc;
      --header-bg: #ffffff;
      --footer-bg: #15131a;
      --text: #1a1a1a;
      --text-inv: #f4f2f7;
      --accent: #9a19e5;
      --accent-700: #7a12b8;
      --accent-2: #19c2e5;
      --muted: #e6e2ec;
      --muted-text: #6b6577;
      --surface: #ffffff;
      --callout-bg: rgba(154, 25, 229, 0.06);

      --font-head: 'Archivo', sans-serif;
      --font-body: 'Source Sans 3', sans-serif;
      --font-mono: 'JetBrains Mono', ui-monospace, monospace;
      --font-logo: 'Sora', sans-serif;

      --content-width: 1100px;
      --section-gap: clamp(3rem, 6vw, 5rem);
      --radius: 10px;
      --shadow-sm: 0 1px 2px rgba(21, 19, 26, 0.04), 0 2px 6px rgba(21, 19, 26, 0.05);
      --shadow-md: 0 2px 8px rgba(21, 19, 26, 0.06), 0 8px 24px rgba(21, 19, 26, 0.07);
    }

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

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

    body {
      margin: 0;
      background: var(--bg);
      color: var(--text);
      font-family: var(--font-body);
      font-size: 1.075rem;
      line-height: 1.7;
      font-weight: 400;
      -webkit-font-smoothing: antialiased;
      text-rendering: optimizeLegibility;
      overflow-x: hidden;
    }

    img {
      max-width: 100%;
      height: auto;
      display: block;
    }

    a {
      color: var(--accent);
      text-decoration: none;
    }

    a:hover {
      color: var(--accent-700);
      text-decoration: underline;
    }

    a:focus-visible,
    button:focus-visible,
    summary:focus-visible {
      outline: 3px solid var(--accent-2);
      outline-offset: 2px;
      border-radius: 3px;
    }

    /* ============================================================
   2) ОБЩАЯ ТИПОГРАФИКА (низкоспецифичные селекторы элементов)
   ============================================================ */
    h1,
    h2,
    h3 {
      font-family: var(--font-head);
      font-weight: 700;
      line-height: 1.18;
      color: var(--text);
      text-align: left;
      letter-spacing: -0.01em;
    }

    h1 {
      font-size: clamp(2rem, 5vw, 3.25rem);
      font-weight: 800;
    }

    h2 {
      font-size: clamp(1.5rem, 3vw, 2.1rem);
      margin: 0 0 1rem;
      scroll-margin-top: 2rem;
    }

    h3 {
      font-size: clamp(1.2rem, 2vw, 1.45rem);
      margin: 2rem 0 0.75rem;
      scroll-margin-top: 2rem;
    }

    p {
      text-align: left;
      margin: 0 0 1.15em;
    }

    li {
      text-align: left;
    }

    ul,
    ol {
      margin: 0 0 1.15em;
      padding-left: 1.4em;
    }

    li {
      margin-bottom: 0.5em;
    }

    strong {
      font-weight: 700;
      color: var(--text);
    }

    em {
      font-style: italic;
    }

    blockquote {
      text-align: left;
      margin: 1.5em 0;
      padding: 0.4em 0 0.4em 1.2em;
      border-left: 3px solid var(--accent);
      color: var(--muted-text);
      font-style: italic;
    }

    table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.96rem;
    }

    th,
    td {
      text-align: left;
      padding: 0.7em 0.85em;
      border-bottom: 1px solid var(--muted);
      vertical-align: top;
    }

    th {
      font-family: var(--font-head);
      font-weight: 600;
    }

    figure {
      margin: 1.5em auto;
    }

    figure img {
      display: block;
      max-width: 100%;
      height: auto;
    }

    figcaption {
      text-align: center;
      font-size: 0.85rem;
      color: var(--muted-text);
      margin-top: 0.6em;
    }

    /* содержимое статьи: размер и ритм */
    [data-content] p,
    [data-content] li {
      font-size: 1.075rem;
    }

    /* ============================================================
   3) LAYOUT СЕКЦИЙ
   ============================================================ */
    main {
      width: 100%;
    }

    article {
      width: 100%;
    }

    [data-content] {
      position: static;
      max-width: var(--content-width);
      margin-left: auto;
      margin-right: auto;
      margin-top: var(--section-gap);
      margin-bottom: var(--section-gap);
      padding-left: 1.25rem;
      padding-right: 1.25rem;
    }

    [data-content]:first-of-type {
      margin-top: var(--section-gap);
    }

    [data-content] figure {
      margin-left: auto;
      margin-right: auto;
      max-width: 100%;
    }

    .article-image {
      max-width: 100%;
      height: auto;
      display: block;
      margin: 0 auto;
      border-radius: var(--radius);
    }

    /* ============================================================
   4) КОМПОНЕНТЫ (после типографики и layout — выигрывают каскад)
   ============================================================ */

    /* --- at-a-glance: панель ключевых цифр (hero data-anchor) --- */
    .at-a-glance {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 0;
      border: 1px solid var(--muted);
      border-radius: var(--radius);
      background: var(--surface);
      box-shadow: var(--shadow-sm);
      overflow: hidden;
      margin-top: 2rem;
      margin-bottom: 0;
      text-align: left;
    }

    .at-a-glance>div {
      padding: 1.1rem 1.25rem;
      border-right: 1px solid var(--muted);
    }

    .at-a-glance>div:last-child {
      border-right: none;
    }

    .at-a-glance .ag-value {
      font-family: var(--font-mono);
      font-weight: 700;
      font-size: 1.45rem;
      color: var(--accent);
      line-height: 1.2;
      text-align: left;
    }

    .at-a-glance .ag-label {
      font-size: 0.82rem;
      color: var(--muted-text);
      text-align: left;
      margin: 0.35rem 0 0;
      line-height: 1.45;
    }

    /* --- key-takeaway: выделенная строка, border-top, без бокса --- */
    .key-takeaway {
      border-top: 2px solid var(--accent);
      background: none;
      border-radius: 0;
      box-shadow: none;
      padding: 1rem 0 0;
      margin: 2rem 0;
    }

    .key-takeaway p {
      font-family: var(--font-head);
      font-size: clamp(1.2rem, 2.2vw, 1.45rem);
      font-weight: 600;
      line-height: 1.4;
      color: var(--text);
      text-align: left;
      margin: 0;
    }

    /* --- info-box: нейтральная рамка с фоном --- */
    .info-box {
      border: 1px solid var(--muted);
      border-left: 4px solid var(--accent-2);
      background: var(--surface);
      border-radius: var(--radius);
      padding: 1.25rem 1.4rem;
      margin: 1.75rem 0;
      box-shadow: var(--shadow-sm);
    }

    .info-box p {
      color: var(--text);
      text-align: left;
      margin: 0;
    }

    .info-box p+p {
      margin-top: 0.85em;
    }

    /* --- callout: правовое предупреждение, левый акцент-700 --- */
    .callout {
      border-left: 4px solid var(--accent-700);
      background: var(--callout-bg);
      border-radius: 0 var(--radius) var(--radius) 0;
      padding: 1.2rem 1.4rem;
      margin: 1.75rem 0;
      box-shadow: var(--shadow-sm);
    }

    .callout p {
      color: var(--text);
      text-align: left;
      margin: 0;
    }

    .callout p+p {
      margin-top: 0.85em;
    }

    /* --- comparison: таблица сравнения --- */
    .comparison {
      margin: 1.75rem 0;
      border: 1px solid var(--muted);
      border-radius: var(--radius);
      overflow: hidden;
      box-shadow: var(--shadow-sm);
    }

    .comparison table {
      font-size: 0.95rem;
    }

    .comparison thead th {
      background: var(--footer-bg);
      color: var(--text-inv);
      font-family: var(--font-head);
      font-weight: 600;
      border-bottom: none;
      text-align: left;
    }

    .comparison tbody tr:nth-child(even) {
      background: #faf8fd;
    }

    .comparison td {
      border-bottom: 1px solid var(--muted);
      color: var(--text);
      text-align: left;
    }

    .comparison tbody tr:last-child td {
      border-bottom: none;
    }

    /* --- stat-card: карта одной статистики --- */
    .stat-card {
      border: 1px solid var(--muted);
      border-top: 3px solid var(--accent);
      background: var(--surface);
      border-radius: var(--radius);
      padding: 1.25rem 1.4rem;
      margin: 1.25rem 0;
      box-shadow: var(--shadow-sm);
    }

    .stat-card p {
      text-align: left;
      margin: 0;
    }

    .stat-card p:first-child strong,
    .stat-card strong {
      font-family: var(--font-mono);
      font-size: 1.85rem;
      font-weight: 700;
      color: var(--accent);
      line-height: 1.15;
      display: block;
      margin-bottom: 0.4rem;
    }

    .stat-card p:last-child {
      font-size: 0.97rem;
      color: var(--muted-text);
    }

    /* --- glossary-term: строка-определение в потоке --- */
    .glossary-term {
      display: flex;
      align-items: baseline;
      gap: 12px;
      background: none;
      border: none;
      box-shadow: none;
      margin: 1.5rem 0;
    }

    .glossary-term p {
      text-align: left;
      margin: 0;
      color: var(--muted-text);
    }

    .glossary-term p strong {
      font-family: var(--font-mono);
      color: var(--accent-700);
      text-decoration: underline;
      text-underline-offset: 3px;
      font-weight: 700;
    }

    /* --- fun-fact: самый лёгкий компонент, курсив + тире-маркер --- */
    .fun-fact {
      position: relative;
      padding-left: 1.5rem;
      background: none;
      border: none;
      box-shadow: none;
      margin: 1.5rem 0;
    }

    .fun-fact::before {
      content: "—";
      position: absolute;
      left: 0;
      top: 0;
      color: var(--accent);
      font-weight: 700;
    }

    .fun-fact p {
      font-style: italic;
      color: var(--muted-text);
      text-align: left;
      margin: 0;
    }

    /* --- dos-donts: две колонки success/danger --- */
    .dos-donts {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1.25rem;
      margin: 1.75rem 0;
    }

    .dos-donts>div {
      border: 1px solid var(--muted);
      border-radius: var(--radius);
      padding: 1.1rem 1.25rem;
      background: var(--surface);
      box-shadow: var(--shadow-sm);
    }

    .dos-donts>div:first-child {
      border-top: 3px solid #1d9d62;
    }

    .dos-donts>div:last-child {
      border-top: 3px solid #d23b3b;
    }

    .dos-donts>div p {
      text-align: left;
      margin: 0 0 0.6rem;
    }

    .dos-donts>div:first-child p strong {
      color: #157a4b;
    }

    .dos-donts>div:last-child p strong {
      color: #b32d2d;
    }

    .dos-donts>div p strong {
      font-family: var(--font-head);
      text-transform: uppercase;
      letter-spacing: 0.06em;
      font-size: 0.9rem;
    }

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

    .dos-donts li {
      font-size: 1rem;
    }

    /* --- section-bridge: строка-переход --- */
    .section-bridge {
      text-align: center;
      font-family: var(--font-head);
      font-style: italic;
      color: var(--accent-700);
      margin: 2rem 0;
      display: flex;
      align-items: center;
      gap: 1rem;
      justify-content: center;
    }

    .section-bridge::before,
    .section-bridge::after {
      content: "";
      flex: 0 0 2.5rem;
      height: 1px;
      background: var(--muted);
    }

    .section-bridge p {
      margin: 0;
      text-align: center;
    }

    /* --- calc-example: оформленный пример расчёта --- */
    .calc-example {
      border: 1px dashed var(--accent);
      background: var(--surface);
      border-radius: var(--radius);
      padding: 1.25rem 1.4rem;
      margin: 1.75rem 0;
      box-shadow: var(--shadow-sm);
      font-family: var(--font-mono);
    }

    .calc-example p {
      text-align: center;
      margin: 0 0 0.5rem;
      font-size: 0.97rem;
    }

    .calc-example p:first-child {
      font-weight: 700;
      color: var(--accent-700);
    }

    /* --- card-grid: сетка карточек --- */
    .card-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 1.1rem;
      margin: 1.75rem 0;
    }

    .card-grid>* {
      border: 1px solid var(--muted);
      border-radius: var(--radius);
      padding: 1.1rem 1.25rem;
      background: var(--surface);
      box-shadow: var(--shadow-sm);
    }

    .card-grid p {
      text-align: left;
    }

    /* --- pre-game-checklist: вертикальный чеклист --- */
    .pre-game-checklist {
      margin: 1.75rem 0;
    }

    .pre-game-checklist>p:first-child,
    .pre-game-checklist .checklist-title {
      font-family: var(--font-head);
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--accent-700);
      font-size: 0.95rem;
      margin-bottom: 0.75rem;
      text-align: left;
    }

    .pre-game-checklist ul {
      list-style: none;
      margin: 0;
      padding-left: 1.5rem;
      border-left: 2px solid var(--muted);
    }

    .pre-game-checklist li {
      position: relative;
      text-align: left;
      padding-left: 0.4rem;
    }

    .pre-game-checklist li::before {
      content: "\2610";
      position: absolute;
      left: -1.95rem;
      color: var(--accent);
      background: var(--bg);
      padding: 0 0.15rem;
    }

    /* --- worked-example: пошаговый расчёт --- */
    .worked-example {
      background: var(--surface);
      border: 1px solid var(--muted);
      border-radius: var(--radius);
      padding: 1.6rem 1.6rem;
      margin: 1.75rem 0;
      box-shadow: var(--shadow-md);
    }

    .worked-example p {
      text-align: left;
      font-family: var(--font-mono);
      font-size: 0.97rem;
      margin: 0 0 0.75rem;
    }

    .worked-example p:last-child {
      margin-bottom: 0;
      font-weight: 700;
      color: var(--accent);
      font-size: 1.1rem;
    }

    .worked-example hr {
      border: none;
      border-top: 1px solid var(--muted);
      margin: 0.85rem 0;
    }

    /* --- author-bio: бейдж автора --- */
    .author-bio {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      gap: 8px;
      font-size: 0.8rem;
      color: var(--muted-text);
      font-style: italic;
      border-top: 1px solid var(--muted);
      padding-top: 1rem;
      margin-top: 1rem;
    }

    [data-content].author-bio {
      display: flex;
      justify-content: center;
      text-align: center;
    }

    /* ============================================================
   HEADER (собственные классы, не переиспользуем hero)
   ============================================================ */
    .site-header {
      background: var(--header-bg);
      border-bottom: 1px solid var(--muted);
      width: 100%;
    }

    .site-header .header-inner {
      max-width: 1100px;
      margin: 0 auto;
      padding: 0.85rem 1.5rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      flex-wrap: wrap;
    }

    .site-logo {
      display: inline-flex;
      align-items: center;
      line-height: 0;
    }

    .site-logo img {
      width: 200px;
      height: auto;
      display: block;
    }

    .header-meta {
      display: flex;
      align-items: center;
      gap: 1rem;
      flex-wrap: wrap;
    }

    .header-badge {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      font-family: var(--font-mono);
      font-size: 0.78rem;
      color: var(--accent-700);
      background: var(--callout-bg);
      border: 1px solid var(--muted);
      border-radius: 100px;
      padding: 0.3rem 0.8rem;
    }

    .header-trust {
      font-family: var(--font-head);
      text-transform: uppercase;
      letter-spacing: 0.12em;
      font-size: 0.7rem;
      color: var(--muted-text);
    }

    /* ============================================================
   5) HERO-СЕКЦИЯ (ниже по файлу — выше специфичность каскада)
   ============================================================ */
    .hero {
      width: 100vw;
      max-width: 100vw;
      margin-left: calc(50% - 50vw);
      margin-right: calc(50% - 50vw);
      background: var(--bg);
      border-bottom: 1px solid var(--muted);
      padding: clamp(2.5rem, 6vw, 4.5rem) 1.25rem clamp(2rem, 5vw, 3.5rem);
      text-align: center;
      margin-top: 0;
      margin-bottom: 0;
    }

    .hero>* {
      position: relative;
      z-index: 1;
    }

    .hero-inner {
      max-width: var(--content-width);
      margin: 0 auto;
      text-align: center;
    }

    .hero-eyebrow {
      position: relative;
      z-index: 1;
      display: block;
      font-family: var(--font-head);
      text-transform: uppercase;
      letter-spacing: 0.16em;
      font-size: 0.75rem;
      font-weight: 600;
      color: var(--accent-700);
      text-align: center;
      margin: 0 auto 1.1rem;
    }

    .hero h1 {
      position: relative;
      z-index: 1;
      text-align: center;
      margin: 0 auto 1.1rem;
      max-width: 25ch;
    }

    .hero-lead {
      position: relative;
      z-index: 1;
      text-align: center;
      font-size: clamp(1.05rem, 1.8vw, 1.25rem);
      color: var(--muted-text);
      max-width: 54ch;
      margin: 0 auto 1.4rem;
    }

    .hero-byline {
      position: relative;
      z-index: 1;
      text-align: center;
      font-family: var(--font-head);
      font-size: 0.9rem;
      color: var(--text);
      margin: 0 auto 0.6rem;
    }

    .hero figure {
      position: relative;
      z-index: 1;
      margin-left: auto;
      margin-right: auto;
      max-width: var(--content-width);
      margin-top: 2rem;
      margin-bottom: 0;
    }

    .hero-image {
      width: 100%;
      max-width: 100%;
      height: auto;
      display: block;
      margin: 0 auto;
      border-radius: var(--radius);
      box-shadow: var(--shadow-md);
    }

    .hero .at-a-glance {
      position: relative;
      z-index: 1;
      text-align: left;
    }

    /* кнопки навигации (внутренние якоря) */
    .nav-btn {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      font-family: var(--font-head);
      font-weight: 600;
      font-size: 0.92rem;
      padding: 0.7rem 1.4rem;
      border-radius: 100px;
      border: 1px solid var(--accent);
      background: var(--accent);
      color: #ffffff;
      cursor: pointer;
      transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
      box-shadow: var(--shadow-sm);
    }

    .nav-btn:hover {
      background: var(--accent-700);
      border-color: var(--accent-700);
      color: #ffffff;
      text-decoration: none;
      transform: translateY(-2px);
      box-shadow: var(--shadow-md);
    }

    .hero-cta {
      position: relative;
      z-index: 1;
      margin-top: 1.8rem;
      text-align: center;
    }

    .back-to-top {
      display: block;
      width: max-content;
      margin: 0 auto;
      background: transparent;
      color: var(--accent-700);
      border: 1px solid var(--muted);
    }

    .back-to-top:hover {
      background: var(--callout-bg);
      color: var(--accent-700);
      border-color: var(--accent);
    }

    .back-to-top-wrap {
      max-width: var(--content-width);
      margin: 0 auto var(--section-gap);
      padding: 0 1.25rem;
      text-align: center;
    }

    /* ============================================================
   TL;DR (data-content + компонент — только margin-top/bottom)
   ============================================================ */
    .tldr {
      background: var(--surface);
      border-left: 4px solid var(--accent);
      border-radius: 0 var(--radius) var(--radius) 0;
      box-shadow: var(--shadow-sm);
      /* margin-left/right:auto приходят из [data-content]; shorthand запрещён */
      padding-top: 1.5rem;
      padding-bottom: 1.5rem;
    }

    .tldr h2 {
      font-family: var(--font-head);
      font-size: clamp(1.1rem, 2vw, 1.25rem);
      font-weight: 700;
      margin: 0 0 0.85rem;
      text-align: left;
      scroll-margin-top: 2rem;
    }

    .tldr ul {
      margin: 0;
      padding-left: 1.3em;
    }

    .tldr li {
      text-align: left;
    }

    /* ============================================================
   TABLE OF CONTENTS (вариант: вертикальный, column-count:2)
   ============================================================ */
    .toc {
      background: var(--surface);
      border: 1px solid var(--muted);
      border-radius: var(--radius);
      box-shadow: var(--shadow-sm);
      padding: 1.5rem 1.6rem;
      position: static;
    }

    .toc h2 {
      font-family: var(--font-head);
      text-transform: uppercase;
      letter-spacing: 0.1em;
      font-size: 0.95rem;
      color: var(--accent-700);
      margin: 0 0 1rem;
      text-align: left;
    }

    .toc-list {
      column-count: 2;
      column-gap: 2rem;
      list-style: none;
      margin: 0;
      padding: 0;
    }

    .toc-list>li {
      break-inside: avoid;
      margin-bottom: 0.85rem;
    }

    .toc-list>li>a {
      font-family: var(--font-head);
      font-weight: 600;
      font-size: 1rem;
      color: var(--text);
      display: block;
    }

    .toc-list>li>a:hover {
      color: var(--accent);
      text-decoration: none;
    }

    .toc-sub {
      list-style: none;
      margin: 0.4rem 0 0;
      padding-left: 0.9rem;
      border-left: 2px solid var(--muted);
    }

    .toc-sub li {
      margin-bottom: 0.3rem;
    }

    .toc-sub a {
      font-size: 0.92rem;
      color: var(--muted-text);
    }

    .toc-sub a:hover {
      color: var(--accent);
      text-decoration: none;
    }

    /* ============================================================
   FOOTER (4 колонки + нижняя полоса)
   ============================================================ */
    .site-footer {
      background: var(--footer-bg);
      color: var(--text-inv);
      width: 100%;
      font-size: 0.8rem;
      line-height: 1.6;
    }

    .footer-cols {
      max-width: 1100px;
      margin: 0 auto;
      padding: 2.75rem 1.5rem 1.75rem;
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 2rem;
    }

    .footer-cols h3 {
      font-family: var(--font-head);
      text-transform: uppercase;
      letter-spacing: 0.1em;
      font-size: 0.78rem;
      color: var(--text-inv);
      margin: 0 0 0.9rem;
    }

    .footer-cols p,
    .footer-cols li {
      color: #b6b0c2;
      font-size: 0.8rem;
      text-align: left;
    }

    .footer-cols ul {
      list-style: none;
      margin: 0;
      padding: 0;
    }

    .footer-cols li {
      margin-bottom: 0.5rem;
    }

    .footer-cols a {
      color: #d9d3e6;
    }

    .footer-cols a:hover {
      color: #ffffff;
      text-decoration: underline;
    }

    .footer-warn strong {
      color: var(--accent-2);
    }

    .footer-bar {
      border-top: 1px solid #2c2834;
      max-width: 1100px;
      margin: 0 auto;
      padding: 1.1rem 1.5rem 1.75rem;
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem 1.5rem;
      align-items: center;
      justify-content: space-between;
    }

    .footer-bar p {
      margin: 0;
      color: #8e889c;
      font-size: 0.78rem;
      text-align: left;
    }

    /* ============================================================
   FAQ-АККОРДЕОН (max-height метод — кросс-браузерный)
   ============================================================ */
    [data-content="faq"] details {
      border: 1px solid var(--muted);
      border-radius: var(--radius);
      background: var(--surface);
      margin-bottom: 0.85rem;
      box-shadow: var(--shadow-sm);
      overflow: hidden;
    }

    [data-content="faq"] summary {
      font-family: var(--font-head);
      font-weight: 600;
      font-size: 1.05rem;
      padding: 1rem 3rem 1rem 1.25rem;
      cursor: pointer;
      list-style: none;
      position: relative;
      color: var(--text);
    }

    [data-content="faq"] summary::-webkit-details-marker {
      display: none;
    }

    [data-content="faq"] summary::after {
      content: "+";
      position: absolute;
      right: 1.25rem;
      top: 50%;
      transform: translateY(-50%);
      font-family: var(--font-mono);
      font-size: 1.4rem;
      color: var(--accent);
      transition: transform 0.3s ease;
    }

    [data-content="faq"] details[open] summary::after {
      content: "\2212";
      transform: translateY(-50%) rotate(180deg);
    }

    [data-content="faq"] details>div {
      overflow: hidden;
      max-height: 0;
      opacity: 0;
      transition: max-height 0.35s ease, opacity 0.3s ease;
    }

    [data-content="faq"] details[open]>div {
      max-height: 600px;
      opacity: 1;
    }

    [data-content="faq"] details>div p {
      padding: 0 1.25rem 1.1rem;
      margin: 0;
      color: var(--text);
      text-align: left;
    }

    /* ============================================================
   6) МЕДИА-ЗАПРОСЫ
   ============================================================ */
    @media (max-width:768px) {
      [data-content] {
        padding-left: 1rem;
        padding-right: 1rem;
      }

      .at-a-glance {
        grid-template-columns: 1fr;
      }

      .at-a-glance>div {
        border-right: none;
        border-bottom: 1px solid var(--muted);
      }

      .at-a-glance>div:last-child {
        border-bottom: none;
      }

      .dos-donts {
        grid-template-columns: 1fr;
      }

      .card-grid {
        grid-template-columns: 1fr;
      }

      .glossary-term {
        flex-direction: column;
        gap: 4px;
      }

      .toc-list {
        column-count: 1;
      }

      .comparison {
        overflow-x: auto;
      }

      .comparison table {
        min-width: 520px;
      }

      .footer-cols {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
      }

      .site-header .header-inner {
        justify-content: center;
        text-align: center;
      }

      .header-meta {
        justify-content: center;
      }
    }

    @media (max-width:480px) {
      .footer-cols {
        grid-template-columns: 1fr;
      }

      .footer-bar {
        flex-direction: column;
        align-items: flex-start;
      }

      .site-logo img {
        width: 180px;
      }
    }

    @media (prefers-reduced-motion:reduce) {
      * {
        transition: none !important;
        scroll-behavior: auto !important;
      }
    }
    
figure {
  margin: 2rem auto;
  max-width: 100%;
}

[data-content] figure {
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
}

img.article-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: var(--radius, 10px);
  border: 1px solid var(--muted, #e6e2ec);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(21,19,26,0.04), 0 2px 6px rgba(21,19,26,0.05));
  background: var(--surface, #ffffff);
  /* плавная загрузка lazy-картинок */
  object-fit: contain;
}

/* Подпись под изображением */
figure figcaption,
[data-content] figcaption {
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted-text, #6b6577);
  margin-top: 0.7em;
  padding: 0 0.5rem;
  font-style: italic;
}

/* Hero-изображение: усиленная тень, без рамки (контекст даёт H1) */
img.hero-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border: none;
  border-radius: var(--radius, 10px);
  box-shadow: var(--shadow-md, 0 2px 8px rgba(21,19,26,0.06), 0 8px 24px rgba(21,19,26,0.07));
}

/* Hero figure не имеет figcaption — убираем лишний нижний отступ */
.hero figure {
  margin-bottom: 0;
}

/* ============================================================
   Адаптивность изображений
   ============================================================ */
@media (max-width: 768px) {
  figure {
    margin: 1.5rem auto;
  }
  figure figcaption,
  [data-content] figcaption {
    font-size: 0.82rem;
  }
}

@media (max-width: 480px) {
  img.article-image {
    border-radius: 8px;
  }
  figure {
    margin: 1.25rem auto;
  }
}

/* Уважение к настройкам пониженной анимации */
@media (prefers-reduced-motion: reduce) {
  img.article-image,
  img.hero-image {
    transition: none !important;
  }
}
