/* Berk Tor - доработки по ТЗ: маршрут «продукт → стоимость → партнёр → заявка», формы, подбор партнёра, подвал */
.btn--ghost { background: transparent; color: var(--blue); box-shadow: inset 0 0 0 1.5px var(--line); min-width: 0; }
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--blue-3); background: var(--soft); }
.btn[disabled], .btn[aria-busy="true"] { opacity: .6; cursor: progress; transform: none; box-shadow: none; }
.actions--route { margin-top: 6px; }
.actions--route .btn { height: 48px; min-width: 0; }
.hero__links { display: flex; gap: 20px; margin-top: 18px; flex-wrap: wrap; }
.hero__links a { color: var(--on-blue); font-size: 15px; font-weight: 600; text-underline-offset: 4px; padding-block: 10px; }
.hero__links a:hover { color: #fff; }

/* шапка: кнопка «Подобрать партнёра» не прилипает к меню */
@media (min-width: 1025px) {
  .nav { gap: 24px; margin-left: clamp(24px, 10vw, 200px); }
}
@media (min-width: 1025px) and (max-width: 1240px) {
  .nav ul { gap: 18px; }
  .nav__cta { min-width: 0; padding-inline: 20px; }
}

/* прогресс маршрута */
.route-progress { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; padding-bottom: 20px; max-width: 560px; }
.route-progress__label { font-size: 13px; font-weight: 700; color: var(--blue); }
.route-progress__bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.route-progress__bar li { height: 6px; border-radius: 99px; background: var(--line-3); position: relative; }
.route-progress__bar li.is-done { background: var(--blue-3); }
.route-progress__bar li.is-current { background: var(--yellow); }
.route-progress__bar span { position: absolute; top: 12px; left: 0; font-size: 12px; color: var(--muted); white-space: nowrap; }
.route-progress__bar li.is-current span { color: var(--ink); font-weight: 600; }

/* поля форм */
.lead-form { display: flex; flex-direction: column; gap: 24px; }
.lead-form fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.lead-form legend { padding: 0; margin-bottom: 4px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.field--wide { grid-column: 1 / -1; }
.field label, .field legend { font-size: 13px; font-weight: 600; color: var(--ink); }
.lead-form input:not([type="checkbox"]):not([type="radio"]), .lead-form textarea, .lead-form select {
  width: 100%; min-height: 52px; padding: 12px 16px; border-radius: 14px; border: 1.5px solid var(--line-2); background: #fff;
  font-size: 16px; font-weight: 400; color: var(--ink); transition: border-color .18s, box-shadow .18s;
}
.lead-form select {
  appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2334339a' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 18px center;
}
.lead-form textarea { resize: vertical; min-height: 96px; }
/* выпадающие списки в формах - те же, что в калькуляторе, по высоте как поля ввода */
.lead-form .dd__button { height: 52px; border-radius: 14px; font-size: 16px; }
.lead-form .dd__list { z-index: 30; }
.lead-form ::placeholder { color: var(--placeholder); opacity: 1; }
.lead-form input:focus, .lead-form textarea:focus, .lead-form select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(85, 81, 166, .18); }
.lead-form [aria-invalid="true"], #match-send [aria-invalid="true"] { border-color: #b3261e !important; outline: 2px solid #b3261e; }
.field__error { font-size: 13px; font-weight: 600; color: #b3261e; }
.field--radios { border: 0; padding: 0; margin: 0; flex-direction: row; flex-wrap: wrap; gap: 4px 20px; align-items: center; }
.field--radios legend { width: 100%; margin-bottom: 4px; }
.field--radios label { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; font-size: 15px; min-height: 44px; cursor: pointer; }
.field--radios input { width: 20px; height: 20px; accent-color: var(--blue); }
.field--check { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: start; font-weight: 400; }
.field--check input { width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--blue); }
.field--check label { display: block; font-size: 14px; font-weight: 500; line-height: 1.5; color: var(--text); cursor: pointer; }
.field--check label a { color: var(--blue); }
.field--check .field__error { grid-column: 2; }
.form-actions { display: flex; flex-wrap: wrap; gap: 14px 16px; align-items: center; }
.form-status { flex-basis: 100%; font-size: 14px; min-height: 0; }
.form-status.is-error { color: #b3261e; font-weight: 600; }
.form-status.is-success { color: #1b6e3a; font-weight: 600; }

/* контакты */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.contact-grid .lead-form { background: var(--soft); border-radius: 22px; padding: 32px; }
.contact-card { border: 1px solid var(--line-2); border-radius: 22px; padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.contact-card dl { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.contact-card dt { font-size: 12px; font-weight: 600; text-transform: uppercase; color: var(--muted); }
.contact-card dd { margin: 2px 0 0; font-size: 16px; font-weight: 600; }
.contact-card a { color: var(--blue); }
.h2--24 { font-size: 24px; }

/* цены */
.breakdown { margin: 0; display: flex; flex-direction: column; gap: 10px; background: rgba(255, 255, 255, .08); border-radius: 16px; padding: 18px 20px; }
.breakdown > div { display: flex; justify-content: space-between; gap: 16px; font-size: 15px; }
.breakdown dt { color: var(--on-blue-3); }
.breakdown dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.breakdown__partner dd { font-weight: 500; color: var(--on-blue-3); }
.calculator__result { gap: 24px; }
.calculator .total { min-height: 0; }
.total__value--unknown { font-size: 26px; line-height: 1.25; }
.calculator__result .btn { align-self: flex-start; }
.price-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
.price-facts > div { border: 1px solid var(--line-2); border-radius: 18px; padding: 22px 24px; }
.price-facts h2 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.price-facts p { font-size: 15px; color: var(--text); line-height: 1.55; }

/* главная: доверие и вопросы */
.trust-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.trust-item { background: #fff; border: 1px solid var(--line-2); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.trust-item h3 { font-size: 17px; font-weight: 700; }
.trust-item p { font-size: 14px; color: var(--text); line-height: 1.5; }
.trust-item .link-arrow { margin-top: auto; padding-top: 6px; }
.faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 48px; align-items: start; }
.faq__list { display: flex; flex-direction: column; border-top: 1px solid var(--line-2); }
.faq__item { border-bottom: 1px solid var(--line-2); }
.faq__item summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; font-size: 17px; font-weight: 600; position: relative; min-height: 44px; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px;
  border-right: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: translateY(-70%) rotate(45deg); transition: transform .2s var(--ease);
}
.faq__item[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq__item p { padding: 0 0 20px; font-size: 15px; line-height: 1.6; color: var(--text); max-width: 760px; }

/* страница продукта */
.product-about { max-width: 920px; display: flex; flex-direction: column; gap: 16px; }
.body-18 { font-size: 18px; line-height: 1.65; color: var(--text); }

/* партнёры */
.metrics-help { margin: 20px 0 8px; border: 1px solid var(--line-2); border-radius: 16px; padding: 0 20px; }
.metrics-help summary { cursor: pointer; padding: 12px 0; font-size: 14px; font-weight: 700; color: var(--blue); min-height: 44px; display: flex; align-items: center; }
.metrics-help dl { margin: 0 0 16px; display: grid; gap: 8px; }
.metrics-help dt { font-weight: 700; font-size: 14px; display: inline; }
.metrics-help dt::after { content: " - "; font-weight: 400; }
.metrics-help dd { display: inline; margin: 0; font-size: 14px; color: var(--text); }
.partner-card { min-height: 0; }
.partner-card__big { margin-top: 18px; font-size: 24px; }
.partner-card__status { margin-top: 18px; font-size: 15px; font-weight: 600; color: var(--muted); background: var(--soft); border-radius: 12px; padding: 12px 14px; }
.partner-card--empty { background: var(--soft-2); }
.partner-card__fact { font-size: 14px; color: var(--text); line-height: 1.5; }
.partner-card__fact span { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; color: var(--muted); }
.partner-card__links { display: flex; flex-direction: column; gap: 6px; }
.partner-card__cta { margin-top: auto; align-self: stretch; min-width: 0; }
.partner-card a[href^="tel:"] { color: inherit; }
.badge--plain { background: var(--soft); color: var(--blue); }

/* клиенты: избранные кейсы */
.cases { margin-bottom: 40px; display: flex; flex-direction: column; gap: 20px; }
.cases__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.case-card { border: 1px solid var(--line-2); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 12px; background: #fff; }
.case-card h3 { font-size: 20px; font-weight: 700; }
.case-card dl { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.case-card dt { font-size: 12px; font-weight: 600; text-transform: uppercase; color: var(--muted); }
.case-card dd { margin: 0; font-size: 14px; color: var(--text); }
.case-card blockquote { margin: 0; padding: 12px 16px; border-left: 3px solid var(--yellow); background: var(--soft); border-radius: 0 12px 12px 0; font-size: 14px; }
.project-card__links { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.project-card__links .ext--blue { margin-top: 0; }
.project-card__links .ext:not(.ext--blue) { font-size: 14px; font-weight: 600; color: var(--ink); }

/* демо */
.demo-card--soon { cursor: default; opacity: .72; }
.demo-card--soon:hover { transform: none; box-shadow: none; border-color: var(--line-2); }
.demo-card--soon .demo-card__cta { color: var(--muted); }
.demo-card__alt { display: block; margin-top: 8px; padding-block: 8px; font-size: 13px; font-weight: 600; color: var(--blue); text-align: center; }
.demo-viewer__btn--primary { background: var(--yellow); color: var(--ink-2); }

/* подбор партнёра */
.match-choice { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; background: var(--soft); border-radius: 16px; padding: 16px 20px; margin-bottom: 28px; font-size: 15px; }
.match-choice[hidden] { display: none; }
.match-choice a { color: var(--blue); font-weight: 600; font-size: 14px; padding-block: 10px; }
.match-results { margin-top: 40px; display: flex; flex-direction: column; gap: 18px; outline: none; }
.match-results[hidden] { display: none; }
.match-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.match-card { border: 1.5px solid var(--line-2); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.match-card:has(input:checked) { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(85, 81, 166, .14); }
.match-card__head { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; min-height: 44px; }
.match-card__head input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--blue); flex: none; }
.match-card__head strong { display: block; font-size: 18px; }
.match-card__head small { font-size: 13px; color: var(--muted); }
.match-card__why { display: flex; flex-direction: column; gap: 6px; }
.match-card__why li { font-size: 14px; color: var(--text); padding-left: 22px; position: relative; }
.match-card__why li::before {
  content: ""; position: absolute; left: 2px; top: 5px; width: 10px; height: 6px;
  border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(-45deg);
}
.match-card .ext { font-size: 13px; font-weight: 600; color: var(--blue); margin-top: auto; }
.match-mode { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.match-mode legend { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.match-mode__opt { display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid var(--line-2); border-radius: 14px; padding: 14px 16px; cursor: pointer; }
.match-mode__opt:has(input:checked) { border-color: var(--blue); background: var(--soft); }
.match-mode__opt input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--blue); flex: none; }
.match-mode__opt strong { display: block; font-size: 15px; }
.match-mode__opt small { font-size: 13px; color: var(--muted); }
.match__step { outline: none; }
.match__step[hidden] { display: none; }
.summary { margin: 20px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; border-top: 1px solid var(--line-2); }
.summary > div { display: grid; grid-template-columns: 180px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.summary dt { font-size: 13px; font-weight: 600; color: var(--muted); }
.summary dd { margin: 0; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.summary-note { background: var(--soft); border-radius: 16px; padding: 18px 20px; margin-bottom: 20px; }
.summary-note h3 { font-size: 16px; margin-bottom: 6px; }
.summary-note p, .summary-note li { font-size: 14px; color: var(--text); line-height: 1.55; }
.summary-note a { color: var(--blue); }
#match-send { display: flex; flex-direction: column; gap: 20px; }

/* подвал */
.site-footer__grid { padding-block: 52px 32px; display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.site-footer__col { display: flex; flex-direction: column; gap: 6px; }
.site-footer__col a { font-size: 14px; color: #fff; text-decoration: none; opacity: .85; padding-block: 5px; }
.site-footer__col a:hover { opacity: 1; text-decoration: underline; }
.site-footer__col--brand .site-footer__brand { opacity: 1; padding-block: 0; }
.site-footer__title { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--footer-meta); margin-bottom: 4px; }
.site-footer__contacts { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.site-footer__contacts li { font-size: 14px; }
.site-footer__contacts span { display: block; font-size: 12px; color: var(--footer-meta); }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding-block: 20px 28px; display: flex; flex-direction: column; gap: 6px; }
.site-footer__bottom p { font-size: 13px; color: var(--footer-meta); }
.site-footer__bottom a { color: #fff; }

/* политика, 404 */
.prose { max-width: 820px; display: flex; flex-direction: column; gap: 16px; }
.prose p { font-size: 16px; line-height: 1.65; color: var(--text); }
.prose h2 { font-size: 24px; margin-top: 16px; }
.prose a { color: var(--blue); }
.page-404 { padding-block: 80px 120px; }
.plain-list { display: flex; flex-direction: column; gap: 4px; }

@media (max-width: 1240px) { .trust-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1024px) {
  .contact-grid, .faq { grid-template-columns: 1fr; gap: 28px; }
  .match-list, .cases__list { grid-template-columns: 1fr; }
  .summary { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .h1, .h2 { overflow-wrap: break-word; hyphens: auto; }
  .toolbar__sort { flex-wrap: wrap; width: 100%; }
  .toolbar__sort .dd { width: 100%; }
  .project-list > li, .partner-list > li, .cases__list > li { min-width: 0; overflow-wrap: anywhere; }
  .form-grid, .price-facts, .trust-grid { grid-template-columns: 1fr; }
  .contact-grid .lead-form { padding: 20px; }
  .summary > div { grid-template-columns: 1fr; gap: 2px; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 24px; }
  .route-progress__bar span { display: none; }
  .route-progress { padding-bottom: 0; margin-bottom: 12px; }
  .form-actions .btn, .calculator__result .btn { width: 100%; min-width: 0; }
  .actions--route .btn--ghost { display: none; }
  .breakdown > div { font-size: 14px; }
  .total__value--unknown { font-size: 22px; }
  .faq__item summary { font-size: 16px; }
}
@media print {
  .site-header, .site-footer, .route-progress, .form-actions, .skip, .cta-band, .page-head { display: none !important; }
}

/* ================= Карточки продуктов: цвет и иконка направления из Directus ================= */
.pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.pgrid > li { min-width: 0; transition-delay: calc(var(--i, 0) * 50ms); }
.pcard {
  --accent: var(--blue);
  --accent-ink: color-mix(in srgb, var(--accent) 78%, #10102a);
  --accent-soft: color-mix(in srgb, var(--accent) 12%, #fff);
  position: relative; height: 100%; display: flex; flex-direction: column; overflow: hidden; isolation: isolate;
  background: #fff; border: 1px solid var(--line-2); border-radius: 24px; text-decoration: none; color: var(--ink);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.pcard::before { /* цветная полоса направления */
  content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--accent); z-index: 2;
  transform: scaleX(.18); transform-origin: left; transition: transform .45s var(--ease);
}
.pcard:hover, .pcard:focus-visible {
  transform: translateY(-6px); border-color: color-mix(in srgb, var(--accent) 45%, #fff);
  box-shadow: 0 22px 44px -18px color-mix(in srgb, var(--accent) 55%, transparent), 0 2px 6px rgba(16, 16, 42, .05);
}
.pcard:hover::before, .pcard:focus-visible::before, .pcard.is-current::before { transform: scaleX(1); }
.pcard:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.pcard.is-current { border-color: color-mix(in srgb, var(--accent) 60%, #fff); }

.pcard__top {
  position: relative; display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; padding: 24px 24px 20px; min-height: 128px; overflow: hidden; z-index: 0;
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--accent) 26%, transparent) 0%, transparent 55%),
    linear-gradient(160deg, var(--accent-soft), #fff 85%);
}
.pcard__chip {
  align-self: center; font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--accent-ink);
  background: rgba(255, 255, 255, .85); border: 1px solid color-mix(in srgb, var(--accent) 25%, #fff); border-radius: 999px; padding: 6px 12px;
}
.pcard__badge {
  align-self: center; font-size: 11px; font-weight: 700; color: #fff; background: var(--accent-ink);
  border-radius: 999px; padding: 6px 10px; box-shadow: 0 6px 14px -6px var(--accent);
}

/* изометрическая сцена направления (как блоки знака Berk) */
.pcard__top { flex-direction: column; align-items: flex-start; gap: 8px; min-height: 168px; padding-right: 46%; }
.pcard__top .pcard__chip, .pcard__top .pcard__badge { align-self: flex-start; }
.pcard__art { position: absolute; right: 18px; bottom: 12px; width: 44%; max-width: 150px; height: 128px; display: grid; place-items: end center; pointer-events: none; }
.iso { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 14px 14px color-mix(in srgb, var(--accent) 30%, transparent)); transition: transform .5s var(--ease); }
.pcard:hover .iso { transform: translateY(-6px); }
.iso .at { fill: color-mix(in srgb, var(--accent) 42%, #fff); }
.iso .al { fill: var(--accent); }
.iso .ar { fill: var(--accent-ink); }
.iso .yt { fill: #ffe57a; }
.iso .yl { fill: #ffd200; }
.iso .yr { fill: #d8ad00; }
.iso .wt { fill: #fff; }
.iso .wl { fill: #eef0fa; }
.iso .wr { fill: #d9dcef; }
.iso .dt { fill: color-mix(in srgb, var(--accent-ink) 60%, #1b1b3a); }
.iso .dl { fill: #26264a; }
.iso .dr { fill: #17172f; }
.iso path { stroke: rgba(255, 255, 255, .35); stroke-width: .4; stroke-linejoin: round; }

.pcard__body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 18px 24px 22px; }
.pcard__logo { height: 34px; display: block; }
.pcard__logo img { height: 100%; width: auto; max-width: 170px; object-fit: contain; object-position: left center; }
/* логотип-плашка (Berk Start): на картинке широкие поля, обрезаем их, чтобы знак был того же размера, что у остальных */
.pcard__logo--cover { width: 104px; overflow: hidden; }
.pcard__logo--cover img { width: 100%; max-width: none; height: 100%; object-fit: cover; object-position: center; transform: scale(1.5); transform-origin: center; }
.pcard__name { font-size: 21px; font-weight: 700; line-height: 1.2; }
.pcard__task { font-size: 14px; color: var(--text); line-height: 1.45; }
.pcard__checks { display: flex; flex-direction: column; gap: 7px; margin-top: 4px; }
.pcard__checks > span { position: relative; padding-left: 26px; font-size: 14px; font-weight: 500; color: var(--ink-3); }
.pcard__checks > span::before {
  content: ""; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft);
}
.pcard__checks > span::after {
  content: ""; position: absolute; left: 6px; top: 5px; width: 6px; height: 4px; border-left: 2px solid var(--accent-ink); border-bottom: 2px solid var(--accent-ink); transform: rotate(-45deg);
}
.pcard__foot { margin-top: auto; padding-top: 16px; border-top: 1px dashed var(--line-2); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pcard__price { font-size: 17px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.pcard__price.is-unknown { font-size: 14px; font-weight: 600; color: var(--muted); }
.pcard__go { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--accent-ink); }
.pcard__go .i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.pcard:hover .pcard__go .i { transform: translateX(4px); }

@media (max-width: 1024px) { .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .pgrid { grid-template-columns: 1fr; gap: 16px; }
  .pcard__top { min-height: 150px; padding: 20px 46% 16px 20px; }
  .pcard__art { height: 112px; }
  .pcard__body { padding: 16px 20px 20px; }
  .pcard.is-current { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
  .pcard, .pcard::before, .iso, .pcard__go .i { transition: none; }
  .pcard:hover, .pcard:hover .iso { transform: none; }
}

/* ================= Страница продукта: premium motion первого экрана ================= */
/* фон первого экрана и шапки - в цвете продукта (--accent на body, из Directus), достаточно тёмный для белого текста */
body.page-product {
  --hero-bg: color-mix(in srgb, var(--accent, #34339a) 58%, #10102c);
  --hero-bg-2: color-mix(in srgb, var(--accent, #34339a) 82%, #10102c);
}
.page-product .hero--motion { background: radial-gradient(120% 90% at 78% 30%, var(--hero-bg-2) 0%, var(--hero-bg) 60%, color-mix(in srgb, var(--hero-bg) 80%, #000) 100%); }
.page-product .site-header.is-scrolled { background: color-mix(in srgb, var(--hero-bg) 92%, transparent); }
@media (max-width: 1024px) { .page-product .site-header:has(.nav.is-open) { background: var(--hero-bg); } }
.page-product .hero--motion .eyebrow--yellow { color: #fff; opacity: .86; letter-spacing: .06em; }
/* вторая кнопка на цветном фоне - прозрачная со светлой обводкой */
.page-product .hero--motion .btn--secondary { background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.page-product .hero--motion .btn--secondary:hover { background: rgba(255, 255, 255, .2); }
/* оттенки граней изометрии (как в карточках): светлая верхняя, цвет продукта слева, тёмная справа */
.hero-stage {
  --accent-ink: color-mix(in srgb, var(--accent) 72%, #10102a);
  --accent-soft: color-mix(in srgb, var(--accent) 12%, #fff);
}

.hero--motion {
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --sp: 0; /* прогресс прокрутки первого экрана 0..1 (main.js) */
  position: relative; overflow: hidden; isolation: isolate;
}
/* мягкое сияние: медленно дрейфует за контентом */
.hero__aura { position: absolute; inset: -20% -10%; z-index: -1; pointer-events: none; filter: blur(70px); }
.hero__aura i { position: absolute; border-radius: 50%; will-change: transform; }
.hero__aura i:nth-child(1) { width: 44vw; height: 44vw; right: 4%; top: 6%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 55%, #fff) 0%, transparent 62%); opacity: .45; animation: aura-a 20s ease-in-out infinite alternate; }
.hero__aura i:nth-child(2) { width: 30vw; height: 30vw; right: 30%; bottom: -6%; background: radial-gradient(circle, rgba(255, 210, 0, .5) 0%, transparent 62%); opacity: .35; animation: aura-b 24s ease-in-out infinite alternate; }
.hero__aura i:nth-child(3) { width: 40vw; height: 40vw; left: -10%; top: -12%; background: radial-gradient(circle, rgba(255, 255, 255, .5) 0%, transparent 62%); opacity: .12; animation: aura-a 28s ease-in-out infinite alternate-reverse; }
@keyframes aura-a { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-6%, 8%, 0) scale(1.15); } }
@keyframes aura-b { from { transform: translate3d(0, 0, 0) scale(1.1); } to { transform: translate3d(10%, -6%, 0) scale(.9); } }

/* появление по очереди: надпись → заголовок из-под маски → текст → кнопки */
.js .hero--motion .m-in { opacity: 0; transform: translate3d(0, 26px, 0); }
.js .hero--motion .m-in--mask { clip-path: inset(0 0 100% 0); transform: translate3d(0, 40px, 0); }
.hero--motion.is-in .m-in { animation: m-in .9s var(--ease-out) forwards; animation-delay: calc(var(--d, 0) * 90ms + 80ms); }
.hero--motion.is-in .m-in--mask { animation-name: m-in-mask; animation-duration: 1.05s; }
@keyframes m-in { to { opacity: 1; transform: none; } }
@keyframes m-in-mask { to { opacity: 1; clip-path: inset(0 0 -20% 0); transform: none; } }
.hero--motion .hero__copy { transform: translate3d(0, calc(var(--sp) * 70px), 0); opacity: calc(1 - var(--sp) * .55); will-change: transform; }

/* сцена справа: крупная изометрия продукта + кубики */
.hero-stage {
  position: relative; flex: 1 1 600px; max-width: 620px; aspect-ratio: 6 / 5; align-self: center;
  --rx: 0deg; --ry: 0deg; --px: 0; --py: 0;
  transform: translate3d(0, calc(var(--sp) * -50px), 0);
}
.hero-stage__scene {
  position: absolute; inset: 4% 4% 10%; display: grid; place-items: center; pointer-events: none;
  /* без 3D-поворотов: иначе браузер растрирует SVG и он выглядит пиксельным */
  transform: translate(calc(var(--px) * -14px), calc(var(--py) * -10px)) rotate(calc(var(--ry) * .12));
  transition: transform .15s linear;
}
/* мягкая тень на «полу»: дышит в такт парению */
.hero-stage__shadow {
  position: absolute; left: 18%; right: 18%; bottom: 2%; height: 14%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(6, 6, 24, .45), transparent); filter: blur(6px);
  animation: stage-shadow 8s ease-in-out infinite alternate;
}
.hero-stage__float { position: relative; width: 100%; height: 100%; display: grid; place-items: center; animation: stage-float 8s ease-in-out infinite alternate; backface-visibility: hidden; }
.hero-stage__iso { width: 100%; height: 100%; max-height: 100%; filter: drop-shadow(0 30px 30px rgba(6, 6, 24, .28)); }
.hero-stage__iso path { stroke-width: .3; }
@keyframes stage-float { from { transform: translateY(-10px) rotate(-.6deg); } to { transform: translateY(10px) rotate(.6deg); } }
@keyframes stage-shadow { from { transform: scale(.86); opacity: .55; } to { transform: scale(1.04); opacity: .9; } }
/* детали над основанием чуть «дышат» вразнобой (цикл 5-6 с, амплитуда пара пикселей) */
.hero-stage__scene .b:not(:first-child) > path { animation: block-bob 5.6s ease-in-out infinite alternate; animation-delay: calc(var(--b) * -1.3s); }
@keyframes block-bob { from { transform: translateY(0); } to { transform: translateY(-1.6px); } }

.hero-stage__cube { position: absolute; z-index: 2; width: 56px; pointer-events: none; transform: translate3d(calc(var(--px) * var(--k, 10px)), calc(var(--py) * var(--k, 10px)), 0); transition: transform .25s linear; }
.hero-stage__cube .iso { width: 100%; height: auto; display: block; animation: cube-float 7s ease-in-out infinite alternate; }
.hero-stage__cube--1 { left: 0; top: 8%; --k: 22px; }
.hero-stage__cube--2 { right: 2%; top: 0; width: 38px; --k: -16px; }
.hero-stage__cube--2 .iso { animation-duration: 9s; animation-delay: -3s; }
.hero-stage__cube--3 { right: 6%; bottom: 14%; width: 32px; --k: 28px; }
.hero-stage__cube--3 .iso { animation-duration: 6.5s; animation-delay: -1.5s; }
@keyframes cube-float { from { transform: translateY(-8px) rotate(-4deg); } to { transform: translateY(10px) rotate(5deg); } }

/* вход сцены: блоки изометрии собираются по одному, потом кубики */
.js .hero--motion .hero-stage__scene .b { opacity: 0; transform: translate3d(0, -26px, 0); }
.hero--motion.is-in .hero-stage__scene .b { animation: block-in .8s var(--ease-out) forwards; animation-delay: calc(var(--b) * 90ms + 350ms); }
@keyframes block-in { to { opacity: 1; transform: none; } }
.js .hero--motion .hero-stage__cube { opacity: 0; }
.hero--motion.is-in .hero-stage__cube { animation: m-in .9s var(--ease-out) forwards; animation-delay: 1s; }
.hero--motion.is-in .hero-stage__cube--2 { animation-delay: 1.15s; }
.hero--motion.is-in .hero-stage__cube--3 { animation-delay: 1.3s; }

/* страховка: если анимации не проигрались (вкладка в фоне), через 3 с всё в конечном виде */
.js .hero--motion.is-done .m-in, .js .hero--motion.is-done .hero-stage__scene .b, .js .hero--motion.is-done .hero-stage__cube {
  opacity: 1; transform: none; clip-path: none; filter: none; animation: none;
}
.js .hero--motion.is-done .hero-stage__cube { transform: translate3d(calc(var(--px) * var(--k, 10px)), calc(var(--py) * var(--k, 10px)), 0); }

@media (max-width: 1024px) {
  .hero-stage { flex: none; width: 100%; max-width: 520px; }
}
@media (max-width: 640px) {
  .hero-stage { max-width: 360px; margin-inline: auto; }
  .hero-stage__cube { width: 38px; }
  .hero__aura { filter: blur(50px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__aura i, .hero-stage__cube .iso, .hero-stage__float, .hero-stage__shadow, .hero-stage__scene .b > path { animation: none !important; }
  .js .hero--motion .m-in, .js .hero--motion .hero-stage__scene .b, .js .hero--motion .hero-stage__cube {
    opacity: 1 !important; transform: none !important; clip-path: none !important; filter: none !important; animation: none !important;
  }
  .hero--motion .hero__copy, .hero-stage, .hero-stage__scene, .hero-stage__cube { transform: none !important; opacity: 1 !important; }
}

/* ================= Главная: сюжетная изометрия в блоке выбранного продукта ================= */
/* Векторы осей изометрии (px на единицу): x (6.06, 3.5), y (-6.06, 3.5), z (0, -7) */
.active-product__story { align-self: center; overflow: visible; background: none; }
.story-box {
  --accent-ink: color-mix(in srgb, var(--accent) 72%, #10102a);
  --accent-soft: color-mix(in srgb, var(--accent) 12%, #fff);
  position: absolute; inset: 4%; display: grid; place-items: center;
  /* сияние гаснет полностью внутри блока (closest-side), без видимых краёв */
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 16%, transparent), color-mix(in srgb, var(--accent) 6%, transparent) 55%, transparent 100%);
  animation: story-in .5s var(--ease) both;
}
.story-box[hidden] { display: none; }
.story { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 22px 22px color-mix(in srgb, var(--accent) 28%, rgba(10, 10, 46, .25))); }
.story .b, .story .b > path { transform-box: view-box; }
@keyframes story-in { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
/* сцена чуть парит, чтобы сюжет жил и в паузах */
.story-box > .story { animation: story-float 7s ease-in-out infinite alternate; }
@keyframes story-float { from { transform: translateY(-5px); } to { transform: translateY(5px); } }

/* Hasap: волна нажатий по клавишам, лист с расчётом выезжает сзади */
.story--calculator .st-key { animation: st-key 6s ease-in-out infinite; animation-delay: calc(var(--i) * .28s); }
@keyframes st-key { 0%, 7%, 100% { transform: translateY(0); } 3.5% { transform: translateY(1.6px); } }
.story--calculator .st-key.yt, .story--calculator .st-key:last-child { }
.story--calculator .st-paper { animation: st-paper 6s cubic-bezier(.16, 1, .3, 1) infinite; }
@keyframes st-paper { 0%, 48% { transform: translateY(0); opacity: 1; } 62% { transform: translateY(-20px); } 82% { transform: translateY(-24px); opacity: 1; } 92% { transform: translateY(-28px); opacity: 0; } 96% { transform: translateY(0); opacity: 0; } 100% { opacity: 1; } }
.story--calculator .st-screen { animation: st-blink 6s steps(1) infinite; }
@keyframes st-blink { 0%, 44% { opacity: .35; } 46%, 100% { opacity: 1; } }

/* Söwda: грузовик подъезжает, коробки уходят в ворота склада, грузовик уезжает */
.story--truck .st-truck { animation: st-truck 9s cubic-bezier(.45, 0, .2, 1) infinite; }
@keyframes st-truck {
  0% { transform: translate(-54px, -31px); opacity: 0; } 6% { opacity: 1; }
  24%, 62% { transform: translate(0, 0); opacity: 1; }
  86% { transform: translate(54px, 31px); opacity: 1; } 92%, 100% { transform: translate(60px, 35px); opacity: 0; }
}
.story--truck .st-parcel { animation: st-parcel 9s ease-in-out infinite; }
.story--truck .st-parcel--2 { animation-delay: .9s; }
@keyframes st-parcel {
  0%, 26% { transform: translate(-6px, 3.5px); opacity: 0; } 30% { opacity: 1; }
  44% { transform: translate(6px, -3.5px); opacity: 1; } 48%, 100% { transform: translate(9px, -5px); opacity: 0; }
}

/* Market: вывеска светится, покупатели выходят из двери с пакетами */
.story--store .st-sign { animation: st-glow 3.2s ease-in-out infinite alternate; }
@keyframes st-glow { from { opacity: .55; } to { opacity: 1; } }
.story--store .st-window { animation: st-glow 4.4s ease-in-out infinite alternate; }
.story--store .st-window--2 { animation-delay: -2s; }
.story--store .st-shopper { animation: st-shopper 7s ease-in-out infinite; }
.story--store .st-shopper--2 { animation-delay: 3.5s; }
@keyframes st-shopper {
  0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: 1; }
  45% { transform: translate(-18px, 10.5px) translateY(-1px); } 55% { transform: translate(-22px, 12.7px); }
  70% { transform: translate(-27px, 15.6px); opacity: 1; } 82%, 100% { transform: translate(-31px, 17.9px); opacity: 0; }
}

/* Doc: лист едет под печать, получает отметку и уходит в архив */
.story--document .st-sheet, .story--document .st-seal { animation: st-sheet 8s cubic-bezier(.45, 0, .2, 1) infinite; }
.story--document .st-seal { animation-name: st-seal; }
@keyframes st-sheet {
  0% { transform: translate(0, -4px); opacity: 0; } 6% { transform: translate(0, 0); opacity: 1; }
  24%, 42% { transform: translate(33.3px, 19.3px); } 66% { transform: translate(55.8px, 32.2px); opacity: 1; }
  74%, 100% { transform: translate(55.8px, 34px); opacity: 0; }
}
@keyframes st-seal {
  0% { transform: translate(0, -4px); opacity: 0; } 24% { transform: translate(33.3px, 19.3px); opacity: 0; }
  31% { opacity: 0; } 33% { opacity: 1; } 42% { transform: translate(33.3px, 19.3px); }
  66% { transform: translate(55.8px, 32.2px); opacity: 1; } 74%, 100% { transform: translate(55.8px, 34px); opacity: 0; }
}
.story--document .st-stamp { animation: st-stamp 8s cubic-bezier(.5, 0, .2, 1) infinite; }
@keyframes st-stamp { 0%, 25% { transform: translateY(0); } 30% { transform: translateY(8.5px); } 34% { transform: translateY(8.5px); } 40%, 100% { transform: translateY(0); } }

/* Biz: столбики растут кубик за кубиком, монетка подпрыгивает */
.story--chart .st-grow { animation: st-grow 7s cubic-bezier(.16, 1, .3, 1) infinite; animation-delay: calc(var(--g) * .26s); }
@keyframes st-grow { 0% { transform: translateY(-12px); opacity: 0; } 7% { transform: translateY(0); opacity: 1; } 78% { opacity: 1; transform: translateY(0); } 86%, 100% { opacity: 0; transform: translateY(0); } }
.story--chart .st-coin { animation: st-coin 7s ease-in-out infinite; }
@keyframes st-coin {
  0%, 40% { transform: translateY(-14px); opacity: 0; } 48% { transform: translateY(0); opacity: 1; }
  55% { transform: translateY(-6px); } 62% { transform: translateY(0); } 69% { transform: translateY(-3px); } 76% { transform: translateY(0); opacity: 1; }
  86%, 100% { transform: translateY(0); opacity: 0; }
}

/* Start: товар едет к сканеру, вспышка, чек вылезает, ящик выдвигается */
.story--receipt .st-item { animation: st-item 7s cubic-bezier(.45, 0, .2, 1) infinite; }
@keyframes st-item { 0% { transform: translate(0, 0); opacity: 0; } 8% { opacity: 1; } 32% { transform: translate(15.2px, 8.8px); opacity: 1; } 42%, 100% { transform: translate(19px, 11px); opacity: 0; } }
.story--receipt .st-scan { animation: st-scan 7s ease-out infinite; }
@keyframes st-scan { 0%, 30% { opacity: 0; } 34% { opacity: 1; } 44%, 100% { opacity: 0; } }
.story--receipt .st-rc { animation: st-rc 7s cubic-bezier(.16, 1, .3, 1) infinite; animation-delay: calc(var(--n) * .3s); }
@keyframes st-rc { 0%, 38% { transform: translateY(3px); opacity: 0; } 44% { transform: translateY(0); opacity: 1; } 84% { opacity: 1; } 92%, 100% { opacity: 0; } }
.story--receipt .st-drawer { animation: st-drawer 7s cubic-bezier(.45, 0, .2, 1) infinite; }
@keyframes st-drawer { 0%, 52% { transform: translate(0, 0); } 60%, 76% { transform: translate(-7px, 4px); } 84%, 100% { transform: translate(0, 0); } }

/* вне экрана и при выключенной анимации - стоп */
.active-product__story.is-paused .story, .active-product__story.is-paused .story .b,
.active-product__story.is-paused .story-box { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .story-box, .story-box > .story, .story .b { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* ================= Главная: мини-интерфейс процесса (окно программы, процесс идёт сам) ================= */
/* --s (шаг) ставит main.js на .mui; у элемента --at: на каком шаге он появляется; --p: 0..1 насколько «наступил» его шаг */
.mui {
  --ink-s: #1d1d3f; --muted-s: #6b6d88; --line-s: #e7e9f3;
  position: relative; width: 100%; max-width: 450px; font-size: 12.5px; color: var(--ink-s);
}
.mui__win {
  position: relative; background: #fff; border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line-s));
  box-shadow: 0 30px 60px -24px color-mix(in srgb, var(--accent) 55%, rgba(16, 16, 42, .5)), 0 2px 6px rgba(16, 16, 42, .06);
  animation: mui-float 8s ease-in-out infinite alternate;
}
@keyframes mui-float { from { transform: translateY(-4px); } to { transform: translateY(4px); } }
.mui__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 18px 18px 0 0; background: color-mix(in srgb, var(--accent) 7%, #fafbff); border-bottom: 1px solid var(--line-s); }
.mui__bar > i { width: 9px; height: 9px; border-radius: 50%; background: #ff6b6b; }
.mui__bar > i:nth-child(2) { background: #ffcf4a; }
.mui__bar > i:nth-child(3) { background: #3ccf8e; }
.mui__bar span { margin-left: 8px; font-size: 11.5px; font-weight: 700; color: var(--muted-s); }
.mui__head { padding: 14px 18px 4px; }
.mui__head b { font-size: 15px; font-weight: 700; padding-left: 10px; border-left: 3px solid var(--accent); }
.mui__body { padding: 10px 18px 18px; display: flex; flex-direction: column; gap: 10px; }

/* появление по шагам */
.mui [style*="--at"] {
  --p: clamp(0, calc(var(--s) - var(--at) + 1), 1);
  opacity: var(--p); transform: translateY(calc((1 - var(--p)) * 8px));
  transition: opacity .5s cubic-bezier(.16, 1, .3, 1), transform .6s cubic-bezier(.16, 1, .3, 1);
}
.mui.is-reset [style*="--at"] { transition-duration: .35s; }

.mui-fields { display: grid; grid-template-columns: auto 1fr auto auto; gap: 4px 10px; font-size: 11.5px; }
.mui-fields span { color: var(--muted-s); }
.mui-fields b { font-weight: 600; }
.mui-table { display: flex; flex-direction: column; border: 1px solid var(--line-s); border-radius: 12px; overflow: hidden; }
.mui-row { display: grid; grid-template-columns: 1fr 64px 76px; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line-s); }
.mui-row:first-child { border-top: 0; }
.mui-row--head { background: #f6f7fb; font-size: 11px; font-weight: 700; color: var(--muted-s); text-transform: uppercase; letter-spacing: .02em; }
.mui-table--pos .mui-row { grid-template-columns: 1fr 70px; }
.mui-row .num { text-align: right; font-variant-numeric: tabular-nums; }
.mui-row:not(.mui-row--head) { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) calc((1 - var(--p, 1)) * 30%), #fff), #fff); }
.mui-total { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 2px 0; }
.mui-total span { color: var(--muted-s); font-weight: 600; }
.mui-total b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
[data-count].is-tick { animation: mui-tick .45s cubic-bezier(.16, 1, .3, 1); }
@keyframes mui-tick { 0% { color: var(--accent); transform: translateY(-3px); } 100% { color: inherit; transform: none; } }
.mui-total b, .mui-kpi b { display: inline-block; }

.mui-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mui-btn { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 9px; font-weight: 700; font-size: 12px; transition: transform .15s, filter .15s, box-shadow .15s; }
.mui-btn--primary { background: var(--accent); color: #fff; box-shadow: 0 6px 14px -6px var(--accent); }
.mui-btn.is-pressed { transform: scale(.94); filter: brightness(.92); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent); }
.mui-badge { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px; font-weight: 700; font-size: 11.5px;
  color: color-mix(in srgb, var(--accent) 75%, #10102a); background: color-mix(in srgb, var(--accent) 13%, #fff); }
.mui svg path { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.mui-badge svg { width: 13px; height: 13px; }

/* всплывающее уведомление выходит за край окна */
.mui-toast {
  position: absolute; right: -8%; bottom: -6%; z-index: 3; min-width: 58%; padding: 11px 14px 11px 16px; border-radius: 14px;
  background: #1d1d3f; color: #fff; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 18px 36px -12px rgba(16, 16, 42, .55);
}
.mui-toast::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--accent); }
.mui-toast b { font-size: 12.5px; }
.mui-toast span { font-size: 11.5px; color: #c9cbe6; }

/* Söwda: склад */
.mui-stock { border: 1px solid var(--line-s); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.mui-stock__name { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.mui-stock__name span { color: var(--muted-s); }
.mui-pill { font-style: normal; font-weight: 700; color: var(--accent); }
.mui-bar { height: 10px; border-radius: 99px; background: #eef0f7; overflow: hidden; }
.mui-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #fff));
  transform-origin: left; opacity: 1 !important; transform: scaleX(calc(var(--a) + (var(--b) - var(--a)) * var(--p))) !important; transition: transform 1s cubic-bezier(.65, 0, .35, 1) !important; }
.mui-stock__nums { display: flex; justify-content: space-between; color: var(--muted-s); }
.mui-stock__nums b { color: var(--ink-s); font-variant-numeric: tabular-nums; }
.mui-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mui-kpi { border: 1px solid var(--line-s); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; background: #fbfbfe; }
.mui-kpi span { font-size: 11px; color: var(--muted-s); }
.mui-kpi b { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mui-kpi--wide { flex-direction: row; justify-content: space-between; align-items: center; }

/* Market: продажи дня */
.mui-spark { display: flex; align-items: flex-end; gap: 5px; height: 46px; padding: 6px 10px; border-radius: 12px; background: #f6f7fb; }
.mui-spark span { margin-right: auto; align-self: center; font-size: 11px; color: var(--muted-s); font-weight: 600; }
.mui-spark i { width: 10px; height: 100%; border-radius: 4px 4px 2px 2px; background: color-mix(in srgb, var(--accent) 35%, #fff); transform-origin: bottom; transform: scaleY(calc(var(--h) * var(--p, 1))); transition: transform .8s cubic-bezier(.16, 1, .3, 1); }
.mui-spark i.is-last { background: var(--accent); }
.mui-spark { --p: clamp(0, calc(var(--s) - 4), 1); }

/* Doc: маршрут согласования */
.mui-route { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 0 2px; }
.mui-route__line { position: absolute; left: 12.5%; right: 12.5%; top: 20px; height: 3px; border-radius: 3px; background: #eceef6; }
.mui .mui-route__line i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transform-origin: left;
  opacity: 1 !important; --p: clamp(0, calc((var(--s) - 1) / 3), 1); transform: scaleX(var(--p)) !important; transition: transform .9s cubic-bezier(.65, 0, .35, 1) !important; }
.mui .mui-route__step { opacity: 1; transform: none; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; z-index: 1; }
.mui-route__step i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: color-mix(in srgb, var(--accent) calc(var(--p) * 100%), #dfe2ee); box-shadow: 0 0 0 calc(var(--p) * 5px) color-mix(in srgb, var(--accent) 18%, transparent);
  transition: background .5s, box-shadow .5s; }
.mui-route__step i svg { width: 15px; height: 15px; opacity: var(--p); transform: scale(calc(.4 + var(--p) * .6)); transition: opacity .4s, transform .5s cubic-bezier(.34, 1.56, .64, 1); }
.mui-route__step span { font-size: 11px; font-weight: 600; color: var(--muted-s); }

/* Biz: график */
.mui-chart { height: 92px; border-radius: 12px; background: linear-gradient(#f6f7fb, #fff); padding: 6px; }
.mui-chart svg { width: 100%; height: 100%; display: block; }
.mui-chart__area { fill: color-mix(in srgb, var(--accent) 16%, transparent); stroke: none !important; }
.mui .mui-chart__line { opacity: 1; transform: none; stroke: var(--accent); stroke-width: 3; vector-effect: non-scaling-stroke;
  stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p)); transition: stroke-dashoffset 1.6s cubic-bezier(.65, 0, .35, 1); }

/* Start: сканер */
.mui-scan { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: #1d1d3f; color: #fff; font-weight: 600; font-size: 11.5px; }
.mui-scan i { position: relative; width: 34px; height: 20px; border-radius: 4px;
  background: repeating-linear-gradient(90deg, #fff 0 2px, transparent 2px 4px, #fff 4px 5px, transparent 5px 8px); overflow: hidden; }
.mui-scan i::after { content: ""; position: absolute; left: -2px; right: -2px; top: 0; height: 2px; background: #ff4d6d; box-shadow: 0 0 8px #ff4d6d; animation: mui-laser 1.2s ease-in-out infinite alternate; }
@keyframes mui-laser { from { top: 0; } to { top: 18px; } }

/* курсор: летит к кнопке и «нажимает» */
.mui__cursor { position: absolute; left: 0; top: 0; width: 22px; height: 22px; z-index: 4; opacity: 0; pointer-events: none;
  transform: translate(85%, 120%); transition: transform .8s cubic-bezier(.65, 0, .35, 1), opacity .3s; filter: drop-shadow(0 3px 4px rgba(16, 16, 42, .35)); }
.mui__cursor path { fill: #1d1d3f !important; stroke: #fff !important; stroke-width: 1.5 !important; }
.mui__cursor.is-on { opacity: 1; }
/* «нажатие» сжимает саму стрелку: scale на svg складывался с translate и уводил курсор к углу окна */
.mui__cursor.is-click path { transform-box: fill-box; transform-origin: 30% 20%; animation: mui-click .35s ease-out .55s; }
@keyframes mui-click { 50% { scale: .82; } }

/* вне экрана - пауза; без анимации - конечный кадр без движения */
.active-product__story.is-paused .mui__win, .active-product__story.is-paused .mui-scan i::after { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .mui__win, .mui-scan i::after { animation: none !important; }
  .mui *, .mui [style*="--at"] { transition: none !important; }
  .mui__cursor { display: none; }
}
@media (max-width: 1240px) { .mui { font-size: 12px; } .mui-toast { right: -2%; } }

/* ================= Демо: карточки выбора продукта в стиле карточек главной ================= */
.demo-pick { width: 100%; padding: 0; font: inherit; text-align: left; cursor: pointer; align-items: stretch; }
.demo-pick .pcard__hint { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.demo-pick .pcard__go {
  padding: 8px 12px; border-radius: 10px; color: var(--ink-2); background: var(--yellow);
  box-shadow: 0 6px 14px -8px rgba(16, 16, 42, .5); transition: transform .2s var(--ease), box-shadow .2s;
}
.demo-pick:hover .pcard__go { transform: translateY(-1px); box-shadow: 0 10px 18px -8px rgba(16, 16, 42, .5); }
.demo-pick--soon { cursor: default; filter: saturate(.55); opacity: .8; }
.demo-pick--soon:hover { transform: none; box-shadow: none; border-color: var(--line-2); }
.demo-pick--soon .pcard__go { background: var(--soft); color: var(--muted); box-shadow: none; }
.demo-pick .pcard__go { white-space: nowrap; flex: none; }
.demo-pick .pcard__hint { flex: 1; min-width: 0; line-height: 1.35; }


/* телефон: мини-окно программы по своей высоте, без вылета за край карточки */
@media (max-width: 640px) {
  .active-product__story { aspect-ratio: auto !important; flex: none !important; }
  .active-product__story .story-box { position: relative; inset: auto; padding: 6px 0 30px; }
  .active-product__story .mui-toast { right: 6px; bottom: 4px; min-width: 0; max-width: 80%; }
  .active-product__story .story-box { grid-template-columns: minmax(0, 1fr); }
  .active-product__story .mui { min-width: 0; font-size: 11.5px; }
  .active-product__story .mui-row { grid-template-columns: minmax(0, 1fr) 44px 72px; gap: 6px; padding: 8px 10px; }
  .active-product__story .mui-table--pos .mui-row { grid-template-columns: minmax(0, 1fr) 64px; }
  .active-product__story .mui-row--head { font-size: 10px; letter-spacing: 0; }
}

/* подбор партнёра: карточка «Ваш расчёт» из калькулятора */
.match-calc { display: grid; gap: 4px; min-width: 0; }
.match-calc__t { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.match-calc__t span { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text); }
.match-calc__t strong { font-size: 16px; color: var(--ink); }
.match-calc__t b { font-size: 16px; color: var(--blue); }
.match-calc__d { margin: 0; font-size: 14px; color: var(--text); }
