/* Оформление страниц сайта: шапка, обложка, карточки, подвал.
   Общее для главной и разделов. */
    /* ---------- Шапка ---------- */
    header.top {
      position: sticky; top: 0; z-index: 50;
      background: rgba(12, 9, 8, .72); backdrop-filter: blur(16px) saturate(140%);
      border-bottom: 1px solid var(--line);
    }
    .nav { display: flex; align-items: center; justify-content: space-between; gap: 22px; height: 70px; }
    .nav-links { display: flex; gap: 26px; align-items: center; }
    .nav-links a { color: var(--muted); font-size: 14.5px; font-weight: 500; transition: color .18s; position: relative; }
    .nav-links a::after {
      content: ""; position: absolute; left: 0; right: 100%; bottom: -5px; height: 1.5px;
      background: var(--grad); transition: right .25s var(--ease); border-radius: 2px;
    }
    .nav-links a:hover { color: var(--text); }
    .nav-links a:hover::after { right: 0; }
    .nav-cta { display: flex; gap: 10px; align-items: center; }

    /* ---------- Hero ---------- */
    .hero { padding: 92px 0 72px; position: relative; }
    .hero h1 { font-size: clamp(42px, 7.2vw, 82px); margin: 24px 0 20px; max-width: 15ch; }
    .hero .lead { font-size: clamp(16.5px, 2.2vw, 20px); color: var(--muted); max-width: 56ch; }
    .hero-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 36px; }
    .stats { display: flex; flex-wrap: wrap; gap: 46px; margin-top: 58px; padding-top: 34px; border-top: 1px solid var(--line); }
    .stat .num { font-size: 34px; font-weight: 800; letter-spacing: -.035em; }
    .stat .lbl { color: var(--muted); font-size: 13.5px; margin-top: 2px; }

    /* ---------- Макет редактора ---------- */
    .preview { margin-top: 62px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
    .preview-bar { display: flex; align-items: center; gap: 8px; padding: 13px 18px; border-bottom: 1px solid var(--line); background: rgba(0, 0, 0, .3); }
    .preview-bar i { width: 11px; height: 11px; border-radius: 50%; background: #3a2d28; }
    .preview-bar i:first-child { background: #ff6b60; }
    .preview-bar i:nth-child(2) { background: #ffab3d; }
    .preview-bar i:nth-child(3) { background: #58d68d; }
    .preview-bar .ttl { margin-left: 12px; font: 12px "JetBrains Mono", monospace; color: var(--dim); }
    .preview-body { display: grid; grid-template-columns: 1fr 258px; min-height: 356px; }
    .stage { padding: 26px; display: flex; flex-direction: column; gap: 16px; border-right: 1px solid var(--line); }
    .video-box {
      flex: 1; border-radius: 14px; position: relative; overflow: hidden; display: grid; place-items: center;
      background:
        repeating-linear-gradient(48deg, rgba(255,255,255,.028) 0 14px, transparent 14px 28px),
        linear-gradient(135deg, rgba(255,111,77,.36), rgba(255,171,61,.2) 60%, rgba(0,0,0,.4));
    }
    /* Виньетка — делает картинку «киношной» */
    .video-box::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 60% at 50% 45%, transparent, rgba(0,0,0,.5)); }
    .video-box .play {
      width: 66px; height: 66px; border-radius: 50%; position: relative; z-index: 2;
      background: rgba(12,9,8,.5); backdrop-filter: blur(6px);
      display: grid; place-items: center; border: 1px solid rgba(255,255,255,.3);
      box-shadow: 0 8px 30px rgba(0,0,0,.45);
    }
    .video-box .play::before { content: ""; border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent #fff; margin-left: 5px; }
    .ratio-tag {
      position: absolute; top: 14px; left: 14px; z-index: 2;
      font: 500 11.5px "JetBrains Mono", monospace; color: #fff;
      background: rgba(12,9,8,.6); border: 1px solid rgba(255,255,255,.2);
      padding: 4px 10px; border-radius: 8px; backdrop-filter: blur(6px);
    }
    .timeline { height: 50px; border-radius: 12px; background: rgba(0,0,0,.34); border: 1px solid var(--line); position: relative; overflow: hidden; }
    .timeline .track { position: absolute; inset: 0; display: flex; gap: 3px; padding: 7px; }
    .timeline .track span { flex: 1; border-radius: 3px; background: linear-gradient(180deg, rgba(255,138,92,.5), rgba(255,111,77,.22)); }
    .timeline .sel { position: absolute; top: 0; bottom: 0; left: 33%; width: 31%; border-radius: 9px; border: 2px solid var(--accent-2); background: rgba(255,171,61,.14); box-shadow: 0 0 22px rgba(255,171,61,.3); }
    .side { padding: 22px; display: flex; flex-direction: column; gap: 19px; background: rgba(0,0,0,.22); }
    .side h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .13em; color: var(--dim); font-weight: 600; }
    .chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
    .chip { font: 500 11.5px "JetBrains Mono", monospace; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); }
    .chip.on { color: #2a1206; background: var(--grad); background-origin: border-box; border-color: transparent; font-weight: 600; }

    /* ---------- Секции ---------- */
    section { padding: 96px 0; }
    .sec-head { max-width: 640px; margin-bottom: 52px; }
    .sec-head h2 { font-size: clamp(30px, 4.6vw, 48px); margin: 14px 0 16px; }
    .sec-head p { color: var(--muted); font-size: 17.5px; }

    /* Возможности */
    .features { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
    .feature { padding: 28px; transition: transform .25s var(--ease), border-color .25s, background .25s; }
    .feature:hover { transform: translateY(-5px); border-color: rgba(255,111,77,.42); background: var(--surface-2); }
    .feature .ic {
      width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 20px;
      background: rgba(255,111,77,.13); border: 1px solid rgba(255,111,77,.28); color: var(--accent-soft);
      transition: box-shadow .25s;
    }
    .feature:hover .ic { box-shadow: 0 0 26px rgba(255,111,77,.26); }
    .feature .ic svg { width: 23px; height: 23px; }
    .feature h3 { font-size: 20px; margin-bottom: 9px; }
    .feature p { color: var(--muted); font-size: 14.8px; }
    .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
    .tags span { font: 500 11.5px "JetBrains Mono", monospace; color: var(--accent-ink); background: rgba(255,171,61,.1); border: 1px solid rgba(255,171,61,.24); padding: 3px 9px; border-radius: 7px; }

    /* Вопросы */
    .faq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
    .faq { padding: 22px 24px; transition: border-color .25s, background .25s; }
    .faq:hover { border-color: var(--line-2); background: var(--surface-2); }
    .faq b { display: block; font-size: 15.5px; font-weight: 700; margin-bottom: 8px; }
    .faq p { color: var(--muted); font-size: 14.5px; }

    /* Как работает */
    .steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); gap: 16px; counter-reset: step; }
    .step { padding: 28px; position: relative; transition: transform .25s var(--ease), border-color .25s; }
    .step:hover { transform: translateY(-4px); border-color: var(--line-2); }
    .step::before {
      counter-increment: step; content: "0" counter(step);
      /* Положение задаём явно: так номер не зависит от других правил для ::before */
      position: static; display: block;
      font-family: Manrope, sans-serif; font-weight: 800; font-size: 38px; line-height: 1.15;
      color: transparent; -webkit-text-stroke: 1.2px var(--accent);
      margin-bottom: 14px; opacity: .85;
    }
    .step h3 { font-size: 18px; margin-bottom: 8px; }
    .step p { color: var(--muted); font-size: 14.2px; }

    /* Призыв к действию */
    .cta {
      text-align: center; border-radius: var(--radius-lg); padding: 76px 26px; position: relative; overflow: hidden;
      background:
        radial-gradient(34rem 17rem at 50% -18%, rgba(255,111,77,.26), transparent 70%),
        var(--surface);
    }
    .cta h2 { font-size: clamp(29px, 4.6vw, 46px); margin-bottom: 16px; }
    .cta p { color: var(--muted); font-size: 17.5px; max-width: 48ch; margin: 0 auto 32px; }

    /* Подвал */
    footer.ft { border-top: 1px solid var(--line); padding: 44px 0 56px; margin-top: 46px; }
    .ft-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 22px; align-items: center; color: var(--muted); font-size: 14px; }
    .ft-links { display: flex; gap: 24px; flex-wrap: wrap; }
    .ft-links a { transition: color .18s; }
    .ft-links a:hover { color: var(--text); }

    @media (max-width: 880px) {
      .nav-links { display: none; }
      .preview-body { grid-template-columns: 1fr; }
      .stage { border-right: none; border-bottom: 1px solid var(--line); }
      .stats { gap: 30px; }
      section { padding: 72px 0; }
      .hero { padding: 64px 0 56px; }
    }

    /* Снимок или видео: содержимое ставит администратор в режиме правки. */
    .shot { margin: 0 auto; max-width: 940px; }
    .shot img, .shot video { display: block; width: 100%; height: auto; border-radius: var(--radius);
                             border: 1px solid var(--line); background: var(--bg-1); }
    .shot figcaption { margin-top: 12px; text-align: center; font-size: 14px; color: var(--dim); }

/* Текущий раздел в шапке подсвечен. */
.nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"]::after { width: 100%; }

/* Шапка раздела: заголовок страницы над содержимым. */
.page-head { padding: 104px 0 10px; }
.page-head .wrap { max-width: var(--maxw); }
.page-head h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.08; margin: 10px 0 14px; }
.page-head p { color: var(--muted); font-size: 17.5px; max-width: 680px; }

