.docs {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 48px;
    align-items: start;
    padding: 40px 0 96px;
}

.docs-side {
    position: sticky;
    top: 92px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 8px;
}

.docs-side::-webkit-scrollbar { width: 6px; }
.docs-side::-webkit-scrollbar-thumb { background: #d8dce8; border-radius: 999px; }

.docs-side__group {
    margin-bottom: 22px;
}

.docs-side__label {
    display: block;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #8790a8;
}

.docs-side__link {
    display: block;
    padding: 6px 12px;
    border-left: 2px solid transparent;
    font-size: 14px;
    color: #3d4560;
    text-decoration: none;
    transition: color .15s ease, border-color .15s ease;
}

.docs-side__link:hover { color: #ff1845; }
.docs-side__link.is-active {
    border-left-color: #ff1845;
    color: #000324;
    font-weight: 600;
}

.docs-main { min-width: 0; }

.docs-sec {
    scroll-margin-top: 96px;
    padding-bottom: 56px;
}

.docs-sec + .docs-sec { border-top: 1px solid #e8ebf3; padding-top: 48px; }

.docs-sec h2 {
    margin: 0 0 10px;
    font-size: 30px;
    line-height: 1.2;
    letter-spacing: -.02em;
    color: #000324;
}

.docs-sec h3 {
    margin: 34px 0 12px;
    font-size: 18px;
    color: #000324;
}

.docs-sec p { margin: 0 0 14px; color: #444b63; line-height: 1.7; }
.docs-sec ul { margin: 0 0 16px; padding-left: 18px; list-style: disc; color: #444b63; line-height: 1.8; }
.docs-sec a { color: #ff1845; }

.docs-lead { font-size: 17px; color: #5a6178; }

code.inline {
    padding: 2px 6px;
    border-radius: 5px;
    background: #f1f3f9;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .9em;
    color: #000971;
}

.endpoint {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid #e2e6f1;
    border-radius: 12px;
    background: #fafbff;
}

.endpoint__method {
    padding: 4px 10px;
    border-radius: 6px;
    background: #000971;
    color: #fff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
}

.endpoint__path {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 14px;
    color: #000324;
    word-break: break-all;
}

.params {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 18px;
    font-size: 14px;
}

.params th {
    padding: 9px 12px;
    border-bottom: 1px solid #e2e6f1;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #8790a8;
}

.params td {
    padding: 11px 12px;
    border-bottom: 1px solid #eef1f7;
    color: #444b63;
    vertical-align: top;
    line-height: 1.6;
}

.params td:first-child {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: #000971;
    white-space: nowrap;
}

.params .type { font-size: 12px; color: #8790a8; }

.tag {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.tag--req { background: #ffe8ed; color: #c00027; }
.tag--opt { background: #eef0f7; color: #6b7390; }

.code {
    margin: 0 0 20px;
    border-radius: 12px;
    overflow: hidden;
    background: #000324;
    border: 1px solid #14183d;
}

.code__bar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    border-bottom: 1px solid #191d44;
    background: #05082b;
}

.code__tab {
    padding: 5px 11px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #8f97c0;
    font-family: inherit;
    font-size: 12.5px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.code__tab:hover { color: #fff; }
.code__tab.is-active { background: #ff1845; color: #fff; }

.code__copy {
    margin-left: auto;
    padding: 5px 11px;
    border: 1px solid #262b58;
    border-radius: 7px;
    background: transparent;
    color: #8f97c0;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
}

.code__copy:hover { border-color: #ff1845; color: #fff; }

.code pre {
    margin: 0;
    padding: 18px 20px;
    overflow-x: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.75;
    color: #d7dbf0;
    tab-size: 2;
}

.code pre[hidden] { display: none; }

.tok-str { color: #7ee0a8; }
.tok-num { color: #ffb86b; }
.tok-key { color: #ff6d8a; }
.tok-com { color: #5b628c; font-style: italic; }
.tok-fn  { color: #7cc4ff; }

.note {
    margin: 0 0 20px;
    padding: 14px 16px;
    border-left: 3px solid #ff1845;
    border-radius: 0 10px 10px 0;
    background: #fff5f7;
    color: #55253a;
    font-size: 14px;
    line-height: 1.7;
}

.note strong { color: #000324; }

.note--info { border-left-color: #000971; background: #f4f6ff; color: #2c3358; }

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    margin: 0 0 8px;
}

.card {
    display: block;
    padding: 18px;
    border: 1px solid #e2e6f1;
    border-radius: 14px;
    background: #fff;
    text-decoration: none;
    transition: border-color .15s ease, transform .15s ease;
}

.card:hover { border-color: #ff1845; transform: translateY(-2px); }
.card strong { display: block; margin-bottom: 4px; color: #000324; font-size: 15px; }
.card span { font-size: 13px; color: #6b7390; }

@media (max-width: 980px) {
    .docs { grid-template-columns: 1fr; gap: 24px; padding-top: 24px; }
    .docs-side { position: static; max-height: none; padding: 0 0 12px; border-bottom: 1px solid #e8ebf3; }
    .docs-side__group { margin-bottom: 14px; }
    .docs-sec h2 { font-size: 25px; }
}
