/* Лонгрид (article.php). Базовые токены — style.css, калькулятор — calc.css */

.art-body { --measure: 700px; --toc: 232px; --gap: 56px; --ink: #262a31; --ink-soft: #4b5260; --navy: #17203a; }
.art-body ::selection { background: #d7e0ff; color: var(--text); }
.art-page { max-width: 1100px; }

.art-body a:focus-visible,
.art-body summary:focus-visible,
.art-body input:focus-visible + .art-check__box { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ─── Шапка ─── */
.art-head { padding: 34px 0 10px; max-width: var(--measure); margin: 0 auto; }
.art-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .86rem; color: var(--text-muted); margin-bottom: 18px; }
.art-crumbs a { color: var(--text-muted); text-decoration: none; }
.art-crumbs a:hover { color: var(--accent); }
.art-h1 {
    font-size: clamp(2rem, 4.6vw, 3rem); line-height: 1.08; font-weight: 800;
    letter-spacing: -0.025em; color: var(--text); text-wrap: balance; margin: 0 0 18px;
}
.art-lead { font-size: 1.2rem; line-height: 1.6; color: var(--ink-soft); margin: 0 0 18px; }
/* Быстрый выбор города: для тех, кто пришёл за адресом, а не за статьёй */
.art-where__label { display: flex; align-items: center; gap: 7px; margin: 0 0 10px; font-size: .92rem; font-weight: 700; color: var(--text); }
.art-where__label svg { color: var(--accent); flex: 0 0 auto; }
.art-where__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.art-where__list a {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px; border-radius: 999px; border: 1px solid transparent;
    background: var(--accent-light); color: #2445c9; font-weight: 600; font-size: .94rem; line-height: 1.3; text-decoration: none; white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s;
}
.art-where__list a:hover { background: var(--accent); color: #fff; }
.art-where__list a.art-where__other { background: none; border-color: var(--border); color: var(--ink-soft); font-weight: 500; }
.art-where__list a.art-where__other:hover { border-color: var(--accent); color: var(--accent); background: none; }
@media (max-width: 560px) {
    .art-where__list {
        flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scroll-padding: 0 16px;
        scroll-snap-type: x proximity; scrollbar-width: none; overscroll-behavior-x: contain;
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 32px), transparent);
                mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 32px), transparent);
    }
    .art-where__list::-webkit-scrollbar { display: none; }
    .art-where__list li { scroll-snap-align: start; flex: 0 0 auto; }
}

/* ─── Сетка: оглавление + текст ─── */
.art-layout { display: block; max-width: var(--measure); margin: 0 auto; }
.art-toc { margin: 26px 0 8px; }
.art-toc details { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 18px; }
.art-toc summary {
    cursor: pointer; list-style: none; font-weight: 700; font-size: .95rem; padding: 12px 0;
    display: flex; justify-content: space-between; align-items: center;
}
.art-toc summary::-webkit-details-marker { display: none; }
.art-toc summary::after {
    content: ''; width: 9px; height: 9px; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg) translateY(-3px); transition: transform .2s ease-out;
}
.art-toc details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.art-toc ol { list-style: none; margin: 0 0 12px; padding: 0; counter-reset: toc; }
.art-toc li { counter-increment: toc; }
.art-toc a {
    display: grid; grid-template-columns: 1.6em 1fr; padding: 7px 10px; margin: 0 -10px; border-radius: var(--radius-sm);
    color: var(--ink-soft); text-decoration: none; font-size: .92rem; line-height: 1.35; transition: background .15s, color .15s;
}
.art-toc a::before { content: counter(toc); color: var(--text-muted); font-variant-numeric: tabular-nums; font-size: .82rem; padding-top: .1em; }
.art-toc a:hover { color: var(--accent); background: var(--accent-light); }
.art-toc a.is-active { color: var(--accent); background: var(--accent-light); font-weight: 600; }

@media (min-width: 1080px) {
    .art-head { max-width: none; display: grid; grid-template-columns: var(--toc) minmax(0, var(--measure)); column-gap: var(--gap); justify-content: center; }
    .art-head > * { grid-column: 2; }
    .art-layout {
        max-width: none; display: grid; grid-template-columns: var(--toc) minmax(0, var(--measure));
        column-gap: var(--gap); justify-content: center; align-items: start;
    }
    .art-toc { position: sticky; top: 24px; margin: 30px 0 0; max-height: calc(100vh - 48px); overflow: auto; }
    .art-toc details { background: none; border: 0; padding: 0; }
    .art-toc summary { pointer-events: none; padding: 0 0 10px; color: var(--text-muted); font-size: .8rem; letter-spacing: .02em; }
    .art-toc summary::after { display: none; }
}

