/* cmd-docs: sticky TOC (special-symbol style, 1 per row) + soft tables */
.tool-form-cmd-docs .cmd-layout {
    display: flex;
    align-items: stretch;
    gap: 1.25rem;
    min-height: calc(100vh - 11rem);
}

.tool-form-cmd-docs .cmd-sidebar {
    flex: 0 0 8.5rem;
    width: 8.5rem;
    position: sticky;
    top: 50%;
    transform: translateY(-50%);
    align-self: flex-start;
    overflow: visible;
    z-index: 10;
}

.tool-form-cmd-docs .cmd-navi {
    margin-bottom: 0 !important;
    width: 100%;
    overflow: visible;
    border-radius: 0;
    background: transparent;
    border: none;
    padding: 0;
}

.tool-form-cmd-docs .cmd-navi ul {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.35rem;
    margin: 0;
    padding: 0.5rem;
    list-style: none;
    background: transparent;
    border-radius: 0;
    overflow: visible;
}

.tool-form-cmd-docs .cmd-navi li {
    display: block !important;
    float: none !important;
    margin: 0 !important;
    min-width: 0;
}

.tool-form-cmd-docs .cmd-navi li a {
    display: block;
    padding: 0.22rem 0.35rem;
    font-size: 0.8125rem;
    line-height: 1.35;
    color: #555;
    background: #fff;
    border: 1px solid #ddd !important;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}

.tool-form-cmd-docs .cmd-navi li a:hover {
    color: #1677ff;
    border-color: #91caff !important;
    background: #f0f7ff;
}

.tool-form-cmd-docs .cmd-main {
    flex: 1;
    min-width: 0;
    align-self: flex-start;
}

.tool-form-cmd-docs .cmd-main > .tips {
    margin: 0 0 1rem;
    padding: 0;
    color: #6b7280;
    font-size: 0.8125rem;
    line-height: 1.45;
    background: transparent;
}

.tool-form-cmd-docs .cmd-section {
    margin: 0 0 1.35rem;
    scroll-margin-top: 5.5rem;
}

.tool-form-cmd-docs .cmd-section-title {
    margin: 0 0 0.55rem;
    padding: 0 0 0 0.55rem;
    border-left: 3px solid #1677ff;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #303133;
    line-height: 1.25;
}

/* Override course.css global table borders */
.tool-form-cmd-docs .cmd-table {
    width: 100%;
    margin: 0 !important;
    table-layout: fixed;
    border-collapse: separate !important;
    border-spacing: 0;
    border: 1px solid #eceef2 !important;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    font-size: 0.8125rem;
}

.tool-form-cmd-docs .cmd-table th,
.tool-form-cmd-docs .cmd-table td {
    padding: 0.62rem 0.8rem !important;
    border: none !important;
    border-bottom: 1px solid #f1f2f4 !important;
    vertical-align: middle;
    text-align: left;
    line-height: 1.5;
    background: #fff !important;
}

.tool-form-cmd-docs .cmd-table th {
    color: #9aa0a6 !important;
    font-weight: 500;
    font-size: 0.75rem;
    background: #fafbfc !important;
    letter-spacing: 0.02em;
}

.tool-form-cmd-docs .cmd-table th:nth-child(1),
.tool-form-cmd-docs .cmd-table td:nth-child(1) {
    width: 32%;
}

.tool-form-cmd-docs .cmd-table th:nth-child(2),
.tool-form-cmd-docs .cmd-table td:nth-child(2) {
    width: 30%;
}

.tool-form-cmd-docs .cmd-table th:nth-child(3),
.tool-form-cmd-docs .cmd-table td:nth-child(3) {
    width: 38%;
}

.tool-form-cmd-docs .cmd-table tbody tr:last-child td {
    border-bottom: none !important;
}

.tool-form-cmd-docs .cmd-table tbody tr:hover td {
    background: #f8fafc !important;
}

.tool-form-cmd-docs .cmd-table .cmd-copy {
    display: inline;
    max-width: 100%;
    padding: 0.12rem 0.35rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #1f2937;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    word-break: break-word;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    transition: color 0.15s, background-color 0.15s;
}

.tool-form-cmd-docs .cmd-table .cmd-example .cmd-copy {
    font-size: 0.75rem;
    color: #8b939c;
    padding: 0.1rem 0.28rem;
}

.tool-form-cmd-docs .cmd-table .cmd-copy:hover,
.tool-form-cmd-docs .cmd-table .cmd-example .cmd-copy:hover {
    color: #1677ff;
    background: transparent;
}

.tool-form-cmd-docs .cmd-table .cmd-copy:active,
.tool-form-cmd-docs .cmd-table .cmd-copy.is-copied {
    color: #1677ff;
    background: #eef5ff;
}

.tool-form-cmd-docs .cmd-table .cmd-desc {
    color: #4b5563;
}

.tool-form-cmd-docs .cmd-table .cmd-example {
    color: #9aa0a6;
    font-size: 0.75rem;
}



.tool-form-cmd-docs .cmd-example-block {
    margin: 0;
    border: 1px solid #eceef2;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.tool-form-cmd-docs .cmd-example-block .cmd-example-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.85rem;
    border-bottom: 1px solid #f1f2f4;
    background: #fafbfc;
}

.tool-form-cmd-docs .cmd-example-block .cmd-example-toolbar span {
    font-size: 0.75rem;
    color: #9aa0a6;
}

.tool-form-cmd-docs .cmd-example-block .cmd-example-copy {
    border: 1px solid #ddd;
    background: #fff;
    color: #555;
    border-radius: 4px;
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    cursor: pointer;
    line-height: 1.4;
}

.tool-form-cmd-docs .cmd-example-block .cmd-example-copy:hover {
    color: #1677ff;
    border-color: #91caff;
    background: #f0f7ff;
}

.tool-form-cmd-docs .cmd-example-block pre {
    margin: 0;
    padding: 0.85rem 1rem;
    overflow: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: #1f2937;
    background: #fff;
    white-space: pre;
}

.tool-form-cmd-docs .cmd-example-note {
    margin: 0.65rem 0 0;
    color: #6b7280;
    font-size: 0.8125rem;
    line-height: 1.55;
}

@media (max-width: 720px) {
    .tool-form-cmd-docs .cmd-layout {
        flex-direction: column;
        gap: 0.85rem;
        min-height: 0;
    }

    .tool-form-cmd-docs .cmd-sidebar {
        flex: none;
        width: 100%;
        position: static;
        transform: none;
    }

    .tool-form-cmd-docs .cmd-navi ul {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tool-form-cmd-docs .cmd-navi li a {
        white-space: normal;
        font-size: 0.75rem;
    }

    .tool-form-cmd-docs .cmd-table th:nth-child(3),
    .tool-form-cmd-docs .cmd-table td.cmd-example {
        display: none;
    }

    .tool-form-cmd-docs .cmd-table th:nth-child(1),
    .tool-form-cmd-docs .cmd-table td:nth-child(1),
    .tool-form-cmd-docs .cmd-table th:nth-child(2),
    .tool-form-cmd-docs .cmd-table td:nth-child(2) {
        width: auto;
    }
}

body:has(.tool-form-cmd-docs) .my-class {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    overflow: visible !important;
}
