:root {
    --paper: #f7f4ee;
    --ink: #23201c;
    --muted: #746b60;
    --line: #ded6ca;
    --brand: #b42318;
    --brand-dark: #7c1710;
    --gold: #b18a43;
    --green: #25564a;
    --white: #fffdf8;
    --shadow: 0 18px 45px rgba(42, 31, 20, .12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        linear-gradient(90deg, rgba(180, 35, 24, .05) 1px, transparent 1px),
        linear-gradient(180deg, #fbf8f1 0%, var(--paper) 46%, #f1ebe1 100%);
    background-size: 48px 48px, auto;
    font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
    line-height: 1.65;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: minmax(230px, 320px) 1fr minmax(190px, 250px);
    gap: 22px;
    align-items: center;
    min-height: 76px;
    padding: 0 32px;
    background: rgba(255, 253, 248, .92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.brand {
    display: inline-flex;
    gap: 12px;
    align-items: center;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    color: var(--white);
    background: var(--brand);
    font-family: Georgia, serif;
    font-weight: 700;
    letter-spacing: 0;
}

.brand strong,
.brand em {
    display: block;
}

.brand strong {
    font-size: 18px;
}

.brand em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    justify-content: center;
    color: #403a33;
    font-size: 15px;
}

.nav a {
    padding: 10px 0;
    border-bottom: 2px solid transparent;
}

.nav a:hover {
    color: var(--brand);
    border-color: var(--brand);
}

.header-search {
    display: grid;
    grid-template-columns: 1fr 42px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--white);
}

.header-search input,
.query-panel input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
}

.header-search input {
    padding: 10px 12px;
}

.header-search button {
    border: 0;
    background: var(--ink);
    color: var(--white);
    cursor: pointer;
}

.hero-band {
    display: grid;
    grid-template-columns: minmax(390px, .82fr) minmax(620px, 1.18fr);
    gap: 36px;
    align-items: start;
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px 32px 34px;
}

.kicker {
    margin: 0 0 10px;
    color: var(--brand);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

.hero-copy h1,
.page-title h1 {
    margin-bottom: 16px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.04;
    letter-spacing: 0;
}

.hero-copy h1 {
    font-size: clamp(40px, 3vw, 52px);
    word-break: keep-all;
    white-space: nowrap;
}

.hero-copy p:not(.kicker),
.page-title p:not(.kicker) {
    max-width: 680px;
    color: var(--muted);
    font-size: 18px;
}

.hero-actions,
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 16px;
    border: 1px solid var(--ink);
    background: transparent;
    font-weight: 700;
}

.button.primary {
    border-color: var(--brand);
    background: var(--brand);
    color: var(--white);
}

.hero-panel {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 18px;
}

.feature-card,
.mini-card,
.news-row,
.article-row,
.related-grid a,
.quick-grid a,
.result-card,
.expert-grid article,
.side-box,
.djpd-card {
    background: rgba(255, 253, 248, .88);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.feature-card {
    position: relative;
    display: grid;
    grid-template-rows: minmax(292px, 1fr) auto;
    min-height: 360px;
    overflow: hidden;
}

.feature-card img {
    width: 100%;
    height: 100%;
    min-height: 292px;
    object-fit: cover;
    transition: transform .45s ease;
}

.feature-card:hover img,
.mini-card:hover img,
.news-row:hover img,
.article-row:hover img {
    transform: scale(1.04);
}

.feature-card span {
    display: block;
    padding: 16px 18px 18px;
    color: var(--white);
    background: var(--ink);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.5;
}

.top-list {
    display: grid;
    gap: 12px;
}

.top-list a {
    display: flex;
    align-items: center;
    min-height: 76px;
    padding: 16px;
    background: var(--ink);
    color: var(--white);
    font-weight: 700;
}

.quick-grid,
.section-grid,
.page-title,
.article-page,
.related,
.query-panel,
.result-list,
.expert-grid,
.djpd-layout {
    max-width: 1240px;
    margin: 0 auto;
    padding-left: 32px;
    padding-right: 32px;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding-top: 18px;
    padding-bottom: 34px;
}

.quick-grid a {
    min-height: 128px;
    padding: 20px;
    border-top: 4px solid var(--brand);
}

.quick-grid strong,
.quick-grid span {
    display: block;
}

.quick-grid strong {
    margin-bottom: 8px;
    font-size: 20px;
}

.quick-grid span,
.news-row small,
.article-row small,
.mini-card span,
.meta,
.related-grid span,
.expert-grid small,
.result-card p {
    color: var(--muted);
}

.section-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    padding-bottom: 58px;
}

.content-section,
.side-box,
.related,
.result-list,
.expert-grid,
.djpd-card {
    margin-bottom: 24px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    border-bottom: 2px solid var(--ink);
}

.section-head h2,
.side-box h2 {
    margin: 0;
    font-size: 25px;
}

.section-head a {
    color: var(--brand);
    font-weight: 700;
}

.news-list,
.article-list {
    display: grid;
    gap: 12px;
}

.news-row,
.article-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 18px;
    min-height: 130px;
    padding: 12px;
    overflow: hidden;
}

