/* ============================================================ Общие элементы страниц */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s6); padding: var(--s8) 0 var(--s8); flex-wrap: wrap; }
.page-head .crumbs { padding-top: 0; margin-bottom: var(--s3); }
.h1-page { font-size: clamp(2rem, 1.5rem + 1.8vw, 2.75rem); line-height: 1.1; letter-spacing: -0.025em; font-weight: 600; }
.page-head__lead { margin-top: var(--s2); max-width: 60ch; }
.row-actions { display: flex; gap: var(--s3); flex-wrap: wrap; justify-content: center; }
.page-head .row-actions { justify-content: flex-end; }
.narrow { max-width: 720px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s12); }
@media (max-width: 899px) { .two-col { grid-template-columns: 1fr; gap: var(--s10); } }
.list { display: grid; gap: 4px; }
.footer-about { margin-top: var(--s3); max-width: 34ch; }
.error-code { font-size: 5rem; font-weight: 600; color: var(--blue); line-height: 1; letter-spacing: -0.04em; }
@media (max-width: 767px) {
  .page-head { padding: var(--s6) 0; align-items: flex-start; flex-direction: column; }
  .page-head .row-actions { justify-content: flex-start; width: 100%; }
  .page-head .row-actions .btn { flex: 1; }
}

/* ============================================================ Главная */
.hero { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding-top: var(--s12); padding-bottom: var(--s8); align-items: start; }
.hero__text { grid-column: 1 / span 5; padding-top: var(--s8); }
.hero__text .display { margin-top: var(--s5); }
.hero__text .lead { margin-top: var(--s5); }
.hero__actions { display: flex; gap: var(--s3); margin-top: var(--s8); flex-wrap: wrap; }
.hero__seller { margin-top: var(--s8); padding-top: var(--s5); border-top: 1px solid var(--line); color: var(--ink-2); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hero__feature { grid-column: 6 / span 4; }
.hero__photo-link { display: block; border-radius: var(--r-product); }
.hero__photo { border-radius: var(--r-product); }
.hero__caption { margin-top: var(--s4); display: grid; gap: 6px; }
.hero__caption-top { display: flex; gap: 10px; align-items: center; }
.hero__caption-title { color: var(--ink); font-weight: 500; font-size: 1.0625rem; line-height: 1.35; }
.hero__caption-title:hover { color: var(--blue); }
.hero__rail { grid-column: 10 / span 3; border-left: 1px solid var(--line); padding-left: var(--gutter); align-self: stretch; display: flex; flex-direction: column; }
.rail__title { font-size: 1.125rem; font-weight: 600; line-height: 1.3; }
.rail__head { padding-bottom: var(--s4); border-bottom: 1px solid var(--line); }
.rail__head .caption { margin-top: 4px; }
.rail__item + .rail__item { border-top: 1px solid var(--line); }
.rail__link { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 14px 0; color: var(--ink); align-items: center; }
.rail__link img { width: 56px; height: 70px; object-fit: cover; border-radius: 8px; background: var(--photo-bg); }
.rail__link:hover .rail__name { color: var(--blue); }
.rail__body { display: grid; gap: 4px; min-width: 0; }
.rail__name { font-size: 0.875rem; line-height: 1.35; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rail__price { font-size: 0.9375rem; font-weight: 600; }
.rail__all { margin-top: auto; padding-top: var(--s4); min-height: 44px; }

@media (max-width: 1099px) {
  .hero__text { grid-column: 1 / span 6; padding-top: 0; }
  .hero__feature { grid-column: 7 / span 6; }
  .hero__rail { grid-column: 1 / -1; border-left: 0; padding-left: 0; margin-top: var(--s10); }
  .rail__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); }
  .rail__item + .rail__item { border-top: 0; }
  .rail__all { margin-top: var(--s2); }
}
@media (max-width: 767px) {
  .hero { display: flex; flex-direction: column; padding-top: var(--s6); padding-bottom: var(--s10); }
  .hero__text .display { margin-top: var(--s3); }
  .hero__text .lead { margin-top: var(--s4); }
  .hero__actions { margin-top: var(--s6); }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__seller { margin-top: var(--s6); }
  .hero__feature { order: -1; margin: 0 calc(-1 * var(--pad)) var(--s6); }
  .hero__photo-link, .hero__photo { border-radius: 0; }
  .hero__photo { aspect-ratio: 5 / 4; }
  .hero__caption { padding-inline: var(--pad); }
  .hero__rail { margin-top: var(--s10); width: 100%; }
  .rail__list { display: flex; overflow-x: auto; gap: 12px; margin: 0 calc(-1 * var(--pad)); padding: var(--s4) var(--pad) 4px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .rail__item { flex: 0 0 72%; scroll-snap-align: start; }
  .rail__link { padding: 0; }
}

.categories { display: flex; flex-wrap: wrap; gap: 6px 32px; }
.categories__link { display: inline-flex; align-items: flex-start; gap: 4px; font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem); font-weight: 500; letter-spacing: -0.02em; color: var(--ink); line-height: 1.25; padding: 4px 0; }
.categories__link sup { font-size: 0.875rem; font-weight: 500; color: var(--ink-2); letter-spacing: 0; top: .2em; position: relative; }
.categories__link:hover { color: var(--blue); }
@media (max-width: 767px) { .categories { gap: 2px 20px; } }

