* {
    box-sizing: border-box;
}

:root {
    --site-blue: #0e47a1;
    --site-ink: #333;
    --site-muted: #888;
    --site-line: #e2e2e2;
    --site-bg: #f5f5f5;
    --site-surface: #fff;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    margin: 0;
    color: var(--site-ink);
    background: var(--site-bg);
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
textarea,
select {
    font: inherit;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.container {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    border-bottom: 1px solid #e4e4e4;
    background: #fff;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 26px;
    min-height: 72px;
}

.logo {
    flex: 0 0 auto;
    margin: 0;
}

.logo a {
    display: block;
    width: 170px;
    height: 48px;
    background-position: left center;
    background-repeat: no-repeat;
    background-size: contain;
}

.main-nav {
    flex: 1 1 auto;
}

.menu {
    display: flex;
    align-items: center;
    gap: 22px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.menu > li {
    position: relative;
}

.menu > li > a {
    display: block;
    padding: 24px 0;
    color: #555;
    white-space: nowrap;
}

.menu > li > a:hover,
.menu > li.current > a {
    color: var(--site-blue);
}

.sub-menu {
    position: absolute;
    z-index: 10;
    top: 100%;
    left: -12px;
    display: none;
    min-width: 150px;
    margin: 0;
    padding: 8px 0;
    list-style: none;
    border: 1px solid var(--site-line);
    background: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
}

.menu-item-has-children:hover .sub-menu,
.menu-item-has-children:focus-within .sub-menu {
    display: block;
}

.sub-menu a {
    display: block;
    padding: 7px 14px;
    color: #555;
    white-space: nowrap;
}

.sub-menu a:hover {
    color: var(--site-blue);
    background: #f5f8fc;
}

.header-actions {
    flex: 0 0 260px;
}

.search-form {
    display: flex;
    height: 36px;
    border: 1px solid #d8d8d8;
    background: #fff;
}

.search-input {
    min-width: 0;
    flex: 1;
    padding: 0 12px;
    border: 0;
    outline: 0;
}

.search-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    border: 0;
    color: #fff;
    background: var(--site-blue);
    cursor: pointer;
}

.search-icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
}

.site-main {
    padding-top: 24px;
    padding-bottom: 36px;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    align-items: start;
}

.content-column,
.main-content {
    min-width: 0;
}

.post-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.post-card {
    display: grid;
    grid-template-columns: 235px minmax(0, 1fr);
    gap: 18px;
    margin-bottom: 0;
    padding: 14px;
    border: 1px solid var(--site-line);
    background: var(--site-surface);
    box-shadow: 0 0 10px rgba(0, 0, 0, .04);
}

.post-thumb {
    display: block;
    overflow: hidden;
    min-height: 140px;
    background: #eef1f4;
}

.post-thumb img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.post-card-body {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 2px 0;
}

.post-card .title {
    margin: 2px 0 8px;
    color: var(--site-blue);
    font-size: 20px;
    font-weight: 400;
    line-height: 1.35;
}

.post-card .info,
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0 14px;
    margin-bottom: 8px;
    color: var(--site-muted);
    font-size: 12px;
}

.post-card .info {
    margin-top: auto;
}

.post-card .note {
    margin: 0;
    color: #666;
    line-height: 1.7;
}

.sidebar {
    min-width: 0;
}

.side-widget {
    margin-bottom: 18px;
    padding: 16px;
    border: 1px solid var(--site-line);
    background: #fff;
}

.side-widget h2,
.side-widget h3,
.section-heading {
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: #444;
    font-size: 17px;
    font-weight: 400;
}

.category-list {
    display: grid;
    gap: 7px;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    color: #555;
    border-bottom: 1px dotted #e6e6e6;
}

.category-list a:hover {
    color: var(--site-blue);
}

.page-heading {
    margin-bottom: 18px;
}

.page-heading h1,
.archive-heading,
.search-heading {
    margin: 0;
    color: #333;
    font-size: 25px;
    font-weight: 400;
}

.narrow-heading {
    max-width: 845px;
    margin-right: 324px;
}

.archive-heading,
.search-heading {
    margin-bottom: 16px;
    padding: 14px 18px;
    border-left: 3px solid var(--site-blue);
    background: #fff;
}

.archive-heading span {
    padding: 0 8px;
    color: #aaa;
}

.empty-state,
.empty-page {
    padding: 44px 20px;
    color: #888;
    text-align: center;
    border: 1px solid var(--site-line);
    background: #fff;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 20px;
}

.pagination a {
    padding: 6px 10px;
    border: 1px solid var(--site-line);
    color: #666;
    background: #fff;
}

.pagination a:hover,
.pagination a.active {
    color: #fff;
    border-color: var(--site-blue);
    background: var(--site-blue);
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 1280px;
    margin: 0 auto 15px;
    padding: 0;
    color: #999;
    font-size: 13px;
}

.breadcrumbs a {
    color: var(--site-blue);
}

.post-breadcrumbs {
    margin-top: 0;
}

.article-card {
    max-width: 845px;
    margin-right: 324px;
    padding: 20px;
    border: 1px solid var(--site-line);
    background: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, .05);
    text-align: left;
}

.article-card.single-page-card {
    max-width: none;
    margin-right: 0;
}

.article-header h1 {
    margin: 0 0 8px;
    color: var(--site-blue);
    font-size: 25px;
    font-weight: 400;
}

.article-excerpt {
    color: #666;
    font-size: 14px;
}

.article-info {
    margin: 12px 0;
    color: #888;
    font-size: 13px;
}