/* Карточки-ссылки на разделы — на главной вместо вырезанных секций. */
.sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.sec-card { display: block; padding: 24px; border-radius: var(--radius); transition: transform .2s var(--ease), border-color .2s; }
.sec-card:hover { transform: translateY(-3px); border-color: var(--line-2); }
.sec-card h3 { font-size: 18px; margin-bottom: 8px; }
.sec-card p { color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.sec-card .go { display: inline-block; margin-top: 14px; color: var(--accent-ink); font-weight: 600; font-size: 14px; }

/* ---------- Подсайты: страницы, заведённые в админ-панели ---------- */
.sub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.sub-block { padding: 24px; }
.sub-block h3 { font-size: 18px; margin-bottom: 9px; }
.sub-block p { color: var(--muted); font-size: 15px; line-height: 1.65; }
.sub-block img { display: block; width: 100%; height: auto; margin-top: 14px; border-radius: 12px; border: 1px solid var(--line); }
.cms-sec { padding: 10px 0 76px; }

/* ---------- Подробная инструкция на странице «Как работает» ---------- */
.guide { padding: 44px 0; }
.guide:nth-of-type(even) .guide-row { direction: rtl; }
.guide:nth-of-type(even) .guide-row > * { direction: ltr; }
.guide-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 40px; align-items: center; }
@media (max-width: 900px) { .guide-row { grid-template-columns: 1fr; gap: 24px; } }