/* ─── Текст ─── */
.art-body__text { font-size: 1.0625rem; line-height: 1.72; color: var(--ink); padding-bottom: 20px; }
.art-body__text > p, .art-body__text > ul { margin: 0 0 1.1em; }
.art-body__text > ul { padding-left: 1.3em; }
.art-body__text > ul li { margin: .35em 0; }
.art-body__text > ul li::marker { color: var(--accent); }
.art-body__text h2 {
    font-size: clamp(1.45rem, 2.6vw, 1.8rem); line-height: 1.2; letter-spacing: -0.015em; font-weight: 800;
    color: var(--text); margin: 2.4em 0 .65em; text-wrap: balance; scroll-margin-top: 20px;
}
.art-body__text h3 { font-size: 1.2rem; line-height: 1.3; font-weight: 700; color: var(--text); margin: 1.8em 0 .5em; }
.art-body__text a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(74,108,247,.35); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: text-decoration-color .15s; }
.art-body__text a:hover { text-decoration-color: var(--accent); }
.art-body__text b { color: var(--text); }

/* «Коротко» */
.art-summary { margin: 30px 0 8px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px 8px; box-shadow: var(--shadow); }
.art-summary__title { font-weight: 800; font-size: 1.1rem; color: var(--text); margin: 0 0 6px; }
.art-summary ul { list-style: none; margin: 0; padding: 0; }
.art-summary li { padding: 14px 0; border-top: 1px solid var(--border); font-size: 1rem; line-height: 1.55; color: var(--ink-soft); }
.art-summary li:first-child { border-top: 0; }
.art-summary li b { display: block; color: var(--text); font-size: 1.02rem; margin-bottom: 3px; }
@media (min-width: 720px) {
    .art-summary ul { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
    .art-summary li:nth-child(2) { border-top: 0; }
}

/* Таблица сравнения */
.art-table { margin: 18px 0 26px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.art-table table { width: 100%; border-collapse: collapse; font-size: .92rem; line-height: 1.4; }
.art-table th, .art-table td { text-align: left; vertical-align: top; padding: 12px 14px; border-top: 1px solid var(--border); }
.art-table thead th { background: #f3f5fa; border-top: 0; font-size: .8rem; font-weight: 700; color: var(--ink-soft); }
.art-table tbody th { font-weight: 700; color: var(--text); width: 22%; }
.art-table td { color: var(--ink-soft); }
@media (max-width: 760px) {
    .art-table { border: 0; background: none; overflow: visible; }
    .art-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .art-table table, .art-table tbody, .art-table tr, .art-table th, .art-table td { display: block; width: auto; }
    .art-table tr { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
    .art-table tbody th { border-top: 0; background: #f3f5fa; font-size: 1rem; }
    .art-table td { display: grid; grid-template-columns: 44% 1fr; gap: 12px; }
    .art-table td::before { content: attr(data-label); color: var(--text-muted); font-size: .84rem; }
}

/* Врезка-совет */
.art-note { position: relative; margin: 22px 0 26px; padding: 18px 22px 18px 58px; background: var(--accent-light); border-radius: var(--radius); }
.art-note::before {
    content: ''; position: absolute; left: 20px; top: 19px; width: 22px; height: 22px; background: var(--accent);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 21h4M12 3a6 6 0 0 0-3.6 10.8c.6.5 1.1 1.3 1.1 2.2h5c0-.9.5-1.7 1.1-2.2A6 6 0 0 0 12 3z'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 21h4M12 3a6 6 0 0 0-3.6 10.8c.6.5 1.1 1.3 1.1 2.2h5c0-.9.5-1.7 1.1-2.2A6 6 0 0 0 12 3z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.art-note__title { font-weight: 700; color: var(--text); margin: 0 0 4px; }
.art-note p { margin: 0; font-size: 1rem; line-height: 1.6; color: #2f3a5c; }

/* Встроенный калькулятор */
.art-calc { margin: 22px 0 28px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 22px 18px; box-shadow: var(--shadow); font-size: 1rem; line-height: 1.5; }
.art-calc__title { font-weight: 800; font-size: 1.15rem; color: var(--text); margin: 0 0 4px; }
.art-calc .calc-form { margin-bottom: 16px; }

/* Воронка на примерку */
.art-cta {
    margin: 26px 0 30px; padding: 28px 28px 30px; border-radius: 20px; background: var(--navy); color: #e8ecf8;
    display: grid; gap: 22px; align-items: center; box-shadow: 0 18px 40px -18px rgba(23,32,58,.55);
}
.art-cta__title { font-size: 1.4rem; line-height: 1.2; font-weight: 800; color: #fff; margin: 0 0 10px; letter-spacing: -0.01em; text-wrap: balance; }
.art-cta p { margin: 0; }
.art-cta__text > p:not(.art-cta__title) { color: #c3cbe2; font-size: 1rem; line-height: 1.55; }
.art-body__text .art-cta__btn {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 13px 22px; border-radius: 12px;
    background: var(--accent); color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; transition: background .15s, transform .15s ease-out;
}
.art-body__text .art-cta__btn:hover { background: #5b7bff; transform: translateY(-1px); }
.art-body__text .art-cta__btn:focus-visible { outline-color: #fff; }
.art-cta .hero-demo { margin: 0 auto; max-width: 380px; }
.art-cta .hero-demo__arrow { color: #8ea4ff; }
@media (min-width: 760px) { .art-cta { grid-template-columns: 1fr 1.05fr; padding: 32px; } }

/* Чек-лист */
.art-check { margin: 14px 0 26px; }
.art-check ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.art-check li + li { border-top: 1px solid var(--border); }
.art-check label { display: grid; grid-template-columns: 26px 1fr; gap: 12px; padding: 13px 18px; cursor: pointer; font-size: 1rem; line-height: 1.55; }
.art-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.art-check__box {
    width: 22px; height: 22px; margin-top: 2px; border: 2px solid #c5cbd6; border-radius: 6px; display: grid; place-items: center;
    color: transparent; transition: background .15s, border-color .15s, color .15s;
}
.art-check label:hover .art-check__box { border-color: var(--accent); }
.art-check input:checked + .art-check__box { background: var(--accent); border-color: var(--accent); color: #fff; }
.art-check input:checked ~ .art-check__text { color: var(--text-muted); }
.art-check__count { margin: 10px 2px 0; font-size: .88rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* Города */
.art-cities__list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.art-body__text .art-cities__list a {
    display: inline-block; padding: 9px 15px; border-radius: 999px; background: var(--card); border: 1px solid var(--border);
    color: var(--text); text-decoration: none; font-size: .95rem; transition: border-color .15s, color .15s;
}
.art-body__text .art-cities__list a:hover { border-color: var(--accent); color: var(--accent); }

/* FAQ */
.art-faq__item { border-bottom: 1px solid var(--border); }
.art-faq__item summary {
    cursor: pointer; list-style: none; position: relative; padding: 16px 40px 16px 0; font-weight: 700; color: var(--text); font-size: 1.05rem; line-height: 1.4;
}
.art-faq__item summary::-webkit-details-marker { display: none; }
.art-faq__item summary::before, .art-faq__item summary::after {
    content: ''; position: absolute; right: 6px; top: 50%; width: 14px; height: 2px; background: var(--accent); border-radius: 2px; transition: transform .2s ease-out;
}
.art-faq__item summary::after { transform: rotate(90deg); }
.art-faq__item[open] summary::after { transform: rotate(0deg); }
.art-faq__item p { margin: 0 0 18px; color: var(--ink); }

@media (max-width: 480px) {
    .art-head { padding-top: 22px; }
    .art-lead { font-size: 1.08rem; }
    .art-body__text { font-size: 1rem; }
    .art-summary, .art-calc { padding-left: 16px; padding-right: 16px; }
    .art-cta { padding: 22px 18px 24px; border-radius: 16px; }
    .art-body__text .art-cta__btn { white-space: normal; }
    .art-cta .hero-demo { max-width: 290px; }
    .art-note { padding-left: 50px; }
    .art-note::before { left: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .art-body *, .art-body *::before, .art-body *::after { transition: none !important; }
}