.guide-feature { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); border-top: 1px solid var(--ink); padding-top: var(--s8); }
.guide-feature__text { grid-column: 1 / span 7; display: grid; gap: var(--s4); align-content: start; }
.guide-feature__text .h2 a { color: var(--ink); }
.guide-feature__text .h2 a:hover { color: var(--blue); }
.guide-feature__list { grid-column: 9 / span 4; counter-reset: none; display: grid; gap: 0; align-content: start; }
.guide-feature__list li { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-weight: 500; }
.guide-feature__list li span { color: var(--blue); font-size: var(--fs-small); padding-top: 2px; }
@media (max-width: 899px) { .guide-feature__text, .guide-feature__list { grid-column: 1 / -1; } }

.seller-invite { display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--s12); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: var(--s12); align-items: center; }
.seller-invite__text { display: grid; gap: var(--s4); justify-items: start; }
.seller-invite__text p { color: var(--ink-2); max-width: 48ch; }
.seller-invite__facts { display: flex; gap: var(--s8); margin: var(--s2) 0; flex-wrap: wrap; }
.seller-invite__facts li { display: grid; color: var(--ink-2); font-size: var(--fs-small); }
.seller-invite__facts b { color: var(--ink); font-size: 1.375rem; font-weight: 600; letter-spacing: -0.01em; }
.seller-invite__flow { display: grid; gap: 10px; justify-items: center; background: var(--chat-bg); border-radius: 14px; padding: var(--s8) var(--s6); }
.flow-url { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: var(--fs-small); color: var(--ink-2); width: 100%; max-width: 360px; overflow: hidden; white-space: nowrap; }
.flow-url span { overflow: hidden; text-overflow: ellipsis; }
.flow-arrow { color: var(--blue); }
.flow-post { display: grid; grid-template-columns: 72px 1fr; gap: 12px; background: #fff; border-radius: 14px 14px 14px 6px; padding: 10px; width: 100%; max-width: 360px; box-shadow: 0 1px 1.5px rgba(10,27,58,.13); }
.flow-post img { width: 72px; height: 90px; object-fit: cover; border-radius: 8px; }
.flow-post div { display: grid; gap: 4px; align-content: center; font-size: var(--fs-small); }
.flow-post b { font-weight: 600; line-height: 1.3; }
.flow-post__ad { color: var(--ink-2); font-size: 0.75rem; }
@media (max-width: 899px) { .seller-invite { grid-template-columns: 1fr; padding: var(--s8) var(--s5); gap: var(--s8); } }

/* ============================================================ Лента */
.deals-toolbar { display: flex; gap: var(--s2); align-items: center; }
.select--sm { min-height: 40px; padding-block: 8px; font-size: 0.9375rem; width: auto; }
.filters-open { display: none; }
.badge-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--blue); color: #fff; font-size: 0.75rem; font-weight: 600; }
.deals-layout { display: grid; grid-template-columns: 264px 1fr; gap: var(--s10); align-items: start; }
.filters { position: sticky; top: 92px; }
.filters__sheet-head { display: none; }
.filters__group { border: 0; padding: 0; margin: 0 0 var(--s6); }
.filters__group legend { font-size: var(--fs-small); font-weight: 600; margin-bottom: var(--s3); padding: 0; }
.filters__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.radio-chip { position: relative; }
.radio-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.radio-chip span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: var(--r-chip); border: 1px solid var(--line-strong); background: var(--surface); font-size: 0.9375rem; font-weight: 500; cursor: pointer; }
.radio-chip input:hover + span { border-color: var(--ink); }
.radio-chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.radio-chip input:focus-visible + span { box-shadow: var(--focus); }
.price-range { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; color: var(--ink-2); }
.filters__actions { display: grid; gap: 8px; }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: var(--s6); }
.cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1099px) { .deals-layout { grid-template-columns: 220px 1fr; gap: var(--s8); } .cards--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .page-head--deals { flex-direction: row; align-items: flex-end; flex-wrap: wrap; }
  .deals-toolbar { width: 100%; }
  .deals-toolbar .select { flex: 1; }
  .filters-open { display: inline-flex; flex: 1; }
  .deals-layout { grid-template-columns: 1fr; }
  .filters { position: fixed; inset: 0; z-index: 60; background: rgba(10,27,58,.42); display: none; top: 0; }
  .filters.is-open { display: block; }
  .filters__form { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88dvh; overflow: auto; background: var(--surface); border-radius: var(--r-dialog) var(--r-dialog) 0 0; padding: var(--s5) var(--s4) 0; animation: sheet-in 220ms var(--ease); }
  .filters__sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s4); }
  .filters__actions { position: sticky; bottom: 0; background: var(--surface); padding: var(--s3) 0 calc(var(--s4) + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); margin: 0 calc(-1 * var(--s4)); padding-inline: var(--s4); }
  .radio-chip span { min-height: 44px; padding: 0 16px; }
  .cards--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 359px) { .cards--3 { grid-template-columns: 1fr; } }
