/* =========================================================
   Страница помощи
   ========================================================= */

.help-page {
    display: flex;
    flex-direction: column;

    width: min(100%, 1060px);

    gap: 18px;

    margin: 0 auto;

    padding:
        clamp(16px, 3vw, 28px)
        clamp(12px, 3vw, 24px)
        38px;
}


/* =========================================================
   Общие подписи
   ========================================================= */

.help-eyebrow {
    display: block;

    margin-bottom: 4px;

    color: var(--accent);

    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.11em;

    text-transform: uppercase;
}


/* =========================================================
   Вводный блок
   ========================================================= */

.help-intro-card {
    position: relative;

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 22px;

    margin: 0;

    padding:
        clamp(22px, 4vw, 34px);

    overflow: hidden;

    background:
        radial-gradient(
            circle at 100% 0,
            color-mix(
                in srgb,
                var(--accent) 17%,
                transparent
            ),
            transparent 21rem
        ),
        linear-gradient(
            145deg,
            var(--surface-raised),
            var(--surface)
        );

    border-color:
        color-mix(
            in srgb,
            var(--accent) 18%,
            var(--border)
        );

    box-shadow: var(--shadow-md);
}

.help-intro-card::after {
    position: absolute;

    right: -92px;
    bottom: -142px;

    width: 300px;
    height: 300px;

    border:
        1px solid
        color-mix(
            in srgb,
            var(--accent) 14%,
            transparent
        );

    border-radius: 50%;

    content: "";

    pointer-events: none;
}

.help-intro-content,
.help-intro-icon {
    position: relative;

    z-index: 1;
}

.help-intro-content {
    min-width: 0;
}

.help-intro-content h2 {
    margin:
        0
        0
        8px;

    color: var(--text);

    font-size:
        clamp(1.4rem, 4vw, 1.95rem);

    line-height: 1.2;
}

.help-intro-content p {
    max-width: 690px;

    margin: 0;

    color: var(--muted);

    font-size: 0.92rem;
    line-height: 1.6;
}

.help-intro-icon {
    display: inline-flex;

    width: 64px;
    height: 64px;

    flex:
        0
        0
        64px;

    align-items: center;
    justify-content: center;

    color: var(--accent);
    background: var(--accent-soft);

    border:
        1px solid
        color-mix(
            in srgb,
            var(--accent) 27%,
            transparent
        );

    border-radius: 19px;

    box-shadow:
        0
        12px
        28px
        color-mix(
            in srgb,
            var(--accent) 14%,
            transparent
        );

    font-size: 1.55rem;
    font-weight: 850;
}


/* =========================================================
   Основная раскладка
   ========================================================= */

.help-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1.4fr)
        minmax(280px, 0.6fr);

    align-items: start;

    gap: 16px;
}

.help-faq-card,
.help-contact-card {
    position: relative;

    margin: 0;

    overflow: hidden;

    padding:
        clamp(20px, 3vw, 28px);

    border-color:
        color-mix(
            in srgb,
            var(--accent) 12%,
            var(--border)
        );

    box-shadow: var(--shadow-sm);
}

.help-faq-card {
    background:
        linear-gradient(
            145deg,
            color-mix(
                in srgb,
                var(--accent) 4%,
                var(--surface-raised)
            ),
            var(--surface)
        );
}

.help-contact-card {
    position: sticky;

    top:
        calc(
            var(--header-height)
            + 16px
        );
}


/* =========================================================
   Заголовки секций
   ========================================================= */

.help-section-heading {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 16px;

    margin-bottom: 20px;
}

.help-section-heading > div {
    min-width: 0;
}

.help-section-heading h2 {
    margin: 0;

    color: var(--text);

    font-size:
        clamp(1.18rem, 3vw, 1.48rem);

    line-height: 1.25;
}

.help-section-icon {
    display: inline-flex;

    width: 45px;
    height: 45px;

    flex:
        0
        0
        45px;

    align-items: center;
    justify-content: center;

    color: var(--accent);
    background: var(--accent-soft);

    border:
        1px solid
        color-mix(
            in srgb,
            var(--accent) 24%,
            transparent
        );

    border-radius: 14px;

    font-size: 1.12rem;
    font-weight: 850;
}


