.byte-guide-width {
    width: min(1120px, calc(100% - 40px));
    margin-inline: auto;
}

.byte-guide-intro {
    padding: 154px 0 58px;
    background: #f2f4ff;
    color: #182144;
}

.byte-guide-intro h1 {
    margin-bottom: 16px;
    font-size: clamp(2.2rem, 6vw, 3.8rem);
    line-height: 1.12;
}

.byte-guide-intro p {
    max-width: 65ch;
    margin-bottom: 24px;
}

.byte-guide-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: clamp(32px, 6vw, 76px);
    padding-block: 48px 64px;
}

.byte-guide-index {
    position: sticky;
    top: 104px;
    align-self: start;
    min-width: 0;
    padding: 20px;
    border: 1px solid #dfe4f1;
    border-radius: 10px;
}

.byte-guide-index h2 {
    margin: 0 0 10px;
    font-size: 1rem;
}

.byte-guide-index ol {
    padding-inline-start: 1.4em;
    margin: 0;
    list-style: decimal;
}

.byte-guide-index li {
    padding-block: 4px;
    line-height: 1.55;
}

.byte-guide-index a,
.byte-guide-article a {
    color: #354cac;
    text-decoration: underline;
    text-underline-offset: 0.16em;
    overflow-wrap: anywhere;
}

.byte-guide-article {
    max-width: 76ch;
    min-width: 0;
}

.byte-guide-article section {
    scroll-margin-top: 120px;
}

.byte-guide-article section + section {
    margin-top: 36px;
    padding-top: 30px;
    border-top: 1px solid #dfe4f1;
}

.byte-guide-article h2 {
    font-size: clamp(1.45rem, 3vw, 2rem);
}

.byte-guide-article h3 {
    margin-top: 24px;
    font-size: 1.15rem;
}

.byte-guide-article p,
.byte-guide-article li {
    line-height: 1.75;
}

.byte-guide-article ul {
    padding-inline-start: 1.4em;
    list-style: disc;
}

.byte-guide-article pre {
    padding: 16px;
    margin-block: 16px 22px;
    border-radius: 8px;
    background: #151d38;
    color: #f3f6ff;
    overflow-x: auto;
}

.byte-guide-article :not(pre) > code {
    overflow-wrap: anywhere;
}

.byte-guide-skip {
    position: fixed;
    left: 12px;
    top: 12px;
    z-index: 1200;
    padding: 8px 12px;
    background: #fff;
    color: #182144;
    transform: translateY(calc(-100% - 16px));
}

.byte-guide-skip:focus {
    transform: translateY(0);
}

@media (max-width: 767px) {
    .byte-guide-intro {
        padding: 114px 0 36px;
    }

    .byte-guide-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
        padding-top: 32px;
    }

    .byte-guide-index {
        position: static;
    }

    .byte-guide-article section {
        scroll-margin-top: 96px;
    }
}
