/* =========================================================================
   Ведение Яндекс Директа (K03): блоки страницы
   Общие токены и компоненты — в site.css. Здесь только то, чего там нет.
   ========================================================================= */

/* ---------- первый экран: панель недели */
.wk-stage { min-height: 560px; }

/* ---------- ссылка из симптома на блок с решением */
.vd-go { display: inline-flex; align-items: center; gap: 8px; justify-self: start; font-weight: 600; font-size: 0.95rem; text-decoration: none; }
.vd-go::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform 0.3s var(--ease-out); }
.vd-go:hover::after { transform: rotate(45deg) translate(2px, 0); }

/* ---------- первые 14 дней */
.vd-gantt { position: relative; }
.vd-gantt .gantt-days, .vd-gantt .gantt-track { grid-template-columns: repeat(14, 1fr); gap: 3px; }
.vd-gantt .gantt-track::before { background: repeating-linear-gradient(90deg, var(--surface-2) 0 calc(100% / 14 - 3px), transparent calc(100% / 14 - 3px) calc(100% / 14)); }
.vd-gantt .gantt-row > span small { display: block; color: var(--fg-dim); font-size: 0.82rem; font-weight: 400; }
.vd-gantt-now { position: absolute; left: 0; top: -8px; bottom: -4px; width: 2px; background: var(--signal); border-radius: 2px; pointer-events: none; visibility: hidden; z-index: 2; box-shadow: 0 0 0 4px rgba(255, 176, 32, 0.15); }
.vd-gantt-now.is-end span { left: auto; right: 8px; }
.vd-gantt-now span { position: absolute; left: 8px; top: -20px; white-space: nowrap; padding: 2px 8px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 0.75rem; font-weight: 600; }

/* ---------- календарь ритма */
.vd-rhythm { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.vd-rh-keys { display: grid; gap: 12px; }
.vd-rh-col { --c: var(--flow-light); padding: 18px 20px; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface); transition: border-color 0.3s, background-color 0.3s; }
.vd-rh-col[data-rh="week"] { --c: var(--signal); }
.vd-rh-col[data-rh="month"] { --c: var(--ok); }
.vd-rh-col.is-on { border-color: var(--c); }
.vd-rh-key { display: inline-flex; align-items: center; gap: 10px; padding: 4px 0; border: 0; background: none; color: var(--fg); font-weight: 650; font-size: var(--step-1); cursor: pointer; }
.vd-rh-key i { width: 12px; height: 12px; border-radius: 4px; background: var(--c); box-shadow: 0 0 0 0 transparent; transition: box-shadow 0.3s; }
.vd-rh-key[aria-pressed="true"] i { box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.12); }
.vd-rh-key::after { content: "показать"; margin-left: 4px; font-size: 0.78rem; font-weight: 500; color: var(--fg-dim); }
.vd-rh-key[aria-pressed="true"]::after { content: "скрыть"; }
.vd-rh-col ul { list-style: none; display: grid; gap: 6px; margin-top: 10px; color: var(--fg-soft); font-size: 0.97rem; line-height: 1.45; }
.vd-rh-col li b { display: inline-block; min-width: 2.4em; color: var(--fg); font-weight: 600; }

.vd-cal { display: grid; gap: 6px; padding: clamp(14px, 2vw, 22px); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.vd-cal-row { display: grid; grid-template-columns: 46px repeat(5, minmax(0, 1fr)); gap: 6px; align-items: stretch; }
.vd-cal-head span { color: var(--fg-dim); font-size: 0.8rem; font-weight: 600; text-align: center; }
.vd-cal-row .wk { align-self: center; color: var(--fg-dim); font-size: 0.75rem; line-height: 1.2; }
.vd-day { display: grid; align-content: start; justify-items: start; gap: 5px; min-height: 78px; padding: 9px 8px; border-radius: 12px; background: var(--surface-2); border: 1px solid transparent; transition: background-color 0.35s, border-color 0.35s, opacity 0.35s; }
.vd-day .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--flow-light); transition: opacity 0.3s; }
.vd-day em { font-style: normal; font-size: 0.74rem; font-weight: 600; line-height: 1.2; padding: 3px 7px; border-radius: 6px; max-width: 100%; white-space: nowrap; transition: opacity 0.3s; }
.vd-day em.w { background: rgba(255, 176, 32, 0.16); color: #ffd38a; }
.vd-day em.m { background: rgba(47, 191, 138, 0.18); color: #86e3bf; }
.vd-day.is-done { background: rgba(76, 125, 255, 0.12); }
.vd-day.is-now { border-color: var(--signal); background: #24345e; box-shadow: 0 0 0 4px rgba(255, 176, 32, 0.14); }
.vd-cal[data-focus="day"] em, .vd-cal[data-focus="week"] .dot, .vd-cal[data-focus="week"] em.m, .vd-cal[data-focus="month"] .dot, .vd-cal[data-focus="month"] em.w { opacity: 0.12; }
.vd-cal-now { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 10px 0 0; max-width: none; color: var(--fg-soft); font-size: 0.9rem; }
.vd-cal-now b { color: var(--fg); font-weight: 600; }
.vd-cal-now .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px rgba(255, 176, 32, 0.2); }

/* ---------- журнал изменений */
.vd-journal .filters { margin-bottom: 22px; }
.vd-jt { border-top: 1px solid var(--line); }
.vd-jr { display: grid; grid-template-columns: 112px minmax(0, 1.35fr) minmax(0, 1.1fr) minmax(0, 0.9fr) minmax(0, 1.05fr); gap: 20px; align-items: start; padding: 18px 4px; border-bottom: 1px solid var(--line); font-size: 0.95rem; line-height: 1.45; color: var(--fg-soft); }
.vd-jr[hidden] { display: none; }
.vd-jh { padding-block: 12px; color: var(--fg-dim); font-size: var(--step--1); font-weight: 600; }
.vd-jr b { color: var(--fg); font-weight: 600; }
.vd-jr .what { color: var(--fg); font-weight: 550; }
.vd-tag { display: inline-block; margin-top: 6px; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--fg-soft); font-size: 0.78rem; font-style: normal; font-weight: 600; }
.vd-res { display: inline-grid; grid-template-columns: 10px 1fr; gap: 9px; align-items: baseline; color: var(--fg); font-weight: 600; }
.vd-res::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(47, 191, 138, 0.16); }
.vd-res.is-wip::before { background: var(--signal); box-shadow: 0 0 0 4px rgba(255, 176, 32, 0.18); }
.vd-res.is-wait::before { background: var(--fg-dim); box-shadow: none; }
.vd-res .wait { display: none; color: var(--fg-dim); font-weight: 500; }
.vd-jr.is-pending .vd-res .wait { display: inline; }
.vd-jr.is-pending .vd-res .done { display: none; }
.vd-jr.is-pending .vd-res::before { background: var(--fg-dim); box-shadow: none; }
.vd-note { margin: 14px 0 0; color: var(--fg-dim); font-size: var(--step--1); }