/* =========================================================
   Вопросы и ответы
   ========================================================= */

.help-faq-list {
    display: flex;
    flex-direction: column;

    gap: 9px;
}

.help-faq-item {
    overflow: hidden;

    background: var(--surface-raised);

    border:
        1px solid
        var(--border);

    border-radius: 14px;

    transition:
        background-color 0.16s ease,
        border-color 0.16s ease,
        box-shadow 0.16s ease;
}

.help-faq-item:hover {
    border-color:
        color-mix(
            in srgb,
            var(--accent) 28%,
            var(--border)
        );
}

.help-faq-item[open] {
    background:
        color-mix(
            in srgb,
            var(--accent) 4%,
            var(--surface-raised)
        );

    border-color:
        color-mix(
            in srgb,
            var(--accent) 36%,
            var(--border)
        );

    box-shadow:
        0
        8px
        22px
        color-mix(
            in srgb,
            var(--accent) 8%,
            transparent
        );
}

.help-faq-item summary {
    display: grid;

    grid-template-columns:
        auto
        minmax(0, 1fr)
        auto;

    min-height: 62px;

    align-items: center;

    gap: 12px;

    padding:
        11px
        13px;

    color: var(--text);

    font-size: 0.9rem;
    font-weight: 730;
    line-height: 1.4;

    cursor: pointer;
    list-style: none;
}

.help-faq-item summary::-webkit-details-marker {
    display: none;
}

.help-faq-item summary::marker {
    content: "";
}

.help-faq-item summary:hover {
    background:
        color-mix(
            in srgb,
            var(--accent) 5%,
            var(--surface-hover)
        );
}

.help-faq-number {
    display: inline-flex;

    width: 36px;
    height: 36px;

    align-items: center;
    justify-content: center;

    color: var(--accent);
    background: var(--accent-soft);

    border-radius: 11px;

    font-size: 0.7rem;
    font-weight: 850;

    font-variant-numeric: tabular-nums;
}

.help-faq-toggle {
    display: inline-flex;

    width: 32px;
    height: 32px;

    align-items: center;
    justify-content: center;

    color: var(--muted);
    background: var(--surface-hover);

    border-radius: 10px;

    font-size: 1.1rem;

    transition:
        color 0.16s ease,
        background-color 0.16s ease,
        transform 0.18s ease;
}

.help-faq-item[open]
.help-faq-toggle {
    color: var(--accent);
    background: var(--accent-soft);

    transform:
        rotate(45deg);
}

.help-faq-content {
    display: flex;
    flex-direction: column;

    gap: 11px;

    padding:
        0
        16px
        17px
        61px;

    color: var(--muted);

    border-top:
        1px solid
        color-mix(
            in srgb,
            var(--border) 82%,
            transparent
        );

    font-size: 0.84rem;
    line-height: 1.6;
}

.help-faq-content > :first-child {
    margin-top: 14px;
}

.help-faq-content p {
    margin: 0;
}

.help-faq-content ol,
.help-faq-content ul {
    display: flex;
    flex-direction: column;

    gap: 8px;

    margin: 0;
    padding-left: 20px;
}

.help-faq-content li::marker {
    color: var(--accent);

    font-weight: 800;
}

.help-faq-content a {
    font-weight: 700;
}

.help-inline-link {
    display: inline-flex;

    align-self: flex-start;

    align-items: center;

    gap: 8px;

    min-height: 42px;

    padding:
        8px
        11px;

    color: var(--accent);
    background: var(--accent-soft);

    border:
        1px solid
        color-mix(
            in srgb,
            var(--accent) 25%,
            transparent
        );

    border-radius: 11px;

    text-decoration: none;
}

.help-inline-link:hover {
    background:
        color-mix(
            in srgb,
            var(--accent) 18%,
            var(--surface-hover)
        );

    text-decoration: none;
}


/* =========================================================
   Блок поддержки
   ========================================================= */

