:root {
  color-scheme: light;
  --ink: #16232e;
  --muted: #64727a;
  --line: #d6ddd9;
  --paper: #f8f9f5;
  --surface: #ffffff;
  --teal: #0d766e;
  --coral: #e65d45;
  --soft-teal: #e0f1ec;
  font-family: "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
.topbar { min-height: 132px; padding: 27px max(24px, calc((100% - 1120px) / 2)); display: flex; justify-content: space-between; align-items: end; gap: 24px; background: #e4f2ed; border-bottom: 1px solid #b7d6ce; }
.eyebrow, .kicker { margin: 0 0 5px; color: var(--teal); font-size: 12px; font-weight: 700; }
h1, h2, h3 { margin: 0; letter-spacing: 0; }
h1 { font-size: 34px; }
h2 { font-size: 24px; }
.status { max-width: 460px; color: var(--muted); font-size: 13px; text-align: right; line-height: 1.5; white-space: pre-line; }
.status.error { color: #a33327; }
main { max-width: 1120px; margin: 0 auto; padding: 0 24px 48px; }
.tabs { display: flex; border-bottom: 1px solid var(--line); gap: 22px; }
.tab { border: 0; padding: 18px 1px 14px; background: transparent; color: var(--muted); font: inherit; cursor: pointer; border-bottom: 3px solid transparent; }
.tab.is-active { color: var(--ink); border-bottom-color: var(--coral); font-weight: 700; }
.section-heading { display: flex; justify-content: space-between; align-items: end; padding: 28px 0 18px; }
.count { color: var(--teal); font-size: 14px; font-weight: 700; }
.trend-list, .history-list { display: grid; gap: 10px; }
.trend-item { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; display: grid; grid-template-columns: 58px 1fr; min-width: 0; }
.rank { padding: 24px 12px; background: var(--soft-teal); color: var(--teal); font-size: 20px; font-weight: 800; text-align: center; }
.entry-body { padding: 19px 20px; min-width: 0; }
.entry-title-row, .entry-footer { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
h3 { font-size: 18px; overflow-wrap: anywhere; }
.confidence { color: var(--teal); font-size: 12px; white-space: nowrap; }
.explanation { margin: 10px 0; line-height: 1.65; color: #34424b; }
.reference-line { margin: 12px 0; padding: 9px 12px; border-left: 3px solid var(--coral); background: #fff4f0; color: #733427; line-height: 1.55; }
.evidence { margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.evidence::before { content: "热度依据："; color: #4b5c65; font-weight: 700; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { background: #edf1ee; color: #45605a; padding: 3px 7px; border-radius: 3px; font-size: 12px; }
.source { color: var(--teal); font-size: 13px; white-space: nowrap; }
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; padding: 16px; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; margin-bottom: 16px; }
.filters label { color: var(--muted); font-size: 12px; display: grid; gap: 5px; }
.filters input, .filters select { width: 100%; min-width: 0; padding: 8px; border: 1px solid #bfcac5; border-radius: 4px; color: var(--ink); background: #fff; font: inherit; }
.snapshot { border-left: 3px solid var(--teal); padding-left: 12px; }
.snapshot h3 { font-size: 16px; margin: 0 0 8px; }
.snapshot .trend-item { margin-bottom: 8px; }
.empty { padding: 36px; color: var(--muted); text-align: center; border: 1px dashed #bfcac5; background: var(--surface); }
.hidden { display: none; }

@media (max-width: 700px) {
  .topbar { min-height: 0; align-items: start; flex-direction: column; }
  .status { text-align: left; }
  .filters { grid-template-columns: 1fr; }
  .trend-item { grid-template-columns: 42px 1fr; }
  .rank { padding: 18px 4px; font-size: 16px; }
  .entry-body { padding: 15px; }
  .entry-footer { align-items: flex-start; flex-direction: column; }
}
