/* Справка магазина — две книги */

.help-body {
    min-height: 100vh;
}

.help-hub {
    max-width: 52rem;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem;
}

.help-hub__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.1rem;
    margin: 1.5rem 0;
}

.help-hub__card {
    display: block;
    padding: 1.25rem 1.2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    color: inherit;
    text-decoration: none;
    transition: border-color .15s ease, background .15s ease;
}

.help-hub__card:hover {
    border-color: var(--accent-border);
    background: var(--accent-soft);
}

.help-hub__card h2 {
    margin: 0 0 .5rem;
    font-size: 1.2rem;
}

.help-hub__card p {
    margin: 0 0 1rem;
    color: var(--muted);
    line-height: 1.45;
    font-size: .95rem;
}

.help-hub__buy {
    margin-top: 1.5rem;
}

.help-hub__buy .btn {
    margin-right: .5rem;
    margin-top: .35rem;
}

.help-hub__card-wrap {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.help-demo {
    margin: 1rem 0 1.25rem;
    padding: .95rem 1rem;
    border: 1px solid rgba(224, 195, 106, 0.45);
    border-radius: var(--radius, 10px);
    background: rgba(224, 195, 106, 0.07);
}

.help-demo__title {
    margin: 0 0 .45rem;
    font-weight: 700;
    font-size: 1rem;
}

.help-demo p {
    margin: 0 0 .45rem;
    line-height: 1.45;
}

.help-demo ul {
    margin: .2rem 0 .65rem 1.1rem;
    padding: 0;
    line-height: 1.55;
}

.help-demo code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .92em;
    padding: .05em .35em;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
}

.help-demo__note {
    margin: 0 !important;
    color: var(--muted);
    font-size: .9rem;
}

.help-hub__card-wrap > .help-demo {
    margin: 0;
}

.help-layout {
    display: grid;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    min-height: calc(100vh - 64px);
}

.help-sidebar {
    border-right: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
    padding: 1.15rem 1rem 1.5rem;
    overflow: auto;
    position: sticky;
    top: 0;
    align-self: start;
    max-height: calc(100vh - 64px);
}

.help-sidebar__home {
    display: inline-block;
    font-size: .85rem;
    color: var(--muted);
    text-decoration: none;
    margin-bottom: .55rem;
}

.help-sidebar__home:hover {
    color: var(--accent, #e0c36a);
}

.help-sidebar__title {
    font-size: 1.05rem;
    margin: 0 0 .75rem;
    line-height: 1.3;
}

.help-book-switch {
    display: flex;
    gap: .35rem;
    margin-bottom: 1rem;
}

.help-book-switch a {
    flex: 1;
    text-align: center;
    padding: .4rem .5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-size: .8rem;
    color: var(--muted);
    text-decoration: none;
}

.help-book-switch a.is-active {
    border-color: rgba(224, 195, 106, 0.55);
    color: var(--accent, #e0c36a);
    background: rgba(224, 195, 106, 0.08);
    font-weight: 600;
}

.help-content {
    padding: 1.5rem 1.75rem 3rem;
    max-width: 52rem;
}

.help-tree {
    font-size: .9rem;
}

.help-tree__roots,
.help-tree__children {
    list-style: none;
    margin: 0;
    padding: 0;
}

.help-tree__children {
    margin-left: .55rem;
    padding-left: .5rem;
    border-left: 1px solid var(--border);
}

.help-tree__item {
    margin: .12rem 0;
}

.help-tree__link {
    display: block;
    padding: .35rem .5rem;
    border-radius: 6px;
    color: var(--muted);
    text-decoration: none;
    line-height: 1.35;
}

.help-tree__link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.help-tree__item.is-active > .help-tree__link {
    color: var(--accent, #e0c36a);
    font-weight: 600;
    background: rgba(224, 195, 106, 0.08);
}

.help-tree__link--section {
    font-weight: 600;
    color: var(--text);
}

.help-article__crumb {
    font-size: .8rem;
    color: var(--muted);
    margin: 0 0 .45rem;
}

.help-article__title {
    margin: 0 0 .5rem;
    font-size: 1.65rem;
    line-height: 1.25;
}

.help-article__lead {
    font-size: 1.05rem;
    color: var(--muted);
    margin: 0 0 1.35rem;
    line-height: 1.45;
}

.help-article__body {
    line-height: 1.65;
}

.help-article__body h2,
.help-article__body h3 {
    margin-top: 1.4rem;
    margin-bottom: .55rem;
}

.help-article__body ul,
.help-article__body ol {
    padding-left: 1.25rem;
}

.help-article__body li {
    margin: .4rem 0;
}

.help-figure {
    margin: 1.25rem 0;
}

.help-figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: #0c0e12;
}

.help-figure figcaption {
    font-size: .85rem;
    color: var(--muted);
    margin-top: .4rem;
    text-align: center;
}

.help-article__children {
    margin: 1rem 0 0;
    padding-left: 1.2rem;
}

.help-article__footer {
    margin-top: 2.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

@media (max-width: 900px) {
    .help-layout {
        grid-template-columns: 1fr;
    }

    .help-sidebar {
        position: static;
        max-height: none;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }
}
