:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f7f8fa;
  --ink: #33363b;
  --muted: #9a9fa8;
  --line: #eceef1;
  --accent: #168a79;
  --accent-soft: #e6f4f1;
  --shadow: 0 8px 24px rgba(39, 51, 65, .10);
  --shadow-hover: 0 16px 35px rgba(39, 51, 65, .17);
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #121517;
  --surface: #1c2023;
  --surface-soft: #171b1e;
  --ink: #edf1f2;
  --muted: #8e9aa0;
  --line: #2a3034;
  --accent: #5fc6b0;
  --accent-soft: #1b3b36;
  --shadow: 0 8px 24px rgba(0, 0, 0, .22);
  --shadow-hover: 0 16px 35px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--bg); font: 14px/1.7 var(--font); transition: color .2s, background .2s; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
.container { width: min(1180px, calc(100% - 44px)); margin: 0 auto; }

.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-inner { display: flex; align-items: center; gap: 32px; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 9px; min-width: 177px; font-weight: 800; }
.brand-mark { display: grid; place-items: center; width: 28px; height: 28px; color: #fff; background: var(--accent); border-radius: 6px 7px 7px 2px; box-shadow: 3px 3px 0 #f0c95b; font-family: Georgia, serif; font-size: 17px; }
.brand-title { font-size: 15px; letter-spacing: -.03em; }
.brand-subtitle { display: block; margin-top: -4px; color: var(--muted); font-size: 8px; font-weight: 600; letter-spacing: .14em; }
.search-trigger { display: inline-flex; align-items: center; gap: 10px; width: 146px; height: 35px; padding: 0 11px; color: var(--muted); background: var(--surface-soft); border: 1px solid transparent; border-radius: 6px; font-size: 12px; }
.search-trigger:hover { color: var(--accent); border-color: var(--line); }
.search-trigger svg { width: 15px; height: 15px; }
.search-key { margin-left: auto; padding: 1px 5px; border: 1px solid var(--line); border-radius: 4px; font-size: 9px; }
.header-nav { display: flex; align-items: center; gap: 23px; margin-left: auto; color: var(--muted); font-size: 13px; }
.header-nav a:hover, .header-nav a.active { color: var(--accent); }
.header-divider { width: 1px; height: 20px; background: var(--line); }
.header-icon { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 50%; }
.header-icon:hover { color: var(--accent); border-color: var(--accent); }
.mobile-nav-toggle { display: none; width: 35px; height: 35px; padding: 0; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 6px; }

.category-bar { border-bottom: 1px solid var(--line); background: var(--surface); }
.category-list { display: flex; align-items: center; gap: 31px; min-height: 54px; overflow-x: auto; scrollbar-width: none; }
.category-list::-webkit-scrollbar { display: none; }
.category-link { flex: 0 0 auto; color: var(--ink); font-size: 14px; white-space: nowrap; }
.category-link::after { display: inline-block; margin-left: 23px; color: var(--line); content: "/"; }
.category-link:last-child::after { display: none; }
.category-link:hover, .category-link.active { color: var(--accent); }

.main { padding: 38px 0 60px; }
.page-intro { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 23px; }
.page-intro h1 { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -.03em; }
.page-intro p { margin: 0; color: var(--muted); font-size: 12px; }
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 27px 29px; }
.article-card { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 2px; box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.article-card:hover { border-color: transparent; box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.card-cover { position: relative; height: 163px; overflow: hidden; background: #dbe9e5; }
.card-cover::after { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(16, 98, 88, .05), rgba(10, 30, 40, .32)); content: ""; }
.card-cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.article-card:hover .card-cover img { transform: scale(1.04); }
.cover-badge { position: absolute; z-index: 1; top: 12px; left: 12px; padding: 3px 7px; color: #fff; background: rgba(20, 45, 43, .68); border-radius: 3px; font-size: 10px; backdrop-filter: blur(3px); }
.card-body { min-height: 126px; padding: 18px 22px 17px; }
.card-body h2 { display: -webkit-box; overflow: hidden; min-height: 48px; margin: 0 0 13px; font-size: 17px; font-weight: 500; line-height: 1.45; letter-spacing: -.02em; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.article-card:hover h2 { color: var(--accent); }
.card-meta { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.card-meta svg { width: 13px; height: 13px; }
.empty-state { display: none; padding: 70px 0; color: var(--muted); text-align: center; grid-column: 1 / -1; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 19px; margin: 43px 0 0; color: var(--muted); font-size: 12px; }
.pagination button { padding: 4px 0; color: var(--muted); background: none; border: 0; }
.pagination button:hover { color: var(--accent); }
.pagination .disabled { opacity: .45; pointer-events: none; }

.footer { padding: 27px 0 36px; color: var(--muted); border-top: 1px solid var(--line); font-size: 11px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.footer-links { display: flex; gap: 18px; }
.footer a:hover { color: var(--accent); }

.search-panel { position: fixed; z-index: 20; inset: 0; display: none; place-items: start center; padding-top: 15vh; background: rgba(21, 27, 30, .46); backdrop-filter: blur(5px); }
.search-panel.open { display: grid; }
.search-box { width: min(580px, calc(100% - 35px)); padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-hover); }
.search-box-row { display: flex; align-items: center; gap: 9px; padding: 4px 8px; border-bottom: 1px solid var(--line); }
.search-box-row svg { color: var(--muted); }
.search-box input { flex: 1; min-width: 0; padding: 9px 0; color: var(--ink); background: none; border: 0; outline: 0; }
.search-results { max-height: 330px; overflow: auto; padding: 5px 0; }
.search-result { display: block; padding: 9px 10px; border-radius: 5px; }
.search-result:hover { background: var(--accent-soft); }
.search-result strong { display: block; font-size: 13px; font-weight: 500; }
.search-result span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.search-empty { padding: 16px 10px; color: var(--muted); font-size: 12px; }

.article-main { padding: 47px 0 80px; }
.article-layout { width: min(820px, 100%); margin: 0 auto; }
.article-breadcrumb { margin-bottom: 19px; color: var(--muted); font-size: 12px; }
.article-breadcrumb a:hover { color: var(--accent); }
.article-header h1 { margin: 0 0 16px; font-size: clamp(30px, 5vw, 44px); font-weight: 500; letter-spacing: -.05em; line-height: 1.25; }
.article-intro { margin: 0 0 17px; color: var(--muted); font-size: 15px; line-height: 1.8; }
.article-info { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.article-info .article-tag { padding: 2px 7px; color: var(--accent); background: var(--accent-soft); border-radius: 3px; }
.article-cover { width: 100%; height: 320px; margin: 31px 0 36px; overflow: hidden; border-radius: 3px; box-shadow: var(--shadow); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-content { color: var(--ink); font-size: 16px; line-height: 2; }
.article-content p { margin: 0 0 22px; }
.article-content h2 { margin: 38px 0 14px; font-size: 24px; font-weight: 600; line-height: 1.45; }
.article-content h3 { margin: 29px 0 10px; font-size: 19px; font-weight: 600; }
.article-content ul, .article-content ol { margin: 0 0 24px; padding-left: 25px; }
.article-content li { margin: 6px 0; }
.article-content blockquote { margin: 27px 0; padding: 10px 20px; color: var(--muted); background: var(--surface-soft); border-left: 3px solid var(--accent); }
.article-content pre { overflow-x: auto; margin: 25px 0; padding: 18px; color: #d8efeb; background: #182d2b; border-radius: 5px; font: 13px/1.8 ui-monospace, SFMono-Regular, Consolas, monospace; }
.article-content code { padding: 2px 5px; color: var(--accent); background: var(--accent-soft); border-radius: 3px; font-size: .88em; }
.article-content pre code { padding: 0; color: inherit; background: transparent; }
.article-back { display: inline-flex; align-items: center; gap: 7px; margin-top: 35px; color: var(--accent); font-size: 13px; }
.article-back:hover { text-decoration: underline; }
.related { margin-top: 62px; padding-top: 22px; border-top: 1px solid var(--line); }
.related h2 { margin: 0 0 17px; font-size: 18px; font-weight: 500; }
.related-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.related-list a { padding: 13px 15px; background: var(--surface-soft); border-radius: 4px; font-size: 13px; }
.related-list a:hover { color: var(--accent); background: var(--accent-soft); }

@media (max-width: 820px) {
  .header-inner { gap: 14px; }
  .brand { min-width: auto; }
  .search-trigger { width: 38px; padding: 0; justify-content: center; }
  .search-trigger span:not(.search-key) { display: none; }
  .search-key { display: none; }
  .header-nav { display: none; position: absolute; z-index: 5; top: 66px; left: 22px; right: 22px; align-items: stretch; flex-direction: column; gap: 0; padding: 9px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); }
  .header-nav.open { display: flex; }
  .header-nav a { padding: 9px 10px; }
  .header-nav a:hover { background: var(--accent-soft); }
  .header-divider { display: none; }
  .mobile-nav-toggle { display: block; margin-left: auto; }
  .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px; }
  .category-list { gap: 23px; }
  .category-link::after { margin-left: 17px; }
}

@media (max-width: 560px) {
  .container { width: min(100% - 28px, 1180px); }
  .main { padding-top: 27px; }
  .page-intro { display: block; }
  .page-intro p { margin-top: 4px; }
  .article-grid { grid-template-columns: 1fr; }
  .card-cover { height: 185px; }
  .card-body { min-height: 112px; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .article-main { padding-top: 29px; }
  .article-cover { height: 200px; margin: 24px 0 27px; }
  .article-content { font-size: 15px; line-height: 1.9; }
  .related-list { grid-template-columns: 1fr; }
}
