/* Sync2Sys site v2: общий первый экран страниц платформы (схема как у Product catalog и Sales channels, Саша 22.11): слева карточка Sync2Sys, ленты парой с изломом в обе стороны, справа три карточки. Классы .phb-*. Источник: plat-sales-channels.css (.pcs-*). */
/* Первый экран по образцу Product catalog (пины 639, 640, Саша 22.11): текст слева 560px, справа схема: товар слева, ленты парой с изломом, три канала справа. Правила скопированы из plat-product-catalog.css с префиксом phb-. */
.phb-hub { --rib-c: var(--th); --rib-t: color-mix(in srgb, var(--th) 30%, white); --sh: 0 1px 2px rgba(16, 22, 19, 0.06), 0 12px 32px -18px rgba(16, 22, 19, 0.28);
  display: grid; grid-template-columns: 290px 40px 390px; grid-template-rows: auto repeat(3, 1fr); row-gap: 12px; column-gap: 0; }
.phb-hub__cap { grid-column: 1 / -1; grid-row: 1; height: 30px; margin-bottom: 14px; display: flex; align-items: center; font-size: 14px; color: rgba(16, 22, 19, 0.62); }
.phb-hub > .phb-src:nth-of-type(3), .phb-hub > .phb-ln:nth-of-type(1) { grid-row: 2; }
.phb-hub > .phb-src:nth-of-type(4), .phb-hub > .phb-ln:nth-of-type(2) { grid-row: 3; }
.phb-hub > .phb-src:nth-of-type(5), .phb-hub > .phb-ln:nth-of-type(3) { grid-row: 4; }
.phb-src { grid-column: 3; display: grid; grid-template-columns: 52px minmax(0, 1fr); grid-template-areas: "ph tag" "ph top" "ph dl"; align-content: center; column-gap: 14px; row-gap: 4px; padding: 14px 20px; background: var(--white); border-radius: 16px; box-shadow: var(--sh); min-width: 0; }
.phb-src .phb-ph { grid-area: ph; align-self: center; }
.phb-src__top { display: contents; }
.phb-src__top b { grid-area: top; font-size: 15px; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; min-width: 0; overflow-wrap: anywhere; }
.phb-tag { grid-area: tag; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.phb-tag small { font-size: 13px; font-weight: 400; color: var(--ink-3); }
.phb-tag img { height: 14px; width: auto; display: block; }
.phb-src dl { grid-area: dl; margin: 4px 0 0; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 0.8fr); gap: 10px; }
.phb-src dt, .phb-out dt { font-size: 12px; color: var(--ink-3); }
.phb-src dd { margin: 2px 0 0; font-size: 14px; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.phb-ph { flex: none; display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 12px; background: var(--fill); font-style: normal; }
.phb-ph svg { width: 34px; height: 34px; }
.phb-ph--none { font-size: 10px; line-height: 1.1; text-align: center; color: var(--ink-3); border: 1px dashed var(--line); background: none; }
.phb-ph--lg { width: 56px; height: 56px; border-radius: 14px; }
.phb-ph--lg svg { width: 38px; height: 38px; }

/* лента по эталону сайта (.mig__lines в pages.css, Саша 21.11 21:13: «мы вроде везде другие используем»): пара лент 4px
   с изломом, отрезки бегут вправо к карточке (кейфрейм mig-r) */
.phb-ln { grid-column: 2; position: relative; display: block; height: 31px; align-self: center; margin: 0 -2px; }
.phb-ln::before, .phb-ln::after, .phb-down::before, .phb-down::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, rgba(255,255,255,0), var(--rib-c)) -22px 0 / 22px 100% no-repeat, var(--rib-t); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 31'%3E%3Cpath d='M0 6H2L12.5 16.5Q14 18 15.5 18H16' fill='none' stroke='%23000' stroke-width='4' stroke-linejoin='miter' stroke-miterlimit='10'/%3E%3C/svg%3E") 50% 0 / 16px 31px no-repeat, linear-gradient(#000, #000) 0 4px / calc(50% - 7px) 4px no-repeat, linear-gradient(#000, #000) 100% 16px / calc(50% - 7px) 4px no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 31'%3E%3Cpath d='M0 6H2L12.5 16.5Q14 18 15.5 18H16' fill='none' stroke='%23000' stroke-width='4' stroke-linejoin='miter' stroke-miterlimit='10'/%3E%3C/svg%3E") 50% 0 / 16px 31px no-repeat, linear-gradient(#000, #000) 0 4px / calc(50% - 7px) 4px no-repeat, linear-gradient(#000, #000) 100% 16px / calc(50% - 7px) 4px no-repeat; }
.phb-ln::after { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 31'%3E%3Cpath d='M0 13H2L12.5 23.5Q14 25 15.5 25H16' fill='none' stroke='%23000' stroke-width='4' stroke-linejoin='miter' stroke-miterlimit='10'/%3E%3C/svg%3E") calc(50% - 3px) 0 / 16px 31px no-repeat, linear-gradient(#000, #000) 0 11px / calc(50% - 10px) 4px no-repeat, linear-gradient(#000, #000) 100% 23px / calc(50% - 4px) 4px no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 31'%3E%3Cpath d='M0 13H2L12.5 23.5Q14 25 15.5 25H16' fill='none' stroke='%23000' stroke-width='4' stroke-linejoin='miter' stroke-miterlimit='10'/%3E%3C/svg%3E") calc(50% - 3px) 0 / 16px 31px no-repeat, linear-gradient(#000, #000) 0 11px / calc(50% - 10px) 4px no-repeat, linear-gradient(#000, #000) 100% 23px / calc(50% - 4px) 4px no-repeat; }
.phb-down { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .phb-ln::before { animation: mig-r 2.4s linear infinite; }
  .phb-ln::after { animation: mig-r 2.4s linear -1.2s infinite; }
  .phb-ln:nth-of-type(2)::before { animation-delay: -0.4s; } .phb-ln:nth-of-type(2)::after { animation-delay: -1.6s; }
  .phb-ln:nth-of-type(3)::before { animation-delay: -0.8s; } .phb-ln:nth-of-type(3)::after { animation-delay: -2s; }
}

.phb-out { grid-column: 1; grid-row: 2 / 5; display: flex; flex-direction: column; justify-content: center; padding: 20px 22px; background: var(--white); border-radius: 20px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--th) 22%, transparent), var(--sh); min-width: 0; }
.phb-out__brand { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); line-height: 1; }
.phb-out__brand img { width: 22px; height: 22px; display: block; }
.phb-out__top { display: flex; align-items: center; gap: 14px; }
.phb-out__top b { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }
.phb-out dl { margin: 14px 0 0; }
.phb-out dl > div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.phb-out dt { font-size: 14px; }
.phb-out dd { margin: 0; color: var(--ink); font-weight: 500; text-align: right; overflow-wrap: anywhere; }
body.pg .hero .phb-out .phb-out__src { color: var(--ink-3); }
.phb-out__foot { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 14px; color: var(--ink-2); }

