:root {
  --red: #d40710;
  --red-dark: #a90008;
  --ink: #171717;
  --muted: #6b7280;
  --line: #e5e7eb;
  --panel: #ffffff;
  --soft: #f6f7f9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  width: 100%;
  object-fit: cover;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  font-size: 13px;
}

.topbar-inner,
.header-inner,
.nav-inner,
.breaking-inner {
  display: flex;
  align-items: center;
}

.topbar-inner {
  min-height: 36px;
  justify-content: space-between;
  gap: 20px;
}

.meta,
.links,
.ticker,
.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.links a {
  color: #374151;
}

.header-inner {
  min-height: 92px;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  color: var(--red);
  line-height: 1;
}

.brand strong {
  display: block;
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 900;
  letter-spacing: 0;
}

.brand span {
  display: block;
  margin-top: 8px;
  color: var(--red-dark);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 3px;
}

.slogan {
  flex: 1;
  display: grid;
  gap: 6px;
  min-width: 220px;
  font-size: 14px;
}

.slogan span,
.story-meta,
.top-list span,
.news-box p,
.cta-row p,
.footer p,
.copyright {
  color: var(--muted);
}

.header-actions a,
.cta-row a,
.cta-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-weight: 700;
}

.header-actions .primary,
.cta-row button {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.nav {
  background: linear-gradient(90deg, var(--red-dark), var(--red));
  color: #fff;
}

.nav-inner {
  min-height: 52px;
  gap: 4px;
  overflow-x: auto;
}

.nav a {
  flex: 0 0 auto;
  padding: 17px 22px;
  font-weight: 800;
}

.breaking {
  border-bottom: 1px solid var(--line);
}

.breaking-inner {
  min-height: 52px;
  gap: 18px;
  overflow: hidden;
}

.breaking strong {
  flex: 0 0 auto;
  padding: 10px 20px;
  border-radius: 4px;
  background: var(--red);
  color: #fff;
}

.ticker {
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  font-size: 14px;
}

.ticker a::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin: 0 18px;
  border-radius: 50%;
  background: var(--red);
  vertical-align: middle;
}

.lead-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  padding: 28px 0 22px;
}

.hero-card {
  min-height: 420px;
  overflow: hidden;
  border-radius: 6px;
  background: #111;
}

.hero-link {
  position: relative;
  display: block;
  height: 100%;
  min-height: 420px;
}

.hero-link img {
  height: 100%;
  min-height: 420px;
}

.hero-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.82));
}

.hero-overlay {
  position: absolute;
  z-index: 1;
  left: 28px;
  right: 28px;
  bottom: 28px;
  color: #fff;
}

.tag {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 5px 10px;
  border-radius: 4px;
  background: var(--red);
  color: #fff;
  font-weight: 800;
}

.hero-overlay h1 {
  max-width: 760px;
  margin: 0 0 12px;
  font-size: clamp(27px, 4vw, 40px);
  line-height: 1.18;
  letter-spacing: 0;
}

.hero-overlay p {
  max-width: 760px;
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.65;
}

.hero-overlay .story-meta {
  color: rgba(255, 255, 255, 0.85);
}

.top-list {
  display: grid;
  gap: 12px;
}

.top-list article {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px;
  position: relative;
  min-height: 74px;
  border-bottom: 1px solid var(--line);
}

.top-list b {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  background: var(--red);
  color: #fff;
}

.top-list img {
  height: 74px;
  border-radius: 5px;
}

.top-list h2 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.38;
}

.top-list span {
  font-size: 13px;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  padding-bottom: 28px;
}

.sections-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.news-box,
.rank,
.topics,
.cta-row article {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}

.news-box {
  padding: 14px;
}

.news-box header,
.rank header,
.topics header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.news-box h2,
.rank h2,
.topics h2,
.cta-row h2 {
  margin: 0;
  border-left: 4px solid var(--red);
  padding-left: 10px;
  font-size: 18px;
}

.news-box header a,
.rank header a,
.topics header a {
  color: var(--muted);
  font-size: 13px;
}

