/* ── 每日速递 · 黑白纸媒风 v2 ── */

/* 思源宋体（标题）+ 思源黑体（正文），从 jsdelivr CDN 加载 */
@import url('https://cdn.jsdelivr.net/npm/@fontsource/noto-serif-sc@5.0.18/400.css');
@import url('https://cdn.jsdelivr.net/npm/@fontsource/noto-serif-sc@5.0.18/700.css');
@import url('https://cdn.jsdelivr.net/npm/@fontsource/noto-serif-sc@5.0.18/900.css');
@import url('https://cdn.jsdelivr.net/npm/@fontsource/noto-sans-sc@5.0.18/400.css');
@import url('https://cdn.jsdelivr.net/npm/@fontsource/noto-sans-sc@5.0.18/500.css');

:root {
  --ink: #111;
  --ink-soft: #333;
  --ink-mute: #777;
  --ink-faint: #aaa;
  --paper: #fbfaf7;
  --paper-2: #ece9e3;
  --rule: #111;
  --rule-soft: #d8d5cf;
  --serif: "Noto Serif SC", "Songti SC", "Source Han Serif SC", Georgia, serif;
  --sans: "Noto Sans SC", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  background-image: radial-gradient(rgba(0,0,0,0.018) 1px, transparent 0);
  background-size: 4px 4px;
  padding-bottom: 60px;
}

/* ── 刊头 ── */
.masthead { padding: 34px 20px 0; }
.masthead-inner { max-width: 1180px; margin: 0 auto; text-align: center; }
.masthead-rule { height: 3px; background: var(--rule); }
.masthead-rule.thin { height: 1px; margin-top: 14px; }
.title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(38px, 8vw, 68px);
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  margin: 16px 0 6px;
}
.masthead-sub {
  font-size: 12px; letter-spacing: 0.28em; color: var(--ink-soft);
  text-transform: uppercase; margin-bottom: 4px;
}
.masthead-sub .dot { margin: 0 8px; color: var(--ink-faint); }
.masthead-sub .date { font-family: var(--serif); font-size: 13px; letter-spacing: 0.12em; }

/* ── 分类导航 ── */
.tabs {
  max-width: 1180px; margin: 22px auto 0; padding: 0 20px;
  display: flex; flex-wrap: wrap; gap: 0; justify-content: center;
  border-bottom: 1px solid var(--rule);
}
.tab {
  font-family: var(--serif); font-size: 15px; letter-spacing: 0.1em;
  color: var(--ink-soft); background: none; border: none; cursor: pointer;
  padding: 10px 18px; position: relative; transition: color .2s;
}
.tab::after {
  content: ""; position: absolute; left: 18px; right: 18px; bottom: -1px;
  height: 2px; background: var(--ink); transform: scaleX(0); transition: transform .25s ease;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); font-weight: 700; }
.tab.active::after { transform: scaleX(1); }

/* ── 内容 ── */
.content { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.loading { text-align: center; color: var(--ink-mute); padding: 80px 0; font-family: var(--serif); letter-spacing: .1em; }

.section { display: none; }
.section.active { display: block; animation: fade .45s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.section-head {
  display: flex; align-items: baseline; gap: 14px;
  margin: 34px 0 20px; padding-bottom: 8px; border-bottom: 1px solid var(--rule);
}
.section-name { font-family: var(--serif); font-weight: 900; font-size: 26px; letter-spacing: 0.14em; }
.section-en { font-size: 11px; letter-spacing: .3em; color: var(--ink-mute); text-transform: uppercase; }
.section-count { margin-left: auto; font-size: 12px; color: var(--ink-mute); letter-spacing: .1em; }

/* ── 统一网格：每张卡都有图位 ── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 32px 26px;
}

.card {
  display: flex; flex-direction: column;
  border-top: 2px solid var(--ink); padding-top: 12px;
  animation: fade .5s ease both;
}
.card-figure {
  margin: 0 0 12px; overflow: hidden; background: var(--paper-2);
  border: 1px solid var(--rule-soft); aspect-ratio: 16 / 9;
  display: flex; align-items: center; justify-content: center;
}
.card-figure img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: grayscale(100%) contrast(1.06) brightness(1.02);
  transition: filter .5s ease, transform .6s ease;
}
.card:hover .card-figure img {
  filter: grayscale(0%) contrast(1) brightness(1);
  transform: scale(1.03);
}
/* 占位（无图）——统一浅灰块 + 源名/序号 */
.card-figure.placeholder {
  flex-direction: column; gap: 4px;
  background: repeating-linear-gradient(45deg, #eae7e1, #eae7e1 10px, #e4e1da 10px, #e4e1da 20px);
}
.card-figure.placeholder .ph-source {
  font-family: var(--serif); font-weight: 700; font-size: 20px;
  color: #9a958c; letter-spacing: 0.12em;
}
.card-figure.placeholder .ph-rank {
  font-family: var(--serif); font-size: 13px; color: #b3aea4; letter-spacing: 0.2em;
}

.card-title {
  font-family: var(--serif); font-weight: 700; font-size: 19px;
  line-height: 1.42; letter-spacing: 0.01em; color: var(--ink);
  text-decoration: none; display: block;
}
.card-title:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.card-summary {
  font-size: 13px; color: var(--ink-soft); margin-top: 8px; line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta {
  margin-top: 10px; font-size: 11px; letter-spacing: 0.08em;
  color: var(--ink-mute); text-transform: uppercase;
  margin-top: auto; padding-top: 10px;
}

/* 头条：跨两列 + 大图大字 */
.grid .card.hero { grid-column: span 2; }
.grid .card.hero .card-title { font-size: clamp(24px, 3.5vw, 32px); line-height: 1.32; }

/* ── 页脚 ── */
.colophon {
  max-width: 1180px; margin: 60px auto 0; padding: 24px 20px;
  border-top: 3px double var(--ink); text-align: center;
  color: var(--ink-mute); font-size: 12px; letter-spacing: 0.15em;
}
.generated { margin-bottom: 6px; }
.motto { font-family: var(--serif); color: var(--ink-soft); }

@media (max-width: 560px) {
  .masthead { padding-top: 22px; }
  .title { letter-spacing: 0.14em; text-indent: 0.14em; }
  .grid { grid-template-columns: 1fr; gap: 26px 16px; }
  .grid .card.hero { grid-column: span 1; }
  .card-title { font-size: 17px; }
  .tab { padding: 8px 12px; font-size: 14px; }
}
