:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --text: #17202a;
  --muted: #667085;
  --line: #dce6f5;
  --line-strong: #b7cff8;
  --accent: #2f6bff;
  --accent-2: #635bff;
  --green: #18a058;
  --orange: #f97316;
  --shadow: 0 12px 30px rgba(31, 65, 120, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4,
h5,
p {
  margin: 0;
}

a {
  color: #245ff5;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 28px;
  background: rgba(245, 247, 251, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #1f57ff, #1fb36b);
  border-radius: 8px;
  font-weight: 800;
  letter-spacing: 0;
}

h1 {
  font-size: 18px;
}

.brand p,
.section-head p,
footer,
.hero-copy,
.report-title-row p {
  color: var(--muted);
}

.brand p {
  margin-top: 2px;
  font-size: 12px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.nav-btn,
.text-action,
.primary-action,
.secondary-action {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
}

.nav-btn {
  padding: 0 12px;
}

.nav-btn.active {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.refresh-status {
  min-width: 220px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: right;
}

main {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 18px;
  align-items: stretch;
  padding: 26px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(47, 107, 255, 0.08), rgba(24, 160, 88, 0.08)),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.hero h2 {
  max-width: 780px;
  font-size: 34px;
  line-height: 1.18;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 760px;
  margin-top: 12px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.primary-action,
.secondary-action,
.text-action {
  padding: 0 14px;
}

.primary-action {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.secondary-action {
  color: #1f3f86;
  background: #eef5ff;
}

.primary-action:disabled,
.secondary-action:disabled,
.text-action:disabled {
  cursor: wait;
  opacity: 0.58;
}

.review-status {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.text-action {
  background: transparent;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.hero-metrics div {
  display: grid;
  align-content: center;
  min-height: 108px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hero-metrics strong {
  font-size: 30px;
  line-height: 1;
}

.hero-metrics span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr 180px 150px 210px;
  gap: 12px;
  margin: 18px 0;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

input,
select {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.daily-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.daily-report,
.archive-panel,
.source-column,
.rank-card,
.source-card,
.empty-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(31, 65, 120, 0.05);
}

.daily-report {
  padding: 24px;
}

.edition-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.edition-chip.edition-daily {
  grid-column: 1 / -1;
}

.edition-chip {
  display: grid;
  gap: 4px;
  min-height: 62px;
  padding: 10px 12px;
  text-align: left;
  color: var(--text);
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.edition-chip.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.edition-chip span {
  color: var(--muted);
  font-size: 12px;
}

.edition-chip em {
  color: #738198;
  font-size: 12px;
  font-style: normal;
}

.edition-chip.active span {
  color: rgba(255, 255, 255, 0.82);
}

.edition-chip.active em {
  color: rgba(255, 255, 255, 0.72);
}

.report-kicker,
.news-meta,
.news-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.report-kicker span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  background: #f2f6ff;
  border: 1px solid #e0e9ff;
  border-radius: 999px;
}

.report-title-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
}

.report-title-row h3 {
  font-size: 28px;
  line-height: 1.22;
}

.report-title-row p {
  max-width: 780px;
  margin-top: 10px;
  line-height: 1.75;
}

.report-summary-panel {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 14px;
  background: #f8fbff;
  border: 1px solid #e2ebf8;
  border-radius: 8px;
}

.report-summary-panel > strong {
  color: #172033;
  font-size: 15px;
}

.report-summary-panel > div {
  display: grid;
  gap: 8px;
}

.summary-row {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 10px;
  min-height: 42px;
  padding: 9px 10px;
  text-align: left;
  background: #fff;
  border: 1px solid #e4ebf5;
  border-radius: 8px;
}

.summary-row.active {
  border-color: var(--accent);
  background: #eef5ff;
}

.summary-row span {
  color: #172033;
  font-weight: 800;
}

.summary-row em,
.report-summary-panel.single p {
  color: #4c5b70;
  font-style: normal;
  line-height: 1.65;
}

.live-badge {
  align-self: start;
  white-space: nowrap;
  padding: 7px 10px;
  color: #fff;
  background: var(--accent);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.live-badge.muted {
  color: #345;
  background: #edf3ff;
}

.topic-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 8px;
}

.topic-strip span,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  color: #245ff5;
  background: #edf3ff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.quality-note {
  margin-top: 12px;
  padding: 11px 12px;
  color: #42526b;
  line-height: 1.65;
  background: #f7faff;
  border: 1px solid #e3ecff;
  border-radius: 8px;
}

.pill.light {
  color: #536176;
  background: #f3f6fb;
}

.timeline-group {
  margin-top: 24px;
}

.timeline-group h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 20px;
}

.timeline-group h4 span {
  width: 14px;
  height: 14px;
  background: var(--accent-2);
  border-radius: 3px;
}

.timeline {
  position: relative;
  display: grid;
  gap: 0;
  margin-top: 10px;
  padding-left: 20px;
}

.timeline::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 5px;
  width: 1px;
  content: "";
  background: linear-gradient(var(--line-strong), rgba(183, 207, 248, 0.18));
}

.timeline-item {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 16px 0 18px;
  border-bottom: 1px solid #edf1f7;
}

.timeline-item:last-child {
  border-bottom: 0;
}

.timeline-dot {
  position: absolute;
  top: 22px;
  left: -20px;
  width: 11px;
  height: 11px;
  background: #fff;
  border: 3px solid var(--accent-2);
  border-radius: 50%;
}

.timeline-item h5 {
  font-size: 18px;
  line-height: 1.5;
}

.timeline-item p {
  color: #3e4a5d;
  line-height: 1.75;
}

.timeline-item .source-line {
  color: #66758a;
  font-size: 13px;
}

.timeline-item .source-line a {
  color: #4e5d73;
  font-weight: 600;
}

.archive-panel {
  position: sticky;
  top: 86px;
  padding: 16px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 22px 0 12px;
}

.section-head.compact {
  align-items: center;
  margin: 0 0 12px;
}

.date-filter {
  display: grid;
  gap: 6px;
  min-width: 180px;
  color: var(--muted);
  font-size: 13px;
}

.archive-controls {
  display: grid;
  grid-template-columns: 180px 180px auto;
  gap: 8px;
  align-items: end;
  justify-content: end;
}

.archive-controls .review-status {
  grid-column: 1 / -1;
  margin: 0;
  text-align: right;
}

.section-head h3 {
  font-size: 22px;
}

.archive-rail,
.report-grid,
.rank-list,
.source-grid,
.source-board {
  display: grid;
  gap: 12px;
}

.archive-card {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 14px;
  text-align: left;
  color: var(--text);
  background: linear-gradient(#f8fbff, #fff);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.archive-card.active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.archive-card strong {
  line-height: 1.45;
}

.archive-card ol {
  display: grid;
  gap: 6px;
  max-height: 190px;
  margin: 0;
  padding-left: 20px;
  overflow: hidden;
  color: #263241;
  line-height: 1.5;
}

.archive-date,
.archive-foot {
  color: var(--muted);
  font-size: 12px;
}

.report-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.archive-detail {
  margin-top: 18px;
}

.hot-head {
  align-items: stretch;
}

.hot-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 760px;
}

.hot-range-btn {
  min-height: 38px;
  padding: 0 12px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hot-range-btn.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.hot-controls label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.hot-controls input {
  min-height: 38px;
}

.hot-summary {
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.source-board {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.source-column {
  overflow: hidden;
}

.source-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 14px;
  background: #f1f7ff;
  border-bottom: 1px solid var(--line);
}

.source-column ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 14px 18px 18px 36px;
}

.source-column li {
  line-height: 1.45;
}

.source-column li span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.rank-card {
  display: grid;
  grid-template-columns: 42px 1fr 64px;
  gap: 12px;
  align-items: center;
  padding: 16px;
}

.rank-card strong {
  color: var(--orange);
  font-size: 22px;
}

.rank-card h4 {
  font-size: 17px;
  line-height: 1.45;
}

.rank-card p,
.source-card p {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.55;
}

.score {
  justify-self: end;
  color: #1f57ff;
  font-weight: 800;
}

.source-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.source-card,
.empty-card {
  padding: 16px;
}

.source-card h4 {
  margin-bottom: 8px;
}

footer {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto 32px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

@media (max-width: 1060px) {
  .topbar,
  .hero,
  .daily-layout,
  .toolbar {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

  .archive-panel {
    position: static;
  }

  .source-board,
  .report-grid,
  .source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-head {
    display: grid;
  }

  .archive-controls {
    justify-content: stretch;
  }
}

@media (max-width: 680px) {
  main {
    width: min(100% - 20px, 1320px);
    padding-top: 14px;
  }

  .topbar {
    padding: 12px 14px;
  }

  .hero,
  .daily-report {
    padding: 18px;
  }

  .hero h2,
  .report-title-row h3 {
    font-size: 24px;
  }

  .hero-metrics,
  .source-board,
  .report-grid,
  .source-grid,
  .rank-card {
    grid-template-columns: 1fr;
  }

  .archive-controls {
    grid-template-columns: 1fr;
  }

  .archive-controls .review-status {
    grid-column: auto;
    text-align: left;
  }

  .edition-switch {
    grid-template-columns: 1fr;
  }

  .hot-controls {
    justify-content: flex-start;
  }

  .rank-card .score {
    justify-self: start;
  }

  .summary-row {
    grid-template-columns: 1fr;
  }

  .report-title-row {
    display: grid;
  }
}