@keyframes sheet-in { from { transform: translateY(24px); opacity: .4; } }

/* ============================================================ Товар */
.deal { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); padding-top: var(--s6); }
.deal__media { grid-column: 1 / span 6; }
.deal__photo { aspect-ratio: 4 / 5; }
.deal__credit { margin-top: var(--s2); }
.deal__info { grid-column: 8 / span 5; display: grid; gap: var(--s4); align-content: start; padding-top: var(--s2); }
.deal__top { display: flex; gap: 10px; align-items: center; }
.deal__title { font-size: clamp(1.625rem, 1.3rem + 1.2vw, 2.25rem); line-height: 1.15; letter-spacing: -0.022em; font-weight: 600; overflow-wrap: anywhere; hyphens: auto; }
.deal__buy { display: grid; gap: var(--s4); padding: var(--s6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); margin-top: var(--s2); }
.deal__facts { margin-top: var(--s2); }
.deal__h { margin-top: var(--s4); }
@media (max-width: 899px) {
  .deal { display: block; padding-top: var(--s4); }
  .deal__media { margin: 0 calc(-1 * var(--pad)); }
  .deal__photo { border-radius: 0; }
  .deal__credit { padding-inline: var(--pad); }
  .deal__info { margin-top: var(--s6); }
  .deal__buy { padding: var(--s5) var(--s4); }
}

/* ============================================================ Продавцам */
.seller-hero { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding-top: var(--s12); padding-bottom: var(--s8); align-items: start; }
.seller-hero__text { grid-column: 1 / span 6; padding-top: var(--s8); display: grid; gap: var(--s5); align-content: start; }
.url-form { margin-top: var(--s4); display: grid; gap: 8px; padding: var(--s5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); box-shadow: var(--shadow-raise); }
.url-form__row { display: flex; gap: 8px; }
.url-form__input { position: relative; flex: 1; min-width: 0; }
.url-form__input .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-2); pointer-events: none; }
.url-form__input .input { padding-left: 44px; min-height: 56px; }
.pipeline { grid-column: 8 / span 5; position: relative; display: grid; gap: var(--s5); }
.pipeline::before { content: ""; position: absolute; left: 15px; top: 24px; bottom: 40%; width: 2px; background: linear-gradient(var(--blue) 0 70%, var(--blue-line)); border-radius: 2px; }
.pipeline__step { display: grid; grid-template-columns: 32px 1fr; gap: 16px; position: relative; }
.pipeline__n { width: 32px; height: 32px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: var(--fs-small); position: relative; z-index: 1; box-shadow: 0 0 0 4px var(--bg); }
.pipeline__label { font-size: var(--fs-caption); color: var(--ink-2); font-weight: 500; margin: 6px 0 8px; }
.pipeline__url { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: var(--fs-small); color: var(--ink); overflow: hidden; white-space: nowrap; }
.pipeline__url span { overflow: hidden; text-overflow: ellipsis; }
.pipeline__url .icon { color: var(--blue); }
.pipeline__product { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.pipeline__product img { width: 56px; height: 70px; object-fit: cover; border-radius: 8px; }
.pipeline__product b { display: block; font-size: var(--fs-small); font-weight: 600; line-height: 1.3; margin-bottom: 6px; }
.pipeline__step--post .tg { padding: var(--s4); }
.pipeline__step--post .tg__photo { aspect-ratio: 1 / 1; max-height: 300px; }
@media (max-width: 1099px) { .seller-hero__text { grid-column: 1 / span 7; padding-top: 0; } .pipeline { grid-column: 8 / span 5; } }
@media (max-width: 899px) {
  .seller-hero { display: block; padding-top: var(--s6); padding-bottom: var(--s10); }
  .pipeline { margin-top: var(--s10); }
}
@media (max-width: 559px) {
  .url-form { padding: var(--s4); }
  .url-form__row { flex-direction: column; }
  .url-form__row .btn { width: 100%; }
}

.platform-name { display: block; font-weight: 600; }
.platform-cards { display: none; }
.platforms__note { margin-top: var(--s4); max-width: 80ch; }
@media (max-width: 767px) {
  .platforms { display: none; }
  .platform-cards { display: grid; gap: 0; border-top: 1px solid var(--line); }
  .platform-card { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
  .platform-card b { font-weight: 600; }
  .platform-card dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; font-size: var(--fs-small); }
  .platform-card dt { color: var(--ink-2); }
}

.tariffs { display: grid; grid-template-columns: 1fr 1.25fr 1fr; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--surface); overflow: hidden; }
.tariff { padding: var(--s8) var(--s6); display: grid; gap: var(--s2); align-content: start; }
.tariff + .tariff { border-left: 1px solid var(--line); }
.tariff--main { background: var(--blue-soft); }
.tariff__name { font-weight: 600; font-size: 1.0625rem; }
.tariff__price { font-size: 3rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; }
.tariff__price span { font-size: 1.125rem; letter-spacing: 0; color: var(--ink-2); font-weight: 500; }
.tariff--main .tariff__price { color: var(--blue); }
.tariff__desc { color: var(--ink-2); font-size: 0.9375rem; }
.tariff-terms { display: grid; gap: 10px; margin-top: var(--s6); }
.tariff-terms li, .rules li { display: flex; gap: 12px; align-items: flex-start; }
.tariff-terms .icon, .rules .icon { color: var(--blue); margin-top: 3px; }
.rules { display: grid; gap: 14px; margin-bottom: var(--s4); }
@media (max-width: 767px) {
  .tariffs { grid-template-columns: 1fr; }
  .tariff { padding: var(--s5); grid-template-columns: 1fr auto; align-items: baseline; }
  .tariff__price { font-size: 2rem; grid-row: 1; grid-column: 2; }
  .tariff__desc { grid-column: 1 / -1; }
  .tariff + .tariff { border-left: 0; border-top: 1px solid var(--line); }
}

