/* Назначение файла: единые стили публичных страниц помощи AiServise и их внутренней навигации. */

.help-page {
    padding: 56px 0 88px;
    background: linear-gradient(180deg, var(--as-surface) 0, var(--as-surface) 260px);
}

.help-hero {
    max-width: 850px;
    margin-bottom: 38px;
}

.help-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    margin-bottom: 14px;
    border: 1px solid var(--as-border);
    border-radius: 999px;
    color: var(--as-accent-text);
    background: var(--public-accent-soft);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.help-hero h1 {
    max-width: 900px;
    margin: 0;
    color: var(--public-text);
    font-size: clamp(36px, 4.2vw, 56px);
    line-height: 1.04;
    letter-spacing: -.05em;
}

.help-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: var(--public-muted);
    font-size: 17px;
    line-height: 1.7;
}

.help-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 34px;
    align-items: start;
}

.help-nav {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 5px;
    padding: 14px;
    border: 1px solid var(--public-line);
    border-radius: var(--public-radius);
    background: rgba(var(--as-surface-rgb), 0.94);
    box-shadow: 0 10px 30px rgba(var(--as-shadow-rgb), 0.05);
}

.help-nav__title {
    padding: 8px 10px 10px;
    color: var(--as-muted);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.help-nav a {
    display: block;
    padding: 10px 11px;
    border-radius: 10px;
    color: var(--as-muted);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.35;
    text-decoration: none;
}

.help-nav a:hover {
    color: var(--as-accent-text);
    background: var(--as-surface);
}

.help-nav a.is-active {
    color: var(--as-accent-text);
    background: var(--public-accent-soft);
}

.help-content {
    min-width: 0;
    display: grid;
    gap: 22px;
}

.help-panel,
.help-example,
.faq-group {
    padding: 32px clamp(24px, 4vw, 42px);
    border: 1px solid var(--public-line);
    border-radius: 20px;
    background: var(--as-surface);
    box-shadow: 0 14px 38px rgba(var(--as-shadow-rgb), 0.055);
    scroll-margin-top: 96px;
}

.help-panel--intro {
    border-color: var(--as-border);
    background: linear-gradient(135deg, var(--as-surface) 0, var(--as-surface) 100%);
}

.help-panel--compact {
    padding-top: 26px;
    padding-bottom: 26px;
}

.help-panel__heading {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.help-panel__heading h2,
.help-example h2,
.faq-group h2 {
    margin: 0;
    color: var(--public-text);
    font-size: 24px;
    line-height: 1.22;
    letter-spacing: -.03em;
}

.help-panel__heading p {
    margin: 7px 0 0;
    color: var(--public-muted);
    font-size: 14px;
    line-height: 1.65;
}

.help-step {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    color: var(--as-accent-text);
    background: var(--public-accent-soft);
    font-size: 12px;
    font-weight: 900;
}

.help-start-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 26px;
}

.help-start-card {
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--as-border);
    border-radius: 15px;
    background: var(--as-surface);
    scroll-margin-top: 96px;
}

.help-start-card__icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    border-radius: 10px;
    color: var(--as-accent-text);
    background: var(--as-surface);
    font-weight: 900;
}

.help-start-card h3,
.help-text-grid h3,
.help-production-grid h3,
.help-compare-grid h3 {
    margin: 0;
    color: var(--as-text);
    font-size: 16px;
    line-height: 1.35;
}

.help-start-card p,
.help-text-grid p,
.help-production-grid p,
.help-compare-grid li,
.help-body-copy {
    color: var(--as-muted);
    font-size: 14px;
    line-height: 1.68;
}

.help-start-card p {
    min-height: 70px;
    margin: 8px 0 14px;
}

.help-start-card a,
.help-example__link,
.help-next a {
    color: var(--as-accent-text);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.help-start-card a:hover,
.help-example__link:hover,
.help-next a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.help-compare-grid,
.help-text-grid,
.help-production-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.help-compare-grid > article,
.help-text-grid > div,
.help-production-grid > article {
    padding: 20px;
    border: 1px solid var(--as-border);
    border-radius: 14px;
    background: var(--as-surface);
}

.help-label {
    display: inline-flex;
    margin-bottom: 9px;
    color: var(--as-accent-text);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.help-compare-grid ul {
    margin: 12px 0 0;
    padding-left: 20px;
}

.help-compare-grid li + li {
    margin-top: 6px;
}

.help-text-grid p,
.help-production-grid p {
    margin: 8px 0 0;
}

.help-feature-flow,
.help-example__flow {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 24px;
}

.help-feature-flow span,
.help-example__flow span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--as-border);
    border-radius: 999px;
    color: var(--as-muted);
    background: var(--as-surface);
    font-size: 12px;
    font-weight: 750;
}

