/* Статья «Мониторинг наличия товаров у конкурентов». Каркас — `.story__*` в
   v2.css, здесь только её собственные блоки. */

.stock-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ── Шапка: дата и кнопка ──────────────────────────────────────────────── */

.article-head__meta { margin-top: 18px; color: #FFFFFF73; font-size: 13px; letter-spacing: 0.2px; }

.head-cta { display: flex; align-items: center; gap: 16px; margin-top: 28px; }

.head-cta .btn { padding: 12px 20px; font-size: 14.5px; }

.head-cta__note { color: #FFFFFF73; font-size: 12.5px; }

/* ── Кнопки внутри текста ──────────────────────────────────────────────── */

.try { display: flex; align-items: center; gap: 16px; margin-top: 28px; }

.try .btn { padding: 12px 20px; font-size: 14.5px; }

.try__note { color: var(--ink-2); font-size: 13px; }

.article__text .story__btn { margin-top: 18px; text-decoration: none; }

/* ── Метки событий ─────────────────────────────────────────────────────── */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
}

.badge svg { flex: none; width: 14px; height: 14px; }

.badge--in { background: var(--ok-bg); color: var(--ok-fg); }

.badge--out { background: var(--down-bg); color: var(--down-fg); }

.badge--price { background: #FDF3E3; color: #B36B00; }

/* ── Снимок и история ──────────────────────────────────────────────────── */

.history {
    display: flex;
    flex-direction: column;
    gap: 32px;
    border-radius: 16px;
    background: var(--dark);
    padding: 44px 48px;
    color: #FFFFFF;
}

.history__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }

.history__kicker { color: #FFFFFF73; font-size: 12px; font-weight: 500; letter-spacing: 1.2px; text-transform: uppercase; }

.history__title { margin-top: 10px; font-size: 30px; letter-spacing: -0.8px; }

.history__legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; color: #FFFFFF99; font-size: 13px; list-style: none; }

.history__legend li { display: flex; align-items: center; gap: 8px; }

.history__legend .history__cell { width: 14px; height: 14px; border-radius: 3px; }

.history__grid { width: 100%; border-collapse: separate; border-spacing: 8px 10px; margin: -10px -8px; table-layout: fixed; }

.history__grid th { font-weight: 400; text-align: left; }

.history__grid thead th { vertical-align: bottom; color: #FFFFFF73; font-size: 13px; text-align: center; }

.history__grid thead th:first-child { width: 300px; }

.history__grid thead .history__today { color: #FFFFFF; font-weight: 500; }

.history__visit { display: block; margin-bottom: 6px; font-size: 11px; font-weight: 500; letter-spacing: 0.4px; }

.history__grid tbody th b { display: block; font-size: 15px; font-weight: 500; }

.history__grid tbody th span { display: block; margin-top: 3px; color: #FFFFFF73; font-size: 13px; }

.history__grid td { padding: 0; }

.history__cell { display: block; height: 40px; border-radius: 6px; }

.history__cell--in { background: #FFFFFFD9; }

.history__cell--out { box-shadow: inset 0 0 0 1px #FFFFFF4D; }

.history__cell--none { background: #FFFFFF1A; }

.history__cell--today.history__cell--in { background: #FFFFFF; box-shadow: inset 0 0 0 2px #FFFFFF; }

.history__outcome { display: flex; gap: 48px; border-top: 1px solid #FFFFFF26; padding-top: 20px; }

.history__outcome p { flex: 1; font-size: 16px; line-height: 1.5; }

.history__outcome span {
    display: block;
    margin-bottom: 6px;
    color: #FFFFFF73;
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ── Размеры ───────────────────────────────────────────────────────────── */

.sizes {
    flex: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 480px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    padding: 28px;
    box-shadow: 0 20px 50px #1717171A;
}

.sizes__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }

.sizes__name { font-size: 18px; font-weight: 500; }

.sizes__shop { margin-top: 4px; color: var(--ink-2); font-size: 13.5px; }

.sizes__label,
.sizes__kicker { color: var(--ink-2); font-size: 11.5px; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; }

.sizes__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0; padding: 0; list-style: none; }

.sizes__grid li {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink-3);
    font-size: 15px;
}

.sizes__grid .sizes__on { border-color: var(--ink); background: var(--ink); color: #FFFFFF; font-weight: 500; }

.sizes__share { height: 6px; border-radius: 3px; background: var(--line); }

.sizes__share span { display: block; height: 100%; border-radius: 3px; background: var(--ink); }

.sizes__count { margin-top: -8px; color: var(--ink-2); font-size: 13px; }

.sizes__title { margin-top: 10px; font-size: 28px; line-height: 1.2; letter-spacing: -0.7px; }

/* ── Цепочки «цена — наличие» ──────────────────────────────────────────── */

.article__text .chains { gap: 0; margin-top: 18px; }

.article__text .chains li { align-items: center; gap: 14px; border-top: 1px solid var(--line); padding: 14px 0; }

.article__text .chains li:first-child { border-top: 0; }

.article__text .chains li::before { width: 28px; color: var(--ink-3); font-size: 14px; content: "0" counter(article-item); }

.chains__arrow { flex: none; width: 16px; height: 16px; color: var(--ink-3); }

/* ── Ручная проверка ───────────────────────────────────────────────────── */

.routine {
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    background: var(--dark);
    padding: 44px 48px;
    color: #FFFFFF;
}

.routine__kicker { color: #FFFFFF73; font-size: 12px; font-weight: 500; letter-spacing: 1.2px; text-transform: uppercase; }

.routine__title { margin-top: 10px; font-size: 30px; letter-spacing: -0.8px; }

.routine__row { display: flex; align-items: center; gap: 10px; margin-top: 36px; }

.routine__steps {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin: 0;
    padding: 0;
    counter-reset: routine;
    list-style: none;
}

.routine__steps li {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    min-height: 112px;
    border: 1px solid #FFFFFF26;
    border-radius: 12px;
    padding: 18px 16px;
    counter-increment: routine;
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.35;
}

.routine__steps li::after { content: counter(routine); position: absolute; top: 18px; right: 16px; color: #FFFFFF4D; font-size: 13px; font-weight: 400; }

.routine__steps svg { width: 20px; height: 20px; }

.routine__again { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 4px; color: #FFFFFF99; font-size: 12.5px; }

.routine__again svg { width: 22px; height: 22px; }

.routine__scale { display: grid; grid-template-columns: repeat(4, 1fr); margin: 36px 0 0; border-top: 1px solid #FFFFFF26; padding-top: 24px; }

.routine__scale dt { color: #FFFFFFB3; font-size: 36px; letter-spacing: -1px; line-height: 1.1; }

.routine__scale dd { margin: 6px 0 0; color: #FFFFFF73; font-size: 13.5px; }

.routine__total dt { color: #FFFFFF; }

/* ── Четыре беды ручной проверки и ситуации ───────────────────────────── */

.problems { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; margin-top: 20px; }

.problems section { border-top: 1.5px solid var(--ink); padding: 18px 0 22px; }

.article__text .problems h3,
.article__text .cases h3 { margin: 0; font-size: 18px; letter-spacing: -0.2px; }

.article__text .problems p,
.article__text .cases p { margin-top: 8px; font-size: 15.5px; line-height: 1.6; }

.cases { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }

.cases section { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 22px 24px; }

.article__text .cases h3 { display: flex; flex-direction: column; gap: 10px; }

.cases h3 svg { width: 20px; height: 20px; }

.nudge {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 24px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    padding: 20px 24px;
}

.article__text .nudge__text { flex: 1; margin: 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }

.nudge__text b { display: block; margin-bottom: 4px; color: var(--ink); font-size: 16px; font-weight: 500; }

.article__text .nudge .btn,
.article__text .try .btn,
.article__text .switch .btn { text-decoration: none; }

.article__text .try .btn--dark,
.article__text .nudge .btn--dark { color: #FFFFFF; }

.article__text .switch .btn--white { color: var(--ink); }

.article__text .switch .btn--outline { color: #FFFFFF; }

/* ── Пять операций ─────────────────────────────────────────────────────── */

.pipeline { display: flex; flex-direction: column; gap: 32px; padding: 8px 48px 0; }

.pipeline__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }

.pipeline__kicker { color: var(--ink-2); font-size: 12px; font-weight: 500; letter-spacing: 1.2px; text-transform: uppercase; }

.pipeline__title { margin-top: 10px; font-size: 30px; letter-spacing: -0.8px; }

.pipeline__note { color: var(--ink-2); font-size: 14px; }

.pipeline__list { display: flex; gap: 32px; margin: 0; padding: 0; list-style: none; }

/* Стрелка между шагами — посередине зазора, псевдоэлементом: разметке
   незачем знать, сколько шагов в ряду. */
.pipeline__list li {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 188px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    padding: 22px;
    color: var(--ink-2);
    font-size: 13.5px;
    line-height: 1.5;
}

.pipeline__list li + li::before {
    content: "›";
    position: absolute;
    top: 50%;
    left: -22px;
    margin-top: -12px;
    color: var(--ink-3);
    font-size: 20px;
}

.pipeline__list b { margin-top: 16px; color: var(--ink); font-size: 17px; font-weight: 500; }

.pipeline__i { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 9px; background: var(--bg); color: var(--ink); }

.pipeline__i svg { width: 18px; height: 18px; }

.pipeline__list .pipeline__last { border-color: var(--ink); background: var(--ink); color: #FFFFFF99; }

.pipeline__last b { color: #FFFFFF; }

.pipeline__last .pipeline__i { background: #FFFFFF1A; color: #FFFFFF; }

/* ── Четыре шага (линия времени, как в статье про цены) ───────────────── */

.steps {
    display: flex;
    flex-direction: column;
    gap: 36px;
    border-radius: 16px;
    background: var(--dark);
    padding: 44px 48px 48px;
    color: #FFFFFF;
}

.steps__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }

.steps__kicker { color: #FFFFFF73; font-size: 12px; font-weight: 500; letter-spacing: 1.2px; text-transform: uppercase; }

.steps__title { margin-top: 10px; font-size: 30px; letter-spacing: -0.8px; }

.steps__note { color: #FFFFFF73; font-size: 14px; }

.steps__list { display: flex; margin: 0; padding: 0; list-style: none; }

.steps__item {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid #FFFFFF33;
    padding: 28px 28px 0 0;
}

.steps__item:last-child { border-top-color: transparent; }

.steps__item::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 0;
    width: 11px;
    height: 11px;
    border: 2px solid #FFFFFF;
    border-radius: 50%;
    background: var(--dark);
}

.steps__item--on::before { background: #FFFFFF; }

.steps__top { display: flex; align-self: stretch; align-items: center; justify-content: space-between; gap: 12px; }

.steps__num { color: #FFFFFF40; font-size: 40px; letter-spacing: -1.5px; line-height: 1; }

.steps__when {
    border: 1px solid #FFFFFF40;
    border-radius: 20px;
    padding: 5px 10px;
    color: #FFFFFFCC;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.steps__item--on .steps__when { border-color: #FFFFFF; background: #FFFFFF; color: var(--ink); }

.steps__name { font-size: 17px; font-weight: 500; }

.steps__text { color: #FFFFFF99; font-size: 14px; line-height: 1.55; }

/* ── Событие и что проверить ───────────────────────────────────────────── */

.shifts { margin-top: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }

.shifts table { width: 100%; border-collapse: collapse; }

.shifts thead th {
    background: #FAFAF8;
    padding: 12px 20px;
    color: var(--ink-2);
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 1px;
    text-align: left;
    text-transform: uppercase;
}

.shifts tbody th,
.shifts td { border-top: 1px solid var(--line); padding: 15px 20px; font-size: 15.5px; text-align: left; vertical-align: top; }

.shifts tbody th { width: 50%; font-weight: 500; }

.shifts td { color: #171717B3; }

.shifts tbody th svg { display: inline-block; width: 16px; height: 16px; margin: 0 10px -3px 0; }

.shifts__in { color: var(--ok-fg); }

.shifts__out { color: var(--down-fg); }

.shifts__price { color: #B36B00; }

/* ── Призыв в конце текста ─────────────────────────────────────────────── */

.switch {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 40px;
    border-radius: 14px;
    background: var(--dark);
    padding: 28px;
    color: #FFFFFF;
}

.article__text .switch__title { margin: 0; color: #FFFFFF; font-size: 22px; font-weight: 400; line-height: 1.3; letter-spacing: -0.5px; }

.article__text .switch__text { max-width: 560px; margin: 0; color: #FFFFFF99; font-size: 14.5px; line-height: 1.6; }

.switch__buttons { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 4px; }

.article__text .switch__note { margin: 0; color: #FFFFFF73; font-size: 12.5px; }

.article__text .switch__request {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    border-top: 1px solid #FFFFFF26;
    padding-top: 16px;
    color: #FFFFFF99;
    font-size: 13.5px;
    line-height: 1.5;
}

.switch__request svg { flex: none; width: 16px; height: 16px; margin-top: 1px; }

/* ── Частые вопросы ────────────────────────────────────────────────────── */

.qa { margin-top: 18px; border-bottom: 1px solid var(--line); }

.qa__item { border-top: 1px solid var(--line); }

.qa__q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 0;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.4;
    list-style: none;
    cursor: pointer;
}

.qa__q::-webkit-details-marker { display: none; }

.qa__i { flex: none; width: 18px; height: 18px; color: var(--ink-2); transition: transform 0.2s var(--ease); }

.qa__item[open] .qa__i { transform: rotate(45deg); }

.qa__a { margin-top: -8px; padding-bottom: 20px; color: #171717B3; font-size: 15.5px; line-height: 1.65; }

/* ── Планшет ───────────────────────────────────────────────────────────── */

@media (max-width: 1023px) {
    .history,
    .routine,
    .steps { padding: 36px 32px; }

    .history__head,
    .pipeline__head,
    .steps__head { flex-direction: column; align-items: flex-start; }

    .history__grid thead th:first-child { width: 200px; }

    .sizes { align-self: center; max-width: 100%; }

    .routine__steps { grid-template-columns: repeat(3, 1fr); }

    .routine__again { display: none; }

    .pipeline { padding: 8px 0 0; }

    .pipeline__list { flex-direction: column; gap: 10px; }

    .pipeline__list li { min-height: 0; }

    .pipeline__list li + li::before { display: none; }

    .steps__list { flex-wrap: wrap; row-gap: 32px; }

    .steps__item { flex: 1 1 50%; }

    .steps__item:nth-child(2) { border-top-color: transparent; }
}

/* ── Телефон ───────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
    .head-cta,
    .try { flex-direction: column; align-items: stretch; gap: 10px; text-align: center; }

    .head-cta .btn,
    .try .btn { justify-content: center; padding: 13px 18px; font-size: 15px; }

    .history,
    .routine { gap: 20px; border-radius: 14px; padding: 28px 20px 24px; }

    .history__title,
    .routine__title,
    .pipeline__title,
    .steps__title { font-size: 22px; line-height: 1.25; letter-spacing: -0.5px; }

    .history__legend { order: 3; font-size: 12px; }

    /* Таблица недели распадается: у товара своя строка из семи дней, имя —
       над ней. Шапку с днями оставляем одну, сверху. */
    .history__grid,
    .history__grid thead,
    .history__grid tbody { display: block; }

    .history__grid { margin: 0; }

    .history__grid thead tr,
    .history__grid tbody tr { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }

    .history__grid tbody tr { margin-top: 16px; row-gap: 8px; }

    .history__grid thead th:first-child { display: none; }

    .history__grid thead th { font-size: 12px; }

    .history__visit { display: none; }

    .history__grid tbody th { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }

    .history__grid tbody th b { font-size: 14px; white-space: nowrap; }

    .history__grid tbody th span { margin: 0; font-size: 12px; }

    .history__cell { height: 30px; border-radius: 5px; }

    .history__outcome { flex-direction: column; gap: 14px; padding-top: 16px; }

    .history__outcome p { font-size: 15px; }

    .sizes { width: 100%; padding: 20px; }

    .sizes__grid { gap: 6px; }

    .sizes__grid li { height: 40px; font-size: 14px; }

    .sizes__title { font-size: 20px; line-height: 1.25; letter-spacing: -0.4px; }

    /* Цепочка не помещается в строку: второе событие уходит под первое. */
    .article__text .chains li { flex-wrap: wrap; row-gap: 8px; }

    .chains__arrow { display: none; }

    .article__text .chains li > .badge:last-child { margin-left: 40px; }

    .badge { font-size: 13px; }

    .routine__row { margin-top: 0; }

    .routine__steps { grid-template-columns: 1fr 1fr; gap: 8px; }

    .routine__steps li { flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; min-height: 52px; padding: 0 12px; font-size: 13.5px; }

    .routine__steps li::after { display: none; }

    .routine__steps svg { flex: none; width: 16px; height: 16px; }

    .routine__scale { grid-template-columns: 1fr 1fr; gap: 14px 12px; margin-top: 0; padding-top: 18px; }

    .routine__scale dt { font-size: 30px; }

    .routine__scale dd { font-size: 12.5px; }

    .problems,
    .cases { grid-template-columns: 1fr; }

    .problems section { padding: 14px 0 16px; }

    .article__text .problems h3,
    .article__text .cases h3 { font-size: 17px; }

    .article__text .problems p,
    .article__text .cases p { font-size: 15px; }

    .article__text .cases h3 { flex-direction: row; align-items: center; }

    .cases h3 svg { width: 18px; height: 18px; }

    .cases section { padding: 18px; }

    .nudge { flex-direction: column; align-items: stretch; gap: 12px; padding: 18px; }

    .nudge .btn { justify-content: center; }

    .pipeline { gap: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 24px 20px; }

    .pipeline__note { order: 3; font-size: 12.5px; }

    .pipeline__list { gap: 0; }

    .pipeline__list li {
        display: grid;
        grid-template-columns: 34px 1fr;
        column-gap: 14px;
        row-gap: 2px;
        border: 0;
        border-top: 1px solid var(--line);
        border-radius: 0;
        background: none;
        padding: 12px 0;
    }

    .pipeline__list li:first-child { border-top: 0; }

    .pipeline__list .pipeline__last { border-color: var(--line); background: none; color: var(--ink-2); }

    .pipeline__last b { color: var(--ink); }

    .pipeline__i { grid-row: span 2; width: 34px; height: 34px; }

    .pipeline__last .pipeline__i { background: var(--ink); }

    .pipeline__list b { margin-top: 0; font-size: 15.5px; }

    .steps { gap: 22px; border-radius: 14px; padding: 28px 22px 26px; }

    .steps__note { order: 3; font-size: 13px; }

    /* Линия времени поворачивает вниз: четыре колонки в 350 не помещаются. */
    .steps__list { flex-direction: column; gap: 20px; }

    .steps__item { border-top: 0; padding: 0 0 0 30px; }

    .steps__item::before { top: 4px; }

    .steps__num { font-size: 15px; letter-spacing: 0; color: #FFFFFF73; }

    .shifts thead { display: none; }

    .shifts tr { display: block; border-top: 1px solid var(--line); padding: 12px 16px; }

    .shifts tbody tr:first-child { border-top: 0; }

    .shifts tbody th,
    .shifts td { display: block; width: auto; border: 0; padding: 0; font-size: 15px; }

    .shifts td { margin-top: 4px; font-size: 14px; }

    .switch { border-radius: 16px; padding: 28px 22px 24px; }

    .switch__buttons { flex-direction: column; }

    .switch__buttons .btn { justify-content: center; padding: 13px 18px; }

    .qa__q { align-items: flex-start; padding: 16px 0; font-size: 15.5px; }

    .qa__a { font-size: 14.5px; }
}