.article-info span {
    margin-right: 12px;
}

.article-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 25px;
    padding-top: 12px;
}

.article-content {
    min-width: 0;
    color: #444;
    font-size: 14px;
    line-height: 1.8;
}

.article-content h2,
.article-content h3 {
    margin: 18px 0 8px;
    color: #333;
}

.article-content h2 {
    font-size: 20px;
}

.article-content h3 {
    font-size: 17px;
}

.article-content ul,
.article-content ol {
    padding-left: 24px;
}

.article-content blockquote {
    margin: 16px 0;
    padding: 10px 16px;
    border-left: 3px solid var(--site-blue);
    color: #667;
    background: #f7f7f7;
}

.article-content pre {
    overflow-x: auto;
    margin: 16px 0;
    padding: 14px 16px;
    color: #26364a;
    background: #f3f5f7;
}

.article-content code {
    font-family: Consolas, Monaco, monospace;
}

.article-content figure {
    margin: 18px 0;
}

.article-content figure img {
    max-width: 100%;
    height: auto;
}

.article-content figcaption {
    margin-top: 6px;
    color: #888;
    font-size: 12px;
}

.article-content hr {
    margin: 22px 0;
    border: 0;
    border-top: 1px solid var(--site-line);
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
}

.article-content th,
.article-content td {
    padding: 8px 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.article-content a {
    color: var(--site-blue);
}

.download-panel {
    padding: 18px;
    border: 1px solid #d9e4f2;
    background: #f5f9ff;
}

.download-panel h2 {
    margin: 0 0 12px;
    color: #333;
    font-size: 18px;
    font-weight: 400;
}

.button-primary,
.button-outline {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--site-blue);
    cursor: pointer;
}

.button-primary {
    color: #fff;
    background: var(--site-blue);
}

.button-outline {
    color: var(--site-blue);
    background: #fff;
}

.download-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin-right: 8px;
    color: #fff;
    background: var(--site-blue);
}

.download-tip {
    margin-top: 10px;
    color: #888;
    font-size: 12px;
}

.related-section {
    max-width: 845px;
    margin: 28px 324px 0 0;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.related-card {
    padding: 12px;
    border: 1px solid var(--site-line);
    background: #fff;
}

.related-card .post-thumb,
.related-card .post-thumb img {
    min-height: 100px;
    height: 100px;
}

.related-card h3 {
    margin: 10px 0 0;
    color: var(--site-blue);
    font-size: 15px;
    font-weight: 400;
}

.site-footer {
    clear: both;
    min-height: 90px;
    padding: 0;
    background: #f3f3f3;
}

.footer-inner {
    padding: 15px 0;
    text-align: center;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 18px;
    color: #777;
    font-size: 13px;
}

.footer-links a {
    color: #777;
}

.copyright {
    padding: 8px;
    border-top: 1px solid #e5e5e5;
    color: #aaa;
    font-size: 12px;
    text-align: center;
}

@media (max-width: 960px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 10px 20px;
    }

    .main-nav {
        order: 3;
        flex-basis: 100%;
    }

    .menu > li > a {
        padding: 12px 0;
    }

    .header-actions {
        margin-left: auto;
    }

    .content-grid {
        grid-template-columns: minmax(0, 1fr) 260px;
    }

    .article-card,
    .narrow-heading,
    .related-section {
        margin-right: 0;
    }
}

@media (max-width: 720px) {
    .container {
        width: min(100% - 20px, 1280px);
    }

    .logo a {
        width: 140px;
    }

    .header-actions {
        flex-basis: 100%;
        margin-left: 0;
    }

    .menu {
        gap: 15px;
        overflow-x: auto;
    }

    .content-grid,
    .article-body {
        grid-template-columns: 1fr;
    }

    .post-card {
        grid-template-columns: 1fr;
    }

    .post-thumb,
    .post-thumb img {
        min-height: 170px;
        height: 170px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }
}

.download-panel-head {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
}

.download-panel-head strong,
.download-panel-head small {
    display: block;
}

.download-panel-head strong {
    color: #333;
    font-size: 18px;
    font-weight: 400;
}

.download-panel-head small {
    margin-top: 3px;
    color: #888;
    font-size: 12px;
}

.download-list {
    display: grid;
    gap: 8px;
}

.download-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 13px;
    border: 1px solid #d9e4f2;
    color: #333;
    background: #fff;
}

.download-link:hover {
    border-color: var(--site-blue);
    color: var(--site-blue);
}

.download-link-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.download-link-action {
    flex: 0 0 auto;
    color: var(--site-blue);
    font-size: 13px;
}

.download-empty {
    margin: 0;
    padding: 12px;
    border: 1px dashed #cbd8e6;
    color: #777;
    background: #fff;
    font-size: 13px;
}

.article-content .has-pale-pink-color { color: #f78da7; }
.article-content .has-vivid-red-color { color: #cf2e2e; }
.article-content .has-luminous-vivid-orange-color { color: #ff6900; }
.article-content .has-luminous-vivid-amber-color { color: #fcb900; }
.article-content .has-light-green-cyan-color { color: #7bdcb5; }
.article-content .has-vivid-green-cyan-color { color: #00d084; }
.article-content .has-pale-cyan-blue-color { color: #8ed1fc; }
.article-content .has-vivid-cyan-blue-color { color: #0693e3; }
.article-content .has-vivid-purple-color { color: #9b51e0; }
.article-content .has-cyan-bluish-gray-color { color: #abb8c3; }
.article-content .has-black-color { color: #000; }
.article-content .has-white-color { color: #fff; }
