* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    color: #111;
    background: #fff;
    font-family: Georgia, "Times New Roman", "Noto Serif SC", "SimSun", serif;
    font-size: 13px;
    letter-spacing: 0;
}

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

a:hover {
    color: #e60012;
}

.site-shell {
    width: min(770px, calc(100vw - 36px));
    min-height: 100vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.site-header {
    padding: 62px 0 54px;
    text-align: center;
}

.site-title {
    display: inline-block;
    color: #000;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 27px;
    font-weight: 400;
    line-height: 1;
}

.site-subtitle {
    margin-top: 12px;
    color: #9ca6b2;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    font-size: 13px;
}

.nav-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 10px;
    align-items: center;
    border-bottom: 1px solid #edf0f2;
    padding-bottom: 8px;
}

.nav-stack {
    display: grid;
    gap: 10px;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 22px;
    align-items: center;
    min-height: 37px;
    color: #000;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    font-size: 13px;
    line-height: 1.35;
}

.link-nav {
    justify-content: flex-start;
    width: fit-content;
    max-width: 100%;
    min-height: 34px;
    margin: 0;
    padding: 0 28px;
    border: 1px solid #e4e8ed;
    border-radius: 6px;
    background: #fbfcfd;
    box-shadow: 0 8px 18px rgba(31, 41, 55, 0.035);
}

.category-nav {
    justify-content: flex-start;
    min-height: 42px;
    padding: 9px 28px 10px;
    border: 1px solid #edf0f3;
    border-left: 0;
    border-right: 0;
    background: linear-gradient(180deg, #fff 0%, #fbfcfd 100%);
}

.main-nav a {
    position: relative;
    white-space: nowrap;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -5px;
    height: 1px;
    background: currentColor;
    opacity: 0;
    transform: scaleX(0.5);
    transition: opacity 160ms ease, transform 160ms ease;
}

.main-nav a:hover::after {
    opacity: 0.38;
    transform: scaleX(1);
}

.search-form {
    display: flex;
    justify-self: end;
    width: 216px;
    height: 30px;
}

.search-form input {
    width: 100%;
    min-width: 0;
    border: 1px solid #cfd6de;
    border-right: 0;
    border-radius: 4px 0 0 4px;
    padding: 0 10px;
    color: #334155;
    font: 13px Arial, "Microsoft YaHei", sans-serif;
    outline: none;
}

.search-form input:focus {
    border-color: #9aa7b5;
}

.search-form button {
    flex: 0 0 44px;
    width: 44px;
    border: 0;
    border-radius: 0 4px 4px 0;
    background: #2f343b;
    color: #fff;
    font: 700 12px/30px Arial, "Microsoft YaHei", sans-serif;
    cursor: pointer;
    padding: 0;
    text-align: center;
    white-space: nowrap;
}

.site-main {
    flex: 1;
    padding-top: 16px;
}

.category-heading {
    margin: 0 0 18px;
    padding: 9px 16px;
    background: #f5f6f7;
    color: #1f2937;
    text-align: center;
    font-size: 14px;
}

.post-list {
    display: grid;
    gap: 22px;
    padding-top: 7px;
}

.post-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 124px;
    gap: 22px;
    align-items: baseline;
}

.post-row h2 {
    margin: 0;
    overflow: hidden;
    color: #000;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-row time {
    color: #e60012;
    font-size: 13px;
    text-align: right;
    white-space: nowrap;
}

.pagination {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-top: 30px;
    padding-top: 18px;
    border-top: 1px solid #edf0f2;
    color: #6b7280;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    font-size: 13px;
}

.page-link {
    min-width: 58px;
    padding: 6px 12px;
    border: 1px solid #d9e0e8;
    border-radius: 4px;
    background: #fff;
    color: #111827;
    text-align: center;
}

.page-link:hover {
    border-color: #b8c2cf;
    color: #e60012;
}

.page-link.disabled {
    color: #b7c0cc;
    cursor: default;
}

.page-status {
    color: #7d8a99;
}

.mark {
    font-weight: 700;
}

.mark.today,
.mark.sticky {
    color: #e60012;
}

.single-post {
    max-width: 700px;
    margin: 0 auto;
    color: #111827;
}

.single-post h1 {
    margin: 0;
    color: #111;
    font-size: 22px;
    font-weight: 500;
    line-height: 1.45;
}

.post-meta {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    color: #8b97a5;
    font-size: 13px;
}

.post-excerpt {
    margin: 20px 0;
    padding: 12px 14px;
    border-left: 3px solid #e60012;
    background: #f8fafc;
    color: #4b5563;
}

.post-content {
    margin-top: 22px;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.8;
}

.post-content a {
    color: #d00012;
    border-bottom: 1px solid rgba(208, 0, 18, 0.25);
}

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

.download-box {
    margin: 24px 0 12px;
    padding: 14px 16px;
    border: 1px solid #e5eaf0;
    border-radius: 6px;
    background: #fbfcfd;
}

.download-box h3 {
    margin: 0 0 10px;
    color: #111827;
    font-size: 15px;
    font-weight: 600;
}

.download-box ul {
    margin: 0;
    padding-left: 18px;
}

.download-box li {
    margin: 6px 0;
}

.download-empty {
    margin: 0;
    color: #7d8a99;
    font-size: 13px;
}

.post-content .source-note {
    margin-top: 28px;
    color: #9aa4b2;
    font-size: 12px;
    line-height: 1.7;
}

.post-content .source-note a {
    color: #7d8794;
    border-bottom-color: rgba(125, 135, 148, 0.25);
}

.empty-state {
    margin-top: 24px;
    padding: 20px;
    border: 1px solid #edf0f2;
    color: #718096;
    text-align: center;
}

.empty-state a {
    color: #e60012;
}

.site-footer {
    padding: 74px 0 18px;
    color: #7d8a99;
    text-align: center;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    font-size: 13px;
    line-height: 1.85;
}

@media (max-width: 760px) {
    .site-shell {
        width: min(100vw - 24px, 520px);
    }

    .site-header {
        padding: 44px 0 34px;
    }

    .site-title {
        font-size: 28px;
    }

    .nav-search-row {
        grid-template-columns: 1fr;
        padding-bottom: 20px;
    }

    .nav-stack {
        gap: 10px;
    }

    .main-nav {
        gap: 12px 16px;
        font-size: 13px;
        min-height: auto;
    }

    .link-nav {
        width: 100%;
        padding: 8px 16px;
    }

    .category-nav {
        padding: 10px 16px;
    }

    .pagination {
        justify-content: space-between;
    }

    .page-status {
        font-size: 12px;
    }

    .search-form {
        justify-self: stretch;
        width: 100%;
    }

    .post-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .post-row h2 {
        white-space: normal;
    }

    .post-row time {
        text-align: left;
        font-size: 13px;
    }

    .site-footer {
        padding-top: 60px;
        font-size: 12px;
    }
}
