:root {
  --bg: #090b0f;
  --surface: #11151b;
  --surface-raised: #171c24;
  --surface-soft: #1d2430;
  --text: #f1f5f9;
  --text-soft: #cbd5e1;
  --muted: #94a3b8;
  --border: #2a3442;
  --border-strong: #3c4a5d;
  --primary: #3b82f6;
  --primary-strong: #2563eb;
  --primary-soft: #93c5fd;
  --success: #22c55e;
  --warning: #f59e0b;
  --max-width: 1180px;
  --radius: 6px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-soft); text-decoration: none; }
a:hover { color: #fff; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.3; letter-spacing: 0; }
h1 { margin-bottom: 16px; font-size: clamp(2rem, 4vw, 3.4rem); }
h2 { margin-bottom: 18px; font-size: 1.55rem; }
h3 { font-size: 1.12rem; }
:focus-visible { outline: 3px solid var(--primary-soft); outline-offset: 3px; }

.container { width: min(calc(100% - 40px), var(--max-width)); margin-inline: auto; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 1000; padding: 10px 14px; background: #fff; color: #000; border-radius: 4px; }
.skip-link:focus { top: 12px; }
.topline { background: #05070a; border-bottom: 1px solid #1d2530; color: var(--muted); font-size: .78rem; }
.topline-inner { min-height: 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.masthead { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.site-header { position: relative; z-index: 20; background: rgba(9, 11, 15, .96); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); min-width: 0; }
.brand img { flex: 0 0 42px; }
.brand-copy { display: grid; min-width: 0; }
.brand-copy strong { font-size: 1.05rem; white-space: nowrap; }
.brand-copy small { color: var(--muted); font-size: .74rem; white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 15px; border-radius: 4px; color: var(--text-soft); font-weight: 600; font-size: .93rem; transition: background-color 160ms ease, color 160ms ease; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--surface-soft); color: #fff; }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px var(--primary); }
.nav-toggle { display: none; width: 44px; height: 44px; padding: 10px; border: 1px solid var(--border); background: var(--surface); border-radius: 4px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; margin: 5px 0; background: var(--text); }

.home-lead { border-bottom: 1px solid var(--border); background: #0d1117; }
.home-lead-grid { min-height: 490px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, .9fr); gap: 54px; align-items: center; padding-block: 48px; }
.home-lead h1 { max-width: 720px; }
.home-lead p { max-width: 680px; color: var(--text-soft); font-size: 1.08rem; }
.eyebrow { display: inline-flex; margin-bottom: 14px; color: var(--primary-soft); font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.lead-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 17px; border: 1px solid transparent; border-radius: 4px; font-weight: 700; transition: background-color 160ms ease, border-color 160ms ease; }
.button.primary { background: var(--primary-strong); color: #fff; }
.button.primary:hover { background: #1d4ed8; }
.button.secondary { border-color: var(--border-strong); color: var(--text); background: transparent; }
.button.secondary:hover { background: var(--surface-soft); }
.cover-visual { margin: 0; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.cover-visual img { aspect-ratio: 1200 / 630; object-fit: cover; }
.cover-visual figcaption { padding: 10px 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: .8rem; }

.home-sections { padding-block: 52px 76px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.section-heading h2 { margin-bottom: 12px; }
.section-heading > span, .section-heading > a { color: var(--muted); font-size: .84rem; }
.topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 64px; }
.topic-card { min-height: 245px; display: flex; flex-direction: column; padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease; }
.topic-card:hover { transform: translateY(-2px); border-color: #426083; background: var(--surface-raised); }
.topic-card > span { color: var(--primary); font-size: .8rem; font-weight: 800; }
.topic-card h3 { margin: 20px 0 12px; font-size: 1.35rem; }
.topic-card p { color: var(--muted); font-size: .9rem; line-height: 1.65; }
.topic-card strong { margin-top: auto; color: var(--primary-soft); font-size: .84rem; }
.home-content-grid, .content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 54px; align-items: start; }

.page-band { padding-block: 38px 40px; background: #0d1117; border-bottom: 1px solid var(--border); }
.page-band h1 { max-width: 870px; }
.dek { max-width: 820px; color: var(--text-soft); font-size: 1.05rem; }
.page-facts { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 22px; color: var(--muted); font-size: .79rem; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 26px; color: var(--muted); font-size: .8rem; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: #fff; }
.content-layout { padding-block: 46px 80px; }
.article-body { min-width: 0; }
.lead-copy { margin-bottom: 42px; padding-left: 20px; border-left: 3px solid var(--primary); color: var(--text-soft); font-size: 1.04rem; }
.lead-copy p:last-child { margin-bottom: 0; }
.article-section { padding: 35px 0 28px; border-top: 1px solid var(--border); }
.article-section p { color: var(--text-soft); }
.content-list { margin: 22px 0 0; padding-left: 22px; color: var(--text-soft); }
.content-list li { margin-bottom: 9px; padding-left: 5px; }
.content-list li::marker { color: var(--primary); }
.faq details { border-top: 1px solid var(--border); }
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary { min-height: 52px; display: flex; align-items: center; cursor: pointer; color: var(--text); font-weight: 700; }
.faq details p { padding: 0 20px 18px; }
.article-summary { margin: 34px 0 50px; padding: 25px; border: 1px solid #34567e; background: #101a28; border-radius: var(--radius); }
.article-summary h2 { font-size: 1.2rem; }
.article-summary p { margin-bottom: 0; color: var(--text-soft); }
.related-block { margin-top: 54px; }
.story-list { border-top: 1px solid var(--border); }
.story-row { display: grid; grid-template-columns: 90px minmax(180px, .7fr) minmax(220px, 1fr); gap: 18px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--border); color: var(--text); }
.story-row:hover strong { color: var(--primary-soft); }
.story-row > span:last-child { color: var(--muted); font-size: .84rem; }
.story-id { color: var(--primary); font-size: .75rem; font-weight: 800; }

.sidebar { position: sticky; top: 20px; display: grid; gap: 18px; }
.sidebar-section { padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.sidebar-section h2 { margin-bottom: 10px; font-size: .92rem; text-transform: uppercase; color: var(--muted); }
.sidebar-link { display: grid; gap: 3px; padding: 13px 0; border-top: 1px solid var(--border); color: var(--text); }
.sidebar-link strong { font-size: .93rem; }
.sidebar-link span { color: var(--muted); font-size: .75rem; }
.rank-link { display: grid; grid-template-columns: 50px 1fr; gap: 10px; padding: 12px 0; border-top: 1px solid var(--border); color: var(--text-soft); font-size: .84rem; line-height: 1.5; }
.rank-link span { color: var(--primary); font-weight: 800; }
.sidebar-note { padding: 20px; border-left: 3px solid var(--warning); background: #18160f; }
.sidebar-note span { color: #fbbf24; font-size: .76rem; font-weight: 800; }
.sidebar-note p { margin: 8px 0 0; color: var(--text-soft); font-size: .84rem; }

.records-section { margin-top: 12px; }
.chart-wrap { min-height: 280px; margin: 24px 0; padding: 12px; background: #0b1017; border: 1px solid var(--border); border-radius: var(--radius); }
#trend-chart { display: block; width: 100%; height: auto; aspect-ratio: 18 / 7; }
.table-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; min-width: 710px; border-collapse: collapse; font-size: .84rem; }
caption { padding: 12px; color: var(--muted); text-align: left; }
th, td { padding: 12px 14px; border-top: 1px solid var(--border); text-align: left; white-space: nowrap; }
thead th { background: var(--surface-soft); color: var(--text); }
tbody th { color: var(--primary-soft); }
.result { display: inline-flex; min-width: 42px; justify-content: center; padding: 2px 7px; border-radius: 3px; font-weight: 800; }
.result-odd { background: #16341f; color: #86efac; }
.result-even { background: #172e4e; color: #93c5fd; }
.empty-state { padding: 32px; border: 1px dashed var(--border-strong); color: var(--muted); text-align: center; }
.noscript-note { color: var(--muted); }

.site-footer { padding-block: 38px; background: #05070a; border-top: 1px solid var(--border); color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 42px; align-items: start; }
.footer-brand { color: var(--text); font-weight: 800; }
.footer-grid p { max-width: 440px; margin: 10px 0 0; font-size: .84rem; }
.footer-grid nav, .footer-meta { display: grid; gap: 8px; }
.footer-grid nav a, .footer-meta a { color: var(--text-soft); font-size: .84rem; }
.footer-meta span { font-size: .78rem; }
.error-page main { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.error-panel { width: min(100%, 520px); padding: 38px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.error-panel > span { color: var(--primary); font-weight: 900; }
.error-panel p { color: var(--muted); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav { position: absolute; top: 111px; left: 0; right: 0; display: none; padding: 10px 20px 18px; background: #090b0f; border-bottom: 1px solid var(--border); }
  .site-nav.is-open { display: grid; }
  .site-nav a { width: 100%; }
  .home-lead-grid { min-height: 0; grid-template-columns: 1fr; gap: 34px; }
  .cover-visual { max-width: 640px; }
  .home-content-grid, .content-layout { grid-template-columns: 1fr; gap: 46px; }
  .sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar-note { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .container { width: min(calc(100% - 28px), var(--max-width)); }
  .topline-inner span:first-child { display: none; }
  .topline-inner { justify-content: flex-end; }
  .masthead { min-height: 70px; }
  .brand-copy small { display: none; }
  .site-nav { top: 103px; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.35rem; }
  .home-lead-grid { padding-block: 36px; }
  .home-lead p, .dek { font-size: 1rem; }
  .topic-grid { grid-template-columns: 1fr; }
  .topic-card { min-height: 210px; }
  .sidebar { grid-template-columns: 1fr; }
  .sidebar-note { grid-column: auto; }
  .story-row { grid-template-columns: 64px 1fr; }
  .story-row > span:last-child { grid-column: 2; }
  .page-band { padding-block: 28px; }
  .content-layout { padding-block: 34px 60px; }
  .page-facts { display: grid; gap: 4px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .article-summary { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

@media print {
  .site-header, .site-footer, .sidebar, .lead-actions { display: none; }
  body { background: #fff; color: #111; }
  .content-layout { display: block; }
  .article-section p, .lead-copy, .dek { color: #222; }
}