.help-feature-flow i,
.help-example__flow i {
    color: var(--as-muted);
    font-size: 12px;
    font-style: normal;
}

.help-body-copy {
    margin: 20px 0 0;
}

.help-panel--units .public-button {
    margin-top: 18px;
}

.help-next {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 26px;
    border: 1px solid var(--as-border);
    border-radius: 16px;
    background: var(--as-surface);
}

.help-next > div:first-child {
    display: grid;
    gap: 4px;
}

.help-next strong {
    color: var(--as-text);
    font-size: 15px;
}

.help-next span {
    color: var(--public-muted);
    font-size: 13px;
}

.help-next__links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: flex-end;
}

/* Назначение блока: карточки практических примеров. */
.help-example > header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.help-example__number {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--as-text);
    background: var(--public-accent);
    font-size: 12px;
    font-weight: 900;
}

.help-example > p {
    margin: 18px 0 0 54px;
    color: var(--as-muted);
    font-size: 14px;
    line-height: 1.7;
}

.help-prompt {
    margin: 18px 0 0 54px;
    padding: 17px 18px;
    border: 1px solid var(--as-border);
    border-radius: 13px;
    background: var(--as-surface);
}

.help-prompt > span {
    display: block;
    margin-bottom: 7px;
    color: var(--as-muted);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.help-prompt p {
    margin: 0;
    color: var(--as-text);
    font-size: 14px;
    line-height: 1.65;
}

.help-example__result {
    display: flex;
    gap: 8px;
    margin: 17px 0 0 54px;
    color: var(--as-muted);
    font-size: 13px;
    line-height: 1.55;
}

.help-example__result strong {
    color: var(--as-text);
}

.help-example .help-example__flow {
    margin-left: 54px;
}

.help-example__link {
    display: inline-flex;
    margin: 18px 0 0 54px;
}

/* Назначение блока: нативные раскрываемые FAQ без обязательного JavaScript. */
.faq-group h2 {
    margin-bottom: 17px;
}

.faq-item {
    border-top: 1px solid var(--as-border);
}

.faq-item:last-child {
    border-bottom: 1px solid var(--as-border);
}

.faq-item summary {
    position: relative;
    padding: 17px 38px 17px 0;
    color: var(--as-text);
    font-size: 15px;
    font-weight: 750;
    line-height: 1.45;
    cursor: pointer;
    list-style: none;
}

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

.faq-item summary::after {
    content: "+";
    position: absolute;
    top: 15px;
    right: 4px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    color: var(--as-accent-text);
    background: var(--public-accent-soft);
    font-size: 16px;
    font-weight: 700;
}

.faq-item[open] summary::after {
    content: "−";
}

.faq-item div {
    padding: 0 40px 17px 0;
}

.faq-item p {
    margin: 0;
    color: var(--as-muted);
    font-size: 14px;
    line-height: 1.72;
}

@media (max-width: 900px) {
    .help-page {
        padding-top: 40px;
    }

    .help-layout {
        grid-template-columns: 1fr;
    }

    .help-nav {
        position: static;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .help-nav__title {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .help-page {
        padding: 32px 0 60px;
    }

    .help-hero h1 {
        font-size: 36px;
    }

    .help-nav,
    .help-start-grid,
    .help-compare-grid,
    .help-text-grid,
    .help-production-grid {
        grid-template-columns: 1fr;
    }

    .help-panel,
    .help-example,
    .faq-group {
        padding: 25px 20px;
        border-radius: 16px;
    }

    .help-start-card p {
        min-height: 0;
    }

    .help-example > p,
    .help-prompt,
    .help-example__result,
    .help-example .help-example__flow,
    .help-example__link {
        margin-left: 0;
    }

    .help-example__result,
    .help-next {
        align-items: flex-start;
        flex-direction: column;
    }

    .help-next__links {
        justify-content: flex-start;
    }
}
