/* Docs and help (/docs, /docs/<slug>) in the landing's light language: white page, ink #121322, grey #6b6b75,
   hairlines, indigo only for links and actions. Flat sections; the one frame is the screenshot. Type on the
   12/14/16/20/24/32/44 scale. */
body.docs-page {
    --docs-ink: #121322;
    --docs-copy: #3a3b47;
    --docs-grey: #6b6b75;
    --docs-line: #e6e6ec;
    --docs-soft: #f7f7fa;
    --docs-accent: #443ab8;
    background: #fff;
    color: var(--docs-ink);
}

.docs-main {
    padding: 56px 0 96px;
}

.docs-wrap {
    /* On the site header's edges (Igor 21 Nov «почему ширина header и контента разная?»): one width, assets/site-chrome.css. */
    width: var(--lr-content-width, min(1400px, calc(100% - 96px)));
    margin-inline: auto;
}

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

.docs-main a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.docs-main a:focus-visible,
.docs-main summary:focus-visible,
.docs-search input:focus-visible {
    outline: 2px solid var(--docs-accent);
    outline-offset: 2px;
    border-radius: 6px;
}

.docs-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- Hub ---------- */
.docs-hero {
    padding: 32px 0 40px;
}

.docs-kicker {
    margin: 0 0 16px;
    color: var(--docs-accent);
    font-size: 14px;
    font-weight: 600;
}

.docs-hero h1,
.docs-article h1 {
    margin: 0;
    color: var(--docs-ink);
    font-weight: 600;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.docs-hero h1 {
    max-width: 18ch;
    font-size: 44px;
    line-height: 1.08;
}

.docs-hero-copy {
    max-width: 640px;
    margin: 16px 0 0;
    color: var(--docs-grey);
    font-size: 20px;
    line-height: 1.5;
}

.docs-search {
    max-width: 640px;
    margin-top: 32px;
}

/* The hub's first block, its questions and "Didn't find it?" stand in one centred column, the search's width (Igor 21 Nov
   «центрировать надо», «центрировать»); on a tablet or a phone the column is the page's width inside its gutters. */
.docs-hero .docs-wrap {
    text-align: center;
}

.docs-hero h1,
.docs-hero .docs-hero-copy,
.docs-hero .docs-search,
.docs-questions .docs-wrap > *,
.docs-contact .docs-contact-row > * {
    max-width: 640px;
    margin-inline: auto;
}

.docs-hero .docs-search input,
.docs-hero .docs-search-empty {
    text-align: left;
}

.docs-contact-row {
    text-align: center;
}

.docs-search input {
    box-sizing: border-box;
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid #d6d6de;
    border-radius: 12px;
    background: #fff;
    color: var(--docs-ink);
    font: inherit;
    font-size: 16px;
}

.docs-search input::placeholder {
    color: #8a8a94;
}

.docs-search-empty {
    margin: 12px 0 0;
    color: var(--docs-grey);
    font-size: 14px;
}

.docs-start {
    padding: 40px 0 56px;
    border-top: 1px solid var(--docs-line);
}

.docs-start-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 56px;
    align-items: start;
}

.docs-start h2,
.docs-groups h2,
.docs-questions h2,
.docs-contact h2 {
    margin: 0;
    color: var(--docs-ink);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.docs-start .docs-steps {
    margin-top: 24px;
}

.docs-start-link {
    margin: 24px 0 0;
    font-size: 16px;
    font-weight: 500;
}

.docs-groups {
    padding: 48px 0 24px;
    border-top: 1px solid var(--docs-line);
}

.docs-groups-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px 56px;
}

.docs-group h2 {
    font-size: 20px;
}

.docs-group > p {
    margin: 8px 0 0;
    color: var(--docs-grey);
    font-size: 14px;
    line-height: 1.5;
}

.docs-group ul {
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.docs-group li {
    border-top: 1px solid var(--docs-line);
}

.docs-group li:last-child {
    border-bottom: 1px solid var(--docs-line);
}

.docs-group li a {
    display: block;
    padding: 12px 0;
    font-size: 16px;
    line-height: 1.4;
}

.docs-group[hidden],
.docs-group li[hidden] {
    display: none;
}

.docs-questions {
    padding: 56px 0 24px;
}

.docs-questions-list {
    max-width: 820px;
    margin-top: 16px;
}

.docs-questions details {
    border-bottom: 1px solid var(--docs-line);
}

.docs-questions summary {
    padding: 16px 0;
    color: var(--docs-ink);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    list-style: none;
}

.docs-questions summary::-webkit-details-marker {
    display: none;
}

.docs-questions summary::after {
    content: "+";
    float: right;
    color: var(--docs-grey);
    font-weight: 400;
}

.docs-questions details[open] summary::after {
    content: "−";
}

.docs-questions details p {
    margin: 0 0 16px;
    color: var(--docs-copy);
    font-size: 16px;
    line-height: 1.6;
}

.docs-contact {
    padding: 48px 0 0;
}

.docs-contact-row p {
    max-width: 720px;
    margin: 12px 0 0;
    color: var(--docs-copy);
    font-size: 16px;
    line-height: 1.6;
}

/* ---------- Article ---------- */
.docs-article-layout {
    display: grid;
    grid-template-columns: 232px minmax(0, 760px);
    gap: 72px;
    align-items: start;
    padding-top: 24px;
}

.docs-index {
    position: sticky;
    top: 104px;
    max-height: calc(100vh - 128px);
    overflow: auto;
    font-size: 14px;
}

.docs-index summary {
    display: none;
}

.docs-index-group {
    margin: 24px 0 8px;
    color: var(--docs-grey);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.docs-index-group:first-of-type {
    margin-top: 0;
}

.docs-index ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.docs-index li a {
    display: block;
    padding: 4px 0;
    color: var(--docs-copy);
    line-height: 1.4;
}

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

.docs-crumbs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--docs-grey);
    font-size: 14px;
}