.news-box img {
  height: 128px;
  border-radius: 5px;
}

.news-box h3 {
  margin: 12px 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.news-box p {
  margin: 0;
  font-size: 13px;
  line-height: 1.75;
}

.sidebar {
  display: grid;
  align-content: start;
  gap: 18px;
}

.rank,
.topics {
  padding: 16px;
}

.rank ol {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: rank;
}

.rank li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 8px;
  color: #374151;
  font-size: 14px;
  line-height: 1.45;
  counter-increment: rank;
}

.rank li::before {
  content: counter(rank);
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 4px;
  background: #9ca3af;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.rank li:nth-child(-n + 3)::before {
  background: var(--red);
}

.topics {
  display: grid;
  gap: 10px;
}

.topics header {
  margin-bottom: 2px;
}

.topics a {
  display: grid;
  gap: 3px;
  padding: 12px;
  border-radius: 999px;
  background: #fff1f2;
  color: var(--red-dark);
  font-weight: 800;
}

.topics a:nth-of-type(even) {
  background: #eef6ff;
  color: #075985;
}

.topics span {
  color: #6b7280;
  font-size: 12px;
  font-weight: 500;
}

.cta-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding-bottom: 32px;
}

.cta-row article {
  min-height: 142px;
  padding: 22px;
}

.cta-row h2 {
  font-size: 20px;
}

.cta-row form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 16px;
}

.cta-row input {
  min-width: 0;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 12px;
  font: inherit;
}

.qr {
  display: grid;
  width: 72px;
  height: 72px;
  margin-top: 10px;
  place-items: center;
  border: 6px solid #111;
  font-weight: 900;
}

.article-shell {
  background: var(--soft);
  padding: 34px 0;
}

.article-page {
  max-width: 880px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 34px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 22px;
  color: var(--red);
  font-weight: 800;
}

.article-header h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.18;
  letter-spacing: 0;
}

.article-header p {
  margin: 0 0 16px;
  color: #4b5563;
  font-size: 18px;
  line-height: 1.75;
}

.article-image {
  height: 420px;
  margin: 28px 0;
  border-radius: 6px;
}

.article-body {
  display: grid;
  gap: 18px;
  color: #1f2937;
  font-size: 18px;
  line-height: 1.9;
}

.article-body p {
  margin: 0;
}

.related-news {
  margin-top: 36px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.related-news h2 {
  margin: 0 0 18px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.related-item {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
}

.related-item img {
  height: 120px;
  border-radius: 4px;
}

.related-item span {
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
}

.related-item strong {
  line-height: 1.45;
}

.empty-state,
.article-loading {
  padding: 36px;
  color: var(--muted);
}

.footer {
  background: #161b22;
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.4fr;
  gap: 38px;
  padding: 34px 0;
}

.footer h2,
.footer h3,
.footer p {
  margin-top: 0;
}

.footer h2 {
  margin-bottom: 2px;
  font-size: 32px;
}

.footer a {
  display: block;
  margin: 9px 0;
  color: #d1d5db;
}

.footer p,
.copyright {
  color: #d1d5db;
  line-height: 1.7;
}

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 14px 0 22px;
  font-size: 13px;
}

@media (max-width: 980px) {
  .header-inner,
  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .lead-layout,
  .content-layout {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 680px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .links,
  .header-actions,
  .meta {
    flex-wrap: wrap;
    gap: 10px;
  }

  .header-actions a {
    flex: 1 1 140px;
  }

  .nav a {
    padding: 15px 16px;
  }

  .hero-card,
  .hero-link,
  .hero-link img {
    min-height: 380px;
  }

  .hero-overlay {
    left: 18px;
    right: 18px;
    bottom: 20px;
  }

  .top-list article,
  .sections-grid,
  .sidebar,
  .cta-row,
  .footer-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .top-list article {
    grid-template-columns: 96px 1fr;
  }

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

  .article-page {
    padding: 22px;
  }

  .article-image {
    height: 260px;
  }
}