.help-contact-card > p {
    margin:
        0
        0
        18px;

    color: var(--muted);

    font-size: 0.83rem;
    line-height: 1.55;
}

.help-contact-button {
    width: 100%;
    min-height: 50px;
}

.help-contact-note {
    margin-top: 18px;

    padding:
        13px
        14px;

    color: var(--muted);

    background:
        color-mix(
            in srgb,
            var(--warning) 7%,
            var(--surface-hover)
        );

    border:
        1px solid
        color-mix(
            in srgb,
            var(--warning) 28%,
            var(--border)
        );

    border-radius: 12px;

    font-size: 0.76rem;
    line-height: 1.5;
}

.help-contact-note strong {
    display: block;

    margin-bottom: 6px;

    color: var(--text);
}

.help-contact-note ul {
    display: flex;
    flex-direction: column;

    gap: 4px;

    margin: 0;
    padding-left: 18px;
}

.help-contact-note li::marker {
    color: var(--warning);
}


/* =========================================================
   Документы
   ========================================================= */

.help-document-links {
    display: flex;
    flex-direction: column;

    gap: 7px;

    margin-top: 18px;
    padding-top: 17px;

    border-top:
        1px solid
        var(--border);
}

.help-document-links a {
    display: flex;

    min-height: 46px;

    align-items: center;
    justify-content: space-between;

    gap: 12px;

    padding:
        9px
        11px;

    color: var(--text);
    background: var(--surface-hover);

    border:
        1px solid
        var(--border);

    border-radius: 11px;

    font-size: 0.78rem;
    font-weight: 680;

    text-decoration: none;

    transition:
        color 0.16s ease,
        background-color 0.16s ease,
        border-color 0.16s ease;
}

.help-document-links a:hover {
    color: var(--accent);
    background: var(--accent-soft);

    border-color:
        color-mix(
            in srgb,
            var(--accent) 30%,
            var(--border)
        );

    text-decoration: none;
}


/* =========================================================
   Нижняя навигация
   ========================================================= */

.help-footer-actions {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 10px;
}

.help-footer-actions .btn {
    min-height: 50px;
}


/* =========================================================
   Адаптивность
   ========================================================= */

.help-intro-card::before,
.help-faq-card::before,
.help-contact-card::before {
    position: absolute;

    z-index: 2;

    top: 0;
    right: 0;
    left: 0;

    height: 3px;

    background:
        linear-gradient(
            90deg,
            var(
                --route-from,
                var(--accent)
            ),
            color-mix(
                in srgb,
                var(--accent) 54%,
                var(--muted)
            ),
            var(
                --route-to,
                var(--info)
            )
        );

    content: "";

    pointer-events: none;
}


@media (max-width: 840px) {
    .help-layout {
        grid-template-columns:
            minmax(0, 1fr);
    }

    .help-contact-card {
        position: static;
    }
}

@media (max-width: 640px) {
    .help-page {
        gap: 13px;

        padding:
            13px
            11px
            28px;
    }

    .help-intro-card {
        align-items: flex-start;

        padding:
            20px
            16px;
    }

    .help-intro-icon {
        width: 50px;
        height: 50px;

        flex-basis: 50px;

        border-radius: 15px;

        font-size: 1.25rem;
    }

    .help-faq-card,
    .help-contact-card {
        padding:
            18px
            14px;
    }

    .help-faq-content {
        padding:
            0
            13px
            15px;
    }
}

@media (max-width: 390px) {
    .help-intro-card {
        flex-direction: column;
    }

    .help-section-heading {
        align-items: flex-start;
    }

    .help-faq-item summary {
        gap: 8px;

        padding:
            10px
            9px;

        font-size: 0.82rem;
    }

    .help-faq-number {
        width: 32px;
        height: 32px;
    }

    .help-faq-toggle {
        width: 28px;
        height: 28px;
    }

    .help-footer-actions {
        grid-template-columns:
            minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .help-faq-item,
    .help-faq-toggle,
    .help-document-links a {
        transition: none;
    }
}