/* Docs article pages (/docs/<slug>): the index | the article | On this page, and the index in sections with the app
   menu's marks. Igor 21 Nov on /docs/what-changed: «чего такая сетка странная, справа пусто?»; on the index: «оно сливается,
   может хоть разделам иконки дать». Loaded after docs.css, which owns the container width and the hub. */

/* ---------- Three columns on a wide screen: the index on the header's left edge, On this page on its right ---------- */
/* An article starts 32 px under the header, not 80 (Igor 21 Nov «пустота такая норм?»); the sticky columns stop there. */
.docs-page--article .docs-main {
    padding-top: 32px;
}

.docs-page .docs-article-layout {
    padding-top: 0;
}

.docs-page .docs-index {
    top: 97px;
    max-height: calc(100vh - 121px);
}

.docs-page .docs-article-layout {
    grid-template-columns: 224px minmax(0, 760px) 200px;
    justify-content: space-between;
    gap: 48px;
}

.docs-rail {
    position: sticky;
    top: 97px;
    font-size: 14px;
    line-height: 1.4;
}

.docs-rail-title {
    margin: 0 0 12px;
    color: var(--docs-ink);
    font-size: 14px;
    font-weight: 600;
}

.docs-toc {
    margin: 0;
    padding: 0;
    list-style: none;
    border-left: 1px solid var(--docs-line);
}

.docs-main .docs-toc a {
    display: block;
    margin-left: -1px;
    padding: 4px 0 4px 12px;
    border-left: 2px solid transparent;
    color: var(--docs-grey);
    text-wrap: pretty;
}

.docs-main .docs-toc a:hover {
    color: var(--docs-ink);
    text-decoration: none;
}

.docs-main .docs-toc a[aria-current="true"] {
    border-left-color: var(--docs-accent);
    color: var(--docs-accent);
}

.docs-rail-open {
    display: grid;
    gap: 8px;
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

.docs-toc + .docs-rail-open {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--docs-line);
}

/* The ways into the app stand in the right column on a wide screen, under the answer below that: one place each. */
.docs-article-layout--rail .docs-article > .docs-open {
    display: none;
}

/* ---------- The index: every section open, each with the app menu's mark (Igor 21 Nov «я бы не сворачивал») ---------- */
.docs-index nav {
    display: grid;
    gap: 24px;
}

/* The open index is taller than a screen: it scrolls in its own column, with a quiet bar. */
.docs-index {
    scrollbar-width: thin;
    scrollbar-color: #d6d6de transparent;
}

.docs-index .docs-index-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 4px 0;
    color: var(--docs-ink);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: none;
}

.docs-ico {
    flex: none;
    width: 16px;
    height: 16px;
    color: var(--docs-copy);
}

.docs-index .docs-index-section ul {
    margin: 4px 0 0;
    padding: 0 0 0 16px;
}

.docs-main .docs-index li a {
    padding: 4px 8px;
    border-radius: 6px;
    color: var(--docs-copy);
}

.docs-main .docs-index li a:hover {
    color: var(--docs-ink);
    text-decoration: none;
}

.docs-main .docs-index li a[aria-current="page"] {
    background: #efeefb;
    color: var(--docs-accent);
    font-weight: 600;
}

/* The hub's sections carry the same marks. */
.docs-group h2 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.docs-group h2 .docs-ico {
    width: 20px;
    height: 20px;
}

/* The hub's common questions: the + stays on the question's first line, right, when the question wraps (Igor 21 Nov,
   on a phone the + fell under "I bought lifetime access. What do I have now?"). */
.docs-questions summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.docs-questions summary::after {
    flex: none;
    float: none;
}

/* ---------- Narrower: On this page goes, the actions return under the answer ---------- */
@media (max-width: 1239px) {
    .docs-page .docs-article-layout {
        grid-template-columns: 224px minmax(0, 760px);
        justify-content: start;
        gap: 56px;
    }

    .docs-rail {
        display: none;
    }

    .docs-article-layout--rail .docs-article > .docs-open {
        display: flex;
    }
}

/* ---------- Tablet and phone: one column, the index below the article in All help articles ---------- */
@media (max-width: 700px) {
    .docs-page--article .docs-main {
        padding-top: 24px;
    }
}

@media (max-width: 1000px) {
    .docs-page .docs-article-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }

    .docs-page .docs-index {
        max-height: none;
    }

    .docs-index .docs-index-group {
        font-size: 16px;
    }

    .docs-main .docs-index li a {
        padding: 8px;
        font-size: 16px;
    }
}
