/* 严格对齐广告门 adquan.com — 见 style-brief.md */
:root {
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-text: #333333;
  --color-title: #333333;
  --color-muted: #999999;
  --color-secondary: #666666;
  --color-accent: #c7000b;
  --color-accent-2: #cd2b1e;
  --color-link: #00386f;
  --color-line: #eeeeee;
  --font-body: "Helvetica Neue", Helvetica, "PingFang SC", "Microsoft YaHei", Tahoma, Arial, sans-serif;
  --radius: 8px;
  --wrap: 1100px;
  --gap: 20px;
  --card-w: 260px;
  --rank-w: 260px;
  --hot-w: 820px;
  --header-h: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

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

button,
input,
textarea {
  font: inherit;
}

.wrap {
  width: min(100% - 32px, var(--wrap));
  margin-inline: auto;
}

/* ========== Header ========== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(250, 250, 250, 0.96);
  border-bottom: 1px solid #dedee2;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.brand img {
  height: 34px;
  width: auto;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 6px 0;
  background: var(--color-text);
}

.nav {
  display: flex;
  flex: 1;
  flex-wrap: nowrap;
  gap: 22px;
  align-items: center;
  overflow-x: auto;
}

.nav a {
  position: relative;
  flex-shrink: 0;
  color: var(--color-text);
  font-size: 15px;
  padding: 6px 0;
  white-space: nowrap;
}

.nav a:hover,
.nav a.is-active {
  color: var(--color-accent);
}

.nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--color-accent);
}

.header-search {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  width: 220px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--color-accent);
  border-radius: 999px;
  background: #fff;
  color: var(--color-muted);
  font-size: 13px;
}

main {
  padding-top: 50px;
}

/* ========== Topic title（红短杠，对齐 hong-.svg） ========== */
.topic-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 0 0 16px;
}

.topic-title {
  margin: 0;
  font-size: 20px;
  font-weight: 400;
  color: var(--color-title);
  line-height: 1.3;
}

.topic-title span {
  position: relative;
  display: inline-block;
  padding-bottom: 6px;
}

.topic-title span::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 36px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 1px;
}

.topic-head .more {
  font-size: 13px;
  color: var(--color-muted);
  padding-bottom: 4px;
}

.topic-head .more:hover {
  color: var(--color-accent);
}

/* ========== Hero banner 1100×300 ========== */
.hero-banner {
  display: block;
  position: relative;
  margin: 20px auto 28px;
  width: 100%;
  max-width: var(--wrap);
  height: 300px;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(115deg, #c7000b 0%, #9a0009 45%, #3a1212 100%);
  color: #fff;
}

.hero-banner:hover {
  color: #fff;
}

.hero-banner__media {
  position: absolute;
  inset: 0;
}

.hero-banner__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
}

.hero-banner__body {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.35) 0%, transparent 65%);
}

.hero-banner__eyebrow {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 12px;
  padding: 2px 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.14);
}

.hero-banner h1 {
  margin: 0 0 10px;
  max-width: 760px;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.3;
}

.hero-banner p {
  margin: 0;
  max-width: 640px;
  font-size: 14px;
  opacity: 0.92;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========== 热门：260 + 20 + 820 ========== */
.module-hot {
  display: grid;
  grid-template-columns: var(--rank-w) var(--hot-w);
  gap: var(--gap);
  margin-bottom: 36px;
  align-items: start;
  justify-content: start;
}

.rank-panel {
  width: var(--rank-w);
  padding: 0 0 8px;
}

.rank-panel > .topic-title {
  margin-bottom: 14px;
}

.rank-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-line);
  color: var(--color-text);
}

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

.rank-item:hover .rank-item__title {
  color: var(--color-accent);
}

.rank-item__no {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 2px;
  background: #ccc;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rank-item:nth-child(-n + 3) .rank-item__no {
  background: var(--color-accent);
}

.rank-item__title {
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-item__meta {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--color-muted);
}

.hot-panel {
  width: var(--hot-w);
  min-width: 0;
}

/* ========== Cards：260×246 / 图 142 / 圆角 8 / 无阴影 ========== */
.card-grid {
  display: grid;
  gap: var(--gap);
}

.card-grid--3 {
  grid-template-columns: repeat(3, var(--card-w));
}

.card-grid--4 {
  grid-template-columns: repeat(4, var(--card-w));
}

.card {
  display: flex;
  flex-direction: column;
  width: var(--card-w);
  min-height: 246px;
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--color-text);
}

.card:hover .card__title {
  color: var(--color-accent);
}

.card__media {
  width: var(--card-w);
  height: 142px;
  background: #222;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 12px;
}

.card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-title);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}

.card__foot {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--color-muted);
}

