/* =========================================================================
   Редизайн сайта (/uslugi/razrabotka-i-dorabotka-sajtov/redizajn-sajta/)
   Первый экран — схема «до и после»: одна страница услуги в одном окне браузера,
   слева старый вид, справа новый, адрес тот же; под окном — что сохранилось.
   Карта страниц (пример) в «Что входит», шаги SEO-части, сроки в блоке цены.
   Таблицу «Редизайн, новый сайт или доработки» рисуют правила .fmt-table страницы
   создания сайтов: на странице подключены оба файла (pages/sozdanie-sajtov.css и этот).
   Всё видно без JS и при «уменьшить движение»: поведение схемы — assets/js/scenes/redesign.js.
   ========================================================================= */

/* ---------- схема «до и после» ---------- */
.rd { margin: 0 0 0 auto; width: 100%; max-width: 520px; display: grid; gap: 14px; padding: clamp(16px, 2.2vw, 24px); border-radius: var(--radius-lg); background: linear-gradient(160deg, rgba(24, 38, 74, 0.72), rgba(17, 28, 51, 0.92)); border: 1px solid var(--line); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.6); }
.rd-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; color: var(--fog); font-size: 0.85rem; }
.rd-top > span:first-child { color: #eef2fb; font-weight: 600; }
.rd-same { color: var(--ok); font-weight: 600; }
.rd-browser { box-shadow: none; }

/* окно: два слоя, новый открывается от линии разреза (--cut — где она стоит) */
.rd-view { --cut: 50%; position: relative; height: 236px; overflow: hidden; background: #f7f8fb; }
.rd-old, .rd-new { position: absolute; inset: 0; display: grid; align-content: start; gap: 10px; padding: 12px 14px; }
.rd-old { background: #eceae4; }
.rd-new { background: #fff; clip-path: inset(0 0 0 var(--cut)); }
.rd-cut { position: absolute; top: 0; bottom: 0; left: var(--cut); width: 2px; margin-left: -1px; background: var(--signal); box-shadow: 0 0 0 3px rgba(255, 176, 32, 0.25); }
.rd-lbl { position: absolute; top: 10px; padding: 2px 8px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.rd-lbl--old { right: calc(100% - var(--cut) + 8px); background: #6b6a66; color: #fff; }
.rd-lbl--new { left: calc(var(--cut) + 8px); background: var(--ok); color: #06291c; }

/* старый вид: длинное меню, баннер, мелкий текст, форма внизу */
.rd-o-bar { display: flex; align-items: center; gap: 5px; padding-bottom: 8px; border-bottom: 1px solid #cfccc3; }
.rd-o-bar b { width: 34px; height: 12px; margin-right: 4px; border-radius: 2px; background: #8d8a80; }
.rd-o-bar span { flex: 1; height: 5px; border-radius: 2px; background: #b4b0a6; }
.rd-o-banner { display: grid; gap: 6px; padding: 14px 12px; border-radius: 3px; background: linear-gradient(90deg, #9c968a, #c0b9aa); }
.rd-o-banner i { height: 8px; width: 70%; border-radius: 2px; background: rgba(255, 255, 255, 0.7); }
.rd-o-banner i + i { width: 45%; }
.rd-o-text { display: grid; gap: 5px; }
.rd-o-text i { height: 4px; border-radius: 2px; background: #bdb9ae; }
.rd-o-text i:nth-child(3n) { width: 82%; }
.rd-o-form { display: flex; align-items: center; gap: 6px; }
.rd-o-form i { flex: 1; height: 12px; border: 1px solid #b4b0a6; background: #fff; }
.rd-o-form b { padding: 1px 6px; border: 1px solid #8d8a80; background: #dedbd2; color: #5c5a54; font-size: 0.58rem; font-weight: 600; }

/* новый вид: короткое меню, заявка на первом экране, карточки с ценами */
.rd-n-bar { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid #e6eaf2; }
.rd-n-bar b { width: 28px; height: 12px; margin-right: 6px; border-radius: 4px; background: var(--flow); }
.rd-n-bar span { width: 34px; height: 5px; border-radius: 3px; background: #c9d3e6; }
.rd-n-bar em { margin-left: auto; padding: 3px 9px; border-radius: 999px; background: var(--signal); color: var(--ink); font-size: 0.62rem; font-style: normal; font-weight: 700; }
.rd-n-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px; align-items: center; padding: 6px 0; }
.rd-n-hero > div { display: grid; gap: 7px; justify-items: start; }
.rd-n-hero i { width: 100%; height: 6px; border-radius: 3px; background: #d5dcea; }
.rd-n-hero i.h { height: 11px; background: var(--ink); }
.rd-n-hero i.s { width: 70%; }
.rd-n-hero em { margin-top: 4px; padding: 5px 11px; border-radius: 999px; background: var(--signal); color: var(--ink); font-size: 0.66rem; font-style: normal; font-weight: 700; white-space: nowrap; }
.rd-n-pic { height: 74px; border-radius: 12px; background: linear-gradient(140deg, #8eabff, #4c7dff); }
.rd-n-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rd-n-cards div { display: grid; gap: 5px; padding: 8px; border-radius: 10px; border: 1px solid #e3e8f1; }
.rd-n-cards i { height: 5px; border-radius: 3px; background: #d5dcea; }
.rd-n-cards i:first-child { width: 70%; height: 7px; background: #8a94ad; }
.rd-n-cards small { color: var(--ink); font-size: 0.64rem; font-weight: 700; white-space: nowrap; }

.rd-keep { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.rd-keep li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 8px; border-radius: 999px; background: var(--night-3); color: #eef2fb; font-size: 0.78rem; line-height: 1.2; transition: opacity 0.35s; }
.rd-keep li::before { content: ""; width: 14px; height: 14px; flex: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.3l2.4 2.4 5-5.2' fill='none' stroke='%232fbf8a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.rd.is-live .rd-keep .is-wait { opacity: 0.25; }
.rd-note { margin: 0; color: var(--fog-dim); font-size: 0.82rem; }

/* ---------- пример карты страниц ---------- */
.rd-map { display: grid; gap: 14px; padding: clamp(18px, 2.6vw, 28px); border-radius: var(--radius-lg); background: var(--paper-2); color: var(--ink); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.6); }
.rd-map-top { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-soft); font-size: 0.85rem; }
.rd-map-top span:first-child { color: var(--ink); font-weight: 650; }
.rd-map-rows { list-style: none; display: grid; gap: 8px; margin: 0; padding: 0; }
.rd-map-rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; padding: 10px 12px; border-radius: 12px; background: var(--paper); border: 1px solid var(--paper-line); }
.rd-map-rows code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-text); font-size: 0.86rem; font-weight: 600; }
.rd-map-rows b { justify-self: end; padding: 2px 9px; border-radius: 999px; background: var(--signal-soft); color: #8a5200; font-size: 0.74rem; font-weight: 700; white-space: nowrap; }
.rd-map-rows b.is-keep { background: rgba(47, 191, 138, 0.16); color: #146b4b; }
.rd-map-rows b.is-new { background: #e6edff; color: var(--flow-ink); }
.rd-map-rows small { grid-column: 1 / -1; color: var(--ink-soft); font-size: 0.82rem; line-height: 1.4; }
.rd-map-rule { display: grid; gap: 4px; padding: 11px 12px; border-radius: 12px; background: var(--night); color: #eef2fb; font-size: 0.9rem; line-height: 1.4; }
.rd-map-rule b { color: var(--signal); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.rd-map-note { margin: 0; color: var(--ink-soft); font-size: 0.82rem; }

/* ---------- SEO-часть: четыре шага ---------- */
.rd-steps { list-style: none; counter-reset: rs; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; }
.rd-steps li { counter-increment: rs; display: grid; gap: 10px; align-content: start; padding: 22px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--line); }
.rd-steps li::before { content: counter(rs); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--signal-soft); color: #8a5200; font-weight: 700; }
.rd-steps b { font-weight: 650; font-size: 1.05rem; line-height: 1.3; }
.rd-steps span { color: var(--fg-soft); font-size: 0.95rem; line-height: 1.45; }
.rd-seo-note { margin: 24px 0 0; max-width: 60rem; color: var(--fg-soft); }

/* ---------- цена: сроки и соседние варианты ---------- */
.rd-terms-h { margin: 0 0 12px; font-weight: 650; }
.rd-terms dl { display: grid; gap: 0; margin: 0; }
.rd-terms dl div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.rd-terms dt { color: var(--fg-soft); }
.rd-terms dd { margin: 0; color: var(--fg); font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; white-space: nowrap; }
.rd-forks { margin-top: 20px; }

/* ---------- адаптив ---------- */
@media (max-width: 1180px) {
  .rd-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .rd { margin: 0 auto; }
}
@media (max-width: 640px) {
  .rd-view { height: 214px; }
  .rd-n-hero { grid-template-columns: minmax(0, 1fr); }
  .rd-n-pic { display: none; }
  .rd-o-bar span:nth-child(n+6) { display: none; }
  .rd-steps { grid-template-columns: minmax(0, 1fr); }
  .rd-steps li { grid-template-columns: 32px minmax(0, 1fr); column-gap: 14px; row-gap: 4px; padding: 18px; }
  .rd-steps li::before { grid-row: span 2; }
  .rd-terms dl div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .rd-terms dd { white-space: normal; }
}
