/* ==========================================================================
   news_orange · 活力橙红资讯风 (Vibrant Orange/Red Breaking-News Theme)
   Pure CSS. No JS. System fonts. Mobile-first breakpoints below 768px.
   ========================================================================== */

:root {
  --orange: #ff5722;
  --orange-deep: #e64a19;
  --amber: #ffc107;
  --orange-light: #fff3ed;
  --amber-light: #fff8e1;
  --ink: #1f1a17;
  --ink-soft: #5b524c;
  --line: #ffe0d1;
  --white: #ffffff;
  --shadow: 0 6px 20px rgba(230, 74, 25, 0.14);
  --shadow-hover: 0 12px 30px rgba(255, 87, 34, 0.26);
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 16px;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--orange-deep); }

ul, ol { list-style: none; margin: 0; padding: 0; }

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

h1, h2, h3 { font-weight: 800; line-height: 1.3; margin: 0 0 .5em; letter-spacing: .01em; }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header { background: var(--white); position: relative; }

.header-topbar {
  background: linear-gradient(90deg, var(--orange-deep), var(--orange) 55%, var(--amber));
  color: var(--white);
}
.header-topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6px 20px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .03em;
}
.topbar-flash { display: inline-flex; align-items: center; gap: 6px; }

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.site-logo { display: inline-flex; align-items: center; }
.site-logo img { display: block; }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.site-nav a {
  display: inline-block;
  padding: 9px 16px;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  border-radius: 999px;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.site-nav a:hover,
.site-nav a:focus {
  background: var(--orange);
  color: var(--white);
  transform: translateY(-2px);
}
.site-nav a.nav-home {
  background: var(--ink);
  color: var(--white);
}
.site-nav a.nav-home:hover { background: var(--orange-deep); }

.header-divider {
  height: 8px;
  background: repeating-linear-gradient(
    -45deg,
    var(--orange) 0 14px,
    var(--orange-deep) 14px 28px
  );
  clip-path: polygon(0 0, 100% 0, 100% 40%, 0 100%);
}

/* ==========================================================================
   Homepage hero strip (diagonal breaking-news banner)
   ========================================================================== */

.hero-strip {
  background: linear-gradient(90deg, var(--orange-deep), var(--orange));
  color: var(--white);
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 60%);
  padding: 22px 20px 34px;
  text-align: center;
}
.hero-strip-text {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ==========================================================================
   Homepage category blocks
   ========================================================================== */

.home-main {
  max-width: 1200px;
  margin: -14px auto 0;
  padding: 0 20px 40px;
  position: relative;
  z-index: 2;
}

.category-block {
  background: var(--white);
  border-radius: var(--radius);
  margin-bottom: 34px;
}

.category-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 12px;
  border-bottom: 3px solid var(--orange);
  margin-bottom: 18px;
  position: relative;
}
.category-block-head h2 {
  font-size: 22px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.category-block-head h2 a { color: var(--ink); }
.category-block-head h2 a:hover { color: var(--orange-deep); }

.cat-badge {
  background: var(--orange);
  color: var(--white);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
  padding: 3px 8px;
  border-radius: 4px;
  clip-path: polygon(0 0, 100% 0, 92% 100%, 0% 100%);
}

.more-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
}
.more-link:hover { color: var(--orange-deep); }