.card__cat {
  color: var(--color-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card__score {
  color: var(--color-accent);
  font-weight: 600;
  white-space: nowrap;
}

.module-latest {
  margin-bottom: 48px;
}

/* ========== Inner pages ========== */
.page-hero {
  padding: 24px 0 8px;
}

.page-hero h1 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 600;
  color: var(--color-title);
}

.page-hero p {
  margin: 0 0 20px;
  color: var(--color-secondary);
  font-size: 14px;
}

.page-hero .card-grid--4 {
  margin-top: 8px;
}

.pager {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 28px 0 40px;
}

.pager button {
  min-width: 36px;
  height: 36px;
  border: 1px solid var(--color-line);
  border-radius: 4px;
  background: var(--color-surface);
  cursor: pointer;
}

.pager button.is-active,
.pager button:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.detail {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 32px 40px 40px;
  margin: 20px 0 48px;
}

.detail__meta {
  font-size: 13px;
  color: var(--color-muted);
  margin-bottom: 12px;
}

.detail h1 {
  margin: 0 0 20px;
  font-size: 28px;
  line-height: 1.35;
  color: var(--color-title);
}

.detail__cover {
  margin: 0 0 24px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #f0f0f0;
}

.detail__cover img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.detail__body,
.prose {
  font-size: 16px;
  line-height: 1.85;
  color: var(--color-text);
  overflow-wrap: anywhere;
}

.prose {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 48px;
  font-size: 15px;
  line-height: 1.8;
}

.detail__body > *:first-child,
.prose > *:first-child {
  margin-top: 0;
}

.detail__body > *:last-child,
.prose > *:last-child {
  margin-bottom: 0;
}

.detail__body p,
.prose p {
  margin: 0 0 1em;
}

.detail__body h2,
.detail__body h3,
.detail__body h4,
.prose h2,
.prose h3,
.prose h4 {
  margin: 1.45em 0 0.65em;
  color: var(--color-title);
  line-height: 1.35;
  font-weight: 700;
}

.detail__body h2,
.prose h2 {
  font-size: 1.3rem;
}

.detail__body h3,
.prose h3 {
  font-size: 1.12rem;
}

.detail__body h4,
.prose h4 {
  font-size: 1.02rem;
}

.detail__body ul,
.detail__body ol,
.prose ul,
.prose ol {
  margin: 0 0 1em;
  padding-left: 1.35em;
}

.detail__body li,
.prose li {
  margin: 0.35em 0;
}

.detail__body a,
.prose a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.detail__body img,
.detail__body video,
.prose img,
.prose video {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.1em 0;
  border-radius: var(--radius);
}

.detail__body blockquote,
.prose blockquote {
  margin: 1.1em 0;
  padding: 0.75em 1em;
  border-left: 3px solid var(--color-accent);
  background: #f5f5f5;
  color: var(--color-secondary);
}

.detail__body table,
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.1em 0;
  font-size: 0.95rem;
}

.detail__body th,
.detail__body td,
.prose th,
.prose td {
  border: 1px solid var(--color-line);
  padding: 0.55em 0.7em;
  text-align: left;
}

.detail__body th,
.prose th {
  background: var(--color-bg);
}

.detail__body pre,
.detail__body code,
.prose pre,
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.detail__body pre,
.prose pre {
  overflow: auto;
  padding: 0.9em 1em;
  margin: 1.1em 0;
  background: var(--color-bg);
  border-radius: var(--radius);
}

.detail__body strong,
.prose strong {
  font-weight: 700;
}

.detail__back {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--color-link);
}

.detail__back:hover {
  color: var(--color-accent);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  margin-bottom: 48px;
}

.contact-item {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 22px;
}

.contact-item h3 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--color-accent);
}

.contact-item p {
  margin: 0;
  font-size: 15px;
  word-break: break-all;
}

.feedback-form {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 640px;
  margin-bottom: 48px;
}

.form-row {
  margin-bottom: 16px;
}

.form-row label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--color-secondary);
}

.form-row input,
.form-row textarea {
  width: 100%;
  border: 1px solid #dedee2;
  padding: 10px 12px;
  border-radius: 6px;
  background: #fff;
}

.form-row textarea {
  min-height: 140px;
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: var(--color-accent);
  color: #fff;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
}

.btn:hover {
  background: var(--color-accent-2);
}

.form-msg {
  margin-top: 12px;
  font-size: 13px;
}

.form-msg.is-ok {
  color: #1a7f37;
}

.form-msg.is-err {
  color: var(--color-accent);
}

.news-empty {
  padding: 40px 24px;
  text-align: center;
  color: var(--color-muted);
  background: var(--color-surface);
  border-radius: var(--radius);
  grid-column: 1 / -1;
}

/* ========== Footer ========== */
.site-footer {
  background: #2a2222;
  color: #ccc;
  padding: 40px 0 24px;
  font-size: 13px;
}

.site-footer a {
  color: #ddd;
}

.site-footer a:hover {
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}

.footer-brand {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.footer-col h4 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 14px;
}

.footer-col a,
.friend-links a {
  display: block;
  margin-bottom: 8px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #999;
}

.footer-bottom a {
  color: #999;
}

/* ========== Responsive ========== */
@media (max-width: 1140px) {
  .module-hot {
    grid-template-columns: 1fr;
  }

  .rank-panel,
  .hot-panel {
    width: 100%;
  }

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

  .card,
  .card__media {
    width: auto;
  }
}

@media (max-width: 860px) {
  .card-grid--3,
  .card-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-banner {
    height: 220px;
  }

  .hero-banner h1 {
    font-size: 22px;
  }

  .hero-banner__body {
    padding: 20px;
  }
}

@media (max-width: 720px) {
  .header-search {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .site-header__inner {
    position: relative;
  }

  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: var(--header-h);
    background: #fff;
    border-bottom: 1px solid #dedee2;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 16px 16px;
    gap: 0;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 12px 0;
    border-bottom: 1px solid var(--color-line);
  }

  .card-grid--3,
  .card-grid--4 {
    grid-template-columns: 1fr;
  }

  .contact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail {
    padding: 20px;
  }
}
