/* Одна заявка, два пути (блок twoways). Только свои классы w-twoways*, цвета и шрифты переменными сайта.
   Без скрипта (.w-twoways без .is-js) обе дорожки видны целиком. Показ по моментам включает w-twoways.js. */
.w-twoways:not(.is-js) .w-twoways__js { display: none; }
.w-twoways__head { display: flex; flex-direction: column; gap: 12px; max-width: 760px; margin-bottom: 32px; }
.w-twoways__intro { font-size: 19px; color: var(--muted); text-wrap: pretty; }
.w-twoways__body { display: flex; flex-direction: column; gap: 20px; }

/* заявка, с которой всё начинается */
.w-twoways__lead { align-self: center; max-width: 100%; display: flex; align-items: center; gap: 16px 20px; border: 2px solid var(--ink); border-radius: 28px; padding: 18px 30px 18px 20px; }
.w-twoways__tile { width: 52px; height: 52px; border-radius: 16px; }
.w-twoways__lg { width: 34px; height: 34px; border-radius: 8px; }
.w-twoways__who { flex: none; display: flex; flex-direction: column; gap: 1px; padding-right: 20px; border-right: 1px solid var(--line); }
.w-twoways__who b { font-family: var(--hf); font-weight: 700; font-size: 18px; line-height: 1.2; }
.w-twoways__who small { font-size: 14px; color: var(--muted); }
.w-twoways__msg { flex: 0 1 auto; min-width: 0; max-width: 452px; font-size: clamp(18px, 1.7vw, 22px); line-height: 1.3; font-weight: 500; text-wrap: balance; }

/* две дорожки и ось времени между ними */
.w-twoways__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 116px minmax(0, 1fr); }
.w-twoways__bg { grid-row: 1 / span var(--rows, 6); border-radius: 32px; }
.w-twoways__bg--l { grid-column: 1; background: var(--stone); }
.w-twoways__bg--r { grid-column: 3; background: var(--cob); }
.w-twoways-m { display: contents; }
.w-twoways-h, .w-twoways-c { padding: 24px 32px; min-width: 0; }
.w-twoways-h { grid-row: 1; display: flex; flex-direction: column; gap: 6px; padding-top: 30px; }
.w-twoways-h--l { grid-column: 1; }
.w-twoways-h--r { grid-column: 3; color: var(--white); }
.w-twoways-h p { font-size: 15.5px; line-height: 1.4; color: var(--muted); }
.w-twoways-h--r p { color: var(--on-cob); }
.w-twoways-h .w-twoways-h__x { margin: 8px 0 0; padding: 0; list-style: none; min-height: 30px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14px; }
.w-twoways-h__x b { font-weight: 600; color: var(--ink); background: var(--white); border-radius: 999px; padding: 5px 12px; }
.w-twoways-st { padding: 5px 12px; border-radius: 999px; font-weight: 600; color: var(--on-cob); border: 1.5px solid var(--on-cob);
  border-color: color-mix(in srgb, var(--white) 34%, transparent); transition: background .25s ease, color .25s ease, border-color .25s ease; }
.w-twoways-st.is-on { background: var(--white); border-color: var(--white); color: var(--cob); }

.w-twoways-c { grid-row: var(--r); display: flex; gap: 14px; align-items: flex-start; border-top: 1px solid var(--line);
  border-top-color: color-mix(in srgb, var(--ink) 10%, transparent); }
.w-twoways-c--l { grid-column: 1; }
.w-twoways-c--r { grid-column: 3; color: var(--white); border-top-color: var(--cob-d); border-top-color: color-mix(in srgb, var(--white) 22%, transparent); }
.w-twoways-c__t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.w-twoways-c__t b { font-weight: 600; font-size: 18px; line-height: 1.25; }
.w-twoways-c__t span { font-size: 15.5px; line-height: 1.4; color: var(--muted); }
.w-twoways-c--r .w-twoways-c__t span { color: var(--on-cob); }
/* на широком экране чья это дорожка, видно по шапке; подпись остаётся для экранного диктора */
.w-twoways-c__k { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.w-twoways-c__tile { width: 44px; height: 44px; border: 0; border-radius: 13px; }
.w-twoways-c__lg { width: 30px; height: 30px; border-radius: 7px; }
.w-twoways-c__dash { flex: none; width: 44px; height: 44px; border-radius: 13px; background: var(--line); background: color-mix(in srgb, var(--ink) 7%, transparent); position: relative; }
.w-twoways-c__dash::before { content: ""; position: absolute; left: 13px; right: 13px; top: 20.5px; height: 3px; border-radius: 2px; background: var(--muted); }
.w-twoways-c--out { padding-top: 28px; padding-bottom: 32px; }
.w-twoways-c--out .w-twoways-c__t { gap: 8px; }
.w-twoways-c--out b { font-family: var(--hf); font-weight: 800; letter-spacing: -0.025em; font-size: 26px; line-height: 1.1; }
.w-twoways__cta { align-self: flex-start; margin-top: 10px; transition: background .15s, transform .16s var(--ease, ease); }
.w-twoways__cta:active { transform: scale(.97); }
.w-twoways__cta:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }

.w-twoways-tw { grid-column: 2; grid-row: var(--r); display: flex; flex-direction: column; align-items: center; }
.w-twoways-tw::before, .w-twoways-tw::after { content: ""; width: 2px; background: var(--line); transition: background .3s ease; }
.w-twoways-tw::before { height: 22px; }
.w-twoways-tw::after { flex: 1; }
.w-twoways-m--first .w-twoways-tw::before { visibility: hidden; }
.w-twoways-m--last .w-twoways-tw::after { display: none; }
.w-twoways-m.is-on .w-twoways-tw::before, .w-twoways-m.is-past .w-twoways-tw::after { background: var(--ink); }
.w-twoways-t { flex: none; min-width: 78px; max-width: 100%; padding: 8px 9px 9px; border: 0; cursor: pointer;
  border-radius: 16px; background: var(--stone); color: var(--muted); display: flex; flex-direction: column; align-items: center; line-height: 1.15;
  transition: background .25s ease, color .25s ease, transform .16s var(--ease, ease); }
.w-twoways-t:disabled { cursor: default; }
.w-twoways-t b { font-family: var(--hf); font-weight: 700; font-size: 17px; }
.w-twoways-t span { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.w-twoways-t:enabled:active { transform: scale(.96); }
.w-twoways-m.is-on .w-twoways-t { background: var(--ink); color: var(--white); }
@media (hover: hover) { .w-twoways-m:not(.is-on) .w-twoways-t:enabled:hover { background: var(--tint); color: var(--ink); } }
.w-twoways-tw__full { display: none; }

/* появление: ячейки занимают место заранее, чтобы страница не прыгала */
.w-twoways-c > * { opacity: 0; transform: translateY(8px); }
.w-twoways-m.is-on .w-twoways-c > * { opacity: 1; transform: none; transition: opacity .4s var(--ease, ease), transform .4s var(--ease, ease); }
.w-twoways-m.is-on .w-twoways-c--r > * { transition-delay: .18s; }

.w-twoways__foot { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.w-twoways__cap { flex: 1 1 420px; font-size: 14px; color: var(--muted); max-width: 760px; }
.w-twoways__again { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); padding: 9.5px 18.5px; font-size: 15px;
  transition: background .15s, color .15s, transform .16s var(--ease, ease); }
.w-twoways__again:hover { background: var(--ink); color: var(--white); }
.w-twoways__again:active { transform: scale(.97); }

@media (max-width: 900px) {
  .w-twoways__body { gap: 14px; }
  .w-twoways__lead { align-self: stretch; flex-wrap: wrap; border-radius: 24px; padding: 16px 18px; }
  .w-twoways__who { border: 0; padding: 0; flex: 1; }
  .w-twoways__msg { flex: 1 1 100%; max-width: none; }
  /* на телефоне каждая точка времени это одна карточка: сверху «без CRM», снизу «с CRM» */
  .w-twoways__grid { display: flex; flex-direction: column; gap: 14px; }
  .w-twoways__bg, .w-twoways-h, .w-twoways-t, .w-twoways-tw::before, .w-twoways-tw::after { display: none; }
  .w-twoways-m { display: flex; flex-direction: column; }
  .w-twoways-tw { align-self: flex-start; margin: 4px 0 8px; }
  .w-twoways-tw__full { display: block; padding: 7px 14px; border-radius: 999px; background: var(--ink); color: var(--white); font-weight: 600; font-size: 14.5px; line-height: 1.3; }
  .w-twoways-c { padding: 16px 18px 18px; border: 0; gap: 12px; }
  .w-twoways-c--l { background: var(--stone); border-radius: 22px 22px 0 0; }
  .w-twoways-c--r { background: var(--cob); border-radius: 0 0 22px 22px; }
  .w-twoways-c__k { position: static; width: auto; height: auto; overflow: visible; clip-path: none; font-size: 12.5px; font-weight: 600; letter-spacing: .04em;
    text-transform: uppercase; color: var(--muted); }
  .w-twoways-c--r .w-twoways-c__k { color: var(--on-cob); }
  .w-twoways-c__t b { font-size: 17px; }
  .w-twoways-c__t span { font-size: 15px; }
  .w-twoways-c__tile, .w-twoways-c__dash { width: 38px; height: 38px; border-radius: 11px; }
  .w-twoways-c__lg { width: 26px; height: 26px; }
  .w-twoways-c__dash::before { left: 11px; right: 11px; top: 17.5px; }
  .w-twoways-c--out b { font-size: 23px; }
  .w-twoways__cta { align-self: stretch; text-align: center; justify-content: center; white-space: normal; }
  .w-twoways__again { display: none; }
}
@media (max-width: 480px) { .w-twoways__cta { padding: 16px 18px; font-size: 17px; } }
@media (prefers-reduced-motion: reduce) {
  .w-twoways-c > *, .w-twoways-m.is-on .w-twoways-c > * { transition: none; transform: none; }
  .w-twoways-t, .w-twoways-st, .w-twoways-tw::before, .w-twoways-tw::after, .w-twoways__cta, .w-twoways__again { transition: none; }
}