.steps-line { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--gutter); }
.steps-line li { display: grid; gap: 8px; align-content: start; padding-top: var(--s4); border-top: 2px solid var(--line); }
.steps-line li:nth-child(-n+3) { border-top-color: var(--blue); }
.steps-line span { color: var(--blue); font-size: var(--fs-small); font-weight: 600; }
.steps-line b { font-weight: 600; font-size: 1.0625rem; line-height: 1.3; }
.steps-line p { color: var(--ink-2); font-size: 0.9375rem; }
@media (max-width: 1099px) { .steps-line { grid-template-columns: repeat(3, 1fr); row-gap: var(--s8); } }
@media (max-width: 559px) { .steps-line { grid-template-columns: 1fr; row-gap: var(--s5); } .steps-line li { grid-template-columns: 32px 1fr; column-gap: 12px; } .steps-line li p { grid-column: 2; } }
.report-note { margin-top: var(--s4); }

.cta-band { display: flex; justify-content: space-between; align-items: center; gap: var(--s8); padding: var(--s12); border-radius: var(--r-panel); background: var(--ink); color: #fff; flex-wrap: wrap; }
.cta-band p { color: #B9C4D6; margin-top: var(--s2); }
.cta-band__actions { display: flex; gap: var(--s3); flex-wrap: wrap; }
.cta-band .btn--secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.cta-band .btn--secondary:hover { border-color: #fff; color: #fff; }
.cta-band :focus-visible { box-shadow: 0 0 0 3px var(--ink), 0 0 0 5px #fff; }
@media (max-width: 767px) { .cta-band { padding: var(--s8) var(--s5); } .cta-band__actions, .cta-band__actions .btn { width: 100%; } }

/* ============================================================ Инструменты */
.tools-list { display: grid; border-top: 1px solid var(--ink); }
.tool-row { display: grid; grid-template-columns: 56px 1fr auto; gap: var(--s6); align-items: center; padding: var(--s8) 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.tool-row:hover { color: var(--ink); }
.tool-row:hover .h3 { color: var(--blue); }
.tool-row__icon { width: 56px; height: 56px; border-radius: 14px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; }
.tool-row__body { display: grid; gap: 6px; }
.tool-row__body .muted { max-width: 64ch; }
.tool-row > .icon { color: var(--ink-2); transition: transform var(--t) var(--ease); }
.tool-row:hover > .icon { transform: translateX(4px); color: var(--blue); }
@media (max-width: 559px) { .tool-row { grid-template-columns: 1fr; gap: var(--s3); padding: var(--s6) 0; } .tool-row > .icon { display: none; } }

/* ============================================================ Редактор поста */
.editor-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s8); align-items: start; }
.editor-layout__preview { position: sticky; top: 92px; display: grid; gap: var(--s4); }
.editor-sep { margin: var(--s8) 0 var(--s6); }
.editor-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s8); padding-top: var(--s6); border-top: 1px solid var(--line); }
.editor-local-note { margin-top: var(--s3); }
.import-status { margin-top: 2px; min-height: 20px; }
.import-status .notice { margin-top: 6px; font-size: var(--fs-small); padding: 10px 12px; }
.import-loading { display: flex; gap: 10px; align-items: center; color: var(--ink-2); font-size: var(--fs-small); }
.import-loading .skeleton { width: 120px; height: 10px; }
.examples { display: flex; flex-wrap: wrap; gap: 2px 4px; align-items: center; margin-top: 4px; }
.examples .btn--xs { --h: 30px; padding: 0 8px; font-size: var(--fs-caption); }
.photo-picker { display: flex; gap: var(--s4); align-items: center; padding: 12px; border: 1px dashed var(--line-strong); border-radius: 12px; background: #FBFCFE; }
.photo-picker.is-dragover { border-color: var(--blue); background: var(--blue-soft); }
.photo-picker__thumb { width: 72px; height: 90px; border-radius: 8px; background: var(--photo-bg); display: grid; place-items: center; color: var(--ink-2); overflow: hidden; flex: none; }
.photo-picker__thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-picker__body { display: grid; gap: 8px; justify-items: start; min-width: 0; }
.photo-picker__upload { cursor: pointer; }
.photo-picker__upload:focus-within { box-shadow: var(--focus); }
.photo-rights { margin-top: var(--s3); }
.preview { min-width: 0; max-width: 100%; }
.preview__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.preview__bar .select { min-width: 0; max-width: 100%; }
.preview__title { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.preview__note { margin-top: calc(-1 * var(--s1)); }
.mobile-tabs { display: none; }
@media (max-width: 899px) {
  .editor-layout { grid-template-columns: 1fr; gap: var(--s4); }
  .editor-layout__preview { position: static; }
  .mobile-tabs { display: grid; grid-template-columns: 1fr 1fr; position: sticky; top: 60px; z-index: 30; background: var(--bg); padding: 8px 0; margin-bottom: var(--s2); gap: 4px; }
  .mobile-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 10px; font-weight: 500; cursor: pointer; color: var(--ink-2); }
  .mobile-tabs [aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
  .editor-layout [role="tabpanel"][data-hidden-mobile] { display: none; }
  .editor-actions .btn { flex: 1 1 100%; }
  .page-editor .site-footer { margin-top: var(--s10); }
}

/* ============================================================ Калькулятор */
.calc { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--s8); align-items: start; }
.calc__form .segmented { flex-wrap: wrap; }
.calc__tariff { border: 0; padding: 0; margin: 0 0 var(--s6); }
.calc__tariff legend { margin-bottom: 8px; }
.calc__result { position: sticky; top: 92px; background: var(--ink); color: #fff; border-radius: var(--r-panel); padding: var(--s8); min-height: 320px; display: grid; }
.calc__result .muted, .calc__result .caption { color: #B9C4D6; }
.calc__empty { align-self: center; display: grid; gap: 8px; }
.calc__out { display: grid; gap: var(--s5); align-content: start; }
.calc__label { color: #B9C4D6; }
.calc__figures { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s6); }
.calc__figures div { display: grid; gap: 2px; }
.calc__big { font-size: clamp(2.5rem, 2rem + 2vw, 3.75rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1; }
.calc__unit { color: #B9C4D6; }
.calc__formula { font-size: var(--fs-small); color: #DDE5F1; padding: 12px 14px; border-radius: 10px; background: rgba(255,255,255,.07); overflow-wrap: anywhere; }
.calc__actions { display: flex; gap: var(--s3); flex-wrap: wrap; }
.calc__actions .btn--ghost { color: #fff; }
.calc__actions .btn--ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.calc__result :focus-visible { box-shadow: 0 0 0 3px var(--ink), 0 0 0 5px #fff; }
.calc__out.is-fresh .calc__big { animation: fig-in 240ms var(--ease); }
@keyframes fig-in { from { opacity: .3; transform: translateY(4px); } }
@media (max-width: 899px) { .calc { grid-template-columns: 1fr; } .calc__result { position: static; padding: var(--s6) var(--s5); min-height: 0; } .calc__actions .btn { flex: 1 1 100%; } }
@media (max-width: 559px) { .calc__form .segmented { display: grid; width: 100%; } .calc__form .segmented label span { width: 100%; justify-content: center; min-height: 44px; } }

/* ============================================================ Мастер заказа */
.wizard-head { align-items: flex-end; }
.save-state { font-size: var(--fs-small); color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.save-state.is-saved::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.save-state.is-error { color: var(--danger); }
.wizard-gate { margin-bottom: var(--s6); align-items: center; }
.wizard-gate > div { flex: 1; }
.stepper { margin-bottom: var(--s6); }
.wizard-step + .wizard-step { margin-top: 0; }
.wizard-nav { display: flex; gap: var(--s3); margin-top: var(--s6); align-items: center; }
.wizard-nav [data-save] { margin-right: auto; }
.wizard-nav [data-prev]:not([hidden]) + [data-save] { margin-right: auto; }
.slots-label { margin-top: var(--s5); }
.slot-legend { margin-top: var(--s3); }
.quote { margin-top: var(--s6); }
.summary { padding: var(--s5); }
.summary__list { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 0.9375rem; }
.summary__list dt { color: var(--ink-2); }
.summary__list dd { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.review-dl { margin-bottom: var(--s6); }
.review-errors { margin-bottom: var(--s5); }
.review-errors ul { margin: 6px 0 0; padding-left: 18px; }
.review-errors button { border: 0; background: none; color: var(--blue); padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; font: inherit; }
.consent { margin-top: var(--s5); }
.review-next { margin-top: var(--s5); }
.wizard-done { text-align: center; display: grid; justify-items: center; gap: var(--s4); padding: var(--s12) var(--s6); }
.done__icon { width: 64px; height: 64px; border-radius: 50%; background: var(--success-bg); color: var(--success); display: grid; place-items: center; }
.wizard-done .lead { max-width: 52ch; margin-inline: auto; }
.mobile-summary { display: none; }
@media (max-width: 899px) {
  .wizard-nav { position: sticky; bottom: 0; z-index: 20; background: rgba(243,246,251,.96); margin: var(--s4) calc(-1 * var(--pad)) 0; padding: 10px var(--pad) calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); flex-wrap: wrap; }
  .wizard-nav [data-save] { order: 3; width: 100%; margin: 0; --h: 36px; }
  .wizard-nav [data-next], .wizard-nav [data-submit] { flex: 1; }
  .wizard-gate { flex-wrap: wrap; }
  .page-wizard .summary { order: -1; }
}

/* ============================================================ Кабинет */
.account-filters { display: flex; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s5); align-items: center; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs .chip { min-height: 38px; font-size: 0.9375rem; }
.search { position: relative; width: min(320px, 100%); }
.search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-2); }
.search .input { padding-left: 40px; min-height: 44px; }
.order-cell { display: flex; gap: 12px; align-items: center; color: var(--ink); min-width: 0; }
.order-cell:hover b { color: var(--blue); }
.order-cell img, .order-cell__ph { width: 40px; height: 50px; border-radius: 6px; object-fit: cover; background: var(--photo-bg); flex: none; display: grid; place-items: center; color: var(--ink-2); }
.order-cell b { display: block; font-weight: 500; max-width: 32ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-cell small, .order-card small { color: var(--ink-2); font-size: var(--fs-caption); }
.order-cards { display: none; }
.login-panel { display: flex; justify-content: space-between; align-items: center; gap: var(--s6); flex-wrap: wrap; }
.login-panel p { max-width: 56ch; margin-top: 6px; }
.account-note { margin-top: var(--s6); }
@media (max-width: 899px) {
  .orders-table { display: none; }
  .order-cards { display: grid; gap: 10px; }
  .order-card { display: grid; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; color: var(--ink); justify-items: start; }
  .order-card:hover { color: var(--ink); border-color: var(--line-strong); }
  .order-card__top { display: flex; gap: 12px; align-items: center; width: 100%; }
  .order-card__top img { width: 44px; height: 55px; border-radius: 6px; object-fit: cover; }
  .order-card__title { display: grid; min-width: 0; }
  .order-card__title b { font-weight: 500; overflow-wrap: anywhere; }
  .order-card__dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: var(--fs-small); width: 100%; }
  .order-card__dl dt { color: var(--ink-2); }
  .order-card__dl dd { text-align: right; }
  .account-filters { flex-direction: column; align-items: stretch; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--pad)); padding: 2px var(--pad); scrollbar-width: none; }
  .search { width: 100%; }
}

/* Детали заказа */
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s4); padding: var(--s5) 0 var(--s6); flex-wrap: wrap; }
.detail-head__product { display: flex; gap: var(--s4); align-items: center; min-width: 0; flex: 1; }
.detail-head__product img { width: 72px; height: 90px; border-radius: 10px; object-fit: cover; flex: none; }
.detail-title { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1.2; letter-spacing: -0.02em; font-weight: 600; overflow-wrap: anywhere; }
.progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: var(--s8); }
.progress li { padding-top: 10px; border-top: 3px solid var(--line); font-size: var(--fs-small); font-weight: 500; color: var(--ink-2); }
.progress .is-done { border-top-color: var(--ink); color: var(--ink); }
.progress .is-current { border-top-color: var(--blue); color: var(--blue); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: var(--s8); align-items: start; }
.detail-main { display: grid; gap: var(--s8); }
.action-panel { display: grid; gap: var(--s4); justify-items: start; }
.action-panel .notice { width: 100%; }
.reserve { display: inline-flex; gap: 8px; align-items: center; font-size: var(--fs-small); color: var(--warn); background: var(--warn-bg); padding: 6px 10px; border-radius: 8px; }
.reschedule { display: grid; gap: var(--s3); width: 100%; }
.demo-sim-note { display: flex; gap: 6px; align-items: center; margin-top: calc(-1 * var(--s5)); }
.detail-section h2 { margin-bottom: var(--s4); }
.placements { display: grid; border-top: 1px solid var(--line); }
.placement { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: center; }
.placement b { font-weight: 600; display: block; }
.placement small { color: var(--ink-2); font-size: var(--fs-caption); }
.placement__link { grid-column: 1 / -1; }
.placement__link:empty { display: none; }
.history { display: grid; gap: 0; border-left: 2px solid var(--line); padding-left: var(--s5); }
.history li { display: grid; gap: 2px; padding: 8px 0; position: relative; font-size: 0.9375rem; }
.history li::before { content: ""; position: absolute; left: calc(-1 * var(--s5) - 6px); top: 15px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); }
.history li:first-child::before { border-color: var(--blue); background: var(--blue); }
.detail-side { display: grid; gap: var(--s4); position: sticky; top: 92px; }
.dl--stack { grid-template-columns: auto 1fr; }
.dl--stack dd { text-align: right; }
.side-actions { display: grid; gap: var(--s2); }
.paylink { display: grid; gap: 4px; }
.paylink code, .login-link code { display: block; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; font-size: var(--fs-small); overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
@media (max-width: 899px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-side { position: static; }
  .progress li { font-size: var(--fs-caption); }
  .action-panel .btn { width: 100%; }
}

/* Вход */
.login-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 0.9375rem; }
.login-link { display: grid; gap: 8px; }
.demo-login { border-top: 1px solid var(--line); padding-top: var(--s4); display: grid; gap: var(--s3); }
.demo-login .tag { margin-right: 4px; }

/* Редакторская панель */
.adm-note { margin-bottom: var(--s8); }
.adm-section { margin-bottom: var(--s10); display: grid; gap: var(--s3); }
.adm-section > h2 { display: flex; align-items: center; gap: 10px; margin-bottom: var(--s2); }
.count-pill { font-size: var(--fs-caption); background: var(--ink); color: #fff; border-radius: 10px; padding: 1px 8px; }
.adm-row { display: grid; gap: var(--s3); padding: var(--s4) var(--s5); }
.adm-row__head { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
.adm-row__head img { width: 48px; height: 60px; border-radius: 6px; object-fit: cover; }
.adm-row__head b { display: block; font-weight: 600; }
.adm-row__head small { color: var(--ink-2); font-size: var(--fs-caption); }
.adm-row--compact { padding: var(--s3) var(--s4); }
.adm-preview summary { cursor: pointer; color: var(--blue); font-size: var(--fs-small); font-weight: 500; min-height: 32px; display: flex; align-items: center; }
.adm-caption { white-space: pre-wrap; font-family: var(--font); font-size: 0.9375rem; background: var(--bg); padding: 12px; border-radius: 8px; margin: 8px 0; }
.adm-actions { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }
.adm-actions--wrap .btn { flex: 0 0 auto; }
.adm-reject { display: flex; gap: 8px; flex: 1; min-width: 260px; }
.input--sm { min-height: 40px; padding-block: 8px; }
.adm-placements { display: grid; gap: 6px; }
.adm-placements li { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: var(--fs-small); }
.adm-placements li > span:first-child { min-width: 200px; }
.adm-reconcile { display: inline-flex; gap: 6px; }
.adm-tariffs { display: grid; gap: 4px; max-width: 420px; }
.adm-tariffs li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.audit code { font-size: var(--fs-caption); background: var(--bg); padding: 1px 5px; border-radius: 4px; }
@media (max-width: 767px) {
  .adm-row__head { grid-template-columns: auto 1fr; }
  .adm-row__head .status { grid-column: 1 / -1; justify-self: start; }
  .adm-actions .btn { width: 100%; }
  .adm-reject { flex-direction: column; min-width: 0; width: 100%; }
  .audit { display: block; overflow-x: auto; }
}

/* ============================================================ Статьи */
.guide-list { border-top: 1px solid var(--ink); }
.guide-item { display: grid; grid-template-columns: 64px 1fr; gap: var(--s6); padding: var(--s8) 0; border-bottom: 1px solid var(--line); }
.guide-item__n { color: var(--blue); font-weight: 600; font-size: 1.25rem; }
.guide-item div { display: grid; gap: var(--s2); max-width: 68ch; }
.guide-item a { color: var(--ink); }
.guide-item a:hover { color: var(--blue); }
@media (max-width: 559px) { .guide-item { grid-template-columns: 1fr; gap: var(--s2); padding: var(--s6) 0; } }
.article__head { max-width: 860px; display: grid; gap: var(--s5); padding: var(--s6) 0 var(--s10); border-bottom: 1px solid var(--line); }
.article__title { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem); }
.article__grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--s12); padding-top: var(--s10); }
.article__toc { position: sticky; top: 92px; align-self: start; display: grid; gap: var(--s3); }
.article__toc ol { display: grid; gap: 4px; padding-left: 18px; margin: 0; font-size: 0.9375rem; }
.article__toc a { color: var(--ink); } .article__toc a:hover { color: var(--blue); }
.article__body { max-width: 68ch; font-size: 1.125rem; line-height: 1.65; }
.article__body section + section { margin-top: var(--s10); }
.article__body h2 { font-size: 1.5rem; line-height: 1.25; margin-bottom: var(--s4); }
.article__body p + p { margin-top: 1em; }
.article__tool { margin-top: var(--s12); padding: var(--s6); border-radius: var(--r-panel); background: var(--blue-soft); display: flex; justify-content: space-between; align-items: center; gap: var(--s4); flex-wrap: wrap; font-weight: 600; font-size: 1rem; }
.more-guides { display: grid; border-top: 1px solid var(--line); }
.more-guides li { display: flex; justify-content: space-between; gap: var(--s4); padding: 16px 0; border-bottom: 1px solid var(--line); font-weight: 500; }
.more-guides a { color: var(--ink); } .more-guides a:hover { color: var(--blue); }
@media (max-width: 899px) { .article__grid { grid-template-columns: 1fr; gap: var(--s6); } .article__toc { position: static; } .article__body { font-size: 1.0625rem; } }

/* Служебные */
.service { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--s12); padding-top: var(--s8); }
.service__nav { display: grid; gap: 2px; align-content: start; position: sticky; top: 92px; }
.service__nav a { color: var(--ink); padding: 10px 12px; border-radius: 8px; font-size: 0.9375rem; }
.service__nav a:hover { background: var(--surface); }
.service__nav a[aria-current="page"] { background: var(--surface); color: var(--blue); font-weight: 500; box-shadow: inset 2px 0 0 var(--blue); }
.service__body { display: grid; gap: var(--s5); align-content: start; }
.service__body h2 { font-size: 1.25rem; margin-top: var(--s4); }
.service__body ul { display: grid; gap: 8px; padding-left: 20px; margin: 0; }
@media (max-width: 767px) { .service { grid-template-columns: 1fr; gap: var(--s6); padding-top: var(--s5); } .service__nav { position: static; display: flex; overflow-x: auto; gap: 4px; margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad); scrollbar-width: none; } .service__nav a { white-space: nowrap; background: var(--surface); border: 1px solid var(--line); } }
.wizard-nav__sum { display: none; }
@media (max-width: 899px) {
  .wizard-nav__sum { display: block; width: 100%; order: -1; font-size: var(--fs-small); font-weight: 600; color: var(--ink); }
  .wizard-nav__sum:empty { display: none; }
}

