:root {
    color-scheme: light;
    --paper: #fff;
    --background: #f3f5f4;
    --ink: #27332e;
    --muted: #5c6c62;
    --line: #e2e8e4;
    --green: #147339;
    --dark-green: #145633;
    --soft-green: #eaf6ed;
    font: 15px/1.65 "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--ink); }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--green); }
a:focus-visible, input:focus-visible, button:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 3px;
}
img { max-width: 100%; }
button, input { font: inherit; }
.site-wide { width: min(1200px, calc(100% - 48px)); margin-inline: auto; }
.surface { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.site-header {
    border-top: 3px solid var(--green);
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: clamp(14px, 2.5vw, 35px);
    min-height: 76px;
}
.brand {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 8px;
    color: var(--dark-green);
    font-size: 23px;
    font-weight: 800;
    white-space: nowrap;
}
.brand img { display: block; width: 163px; height: auto; }
.primary-nav { display: flex; align-items: stretch; gap: 4px; flex: auto; }
.primary-nav a {
    display: grid;
    align-items: center;
    min-height: 54px;
    padding: 0 clamp(6px, .9vw, 13px);
    border-bottom: 2px solid transparent;
    font-weight: 600;
    white-space: nowrap;
}
.primary-nav a:hover, .primary-nav a[aria-current] {
    border-color: var(--green);
    color: var(--green);
}
.header-search {
    display: flex;
    min-width: 130px;
    width: min(247px, 27%);
    border: 1px solid #b9ccbe;
    border-radius: 5px;
}
.header-search input {
    min-width: 0;
    flex: auto;
    border: 0;
    border-radius: 5px 0 0 5px;
    padding: 7px 9px;
    background: var(--paper);
    color: var(--ink);
    font-size: 14px;
}
.header-search button {
    flex: none;
    border: 0;
    border-radius: 0 4px 4px 0;
    padding: 6px 14px;
    background: var(--green);
    color: #fff;
    cursor: pointer;
}

.home-page { padding-top: 22px; padding-bottom: 54px; }
.home-banner { display: block; }
.home-banner img { display: block; width: 100%; height: auto; border-radius: 3px; }
.home-section { margin-top: 29px; scroll-margin-top: 18px; }
.home-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 17px;
    margin-bottom: 21px;
    color: var(--dark-green);
    font-size: 27px;
    letter-spacing: .13em;
}
.home-heading::before, .home-heading::after {
    content: "";
    width: min(10vw, 90px);
    height: 1px;
    background: #a9cab4;
}
.recommend-layout { display: grid; grid-template-columns: 152px minmax(0, 1fr); overflow: hidden; }
.recommend-tabs { background: #f9fbfa; border-right: 1px solid var(--line); }
.recommend-tabs a {
    display: grid;
    min-height: 78px;
    align-items: center;
    padding-inline: 14px;
    color: var(--muted);
    text-align: center;
    border-left: 3px solid transparent;
    border-bottom: 1px solid var(--line);
}
.recommend-tabs a[aria-current], .recommend-tabs a:hover {
    border-left-color: var(--green);
    background: var(--soft-green);
    color: var(--dark-green);
    font-weight: 700;
}
.recommend-content { min-width: 0; padding: 17px 20px 12px; }
.tile-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; padding: 0; list-style: none; }
.software-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 116px;
    height: 100%;
    padding: 7px 4px;
    text-align: center;
    border: 1px solid transparent;
    border-radius: 5px;
}
.software-tile:hover { background: var(--soft-green); border-color: #cde7d4; }
.software-tile img { object-fit: contain; }
.tile-name { font-weight: 600; overflow-wrap: anywhere; }
.tile-version { font-size: 12px; color: var(--muted); }
.more-link { display: block; margin-top: 12px; color: var(--green); text-align: right; font-size: 14px; }
.more-link:hover { text-decoration: underline; }
.news-grid, .rank-grid { display: grid; gap: 16px; padding: 0; list-style: none; }
.news-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rank-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.news-card, .rank-list { padding: 17px 19px; }
.news-card h3 { font-size: 16px; line-height: 1.45; }
.news-card p { color: var(--muted); margin-top: 8px; font-size: 14px; }
.news-card img { float: left; margin: 0 12px 7px 0; object-fit: cover; border-radius: 4px; }
.feature-list { padding: 0 22px 15px; }
.popular-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 23px; padding: 10px 20px; }
.rank-list h3 { border-left: 3px solid var(--green); padding-left: 10px; margin-bottom: 9px; font-size: 17px; }
.rank-list ol { padding-left: 25px; }
.rank-list li { border-bottom: 1px dotted var(--line); padding: 6px 0 6px 5px; }
.rank-list li::marker { color: var(--green); font-variant-numeric: tabular-nums; font-weight: 700; }

