/* =========================================================================
   Восстановление поискового трафика (/uslugi/seo/vosstanovlenie-trafika/)
   Первый экран — схема «расследование падения»: график визитов, проверка причин
   по очереди, найденная причина и возврат после правки. Причины падения карточками,
   пример итога диагностики, сравнение с SEO-аудитом.
   Всё видно без JS и при «уменьшить движение»: поведение схемы — assets/js/scenes/trafficdrop.js.
   ========================================================================= */

/* ---------- схема «расследование падения» ---------- */
.drop { 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); }
.drop-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; color: var(--fog); font-size: 0.85rem; }
.drop-top > span:first-child { color: #eef2fb; font-weight: 600; }
.drop-key { display: inline-flex; align-items: center; gap: 6px; }
.drop-key i { width: 14px; height: 3px; border-radius: 2px; margin-left: 8px; }
.drop-key i:first-child { margin-left: 0; }
.drop-key .k-ya { background: var(--signal); }
.drop-key .k-g { background: var(--flow-light); }
.drop-chart { width: 100%; height: auto; overflow: visible; }
.drop-grid line { stroke: var(--night-line); stroke-width: 1; }
.drop-mark { stroke: var(--leak); stroke-width: 1.5; stroke-dasharray: 4 5; }
.drop-date { font-family: var(--font-text); font-size: 13px; font-weight: 600; fill: #ff8a7d; }
.drop-line { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.drop-line--ya { stroke: var(--signal); }
.drop-line--g { stroke: var(--flow-light); stroke-width: 2.5; }
.drop-back { fill: none; stroke: var(--ok); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 5 6; }
.drop-back--g { stroke-width: 2.5; opacity: 0.75; }
.drop-back-l { font-family: var(--font-text); font-size: 12.5px; font-weight: 600; fill: var(--ok); }
.drop-scan { stroke: #eef2fb; stroke-width: 2; opacity: 0; }

.drop-checks { list-style: none; display: grid; gap: 6px; margin: 0; padding: 0; counter-reset: dc; }
.drop-checks li { position: relative; display: grid; grid-template-columns: 22px minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 4px 10px; align-items: center; padding: 8px 12px; border-radius: 12px; background: var(--night-2); border: 1px solid var(--night-line); font-size: 0.84rem; line-height: 1.3; transition: border-color 0.35s, background-color 0.35s, opacity 0.35s; }
.drop-checks li::before { content: ""; justify-self: center; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--fog-dim); box-sizing: border-box; }
.drop-checks b { color: #eef2fb; font-weight: 600; }
.drop-checks span { color: var(--fog); }
.drop-checks .is-ok::before { border: 0; background: var(--night-3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.3l2.2 2.2 4.6-4.8' fill='none' stroke='%232fbf8a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.drop-checks .is-hit { border-color: rgba(255, 107, 91, 0.55); background: rgba(255, 107, 91, 0.1); }
.drop-checks .is-hit::before { border: 0; background: var(--leak); box-shadow: 0 0 0 4px rgba(255, 107, 91, 0.2); }
.drop-checks .is-hit span { color: #ffb4ab; }
.drop-checks .is-checking { border-color: var(--signal); background: rgba(255, 176, 32, 0.08); }
.drop-checks .is-checking::before { border-color: var(--signal); border-right-color: transparent; animation: drop-spin 0.7s linear infinite; }
.drop-checks .is-wait span { opacity: 0; }
.drop-checks .is-wait { opacity: 0.55; }

.drop-found { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; background: #fff; color: var(--ink); transition: opacity 0.4s, transform 0.4s var(--ease-out); }
.drop-found b { font-weight: 600; line-height: 1.35; font-size: 0.92rem; }
.drop-found .prio { padding: 3px 10px; border-radius: 999px; background: #ffe9e6; color: #b3271a; font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.drop.is-live .drop-found.is-hidden { opacity: 0; transform: translateY(8px); }
.drop-note { margin: 0; color: var(--fog-dim); font-size: 0.82rem; }
@keyframes drop-spin { to { transform: rotate(360deg); } }

/* ---------- причины падения ---------- */
.causes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cause { position: relative; display: grid; gap: 10px; align-content: start; padding: clamp(22px, 2.6vw, 30px); border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--line); }
.cause-n { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--night-3); color: var(--signal); font-family: var(--font-display); font-weight: 600; font-size: 1rem; }
.cause h3 { font-size: var(--step-1); font-weight: 650; line-height: 1.3; }
.cause p { margin: 0; color: var(--fg-soft); }
.cause .cause-where { margin-top: 4px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 0.92rem; }
.cause .cause-where b { color: var(--fg); font-weight: 600; }

/* ---------- пример итога диагностики ---------- */
.diag { display: grid; gap: 14px; padding: clamp(18px, 2.6vw, 28px); border-radius: var(--radius-lg); background: var(--night); color: #eef2fb; box-shadow: 0 40px 80px -40px rgba(11, 19, 36, 0.55); }
.diag-top { display: flex; justify-content: space-between; gap: 12px; color: var(--fog); font-size: 0.85rem; }
.diag-top span:first-child { color: #eef2fb; font-weight: 650; }
.diag-facts { display: grid; gap: 8px; margin: 0; }
.diag-facts div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 4px 14px; padding: 10px 12px; border-radius: 12px; background: var(--night-2); border: 1px solid var(--night-line); }
.diag-facts dt { color: var(--fog); font-size: 0.85rem; }
.diag-facts dd { margin: 0; font-size: 0.92rem; line-height: 1.4; }
.diag-plan { list-style: none; display: grid; gap: 8px; margin: 0; padding: 0; }
.diag-plan li { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 11px 12px; border-radius: 12px; background: #fff; color: var(--ink); }
.diag-plan b { font-weight: 600; line-height: 1.35; font-size: 0.92rem; }
.diag-plan small { color: var(--ink-soft); font-size: 0.82rem; white-space: nowrap; }
.diag-plan .prio { justify-self: start; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.diag-plan .p-hi .prio { background: #ffe9e6; color: #b3271a; }
.diag-plan .p-mid .prio { background: var(--signal-soft); color: #8a5200; }
.diag-note { margin: 0; color: var(--fog-dim); font-size: 0.82rem; }

/* ---------- кейсы: подписи столбиков шире ---------- */
.vt-bars .case-row .bar { grid-template-columns: 104px minmax(0, 1fr) auto; }

/* ---------- цена: сравнение с SEO-аудитом и продолжение ---------- */
.vs-h { margin: 0 0 12px; font-weight: 650; }
.vs-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; line-height: 1.4; }
.vs-table th, .vs-table td { padding: 10px 12px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.vs-table thead th { border-top: 0; color: var(--fg-dim); font-size: 0.82rem; font-weight: 600; }
.vs-table thead th:nth-child(2) { color: var(--flow-ink); }
.vs-table tbody th { width: 28%; color: var(--fg-dim); font-weight: 600; font-size: 0.86rem; }
.vs-table td { color: var(--fg-soft); }
.vs-table td:nth-child(2) { color: var(--fg); font-weight: 500; }
.forks--after { margin-top: 20px; }
.forks--after .fork a { font-size: 0.95rem; }

/* ---------- адаптив ---------- */
@media (max-width: 1080px) {
  .drop { margin: 0 auto; }
  .causes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .causes { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .drop-checks li { grid-template-columns: 22px minmax(0, 1fr); }
  .drop-checks span { grid-column: 2; font-size: 0.8rem; }
  .diag-facts div { grid-template-columns: minmax(0, 1fr); }
  .diag-plan li { grid-template-columns: minmax(0, 1fr) auto; }
  .diag-plan .prio { grid-column: 1 / -1; }
  .vt-bars .case-row .bar { grid-template-columns: 92px minmax(0, 1fr) auto; }
  .vs-table th, .vs-table td { padding: 9px 6px; font-size: 0.86rem; }
}
@media (max-width: 420px) {
  .hero .h1--long { font-size: 8vw; }
}
@media (prefers-reduced-motion: reduce) {
  .drop-checks .is-checking::before { animation: none; }
}