/* ---- исправления после первого прохода (320–390 px) ---- */
.pipeline__step { grid-template-columns: 32px minmax(0, 1fr); }
.pipeline__body { min-width: 0; }
.deals-toolbar > * { min-width: 0; }
@media (max-width: 767px) {
  .deals-toolbar .select, .deals-toolbar .filters-open { flex: 1 1 0; }
}
@media (max-width: 899px) {
  .editor-layout { grid-template-columns: minmax(0, 1fr); }
  .detail-grid, .calc { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 559px) {
  .btn { white-space: normal; line-height: 1.25; padding-block: 8px; }
  .url-import .btn { padding-inline: 14px; }
}
@media (max-width: 559px) {
  [data-templates] { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  [data-templates] button { justify-content: center; padding: 0 6px; font-size: 0.875rem; min-height: 44px; }
}
.go-short, .demo-bar__short { display: none; }
@media (max-width: 767px) {
  .hero .rail__list { padding: var(--s4) var(--pad) 4px; }
  .go-long, .demo-bar__long { display: none; }
  .go-short, .demo-bar__short { display: inline; }
}

/* Второй визуальный проход: шапка заказа и строки с иконкой на узких экранах */
.detail-head__product { flex: 1 1 280px; }
.detail-head__product > div { flex: 1 1 auto; min-width: 0; }
.detail-title { overflow-wrap: break-word; hyphens: auto; }
.reserve, .demo-sim-note { align-items: flex-start; }
.reserve .icon, .demo-sim-note .icon { margin-top: 2px; }
@media (max-width: 767px) {
  .detail-head { flex-direction: column-reverse; gap: var(--s3); }
  .detail-head__product { flex: none; width: 100%; align-items: flex-start; }
  .detail-head__product img { width: 56px; height: 70px; }
  .detail-title { font-size: 1.375rem; }
}
.detail-main, .detail-side { grid-template-columns: minmax(0, 1fr); }
.placement { grid-template-columns: minmax(0, 1fr) auto; }
.placement small { overflow-wrap: anywhere; }
@media (max-width: 420px) {
  .placement { grid-template-columns: minmax(0, 1fr); }
  .placement .status { justify-self: start; }
}

.partner-feature { display:grid; grid-template-columns:minmax(0,336px) minmax(0,1fr); gap:clamp(24px,4vw,56px); align-items:center; padding:clamp(20px,3vw,40px); border:1px solid var(--line); border-radius:16px; background:#fff; }
.partner-feature>img { width:100%; height:auto; border-radius:10px; }
.partner-feature .lead { max-width:42ch; margin:16px 0 24px; }
.partner-feature__legal { margin-top:20px; }
@media (max-width:767px) { .partner-feature {grid-template-columns:minmax(0,1fr);} .partner-feature>img {max-width:336px;justify-self:center;} }
