:root {
  --bg: #f4f7f6;
  --surface: #ffffff;
  --surface-soft: #f8faf9;
  --ink: #17231f;
  --muted: #708078;
  --line: #e4ebe7;
  --green: #17a673;
  --green-dark: #0c7552;
  --green-soft: #e8f7f1;
  --orange: #f69b45;
  --shadow: 0 10px 35px rgba(28, 58, 46, .06);
  --radius: 16px;
  --max-width: 1500px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 20px; top: -60px; z-index: 1000; padding: 10px 16px; color: #fff; background: var(--green-dark); border-radius: 8px; transition: top .2s; }
.skip-link:focus { top: 10px; }

.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.92); border-bottom: 1px solid rgba(219,229,224,.9); backdrop-filter: blur(16px); }
.header-inner { max-width: var(--max-width); height: 70px; margin: 0 auto; padding: 0 28px; display: flex; align-items: center; gap: 38px; }
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand-mark { width: 46px; height: 46px; flex: none; object-fit: cover; background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 5px 15px rgba(15, 76, 145, .12); }
.brand-copy { display: grid; line-height: 1.1; }
.brand-copy strong { font-size: 17px; letter-spacing: -.02em; }
.brand-copy small { margin-top: 5px; color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.top-nav { display: flex; align-self: stretch; align-items: center; gap: 6px; }
.top-nav a { position: relative; padding: 24px 14px 22px; color: #52615a; font-size: 14px; font-weight: 600; }
.top-nav a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; background: transparent; }
.top-nav a:hover, .top-nav a.is-active { color: var(--green-dark); }
.top-nav a.is-active::after { background: var(--green); }
.header-search { position: relative; width: 240px; margin-left: auto; }
.header-search svg { position: absolute; left: 13px; top: 50%; width: 17px; transform: translateY(-50%); fill: none; stroke: #809087; stroke-width: 1.8; }
.header-search input { width: 100%; height: 40px; padding: 0 14px 0 39px; border: 1px solid var(--line); border-radius: 12px; outline: none; color: var(--ink); background: var(--surface-soft); transition: .2s; }
.header-search input:focus { border-color: #9fd8c2; background: #fff; box-shadow: 0 0 0 3px rgba(23,166,115,.08); }
.nav-toggle, .mobile-nav { display: none; }

.welcome-strip { overflow: hidden; border-bottom: 1px solid var(--line); background: #eef5f2; }
.welcome-inner { position: relative; max-width: var(--max-width); min-height: 184px; margin: 0 auto; padding: 32px 28px; display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.welcome-inner::after { content: ""; position: absolute; right: 28%; top: -130px; width: 330px; height: 330px; border: 1px solid rgba(23,166,115,.11); border-radius: 50%; box-shadow: 0 0 0 48px rgba(23,166,115,.025), 0 0 0 96px rgba(23,166,115,.018); pointer-events: none; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--green-dark); font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.eyebrow i { width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 5px rgba(23,166,115,.1); }
.welcome-inner h1, .compact-hero h1 { margin: 6px 0 3px; font-family: "Songti SC", SimSun, serif; font-size: clamp(29px, 3vw, 42px); line-height: 1.25; letter-spacing: -.03em; }
.welcome-inner p, .compact-hero p { margin: 0; color: var(--muted); }
.quick-stats { position: relative; z-index: 1; display: flex; padding: 18px 8px; background: rgba(255,255,255,.72); border: 1px solid rgba(255,255,255,.95); border-radius: 16px; box-shadow: var(--shadow); backdrop-filter: blur(8px); }
.quick-stats span { min-width: 105px; padding: 0 20px; display: grid; text-align: center; border-right: 1px solid var(--line); }
.quick-stats span:last-child { border: 0; }
.quick-stats strong { color: var(--ink); font-size: 23px; line-height: 1.25; }
.quick-stats small { margin-top: 4px; color: var(--muted); font-size: 11px; }

.page-shell { max-width: var(--max-width); margin: 0 auto; padding: 28px; display: grid; grid-template-columns: minmax(600px, 1fr) 280px; gap: 24px; align-items: start; }
.page-shell-no-right { grid-template-columns: minmax(0, 1fr); }
.category-sidebar { position: sticky; top: 98px; display: grid; gap: 5px; }
.sidebar-label { padding: 0 12px 9px; color: #9aa69f; font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.category-link { display: flex; align-items: center; gap: 11px; padding: 10px; border: 1px solid transparent; border-radius: 12px; transition: .2s ease; }
.category-link:hover { background: rgba(255,255,255,.65); }
.category-link.is-active { background: #fff; border-color: var(--line); box-shadow: 0 7px 20px rgba(31,70,54,.05); }
.category-icon { width: 34px; height: 34px; display: grid; flex: none; place-items: center; color: var(--green-dark); background: var(--green-soft); border-radius: 10px; font-size: 13px; font-weight: 800; }
.all-icon { color: #fff; background: var(--ink); }
.category-link > span:last-child { display: grid; min-width: 0; }
.category-link strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.category-link small { color: var(--muted); font-size: 10px; }
.content-column { min-width: 0; }
.section-heading { min-height: 48px; margin-bottom: 15px; display: flex; align-items: end; justify-content: space-between; gap: 15px; }
.section-heading h2 { margin: 1px 0 0; font-size: 19px; line-height: 1.3; }
.section-kicker { color: var(--green); font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.muted { color: var(--muted); font-size: 11px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 17px; }
.category-card-grid, .home-card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.category-card-grid .source-card-header, .home-card-grid .source-card-header { min-height: 92px; align-items: flex-start; }
.category-card-grid .source-identity strong, .home-card-grid .source-identity strong { display: -webkit-box; overflow: hidden; font-size: 15px; line-height: 1.35; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.category-card-grid .source-identity small, .home-card-grid .source-identity small { font-size: 11px; }
.category-card-grid .update-badge, .home-card-grid .update-badge { font-size: 10px; }
.category-card-grid .rank-list li, .home-card-grid .rank-list li { min-height: 35px; }
.category-card-grid .rank-list a, .home-card-grid .rank-list a { font-size: 13px; }
.category-card-grid .rank-list time, .home-card-grid .rank-list time { font-size: 10px; }
.category-card-grid .rank, .home-card-grid .rank { font-size: 10px; }
.category-card-grid .source-card-footer, .home-card-grid .source-card-footer { min-height: 42px; font-size: 10px; }
.source-card { min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 3px 16px rgba(24,64,48,.025); transition: transform .2s, box-shadow .2s, border-color .2s; }
.source-card:hover { transform: translateY(-2px); border-color: #d4e5dd; box-shadow: var(--shadow); }
.source-card-header { min-height: 72px; padding: 15px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid #edf1ef; }
.source-identity { min-width: 0; display: flex; align-items: center; gap: 11px; }
.source-identity > span:last-child { min-width: 0; display: grid; }
.source-identity strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.source-identity small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.source-logo { width: 38px; height: 38px; display: grid; flex: none; place-items: center; color: #fff; border-radius: 11px; font-family: "Songti SC", serif; font-size: 17px; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.source-logo.large { width: 64px; height: 64px; border-radius: 18px; font-size: 27px; }
.source-logo.small { width: 40px; height: 40px; font-size: 15px; }
.color-0 { background: linear-gradient(145deg, #207b65, #38b58e); }
.color-1 { background: linear-gradient(145deg, #386a91, #55a2c7); }
.color-2 { background: linear-gradient(145deg, #8f5c43, #cc8c67); }
.color-3 { background: linear-gradient(145deg, #5a6793, #8996ca); }
.color-4 { background: linear-gradient(145deg, #9b6944, #e0a665); }
.color-5 { background: linear-gradient(145deg, #507767, #80ae91); }
.update-badge { flex: none; padding: 3px 7px; color: var(--green-dark); background: var(--green-soft); border-radius: 6px; font-size: 9px; font-weight: 700; }
.rank-list { margin: 0; padding: 9px 15px 8px; list-style: none; }
.rank-list li { min-height: 32px; display: grid; grid-template-columns: 21px minmax(0, 1fr) 33px; align-items: center; gap: 7px; }
.rank-list a { overflow: hidden; color: #35453e; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; transition: color .15s; }
.rank-list a:hover { color: var(--green-dark); }
.rank-list time { color: #a0aaa5; font-size: 9px; text-align: right; }
.rank { width: 18px; height: 18px; display: grid; place-items: center; color: #a0aaa5; font-size: 9px; font-weight: 700; }
.rank-1 { color: #fff; background: #ef765b; border-radius: 5px; }
.rank-2 { color: #fff; background: #efa14e; border-radius: 5px; }
.rank-3 { color: #fff; background: #e4bd5e; border-radius: 5px; }
.rank-list .empty-row { display: block; padding: 45px 10px; color: var(--muted); text-align: center; }
.source-card-footer { min-height: 39px; padding: 9px 16px; display: flex; align-items: center; justify-content: space-between; color: #98a39e; background: #fbfcfb; border-top: 1px solid #edf1ef; font-size: 9px; }
.source-card-footer a { color: var(--green-dark); font-weight: 700; }

.right-sidebar { position: sticky; top: 98px; display: grid; gap: 17px; }
.side-card { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.side-card-title { height: 50px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 750; }
.live-dot { width: 7px; height: 7px; background: #ff765d; border-radius: 50%; box-shadow: 0 0 0 5px rgba(255,118,93,.1); }
.latest-list { margin: 0; padding: 9px 15px 12px; list-style: none; }
.latest-list li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 9px; padding: 9px 0; border-bottom: 1px dashed #e8eeeb; }
.latest-list li:last-child { border: 0; }
.latest-list > li > span { color: #b0bab5; font-size: 10px; font-weight: 750; }
.latest-list div { min-width: 0; display: grid; }
.latest-list a { display: -webkit-box; overflow: hidden; color: #394940; font-size: 11px; line-height: 1.5; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.latest-list a:hover { color: var(--green-dark); }
.latest-list small { margin-top: 3px; overflow: hidden; color: #9ca7a2; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.about-card { position: relative; padding: 24px 20px; color: #dbeee6; background: var(--ink); }
.about-card::after { content: ""; position: absolute; right: -45px; bottom: -50px; width: 140px; height: 140px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; box-shadow: 0 0 0 28px rgba(255,255,255,.02); }
.tiny-mark { display: grid; width: 27px; height: 27px; place-items: center; color: var(--ink); background: #7addb8; border-radius: 8px; font-size: 12px; font-weight: 900; }
.about-card h2 { margin: 15px 0 8px; color: #fff; font-family: "Songti SC", serif; font-size: 19px; line-height: 1.45; }
.about-card p { position: relative; z-index: 1; margin: 0; color: #9fb1a9; font-size: 10px; }

.compact-hero { max-width: var(--max-width); min-height: 156px; margin: 0 auto; padding: 32px 28px 25px; display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); }
.compact-hero h1 { font-size: 34px; }
.compact-hero.site-hero { min-height: 180px; }
.breadcrumb { display: flex; gap: 7px; margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.breadcrumb a:hover { color: var(--green-dark); }
.detail-shell { max-width: 1120px; margin: 0 auto; padding: 30px 28px 60px; display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 22px; align-items: start; }
.news-panel { overflow: hidden; padding: 20px 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.news-list-large { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.news-list-large li { min-height: 70px; display: grid; grid-template-columns: 32px minmax(0, 1fr) 90px; gap: 10px; align-items: center; border-bottom: 1px solid #edf1ef; }
.news-index { color: #a4afa9; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.news-list-large li > div { min-width: 0; display: grid; }
.news-list-large a { overflow: hidden; color: #2d3c35; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.news-list-large a:hover { color: var(--green-dark); }
.news-meta { margin-top: 3px; color: #9ca7a2; font-size: 9px; }
.news-list-large time { color: #8d9a94; font-size: 10px; text-align: right; }
.news-list-large .empty-state { display: block; padding: 50px 0; color: var(--muted); text-align: center; }
.source-detail-card { position: sticky; top: 98px; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.source-detail-card h2 { margin: 3px 0 16px; font-size: 18px; }
.source-detail-card dl { margin: 0 0 18px; }
.source-detail-card dl div { padding: 9px 0; display: flex; justify-content: space-between; gap: 15px; border-bottom: 1px dashed var(--line); font-size: 11px; }
.source-detail-card dt { color: var(--muted); }
.source-detail-card dd { margin: 0; font-weight: 650; text-align: right; }
.source-home-link { height: 42px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; color: #fff; background: var(--ink); border-radius: 10px; font-size: 11px; font-weight: 700; }
.source-home-link:hover { background: var(--green-dark); }
.source-domain { display: block; margin-top: 7px; overflow: hidden; color: #9ca7a2; font-size: 9px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.pagination { margin-top: 22px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.pagination a, .pagination > span { min-width: 82px; height: 36px; padding: 0 12px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); border-radius: 9px; font-size: 10px; }
.pagination a:hover { color: var(--green-dark); border-color: #a9d6c4; }
.pagination .page-status { min-width: 54px; color: var(--muted); background: transparent; border: 0; }
.pagination .is-disabled { color: #bbc3bf; background: #f6f8f7; }

.search-page { width: min(860px, calc(100% - 40px)); min-height: 65vh; margin: 0 auto; padding: 58px 0 70px; }
.search-header { text-align: center; }
.search-header h1 { margin: 3px 0 20px; font-family: "Songti SC", serif; font-size: 36px; }
.search-header form { position: relative; max-width: 620px; margin: 0 auto; display: flex; }
.search-header input { width: 100%; height: 54px; padding: 0 105px 0 19px; color: var(--ink); background: #fff; border: 1px solid #dce6e1; border-radius: 14px; outline: none; box-shadow: var(--shadow); }
.search-header input:focus { border-color: #9fd8c2; box-shadow: 0 0 0 4px rgba(23,166,115,.08); }
.search-header button { position: absolute; right: 6px; top: 6px; width: 85px; height: 42px; color: #fff; background: var(--ink); border: 0; border-radius: 10px; font-size: 12px; font-weight: 700; }
.search-header button:hover { background: var(--green-dark); }
.search-header p { margin: 14px 0 26px; color: var(--muted); font-size: 11px; }
.search-results { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.search-results article { min-height: 78px; padding: 15px 18px; display: grid; grid-template-columns: 40px minmax(0, 1fr) 20px; align-items: center; gap: 13px; border-bottom: 1px solid #edf1ef; }
.search-results article:last-child { border-bottom: 0; }
.search-results article > div { min-width: 0; display: grid; }
.result-title { overflow: hidden; color: #2d3c35; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.result-title:hover { color: var(--green-dark); }
.search-results p { margin: 4px 0 0; color: #9aa59f; font-size: 9px; }
.search-results p a { color: var(--green-dark); }
.search-results p span { margin: 0 4px; }
.result-arrow { color: #9aa59f; }
.empty-search, .search-suggestion { padding: 80px 20px; color: var(--muted); text-align: center; }
.empty-search > span, .search-suggestion > span { font-size: 45px; color: #b7c4be; }
.empty-search h2 { margin: 8px 0 3px; color: var(--ink); font-size: 18px; }
.empty-search p, .search-suggestion p { margin: 0; font-size: 12px; }

.site-footer { color: #aebdb6; background: #15221d; }
.footer-inner { max-width: var(--max-width); min-height: 125px; margin: 0 auto; padding: 28px; display: flex; align-items: center; justify-content: space-between; gap: 35px; }
.footer-inner strong { color: #fff; font-size: 14px; }
.footer-inner p { max-width: 520px; margin: 4px 0 0; font-size: 10px; }
.footer-links { display: flex; align-items: center; gap: 18px; font-size: 10px; }
.footer-links a:hover { color: #fff; }
.footer-record { padding: 0 28px 22px; color: #8fa198; font-size: 11px; text-align: center; }
.footer-record a { display: inline-block; }
.footer-record a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.error-page { min-height: 67vh; padding: 100px 20px; text-align: center; }
.error-page > span { color: #b9d8cc; font-size: 70px; font-weight: 900; letter-spacing: -.06em; }
.error-page h1 { margin: -10px 0 5px; font-family: "Songti SC", serif; font-size: 28px; }
.error-page p { color: var(--muted); }
.error-page a { display: inline-block; margin-top: 15px; padding: 9px 19px; color: #fff; background: var(--ink); border-radius: 9px; font-size: 12px; }

@media (max-width: 1230px) {
  .page-shell { grid-template-columns: minmax(0, 1fr); }
  .right-sidebar { display: none; }
}

@media (max-width: 900px) {
  .header-inner { height: 64px; padding: 0 18px; }
  .top-nav, .header-search { display: none; }
  .brand-copy small { display: none; }
  .nav-toggle { width: 40px; height: 40px; margin-left: auto; padding: 9px; display: grid; align-content: center; gap: 5px; background: transparent; border: 0; }
  .nav-toggle span { width: 21px; height: 2px; background: var(--ink); border-radius: 3px; transition: .2s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .mobile-nav { padding: 7px 18px 15px; background: #fff; border-top: 1px solid var(--line); }
  .mobile-nav:not([hidden]) { display: flex; flex-wrap: wrap; gap: 7px; }
  .mobile-nav > a { padding: 6px 12px; color: #46564e; background: var(--surface-soft); border-radius: 8px; font-size: 12px; }
  .mobile-nav form { width: 100%; margin-top: 4px; display: flex; }
  .mobile-nav input { flex: 1; min-width: 0; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px 0 0 9px; outline: 0; }
  .mobile-nav button { padding: 0 16px; color: #fff; background: var(--ink); border: 0; border-radius: 0 9px 9px 0; }
  .welcome-inner { min-height: 210px; padding: 30px 20px; }
  .quick-stats { display: none; }
  .page-shell, .page-shell-no-right { padding: 20px; grid-template-columns: 1fr; }
  .category-sidebar { position: static; padding-bottom: 2px; display: flex; overflow-x: auto; scrollbar-width: none; }
  .category-sidebar::-webkit-scrollbar { display: none; }
  .sidebar-label { display: none; }
  .category-link { min-width: max-content; padding: 7px 10px; }
  .category-icon { width: 30px; height: 30px; }
  .category-link small { display: none; }
  .detail-shell { grid-template-columns: 1fr; }
  .source-detail-card { position: static; grid-row: 1; }
  .category-card-grid, .home-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 650px) {
  .welcome-inner h1 { font-size: 29px; }
  .welcome-inner p { max-width: 300px; font-size: 12px; }
  .card-grid { grid-template-columns: 1fr; }
  .section-heading { margin-top: 3px; }
  .source-card-header { padding: 14px; }
  .rank-list { padding-left: 13px; padding-right: 13px; }
  .compact-hero { min-height: 145px; padding: 28px 20px 20px; }
  .compact-hero h1 { font-size: 28px; }
  .compact-hero.site-hero { align-items: flex-start; }
  .source-logo.large { width: 50px; height: 50px; border-radius: 14px; font-size: 21px; }
  .detail-shell { padding: 20px 14px 40px; }
  .news-panel { padding: 17px 14px; }
  .news-list-large li { grid-template-columns: 26px minmax(0,1fr); padding: 10px 0; }
  .news-list-large time { grid-column: 2; text-align: left; }
  .search-page { width: calc(100% - 28px); padding-top: 38px; }
  .search-header h1 { font-size: 30px; }
  .search-results article { padding: 13px; grid-template-columns: 38px minmax(0,1fr); }
  .search-results .result-arrow { display: none; }
  .footer-inner { padding: 28px 20px; display: block; }
  .footer-links { margin-top: 16px; flex-wrap: wrap; gap: 10px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