.news-row img,
.article-row img,
.mini-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}

.news-row strong,
.article-row strong {
    display: block;
    margin-bottom: 6px;
    font-size: 19px;
    line-height: 1.35;
}

.news-row em,
.article-row em {
    display: block;
    margin-bottom: 4px;
    color: var(--brand);
    font-size: 13px;
    font-style: normal;
}

.side-box {
    padding: 18px;
}

.mini-card {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 12px;
    min-height: 78px;
    margin-top: 12px;
    padding: 8px;
    overflow: hidden;
}

.link-cloud,
.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.link-cloud a,
.category-list a {
    padding: 7px 10px;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--muted);
}

.page-title {
    padding-top: 52px;
    padding-bottom: 30px;
}

.article-page {
    max-width: 920px;
    margin: 0 auto;
    padding-top: 46px;
    padding-bottom: 34px;
}

.article-head {
    max-width: 880px;
    margin-right: auto;
    margin-left: auto;
}

.article-head h1 {
    margin-bottom: 12px;
    font-size: clamp(32px, 4.8vw, 58px);
    line-height: 1.15;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 22px;
}

.article-share {
    display: grid;
    justify-items: center;
    gap: 14px;
    max-width: 880px;
    margin: 32px auto 4px;
    padding: 24px 0 6px;
    border-top: 1px solid var(--line);
}

.share-tools {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.share-tools button {
    min-height: 38px;
    padding: 7px 12px;
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.share-tools button:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.wechat-share-box {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--muted);
    font-size: 14px;
}

.wechat-share-box[hidden] {
    display: none;
}

.wechat-share-box img {
    width: 180px;
    height: 180px;
}

.article-cover {
    width: 100%;
    max-width: 880px;
    max-height: 520px;
    margin: 0 auto 28px;
    object-fit: cover;
    border: 1px solid var(--line);
}

.article-content {
    max-width: 880px;
    margin-right: auto;
    margin-left: auto;
    font-size: 18px;
}

.article-content img {
    width: auto;
    max-width: 100%;
    margin: 18px 0;
    border: 1px solid var(--line);
}

.article-content a {
    color: var(--brand);
    text-decoration: underline;
}

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

.related-grid a {
    min-height: 116px;
    padding: 16px;
}

.related-grid strong,
.related-grid span {
    display: block;
}

.query-panel {
    padding-bottom: 24px;
}

.query-panel form {
    display: grid;
    grid-template-columns: 1fr 110px;
    max-width: 720px;
    border: 1px solid var(--line);
    background: var(--white);
}

.query-panel input {
    padding: 14px 16px;
}

.result-list {
    display: grid;
    gap: 16px;
    padding-bottom: 54px;
}

.result-card {
    padding: 22px;
}

.result-card h2 {
    margin-bottom: 4px;
}

.result-card dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 18px;
}

.result-card dt {
    color: var(--muted);
    font-size: 13px;
}

.result-card dd {
    margin: 0;
    font-weight: 700;
}

.expert-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    padding-bottom: 58px;
}

.expert-grid article {
    min-height: 130px;
    padding: 18px;
    border-top: 4px solid var(--green);
}

.expert-grid strong,
.expert-grid span,
.expert-grid small {
    display: block;
}

.expert-grid strong {
    font-size: 22px;
}

.djpd-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 260px;
    gap: 24px;
    padding-bottom: 58px;
}

.djpd-nav {
    display: grid;
    align-content: start;
    gap: 8px;
}

.djpd-nav a {
    padding: 12px 14px;
    border-left: 4px solid var(--brand);
    background: var(--white);
}

.djpd-nav a[aria-current="page"] {
    background: var(--brand);
    color: var(--white);
}

.djpd-card {
    padding: 22px;
}

.djpd-card img {
    width: 100%;
    background: var(--white);
}