.article-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.article-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px 16px;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--orange);
}
.article-card h3 {
  font-size: 15px;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card h3 a { color: var(--ink); }
.article-card h3 a:hover { color: var(--orange-deep); }
.article-card time {
  font-size: 12px;
  color: var(--ink-soft);
}

/* Ribbon badge — only surfaced on the first (featured/"hot") card of each grid */
.ribbon {
  display: none;
  position: absolute;
  top: 12px;
  right: -30px;
  background: linear-gradient(90deg, var(--orange-deep), var(--orange));
  color: var(--white);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
  padding: 4px 34px;
  transform: rotate(40deg);
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.article-card:first-child .ribbon { display: block; }
.article-card:first-child { border-color: var(--orange); box-shadow: var(--shadow); }

/* ==========================================================================
   List / category page
   ========================================================================== */

.page-banner {
  background: linear-gradient(120deg, var(--orange-deep), var(--orange) 60%, var(--amber));
  clip-path: polygon(0 0, 100% 0, 100% 78%, 0 100%);
  padding: 34px 20px 46px;
}
.page-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.page-banner h1 {
  color: var(--white);
  font-size: 30px;
  margin: 0;
}

.page-wrap {
  max-width: 1200px;
  margin: -18px auto 0;
  padding: 0 20px 40px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
  position: relative;
  z-index: 2;
}

.article-list-item {
  display: flex;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}
.article-list-item:hover {
  box-shadow: var(--shadow);
  border-color: var(--orange);
  transform: translateX(2px);
}

.thumb-flag {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  color: var(--white);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: .04em;
  clip-path: polygon(15% 0, 100% 0, 100% 85%, 85% 100%, 0 100%, 0 15%);
}

.article-list-body { flex: 1 1 auto; min-width: 0; }
.article-list-item h2 { font-size: 18px; margin: 0 0 8px; }
.article-list-item h2 a { color: var(--ink); }
.article-list-item h2 a:hover { color: var(--orange-deep); }
.article-list-item .summary {
  color: var(--ink-soft);
  font-size: 14px;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-list-item .meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink-soft);
}
.article-list-item .meta .hits { color: var(--orange-deep); font-weight: 700; }

/* Pagination */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
  justify-content: center;
}
.pagination a {
  display: inline-block;
  min-width: 38px;
  text-align: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.pagination a:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.sidebar { display: flex; flex-direction: column; gap: 22px; }

.side-block {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.side-block h3 {
  font-size: 16px;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--orange);
  display: flex;
  align-items: center;
  gap: 8px;
}
.side-block-tag {
  background: var(--orange);
  color: var(--white);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  clip-path: polygon(0 0, 100% 0, 88% 100%, 0% 100%);
}
.side-block-hot h3 .side-block-tag { background: var(--amber); color: var(--ink); }

.side-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13.5px;
}
.side-list li:last-child { border-bottom: 0; }
.side-list li a {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}
.side-list li a:hover { color: var(--orange-deep); }
.side-list li time {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--ink-soft);
}

/* Rank numbering for 热门排行 via CSS counters */
.side-list-rank { counter-reset: rank; }
.side-list-rank li { counter-increment: rank; position: relative; padding-left: 28px; }
.side-list-rank li::before {
  content: counter(rank);
  position: absolute;
  left: 0;
  top: 8px;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  border-radius: 4px;
  background: #ddd;
  color: var(--white);
}
.side-list-rank li:nth-child(1)::before { background: var(--orange-deep); }
.side-list-rank li:nth-child(2)::before { background: var(--orange); }
.side-list-rank li:nth-child(3)::before { background: var(--amber); color: var(--ink); }

/* ==========================================================================
   Article detail page
   ========================================================================== */

.show-main { min-width: 0; }

.article-detail {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 30px;
  margin-top: 24px;
  overflow: hidden;
}

.article-detail .ribbon-detail {
  display: block;
  top: 18px;
  right: -34px;
}

.article-detail h1 {
  font-size: 30px;
  margin: 0 0 14px;
  padding-right: 40px;
}

.article-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-soft);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.article-meta .source { color: var(--orange-deep); font-weight: 700; }

.summary {
  background: var(--orange-light);
  border-left: 4px solid var(--orange);
  padding: 14px 16px;
  border-radius: 0 8px 8px 0;
  font-size: 14.5px;
  color: var(--ink-soft);
  margin: 0 0 22px;
}

.body-divider {
  height: 14px;
  margin: 0 0 22px;
  background: repeating-linear-gradient(-45deg, var(--amber) 0 10px, var(--orange-light) 10px 20px);
  clip-path: polygon(0 0, 100% 30%, 100% 100%, 0 70%);
  opacity: .8;
}