@media (min-width: 1181px) {
  .phb-hero > .wrap { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); column-gap: 64px; align-items: start; padding-bottom: 140px; }
  .phb-hero .h1 { font-size: 54px; }
  .phb-hero .hero__stage { margin: 0; padding: 0; display: flex; justify-content: flex-end; }
}
@media (max-width: 1180px) and (min-width: 861px) {
  .phb-hero .hero__stage { margin-top: 72px; }
}
@media (max-width: 860px) {
  .phb-hub { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-rows: auto; row-gap: 10px; }
  .phb-hub__cap { height: auto; margin: 0 0 2px; }
  .phb-hub > * { grid-column: 1 !important; grid-row: auto !important; }
  .phb-ln { display: none; }
  .phb-src { grid-template-columns: 44px minmax(0, 1fr); column-gap: 12px; padding: 12px 14px; border-radius: 14px; }
  .phb-ph { width: 44px; height: 44px; border-radius: 10px; }
  .phb-ph svg { width: 30px; height: 30px; }
  .phb-ph--none { font-size: 9px; }
  .phb-src__top b { font-size: 14px; }
  .phb-tag, .phb-tag small { font-size: 12px; }
  .phb-src dd { font-size: 13px; }
  .phb-down { display: block; position: relative; justify-self: center; width: 31px; height: 56px; --rl: 56px; transform: translateX(-6px); }
  .phb-down::before, .phb-down::after { background: linear-gradient(to bottom, rgba(255,255,255,0), var(--rib-c)) 0 -26px / 100% 26px no-repeat, var(--rib-t); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 31 56'%3E%3Cpath d='M6 0V22L14.5 30.5Q18 34 18 37.5V56' fill='none' stroke='%23000' stroke-width='4' stroke-linejoin='miter' stroke-miterlimit='10'/%3E%3C/svg%3E") 0 0 / 31px 56px no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 31 56'%3E%3Cpath d='M6 0V22L14.5 30.5Q18 34 18 37.5V56' fill='none' stroke='%23000' stroke-width='4' stroke-linejoin='miter' stroke-miterlimit='10'/%3E%3C/svg%3E") 0 0 / 31px 56px no-repeat; }
  .phb-down::after { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 31 56'%3E%3Cpath d='M13 0V19.1L21.5 27.6Q25 31.1 25 34.6V56' fill='none' stroke='%23000' stroke-width='4' stroke-linejoin='miter' stroke-miterlimit='10'/%3E%3C/svg%3E") 0 0 / 31px 56px no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 31 56'%3E%3Cpath d='M13 0V19.1L21.5 27.6Q25 31.1 25 34.6V56' fill='none' stroke='%23000' stroke-width='4' stroke-linejoin='miter' stroke-miterlimit='10'/%3E%3C/svg%3E") 0 0 / 31px 56px no-repeat; }
  .phb-out { padding: 18px; }
}
@media (max-width: 860px) and (prefers-reduced-motion: no-preference) {
  .phb-down::before { animation: hub-dn 2.4s linear infinite; }
  .phb-down::after { animation: hub-dn 2.4s linear -1.2s infinite; }
}



/* z-index и ленты в обе стороны (пины 640, 22.11) */
.phb-hub > .phb-src, .phb-hub > .phb-out { position: relative; z-index: 2; }
.phb-hub > .phb-ln { z-index: 1; margin: 0 -10px; }
.phb-ph img { width: 34px !important; height: 34px !important; object-fit: contain; }
/* Пин 640 (Саша 22.11): ленты идут в обе стороны: одна несёт товар в канал, вторая возвращает остатки и заказы. */
.phb-ln::after { background: linear-gradient(to left, rgba(255,255,255,0), var(--rib-c)) -22px 0 / 22px 100% no-repeat, var(--rib-t); }
@media (prefers-reduced-motion: no-preference) {
  .phb-ln::after { animation: mig-l 2.4s linear -1.2s infinite; }
  .phb-ln:nth-of-type(2)::after { animation-delay: -1.6s; } .phb-ln:nth-of-type(3)::after { animation-delay: -2s; }
}

/* Пины 659-667 (Саша 22.11). */
/* 659: логотипы в карточках каналов крупнее и в цвете, без серой плашки (у Shopify слово было белым). */
.phb-src { grid-template-columns: 72px minmax(0, 1fr); }
.phb-src .phb-ph { width: 72px; height: 44px; background: none; border-radius: 0; justify-content: flex-start; }
.phb-src .phb-ph .phb-ph__w { width: auto !important; height: 44px !important; max-width: 72px; }
@media (max-width: 860px) { .phb-src { grid-template-columns: 72px minmax(0, 1fr); } .phb-src .phb-ph { width: 72px; height: 40px; } .phb-src .phb-ph .phb-ph__w { height: 40px !important; } }

/* бейдж языка вместо логотипа (catalog-translation) и строка с кодом (ai-content) */
.phb-lang { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: color-mix(in srgb, var(--c, var(--th)) 12%, #fff); color: var(--c, var(--th)); font-size: 15px; font-weight: 600; letter-spacing: .02em; }
.phb-out dd code { font-size: 12px; }
.phb-out dd s, .phb-src dd s { color: var(--ink-3); }
.phb-src .phb-ph svg { width: 36px; height: 36px; }
/* значения в карточках не рвутся посреди слова: колонки в строку, при нехватке места переносятся целиком */
.phb-src dl { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.phb-src dt, .phb-src dd { white-space: nowrap; }
.phb-hub { max-width: 100%; }
.phb-src dl { gap: 4px 14px; }
.phb-mark { display: block; height: 22px; background: var(--col); -webkit-mask: var(--src) left center / contain no-repeat; mask: var(--src) left center / contain no-repeat; }

/* пин 733 (Саша 22.11): на широком экране колонка текста 640px и заголовок 64px; схема справа чуть уменьшается, чтобы уместиться; низ блока выше, чтобы подводка осталась на светлой части фона */
@media (min-width: 1400px) {
  .phb-hero > .wrap { grid-template-columns: minmax(0, 640px) minmax(0, 1fr); column-gap: 48px; padding-bottom: 240px; }
  .phb-hero .h1 { font-size: 64px; }
  .phb-hero .hero__stage > * { zoom: 0.85; }
}
@media (min-width: 1460px) { .phb-hero > .wrap { padding-bottom: 200px; } .phb-hero .hero__stage > * { zoom: 0.93; } }