.djpd-article {
    color: #3d3730;
}

.djpd-article h2 {
    margin: 28px 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--line);
    color: var(--brand);
    font-size: 26px;
}

.djpd-article h3 {
    margin: 24px 0 8px;
    color: var(--brand);
    font-size: 21px;
}

.djpd-article p,
.djpd-article li {
    font-size: 17px;
}

.djpd-intro {
    margin-top: 24px;
}

.djpd-note {
    padding: 14px 16px;
    background: var(--paper);
    color: var(--green);
    font-weight: 700;
}

.djpd-sample-grid,
.djpd-sample-strip {
    display: grid;
    gap: 18px;
}

.djpd-sample-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
}

.djpd-sample-grid figure,
.djpd-sample-strip a,
.djpd-reminder {
    margin: 0;
    border: 1px solid var(--line);
    background: var(--white);
}

.djpd-sample-grid figcaption {
    padding: 12px 14px;
}

.djpd-sample-grid strong,
.djpd-sample-grid span,
.djpd-sample-strip strong,
.djpd-sample-strip em {
    display: block;
}

.djpd-sample-grid span,
.djpd-sample-strip em {
    color: var(--muted);
    font-style: normal;
}

.djpd-sample-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 22px;
}

.djpd-sample-strip a {
    display: grid;
    grid-template-columns: 1fr 150px;
    gap: 14px;
    align-items: center;
    padding: 14px;
}

.djpd-reminder {
    align-self: start;
    position: sticky;
    top: 96px;
    padding: 18px;
}

.djpd-reminder h2 {
    margin: 0 0 10px;
    color: var(--brand);
    font-size: 22px;
}

.djpd-reminder p,
.djpd-sign {
    color: var(--muted);
}

.djpd-sign {
    text-align: right;
    font-weight: 700;
}

.download-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.download-list a {
    padding: 12px;
    background: var(--paper);
    color: var(--brand);
    font-weight: 700;
}

.empty {
    padding: 28px;
    border: 1px dashed var(--line);
    color: var(--muted);
    background: rgba(255, 253, 248, .72);
}

.pager {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.pager a,
.pager span {
    padding: 8px 12px;
    border: 1px solid var(--line);
    background: var(--white);
}

.site-footer {
    display: grid;
    grid-template-columns: minmax(220px, .75fr) minmax(0, 1.5fr) minmax(210px, .75fr);
    align-items: start;
    gap: 22px;
    padding: 34px 32px;
    background: var(--ink);
    color: var(--white);
}

.site-footer p {
    margin-bottom: 0;
    color: #d6cab8;
}

.footer-main p {
    margin-top: 8px;
}

.footer-friend-links {
    display: grid;
    gap: 10px;
}

.footer-friend-links strong {
    color: var(--white);
}

.footer-friend-links p {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.footer-links {
    justify-content: flex-end;
}

.footer-links a,
.footer-friend-links a {
    color: #eadbc5;
}

.footer-friend-links a:hover,
.footer-links a:hover {
    color: var(--white);
}

@media (max-width: 980px) {
    .site-header,
    .hero-band,
    .section-grid,
    .djpd-layout {
        grid-template-columns: 1fr;
    }

    .site-header {
        position: static;
        padding: 16px;
    }

    .hero-copy h1 {
        white-space: normal;
    }

    .nav {
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 0 18px;
        overflow-x: auto;
        overflow-y: hidden;
        max-width: 100%;
        padding-bottom: 2px;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .nav::-webkit-scrollbar {
        display: none;
    }

    .nav a {
        flex: 0 0 auto;
    }

    .hero-panel,
    .quick-grid,
    .related-grid,
    .expert-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .side-column {
        order: -1;
    }

    .djpd-reminder {
        position: static;
    }
}

@media (max-width: 640px) {
    .hero-band,
    .quick-grid,
    .section-grid,
    .page-title,
    .article-page,
    .related,
    .query-panel,
    .result-list,
    .expert-grid,
    .djpd-layout {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero-panel,
    .quick-grid,
    .related-grid,
    .expert-grid,
    .djpd-sample-grid,
    .djpd-sample-strip,
    .result-card dl {
        grid-template-columns: 1fr;
    }

    .news-row,
    .article-row {
        grid-template-columns: 112px 1fr;
    }

    .query-panel form {
        grid-template-columns: 1fr;
    }

    .query-panel .button {
        width: 100%;
    }

    .site-footer {
        grid-template-columns: 1fr;
    }
}