.article-body {
  font-size: 16.5px;
  color: var(--ink);
}
.article-body p { margin: 0 0 1.1em; }
.article-body img { border-radius: 8px; margin: 12px 0; }
.article-body h2, .article-body h3 { color: var(--orange-deep); }
.article-body a { color: var(--orange-deep); text-decoration: underline; }
.article-body blockquote {
  margin: 1.2em 0;
  padding: 12px 18px;
  background: var(--amber-light);
  border-left: 4px solid var(--amber);
  border-radius: 0 8px 8px 0;
}

.article-nav {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 2px dashed var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  font-size: 14px;
}
.article-nav .nav-label {
  display: inline-block;
  background: var(--ink);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 8px;
}
.article-nav a { color: var(--ink); font-weight: 600; }
.article-nav a:hover { color: var(--orange-deep); }
.next-article { text-align: right; }

/* ==========================================================================
   Footer
   ========================================================================== */

.footer-divider {
  height: 10px;
  margin-top: 40px;
  background: repeating-linear-gradient(45deg, var(--orange-deep) 0 14px, var(--orange) 14px 28px);
  clip-path: polygon(0 40%, 100% 0, 100% 100%, 0 100%);
}

.site-footer {
  background: var(--ink);
  color: #d8d0ca;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
}
.friendlink h3 {
  color: var(--amber);
  font-size: 15px;
  margin: 0 0 12px;
}
.friendlink ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 20px;
}
.friendlink a { font-size: 13px; color: #d8d0ca; }
.friendlink a:hover { color: var(--orange); }

.copyright {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 16px;
  font-size: 12.5px;
  color: #a89f99;
}
.copyright a { color: #d8d0ca; }
.copyright a:hover { color: var(--orange); }

/* ==========================================================================
   Responsive breakpoints
   ========================================================================== */

@media (max-width: 1024px) {
  .article-card-grid { grid-template-columns: repeat(3, 1fr); }
  .page-wrap { grid-template-columns: 1fr 280px; }
}

@media (max-width: 768px) {
  .header-inner { padding: 12px 16px; }
  .site-nav ul { gap: 4px; }
  .site-nav a { padding: 7px 12px; font-size: 14px; }

  .hero-strip { padding: 16px 16px 26px; }
  .hero-strip-text { font-size: 12px; }

  .home-main { padding: 0 14px 30px; }
  .article-card-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .category-block-head h2 { font-size: 18px; }

  .page-banner { padding: 24px 16px 34px; }
  .page-banner h1 { font-size: 22px; }

  .page-wrap {
    grid-template-columns: 1fr;
    padding: 0 14px 30px;
  }
  .sidebar { order: 2; }
  .list-main { order: 1; }

  .article-list-item { flex-direction: column; padding: 14px; }
  .thumb-flag { display: none; }

  .article-detail { padding: 22px 16px; }
  .article-detail h1 { font-size: 22px; padding-right: 0; }
  .article-nav { grid-template-columns: 1fr; }
  .next-article { text-align: left; }
}

@media (max-width: 480px) {
  .article-card-grid { grid-template-columns: 1fr 1fr; }
  .header-topbar-inner { font-size: 11px; }
}

/* ==========================================================================
   Print fallback — strip decorative color/shape, keep readable content
   ========================================================================== */

@media print {
  .site-header, .site-footer, .sidebar, .hero-strip, .page-banner,
  .header-topbar, .header-divider, .footer-divider, .pagination,
  .ribbon, .thumb-flag, .body-divider { display: none !important; }

  body { color: #000; background: #fff; }
  .page-wrap { display: block; padding: 0; margin: 0; }
  .article-detail {
    border: none;
    padding: 0;
    box-shadow: none;
  }
  .summary { background: none; border-left: 2px solid #000; }
  a { color: #000; text-decoration: underline; }
}
