:root {
    --ink: #252525;
    --muted: #616561;
    --olive: #3c5c12;
    --olive-dark: #294209;
    --olive-light: #eaf0e1;
    --red: #a82833;
    --border: #dbddd5;
    --paper: #fff;
    --content-width: 1000px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
    margin: 0;
    color: var(--ink);
    background: #fff;
    font: 1rem/1.6 "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); text-decoration: underline; }
:focus-visible { outline: 2px solid #a82833; outline-offset: 2px; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button, input { font: inherit; }

.visually-hidden, .skip-link:not(:focus) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    white-space: nowrap;
    clip-path: inset(50%);
}

.skip-link:focus {
    position: absolute;
    z-index: 2;
    padding: .4rem .75rem;
    background: white;
    color: var(--olive-dark);
}

.site-width {
    width: min(calc(100% - 28px), var(--content-width));
    margin-inline: auto;
}

.utility {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    color: #4f544a;
    font-size: .875rem;
    border-bottom: 1px solid #eeefe9;
}

.search { display: flex; align-items: center; gap: 4px; }
.search input {
    width: 9.25rem;
    min-width: 0;
    border: 1px solid #bfc8b5;
    border-radius: 0;
    padding: 1px 7px;
    color: var(--ink);
    background: #fff;
}
.search button {
    border: 1px solid #344726;
    padding: 1px 9px;
    color: #fff;
    background: #46593a;
    cursor: pointer;
}

.masthead {
    display: grid;
    grid-template-columns: 146px minmax(0, 768px);
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    padding-inline: 15px 12px;
}

.site-logo {
    width: 146px;
    height: 63px;
    background: url("/images/duanjun/sprite.gif") no-repeat left 4px;
}
.masthead-banner { width: 100%; height: auto; }

.primary-nav {
    display: flex;
    flex-wrap: wrap;
    min-height: 40px;
    border-block: 1px solid #354e18;
    background: linear-gradient(#608039, #365318 68%, #30490f);
    color: white;
}
.primary-nav a {
    flex: 1 0 auto;
    display: grid;
    padding: .42rem .53rem;
    place-items: center;
    border-right: 1px solid rgb(255 255 255 / 15%);
    white-space: nowrap;
    font-size: .9375rem;
    font-weight: 700;
}
.primary-nav a:hover, .primary-nav a[aria-current] {
    color: white;
    background: var(--olive-dark);
    text-decoration: underline;
    text-underline-offset: .22em;
}

.section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 0;
    min-height: 34px;
    margin-inline: 10px;
    padding-block: 5px;
    border-bottom: 1px solid #6b9431;
    font-size: .875rem;
}
.section-nav > div { display: flex; flex-wrap: wrap; gap: 4px 11px; padding: 0 11px; }
.section-nav > div + div { border-left: 1px solid #ddd; }
.section-nav b, .section-nav a[aria-current] { color: var(--olive-dark); font-weight: 700; }

.home-page { display: grid; gap: 9px; padding-block: 8px 0; }
.panel { min-width: 0; border: 1px solid var(--border); background: var(--paper); }
.panel-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
    padding: .35rem .65rem;
    min-height: 35px;
    border-top: 2px solid #6b9431;
    border-bottom: 1px solid var(--border);
    color: var(--olive-dark);
    background: linear-gradient(#fff, #edf0e8);
    font: 700 1rem/1.4 "Microsoft YaHei", "PingFang SC", sans-serif;
}
.panel-title a { flex: none; color: var(--muted); font-size: .8125rem; font-weight: 400; }

.headline-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 8px 0 6px; }
.headline-strip > div { padding: 0 8px; min-width: 0; }
.headline-strip > div + div { border-left: 1px solid #eceee8; }
.headline-strip h2 { padding-inline: 8px; color: var(--red); font-size: .9375rem; }
.headline-strip .headline-list a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.headline-list { padding: .35rem .65rem .6rem; font-size: .9375rem; }
.headline-list li { min-width: 0; display: flex; align-items: baseline; gap: .35rem; line-height: 1.55; }
.headline-list li + li { margin-top: .22rem; }
.headline-list li::before { content: "·"; flex: none; color: var(--olive-dark); font-weight: 700; }
.headline-list a { display: block; min-width: 0; overflow-wrap: anywhere; }
.headline-list time { flex: none; margin-left: auto; color: var(--muted); font-size: .8125rem; }

.home-lead { display: grid; grid-template-columns: 1.05fr 1.06fr .95fr; align-items: stretch; gap: 8px; }
.home-lead > section:only-of-type { grid-column: 1 / -1; }
.hot-lead { margin: .5rem .6rem 0; padding: 0 0 .5rem; border-bottom: 1px dotted #d4d8cf; }
.hot-lead h3 { margin-bottom: .25rem; font-size: 1.05rem; line-height: 1.4; color: var(--red); }
.hot-lead p { color: var(--muted); font-size: .875rem; }
.feature { padding: 5px; }
.feature-frame { aspect-ratio: 1.17; background: #ecede8; }
.feature-frame a { position: relative; display: block; height: 100%; }
.feature-frame img { width: 100%; height: 100%; object-fit: cover; }
.feature-frame span {
    position: absolute;
    inset: auto 0 0;
    padding: .62rem .55rem;
    color: #fff;
    background: rgb(24 26 19 / 78%);
    font-size: .9375rem;
    font-weight: 700;
    line-height: 1.35;
}
.feature-picker { display: flex; gap: 5px; padding-top: 5px; }
.feature-picker button { flex: 1; min-width: 0; padding: 2px; border: 1px solid #d0d1cb; background: #fff; cursor: pointer; }
.feature-picker button[aria-pressed="true"] { border-color: var(--red); }
.feature-picker img { width: 100%; aspect-ratio: 1.3; object-fit: cover; }
.home-sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(218px, 1fr)); gap: 8px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(127px, 1fr)); gap: 9px; padding: 10px; }
.photo-grid a { min-width: 0; font-size: .875rem; overflow-wrap: anywhere; }
.photo-grid img { width: 100%; aspect-ratio: 1.54; object-fit: cover; }
.photo-grid span { display: block; padding-block: .25rem; }

.crumb {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    column-gap: .6rem;
    padding: .65rem .25rem;
    font-size: .875rem;
    color: #50564b;
}
.crumb a { color: var(--olive-dark); }
.list-columns, .article-columns { display: grid; align-items: start; gap: 10px; }
.list-columns { grid-template-columns: minmax(168px, .72fr) minmax(0, 2.6fr); }
.category-columns { grid-template-columns: minmax(140px, .75fr) minmax(0, 2.58fr) minmax(155px, .85fr); }
.category-updates { display: grid; gap: 10px; }
.category-photo { display: block; padding: .5rem; font-size: .875rem; }
.category-photo img { width: 100%; aspect-ratio: 1.55; object-fit: cover; }
.category-photo span { display: block; margin-top: .3rem; }
.article-columns { grid-template-columns: minmax(0, 2.6fr) minmax(210px, .9fr); }
.article-columns:has(> :only-child) { grid-template-columns: 1fr; }
.section-index { display: grid; gap: 0; padding: .3rem .7rem .55rem; font-size: .9375rem; }
.section-index a { display: block; padding: .25rem .3rem; }
.section-index a[aria-current] { color: var(--olive-dark); font-weight: 700; background: var(--olive-light); }
.results > h1 { font-size: 1.2rem; }
.result-list { padding: 0 .8rem; }
.result-list > li { display: flex; gap: 12px; padding: .75rem 0; border-bottom: 1px dotted #d4d8cf; min-width: 0; }
.result-list > li > div { min-width: 0; overflow-wrap: anywhere; }
.result-list h2 { font-size: 1.08rem; line-height: 1.4; }
.result-list p { margin-top: .3rem; font-size: .9375rem; color: #4d5349; }
.result-image { flex: 0 0 113px; align-self: start; }
.result-image img { width: 100%; aspect-ratio: 1.55; object-fit: cover; }
.result-meta { display: flex; gap: .75rem; margin-top: .22rem; color: #5a6156; font-size: .8125rem; }
.result-meta a { color: var(--olive-dark); }
.empty-list, .author-profile { padding: .8rem; }
.author-profile { background: #f5f6f1; }
.author-profile a, .info-page p a { color: var(--olive-dark); text-decoration: underline; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: .6rem; }
.pagination > * { min-width: 2rem; text-align: center; padding: .13rem .5rem; border: 1px solid var(--border); }
.pagination span { background: var(--olive-dark); color: #fff; }

.article-panel { padding: 0 clamp(16px, 3.3vw, 34px) 1.2rem; }
.article-panel header { padding: 1.15rem 0 .65rem; border-bottom: 1px dotted #cdd1c7; text-align: center; }
.article-panel h1 { font-size: clamp(1.5rem, 3.7vw, 2rem); line-height: 1.36; overflow-wrap: anywhere; }
.article-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 1rem; margin-top: .45rem; color: var(--muted); font-size: .875rem; }
.article-meta a { color: var(--olive-dark); text-decoration: underline; }
.article-body { padding: .9rem 0; line-height: 1.85; overflow-wrap: anywhere; }
.article-body p { margin-bottom: .8rem; }
.article-body figure { margin: .15rem 0 .9rem; }
.article-body img { height: auto; margin-inline: auto; }
.article-body .inline-related { color: var(--olive-dark); font-size: .9375rem; background: #f3f6ee; padding: .25rem .7rem; }
.article-body .inline-related a { text-decoration: underline; }
.gallery { margin-bottom: .9rem; padding: 5px; background: #262826; }
.gallery-frame { display: grid; place-items: center; min-height: 220px; }
.article-body .gallery figure { margin: 0; width: 100%; }
.gallery-frame img { min-width: min(260px, 100%); max-height: 600px; object-fit: contain; }
.gallery-picker { justify-content: safe center; overflow-x: auto; scrollbar-width: thin; }
.gallery-picker button { flex: 0 0 clamp(52px, 10%, 74px); border-color: #51564e; background: #323630; }
.gallery-picker button[aria-pressed="true"] { border-color: #ef9c39; }
.article-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.article-tags a { background: #f5f6f2; border: 1px solid var(--border); color: var(--olive-dark); padding: .12rem .5rem; font-size: .875rem; }

.info-page { margin-top: .8rem; padding: 1rem; }
.info-page p { margin-block: .6rem; }
.site-map-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: .35rem .55rem; }
.site-footer { margin-block: 1rem; padding: .8rem .25rem; border-top: 1px solid #b7c3a7; text-align: center; font-size: .875rem; color: #4e564a; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem .9rem; margin-bottom: .4rem; }

@media (max-width: 760px) {
    .masthead { padding: 0; gap: 8px; }
    .primary-nav a { flex: 1 0 20%; }
    .section-nav { margin-inline: 0; }
    .section-nav > div { padding-inline: 6px; }
    .home-lead { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .feature { grid-column: 1 / -1; }
    .feature-frame { aspect-ratio: 1.6; }
    .feature-picker img { max-height: 60px; }
    .list-columns, .article-columns { grid-template-columns: 1fr; }
    .list-side, .category-updates { display: none; }
}

@media (max-width: 480px) {
    .site-width { width: calc(100% - 16px); }
    .utility { gap: 8px; flex-wrap: wrap; justify-content: space-between; padding-block: 3px; }
    .search { margin-left: auto; }
    .search input { width: clamp(4.5rem, 27vw, 8rem); }
    .masthead { grid-template-columns: 146px minmax(0, 1fr); min-height: 66px; }
    .masthead-banner { height: clamp(25px, 8.2vw, 33px); object-fit: cover; object-position: 56% center; }
    .primary-nav a { flex-basis: 20%; padding: .37rem .14rem; font-size: .8rem; }
    .section-nav > div { column-gap: 6px; }
    .headline-strip, .home-lead, .home-sections { grid-template-columns: 1fr; }
    .headline-strip > div + div { border-left: 0; border-top: 1px solid #eceee8; padding-top: 5px; }
    .headline-strip .headline-list li:nth-child(n+3) { display: none; }
    .result-image { flex-basis: 74px; }
}
