/* ==========================================================================
   Dola — GitHub 热点观察（每日专栏）
   一页一天：最新一期完整阅读，往期可回看。
   颜色全部来自 style.css 的变量，这里只做版面与节奏。
   ========================================================================== */

.trend-hero {
  margin-top: clamp(24px, 4vh, 40px);
  animation: dispatch-in 0.7s ease both;
}

.trend-hero h1 {
  margin: 10px 0 0;
  font-size: clamp(1.9rem, 5.4vw, 2.5rem);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.trend-hero .lede {
  max-width: 34em;
}

.trend-dateline {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}

.trend-dateline strong {
  color: var(--accent-2);
  font-weight: 600;
}

/* ---------- 当期正文 ---------- */

.dispatch {
  position: relative;
  margin-top: clamp(22px, 4vh, 34px);
  padding: clamp(26px, 5vw, 46px) clamp(22px, 4.6vw, 44px) clamp(24px, 4.4vw, 40px);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--glass-radius);
  box-shadow: var(--shadow-sm);
  animation: dispatch-in 0.8s 0.08s ease both;
}

.dispatch[hidden] {
  display: none;
}

.dispatch-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.dispatch.is-error .dispatch-status {
  color: var(--text);
}

.dispatch-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.dispatch-meta .issue {
  color: var(--accent);
  font-weight: 600;
}

.dispatch-title {
  margin: 0 0 18px;
  font-size: clamp(1.55rem, 4.4vw, 2.15rem);
  line-height: 1.34;
  letter-spacing: -0.005em;
}

.dispatch-lede {
  margin: 0 0 8px;
  padding: 2px 0 2px 18px;
  border-left: 2px solid var(--accent-line);
  color: var(--accent-2);
  font-size: 1.04rem;
  line-height: 1.85;
}

.dispatch-body {
  margin-top: 26px;
}

.dispatch-section {
  margin-top: 30px;
}

.dispatch-section h3 {
  margin: 0 0 10px;
  font-size: 1.12rem;
  line-height: 1.5;
}

.dispatch-section h3::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--accent-line);
  vertical-align: 0.12em;
}

.dispatch-section p {
  margin: 0 0 14px;
  color: var(--body);
  font-size: 0.98rem;
  line-height: 1.95;
}

.dispatch-section p:last-child {
  margin-bottom: 0;
}

/* ---------- 当天的数字：证据表 ---------- */

.dispatch-evidence {
  margin-top: 34px;
  padding: 20px 20px 8px;
  background: var(--highlight);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.evidence-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 14px;
}

.evidence-head h3 {
  margin: 0;
  font-size: 0.86rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.evidence-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.evidence-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.evidence-row {
  display: grid;
  grid-template-columns: 2.2em minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 2px 12px;
  padding: 11px 0;
  border-top: 1px solid var(--border);
}

.evidence-row:first-child {
  border-top: 0;
}

.evidence-rank {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
}

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

.evidence-repo {
  display: block;
  color: var(--text);
  font-weight: 600;
  font-size: 0.94rem;
  text-decoration: none;
  overflow-wrap: anywhere;
}

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

.evidence-note {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.evidence-gain {
  color: #8fe0b6;
  font-family: var(--mono);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.evidence-total {
  padding: 10px 0 12px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.6;
}

/* ---------- 明天看什么 ---------- */

.dispatch-watch {
  margin-top: 30px;
  padding: 20px 22px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 14px;
}

.dispatch-watch h3 {
  margin: 0 0 8px;
  color: var(--accent-2);
  font-size: 0.86rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dispatch-watch p {
  margin: 0;
  color: var(--body);
  font-size: 0.95rem;
  line-height: 1.9;
}

/* ---------- 来源与注脚 ---------- */

.dispatch-foot {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.8;
}

.dispatch-foot p {
  margin: 0 0 6px;
}

.dispatch-foot a {
  color: var(--accent-2);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-line);
}

.dispatch-foot a:hover {
  color: var(--accent);
}

.dispatch-back {
  margin: 14px 0 0;
  text-align: right;
}

.text-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--accent-line);
  text-underline-offset: 4px;
}

.text-button:hover {
  color: var(--accent-2);
}

/* ---------- 往期 ---------- */

.trend-archive {
  margin-top: clamp(34px, 6vh, 54px);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.section-heading h2 {
  margin: 4px 0 0;
  font-size: clamp(1.25rem, 3.4vw, 1.5rem);
}

.archive-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.archive-item {
  display: grid;
  grid-template-columns: 6.4em minmax(0, 1fr);
  align-items: baseline;
  gap: 4px 16px;
  width: 100%;
  padding: 14px 16px;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

a.archive-item { text-decoration: none; }

/* 主页上的往期入口卡片：列表本体在 github-trends-archive.html */
.trend-archive-link { margin-top: clamp(34px, 6vh, 52px); }
.archive-link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(20px, 3.4vw, 28px);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}
.archive-link-card:hover {
  border-color: var(--accent-line);
  background: var(--panel-strong);
  transform: translateY(-1px);
}
.archive-link-kicker {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: var(--accent);
}
.archive-link-title {
  display: block;
  margin-top: 6px;
  font-size: clamp(1.05rem, 2.8vw, 1.15rem);
  font-weight: 620;
}
.archive-link-sub {
  display: block;
  margin-top: 6px;
  font-size: 0.88rem;
  color: var(--muted);
}
.archive-link-arrow {
  flex: none;
  font-size: 1.2rem;
  color: var(--accent);
  transition: transform 0.2s ease;
}
.archive-link-card:hover .archive-link-arrow { transform: translateX(3px); }

.archive-item:hover {
  border-color: var(--accent-line);
  background: var(--panel-strong);
  transform: translateY(-1px);
}

.archive-item[aria-current="true"] {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.archive-date {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.archive-text {
  min-width: 0;
}

.archive-title {
  display: block;
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.55;
}

.archive-snippet {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.archive-empty {
  padding: 18px 16px;
  color: var(--muted);
  font-size: 0.88rem;
  border: 1px dashed var(--border);
  border-radius: 14px;
}

/* ---------- 方法说明 ---------- */

.trend-method {
  margin: clamp(36px, 6vh, 56px) 0 clamp(20px, 4vh, 36px);
  padding-top: clamp(24px, 4vh, 34px);
  border-top: 1px solid var(--border);
}

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

.method-grid h3 {
  margin: 0 0 6px;
  font-size: 0.92rem;
}

.method-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.8;
}

/* ---------- 动效与响应式 ---------- */

@keyframes dispatch-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 620px) {
  .dispatch {
    padding: 24px 18px 22px;
  }

  .method-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .archive-item {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .evidence-row {
    grid-template-columns: 1.8em minmax(0, 1fr) auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .trend-hero,
  .dispatch {
    animation: none;
  }

  .archive-item {
    transition: none;
  }
}