/* ---------- отчёт с переключателем */
.vd-report { --surface: var(--night-2); --line: var(--night-line); --fg: #eef2fb; --fg-soft: var(--fog); --fg-dim: var(--fog-dim); }
.vd-report .report-top { flex-wrap: wrap; }
.vd-report .toggle button { min-height: 34px; padding: 0 14px; font-size: 0.85rem; }
.vd-report .report-chart { margin-bottom: 6px; }
.vd-rp-x { display: flex; justify-content: space-between; padding: 0 12px; color: var(--fog-dim); font-size: 0.72rem; }
.vd-rp-legend { display: flex; gap: 18px; margin: 8px 0 14px; color: var(--fog); font-size: 0.78rem; }
.vd-rp-legend span { display: inline-flex; align-items: center; gap: 8px; }
.vd-rp-legend span::before { content: ""; width: 16px; height: 3px; border-radius: 2px; background: var(--signal); }
.vd-rp-legend .l::before { background: repeating-linear-gradient(90deg, var(--flow-light) 0 3px, transparent 3px 6px); }

/* ---------- сверка с продажами */
.vd-funnel { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.vd-funnel-frame { position: relative; height: 380px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--night); overflow: hidden; }
.vd-dolist { list-style: none; display: grid; gap: 18px; }
.vd-dolist li { display: grid; grid-template-columns: 30px 1fr; gap: 14px; align-items: start; }
.vd-dolist .step-num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: 0.85rem; font-weight: 700; }
.vd-dolist b { display: block; font-weight: 600; margin-bottom: 2px; }
.vd-dolist span:not(.step-num) { color: var(--fg-soft); font-size: 0.97rem; }

/* ---------- цена по бюджету */
.vd-tier { align-content: start; }
.vd-steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.vd-steps li { display: grid; gap: 4px; align-content: start; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); transition: border-color 0.3s, background-color 0.3s; }
.vd-steps li span { color: var(--fg-dim); font-size: 0.84rem; line-height: 1.3; }
.vd-steps li b { font-family: var(--font-display); font-weight: 600; font-size: 1rem; letter-spacing: -0.02em; line-height: 1.25; }
.vd-steps li.is-on { border-color: var(--signal); background: rgba(255, 176, 32, 0.1); }
.vd-split { display: flex; gap: 3px; height: 22px; border-radius: 8px; overflow: hidden; margin-bottom: 12px; }
.vd-split i { display: block; height: 100%; min-width: 6px; flex-basis: 0; }
.vd-split .to-ya, .vd-split-legend i.to-ya { background: var(--flow); }
.vd-split .to-me, .vd-split-legend i.to-me { background: var(--signal); }
.vd-split .to-me.is-unknown { background: repeating-linear-gradient(135deg, var(--signal) 0 6px, #ffd38a 6px 12px); }
.vd-split-legend { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--fg-soft); font-size: 0.93rem; }
.vd-split-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 3px; }
.vd-split-legend b { color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; }

@media (max-width: 1080px) {
  .wk-stage { min-height: 520px; }
  .vd-rhythm, .vd-funnel { grid-template-columns: 1fr; }
  .vd-funnel-frame { height: 340px; }
  .vd-jh { display: none; }
  .vd-jr { grid-template-columns: 1fr 1fr; gap: 10px 20px; padding: 20px 0; }
  .vd-jr > [role="cell"]:first-child, .vd-jr > .what { grid-column: 1 / -1; }
  .vd-jr > [role="cell"]:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
  .vd-jr > [role="cell"]:first-child .vd-tag { margin-top: 0; }
  .vd-jr > [role="cell"]:not(:first-child):not(.what)::before { content: attr(data-l); display: block; margin-bottom: 2px; color: var(--fg-dim); font-size: 0.78rem; font-weight: 600; }
}
@media (max-width: 640px) {
  .wk-stage { min-height: 450px; }
  .vd-gantt-now { display: none; }
  .vd-cal-row { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .vd-cal-row > span:first-child { display: none; }
  .vd-cal-row .wk { display: none; }
  .vd-day { min-height: 70px; padding: 7px 5px; }
  .vd-day em { font-size: 0.64rem; padding: 2px 4px; }
  .vd-jr { grid-template-columns: 1fr; }
  .vd-steps { grid-template-columns: 1fr; }
  .vd-steps li { grid-template-columns: 1fr auto; align-items: center; }
  .vd-funnel-frame { height: 320px; }
}