.docs-article h1 {
    font-size: 32px;
    line-height: 1.2;
}

.docs-answer {
    margin: 16px 0 0;
    color: var(--docs-copy);
    font-size: 20px;
    line-height: 1.5;
}

.docs-open {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin: 16px 0 0;
    font-size: 16px;
    font-weight: 500;
}

.docs-shot {
    margin: 32px 0 0;
}

.docs-shot img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--docs-line);
    border-radius: 12px;
    background: var(--docs-soft);
}

.docs-shot figcaption {
    margin-top: 8px;
    color: var(--docs-grey);
    font-size: 14px;
}

.docs-start .docs-shot {
    margin: 0;
}

.docs-body {
    margin-top: 8px;
    color: var(--docs-copy);
    font-size: 16px;
    line-height: 1.65;
}

.docs-body h2 {
    margin: 40px 0 0;
    color: var(--docs-ink);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    scroll-margin-top: 104px;
}

.docs-body > p {
    margin: 16px 0 0;
}

.docs-body > .docs-shot {
    margin-top: 24px;
}

.docs-body strong {
    color: var(--docs-ink);
    font-weight: 600;
}

.docs-body code,
.docs-body kbd {
    padding: 1px 6px;
    border: 1px solid var(--docs-line);
    border-radius: 6px;
    background: var(--docs-soft);
    font: 500 14px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
    overflow-wrap: anywhere;
}

.docs-steps {
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: docs-step;
}

.docs-steps li {
    position: relative;
    margin: 0;
    padding: 0 0 16px 40px;
    color: var(--docs-copy);
    font-size: 16px;
    line-height: 1.6;
    counter-increment: docs-step;
}

.docs-steps li::before {
    content: counter(docs-step);
    position: absolute;
    top: 1px;
    left: 0;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #efeefb;
    color: var(--docs-accent);
    font-size: 12px;
    font-weight: 600;
}

.docs-steps strong {
    color: var(--docs-ink);
    font-weight: 600;
}

.docs-list {
    margin: 16px 0 0;
    padding-left: 20px;
}

.docs-list li {
    margin: 0 0 8px;
}

.docs-note {
    margin: 24px 0 0;
    padding: 0 0 0 16px;
    border-left: 2px solid var(--docs-accent);
    color: var(--docs-copy);
    font-size: 16px;
    line-height: 1.6;
}

.docs-table {
    margin: 16px 0 0;
    overflow-x: auto;
}

.docs-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    line-height: 1.5;
}

.docs-table th,
.docs-table td {
    padding: 10px 16px 10px 0;
    border-bottom: 1px solid var(--docs-line);
    text-align: left;
    vertical-align: top;
}

.docs-table thead th {
    color: var(--docs-grey);
    font-size: 12px;
    font-weight: 600;
}

.docs-table tbody th {
    color: var(--docs-ink);
    font-weight: 500;
}

.docs-related {
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid var(--docs-line);
}

.docs-related h2 {
    margin: 0;
    color: var(--docs-ink);
    font-size: 20px;
    font-weight: 600;
}

.docs-related ul {
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.docs-related li {
    display: grid;
    gap: 4px;
    padding: 12px 0;
    border-bottom: 1px solid var(--docs-line);
}

.docs-related li a {
    font-size: 16px;
    font-weight: 500;
}

.docs-related li span {
    color: var(--docs-grey);
    font-size: 14px;
    line-height: 1.5;
}

.docs-support {
    margin: 32px 0 0;
    color: var(--docs-grey);
    font-size: 14px;
    line-height: 1.6;
}

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

    .docs-index {
        position: static;
        max-height: none;
        order: 2;
        padding-top: 24px;
        border-top: 1px solid var(--docs-line);
    }

    .docs-index summary {
        display: block;
        padding: 4px 0 12px;
        color: var(--docs-ink);
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
    }
}

@media (max-width: 700px) {
    .docs-main {
        padding: 40px 0 64px;
    }

    .docs-hero h1 {
        font-size: 32px;
    }

    .docs-hero-copy,
    .docs-answer {
        font-size: 16px;
    }

    .docs-article h1 {
        font-size: 24px;
    }

    .docs-groups-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }

    .docs-steps li {
        padding-left: 36px;
    }
}

/* Running text wraps like the kit's (.ui-text pretty, headings balance): no word left alone on a last line. */
.docs-main p,
.docs-main li,
.docs-main td,
.docs-main th,
.docs-main figcaption {
    text-wrap: pretty;
}

.docs-main h1,
.docs-main h2,
.docs-related a {
    text-wrap: balance;
}