.guide-n {
  display: inline-block; font: 700 12px "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink);
  border: 1px solid rgba(255, 171, 61, .3); background: rgba(255, 171, 61, .1);
  padding: 4px 11px; border-radius: 999px; margin-bottom: 14px;
}
.guide-text h2 { font-size: clamp(24px, 3.4vw, 34px); margin-bottom: 20px; }
.guide-list { list-style: none; display: flex; flex-direction: column; gap: 16px; counter-reset: gl; }
.guide-list li { position: relative; padding-left: 34px; counter-increment: gl; }
.guide-list li::before {
  content: counter(gl); position: absolute; left: 0; top: 1px;
  width: 23px; height: 23px; border-radius: 50%; display: grid; place-items: center;
  font: 700 12px Manrope, sans-serif; color: #2a1206;
  background: var(--grad); background-origin: border-box;
}
.guide-list b { display: block; font-size: 16px; margin-bottom: 4px; }
.guide-list p { color: var(--muted); font-size: 15px; line-height: 1.6; }

.guide-pic { margin: 0; }
.guide-pic img {
  display: block; width: 100%; height: auto; border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--bg-1);
}

/* Клавиши */
.keys { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.key { display: flex; align-items: center; gap: 9px; padding: 16px 18px; flex-wrap: wrap; }
.key kbd {
  font: 600 12.5px "JetBrains Mono", ui-monospace, monospace; color: var(--text);
  background: rgba(0, 0, 0, .34); border: 1px solid var(--line-2);
  border-bottom-width: 2px; border-radius: 7px; padding: 5px 9px;
}
.key span { color: var(--muted); font-size: 14.5px; margin-left: 4px; }

/* Важное примечание */
.note-big { padding: 28px 30px; }
.note-big h2 { font-size: 22px; margin-bottom: 12px; }
.note-big p { color: var(--muted); font-size: 15.5px; line-height: 1.7; }
.note-big p + p { margin-top: 12px; }
.note-big .warn { color: var(--text); border-left: 3px solid var(--accent); padding-left: 14px; }

/* Кнопки панели таймлайна: значок, название, что делает. */
.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 12px; }
.tool {
  display: flex; align-items: flex-start; gap: 14px; padding: 15px 17px;
  border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
}
.tool-ic {
  flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px;
  color: var(--text); background: rgba(0, 0, 0, .3); border: 1px solid var(--line-2);
}
.tool-ic svg { width: 20px; height: 20px; }
.tool b { display: block; font-size: 15px; margin-bottom: 3px; }
.tool p { color: var(--muted); font-size: 14px; line-height: 1.55; }
/* Красим так же, как в самом редакторе: удаление — красным, магнит — активный. */
.tool.danger .tool-ic { color: var(--danger); border-color: rgba(255, 107, 96, .35); }
.tool.on .tool-ic { color: #2a1206; background: var(--grad); background-origin: border-box; border-color: transparent; }
.tool.wide { grid-column: 1 / -1; }
.tool.wide .tool-ic { color: #2a1206; background: var(--grad); background-origin: border-box; border-color: transparent; }

/* Подпись под схемой: раньше она была внутри картинки и не читалась. */
.legend { display: flex; flex-direction: column; gap: 7px; margin-top: 14px; }
.legend > span { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.legend b { color: var(--text); font-weight: 700; }
.lg { flex: none; width: 16px; height: 16px; border-radius: 4px; }
.lg-handle { background: #fff; width: 7px; height: 18px; border-radius: 3px; }
.lg-head { background: #ff6f4d; width: 3px; height: 18px; border-radius: 2px; }
.lg-aud { background: #16313a; border: 1px solid rgba(110, 200, 220, .45); }
.lg-tr { background: rgba(255, 171, 61, .25); border: 1px dashed #ffab3d; }
.lg-pr { background: rgba(255, 255, 255, .06); border: 1px solid var(--line-2); }


/* ---------- Ширина текста на широком экране ---------- */
/* Колонка стала шире, но строки во весь монитор читать неудобно:
   у смысловых абзацев свой предел, у сеток с карточками — нет. */
.page-head p { max-width: 70ch; }
.sec-head p { max-width: 70ch; }
.guide-text { max-width: 64ch; }
.guide-row { gap: clamp(32px, 5vw, 72px); }
.note-big { max-width: 78ch; }
.legend > span { max-width: 72ch; }
