.qc-guide-page,
.qc-guide-page main {
    margin: 0;
    background: #f3f5f6;
}

html {
    scroll-behavior: smooth;
}

html:has(body.qc-guide-page) {
    margin-top: 0 !important;
}

.qc-guide-page #wpadminbar {
    display: none;
}

.qc-guide-page {
    margin-top: 0 !important;
}

.qc-guide,
.qc-guide-login {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    color: #202a31;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    letter-spacing: 0;
}

.qc-guide-admin .qc-guide {
    width: 100%;
    margin: 0;
}

.qc-guide-login {
    width: min(440px, calc(100% - 32px));
    margin-top: 48px;
    padding: 26px;
    border: 1px solid #cbd2d8;
    border-radius: 6px;
    background: #fff;
    box-sizing: border-box;
}

.qc-guide-login input[type="text"],
.qc-guide-login input[type="password"] {
    width: 100%;
    min-height: 42px;
    box-sizing: border-box;
}

.qc-guide-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 0 20px;
    border-bottom: 2px solid #176d5d;
}

.qc-guide-header h1,
.qc-guide-header p {
    margin: 0;
}

.qc-guide-header h1 {
    margin-top: 4px;
    font-size: 30px;
    line-height: 1.2;
}

.qc-guide-kicker,
.qc-guide-version {
    color: #596872;
    font-size: 13px;
}

.qc-guide-version {
    margin-top: 8px !important;
}

.qc-guide-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.qc-guide-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #8e9ba4;
    border-radius: 4px;
    background: #fff;
    color: #1c526f;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
}

.qc-guide-button:hover {
    border-color: #176d5d;
    color: #176d5d;
}

.qc-guide-search {
    display: grid;
    grid-template-columns: auto minmax(220px, 520px) 1fr;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
}

.qc-guide-search label {
    font-weight: 600;
}

.qc-guide-search input {
    width: 100%;
    min-height: 40px;
    padding: 7px 11px;
    border: 1px solid #9da8b0;
    border-radius: 4px;
    background: #fff;
    font: inherit;
    box-sizing: border-box;
}

#qc-guide-search-result {
    color: #596872;
    font-size: 13px;
}

.qc-guide-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    padding-bottom: 40px;
}

.qc-guide-nav {
    position: sticky;
    top: 16px;
    border: 1px solid #cbd2d8;
    background: #fff;
}

.qc-guide-nav a {
    display: block;
    padding: 9px 12px;
    border-bottom: 1px solid #e2e6e9;
    color: #34434c;
    font-size: 14px;
    text-decoration: none;
}

.qc-guide-nav a:last-child {
    border-bottom: 0;
}

.qc-guide-nav a:hover,
.qc-guide-nav a.is-active {
    border-left: 3px solid #176d5d;
    padding-left: 9px;
    background: #eef5f3;
    color: #135548;
}

.qc-guide-content {
    min-width: 0;
    border: 1px solid #cbd2d8;
    background: #fff;
}

.qc-guide-section {
    padding: 24px 28px;
    border-bottom: 1px solid #dce1e5;
    scroll-margin-top: 16px;
}

.qc-guide-section:last-of-type {
    border-bottom: 0;
}

.qc-guide-section[hidden] {
    display: none;
}

.qc-guide-section h2 {
    margin: 0 0 16px;
    color: #18262e;
    font-size: 21px;
    line-height: 1.3;
}

.qc-guide-section h3 {
    margin: 20px 0 7px;
    color: #263842;
    font-size: 16px;
}

.qc-guide-section p,
.qc-guide-section li,
.qc-guide-section td,
.qc-guide-section th {
    font-size: 14px;
    line-height: 1.75;
}

.qc-guide-section p {
    margin: 7px 0 12px;
}

.qc-guide-section ul,
.qc-guide-section ol {
    margin: 8px 0 12px 22px;
}

.qc-guide-section li {
    margin-bottom: 5px;
}

.qc-guide-section code {
    padding: 2px 5px;
    border-radius: 3px;
    background: #edf0f2;
}

.qc-guide-table-wrap {
    overflow-x: auto;
    border: 1px solid #d7dde1;
}

.qc-guide table {
    width: 100%;
    border-collapse: collapse;
}

.qc-guide-table-wrap table {
    min-width: 720px;
}

.qc-guide th,
.qc-guide td {
    padding: 9px 11px;
    border: 1px solid #d7dde1;
    text-align: left;
    vertical-align: top;
}

.qc-guide th {
    background: #f2f4f5;
    color: #34434c;
    white-space: nowrap;
}

.qc-guide-callout {
    margin: 16px 0;
    padding: 12px 14px;
    border-left: 4px solid #788994;
    background: #f4f6f7;
    font-size: 14px;
    line-height: 1.65;
}

.qc-guide-callout-info {
    border-color: #2e78a0;
    background: #eef6fa;
}

.qc-guide-callout-warning {
    border-color: #b46a16;
    background: #fff7ea;
}

.qc-guide-callout-neutral {
    border-color: #687680;
    background: #f2f4f5;
}

.qc-guide-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 14px;
    border: 1px solid #cbd2d8;
    background: #f7f9f9;
}

.qc-guide-flow span {
    padding: 5px 8px;
    border: 1px solid #98aaa5;
    border-radius: 4px;
    background: #fff;
    font-size: 13px;
}

.qc-guide-flow b {
    color: #176d5d;
}

.qc-guide details {
    border-top: 1px solid #dce1e5;
}

.qc-guide details:last-of-type {
    border-bottom: 1px solid #dce1e5;
}

.qc-guide summary {
    padding: 11px 2px;
    font-weight: 600;
    cursor: pointer;
}

.qc-guide details p {
    margin: 0;
    padding: 0 2px 13px;
}

.qc-guide-empty {
    padding: 44px 24px;
    text-align: center;
}

.qc-guide-back {
    display: inline-block;
    margin: 18px 28px;
}

@media (max-width: 900px) {
    .qc-guide-layout {
        grid-template-columns: 1fr;
    }

    .qc-guide-nav {
        position: static;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .qc-guide-nav a {
        border-right: 1px solid #e2e6e9;
    }

    .qc-guide-nav a:hover,
    .qc-guide-nav a.is-active {
        border-left: 0;
        border-bottom: 3px solid #176d5d;
        padding: 9px 12px 6px;
    }
}

@media (max-width: 600px) {
    .qc-guide {
        width: min(100% - 20px, 1240px);
    }

    .qc-guide-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
        padding-top: 18px;
    }

    .qc-guide-header h1 {
        font-size: 24px;
    }

    .qc-guide-search {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .qc-guide-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .qc-guide-section {
        padding: 19px 16px;
    }

    .qc-guide-flow {
        align-items: stretch;
        flex-direction: column;
    }

    .qc-guide-flow b {
        transform: rotate(90deg);
        text-align: center;
    }
}

@media print {
    .qc-guide-page,
    .qc-guide-page main,
    .qc-guide-content {
        background: #fff;
    }

    .qc-guide,
    .qc-guide-admin .qc-guide {
        width: 100%;
    }

    .qc-guide-actions,
    .qc-guide-search,
    .qc-guide-nav,
    .qc-guide-back,
    #wpadminbar,
    #adminmenumain,
    #wpadminbar,
    #wpfooter {
        display: none !important;
    }

    .qc-guide-layout {
        display: block;
    }

    .qc-guide-content {
        border: 0;
    }

    .qc-guide-section {
        break-inside: avoid;
        padding: 18px 0;
    }
}
