/* ----------「 DOCUMENTATION 」---------- */

.docs-section {
    padding: 2.5rem 0;
}

.docs-layout {
    display: grid;
    grid-template-columns: 245px minmax(0, 1fr);
    align-items: start;
    gap: 2.5rem;
}

.docs-sidebar {
    position: sticky;
    top: 105px;
    max-height: calc(100vh - 125px);
    overflow-y: auto;
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    background: #fff;
    scrollbar-gutter: stable;
}

.docs-sidebar-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

.docs-sidebar-heading > a {
    font-size: 1.25rem;
    font-weight: 600;
}

.docs-sidebar-heading > span,
.docs-muted {
    color: #5c636a;
}

.docs-sidebar-heading > span {
    font-size: 0.8rem;
}

.docs-nav-group {
    margin-top: 1.4rem;
}

.docs-nav-group h2 {
    margin-bottom: 0.5rem;
    color: #5c636a;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.5;
}

.docs-nav-group a {
    display: block;
    padding: 0.4rem 0.6rem;
    border-left: 3px solid transparent;
    border-radius: 0 5px 5px 0;
    color: #495057;
    font-size: 0.9rem;
    line-height: 1.4;
    text-decoration: none;
}

.docs-nav-group a:hover,
.docs-nav-group a[aria-current="page"] {
    border-left-color: var(--color-link);
    color: var(--color-link);
    background: #e9f5f7;
}

.docs-nav-group a[aria-current="page"] {
    font-weight: 600;
}

.docs-content {
    min-width: 0;
    padding: 1.75rem;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    background: #fff;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.docs-content a,
.docs-sidebar-heading > a {
    color: var(--color-link);
    text-underline-offset: 3px;
}

.docs-content .btn-primary {
    color: #fff;
}

.docs-header h1 {
    margin: 0.6rem 0 0.75rem;
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.3;
}

.docs-lead {
    color: #495057;
    font-size: 1.1rem;
}

.docs-contents {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    margin-top: 1.75rem;
    padding: 1rem 0;
    border-top: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
    font-size: 0.9rem;
}

.docs-block {
    margin-top: 2.25rem;
}

.docs-block h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
}

.docs-parameter {
    padding: 1.25rem 0;
    border-top: 1px solid #dee2e6;
}

.docs-parameter-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.75rem;
    margin-bottom: 0.5rem;
}

.docs-parameter h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.5;
}

.docs-field-kind {
    color: #5c636a;
    font-size: 0.8rem;
}

.docs-field-meta {
    margin: 1rem 0 0;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    background: var(--color-background);
    font-size: 0.9rem;
}

.docs-field-meta > div {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr);
    gap: 0.5rem;
    padding: 0.15rem 0;
}

.docs-field-meta dt {
    color: #495057;
    font-weight: 500;
}

.docs-field-meta dd,
.docs-choices dd {
    margin: 0;
}

.docs-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin: 0.75rem 0;
    font-size: 0.85rem;
}

.docs-choices dt {
    font-weight: 400;
}

.docs-example-table {
    overflow-x: auto;
}

.docs-example-table th,
.docs-example-table td {
    padding: 0.65rem 0.5rem;
    vertical-align: top;
}

.docs-example-table tbody th {
    font-weight: 500;
}

.docs-category {
    margin-top: 1.75rem;
}

.docs-category h3 {
    margin-bottom: 0.25rem;
    font-size: 1.15rem;
    font-weight: 600;
}

.docs-module-list {
    padding: 0;
    list-style: none;
}

.docs-module-list li {
    padding: 0.9rem 0;
    border-bottom: 1px solid #e9ecef;
}

.docs-module-list a {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-weight: 500;
    text-decoration: none;
}

.docs-module-list a:hover {
    text-decoration: underline;
}

.docs-module-list p {
    margin: 0.3rem 0 0;
    color: #5c636a;
    font-size: 0.95rem;
}

.docs-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid #dee2e6;
    font-size: 0.9rem;
}

/* ----------「 RESPONSIVE DOCUMENTATION 」---------- */

@media (max-width: 991.98px) {
    .docs-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.25rem;
    }

    .docs-sidebar {
        position: static;
        max-height: none;
        scrollbar-gutter: auto;
    }

    .docs-sidebar-heading {
        margin-bottom: 0.75rem;
    }

    #docs-navigation {
        max-height: 55vh;
        overflow-y: auto;
    }
}

@media (max-width: 575.98px) {
    .docs-section {
        padding: 1.5rem 0;
    }

    .docs-content {
        padding: 1.1rem;
    }

    .docs-field-meta > div {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        padding: 0.3rem 0;
    }
}