.inner-page { padding-top: 22px; padding-bottom: 52px; min-height: 64vh; }
.page-heading { margin-bottom: 17px; }
.breadcrumb { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 16px; color: var(--muted); font-size: 14px; }
.breadcrumb a:hover { text-decoration: underline; }
.section-suggestions, .archive-panel { padding: 22px 26px; }
.section-suggestions { margin-bottom: 18px; }
.section-suggestions h2 { margin-bottom: 8px; font-size: 19px; color: var(--dark-green); }
.section-suggestions .tile-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.archive-panel h1, .article-header h1 { font-size: clamp(24px, 3vw, 31px); line-height: 1.35; }
.archive-panel > p { margin-top: 9px; }
.category-links { display: flex; flex-wrap: wrap; gap: 8px 11px; margin: 14px 0 9px; }
.category-links a { border: 1px solid var(--line); border-radius: 4px; padding: 3px 9px; font-size: 14px; }
.category-links a:hover, .category-links a[aria-current] { background: var(--soft-green); color: var(--dark-green); border-color: #afd5b9; }
.results, .compact-links { list-style: none; }
.results { padding: 0; }
.result {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    border-bottom: 1px solid var(--line);
    padding: 16px 0;
    overflow-wrap: anywhere;
}
.result-image { flex: 0 0 70px; }
.result-image img { display: block; width: 70px; height: 65px; object-fit: contain; border-radius: 4px; }
.result h3 { font-size: 17px; line-height: 1.45; }
.result p { margin: 5px 0; color: var(--muted); }
.result-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--muted); }
.result-meta a { color: var(--green); }
.pagination { display: flex; justify-content: center; align-items: center; gap: 13px; margin-top: 19px; }
.pagination a { border: 1px solid var(--line); border-radius: 4px; padding: 3px 8px; color: var(--green); }
.empty-list, .search-count { color: var(--muted); }
.empty-list { padding-block: 20px; }

.two-column { display: grid; grid-template-columns: minmax(0, 1fr) minmax(245px, 29%); gap: 18px; align-items: start; }
.article { padding: clamp(18px, 3vw, 35px); overflow-wrap: anywhere; }
.article-header { padding-bottom: 15px; }
.byline { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 8px; font-size: 14px; color: var(--muted); }
.byline a, .article-body a { color: var(--green); }
.byline a:hover, .article-body a:hover { text-decoration: underline; }
.tags { padding: 0; margin-top: 10px; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.tags a { display: block; padding: 2px 8px; border-radius: 4px; color: var(--dark-green); background: var(--soft-green); font-size: 13px; }
.article-facts { display: flex; align-items: center; gap: 20px; margin-bottom: 15px; padding: 15px; background: #f5f9f6; border: 1px solid var(--line); border-radius: 5px; }
.article-facts img { width: 82px; height: 82px; object-fit: contain; }
.article-facts dl { display: flex; flex-wrap: wrap; gap: 8px 25px; }
.article-facts dl div { display: flex; flex-wrap: wrap; gap: 5px; }
.article-facts dt { color: var(--muted); }
.article-facts.news-facts img { width: auto; height: auto; max-height: 230px; }
.article-body { font-size: 16px; line-height: 1.9; }
.article-body > * + * { margin-top: 12px; }
.article-body h2 { font-size: 19px; color: var(--dark-green); }
.article-body h3 { font-size: 17px; }
.article-body img { height: auto; }
.sidebar { padding: 17px; }
.sidebar h2 { font-size: 18px; margin-bottom: 5px; }
.compact-links li { padding-block: 8px; border-bottom: 1px dotted var(--line); overflow-wrap: anywhere; }
.related-links { padding: 0; }
.compact-links li:last-child { border-bottom: 0; }
.site-footer { background: #fff; border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); text-align: center; }
.site-footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 18px; font-size: 14px; }
.site-footer p { margin-top: 8px; font-size: 13px; }

@media (max-width: 975px) {
    .header-inner { flex-wrap: wrap; justify-content: space-between; gap: 3px 13px; padding-top: 12px; }
    .primary-nav { order: 3; flex-basis: 100%; justify-content: space-between; }
    .header-search { width: min(240px, 51%); }
    .section-suggestions .tile-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .site-wide { width: calc(100% - 30px); }
    .news-grid, .two-column { grid-template-columns: 1fr; }
    .tile-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .recommend-layout { grid-template-columns: 1fr; }
    .recommend-tabs { display: flex; border-right: 0; }
    .recommend-tabs a { flex: 1; min-height: 43px; padding-inline: 8px; border-left: 0; border-bottom: 2px solid transparent; }
    .recommend-tabs a[aria-current], .recommend-tabs a:hover { border-bottom-color: var(--green); }
    .recommend-content { padding: 11px 9px; }
    .archive-panel, .section-suggestions { padding: 16px; }
}
@media (max-width: 440px) {
    .site-wide { width: calc(100% - 24px); }
    .brand { font-size: 19px; }
    .brand img { width: 127px; }
    .primary-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
    .primary-nav a { justify-content: center; min-height: 37px; padding: 0 3px; font-size: 14px; }
    .header-search button { padding-inline: 8px; }
    .home-heading { font-size: 22px; margin-bottom: 14px; }
    .home-section { margin-top: 23px; }
    .tile-grid, .section-suggestions .tile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .software-tile { min-height: 100px; font-size: 13px; }
    .software-tile img { width: 53px; height: 53px; }
    .rank-grid, .popular-grid { grid-template-columns: 1fr; }
    .article-facts { align-items: flex-start; gap: 10px; padding: 9px; }
    .article-facts img { width: 50px; height: 50px; }
    .result { gap: 8px; }
    .result-image { flex-basis: 46px; }
    .result-image img { width: 46px; height: 46px; }
}
