/* Article list/detail — theme via themes.css body[data-page="article"] */

.article-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.article {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1rem 1.2rem 1.1rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color 0.25s, transform 0.25s, background 0.25s, box-shadow 0.25s;
  text-align: left;
  color: inherit;
  font: inherit;
  width: 100%;
}
.article:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--accent) 10%, transparent),
    color-mix(in srgb, var(--accent-2) 4%, transparent)
  );
  box-shadow: 0 12px 28px var(--shadow);
}

/* 第 1 行：日期 | 查看原文 */
.article-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}
.article-date {
  display: inline-flex;
  align-items: baseline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--font-display);
  line-height: 1.2;
  white-space: nowrap;
  min-width: 0;
}
.article-date .date-md {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.article:hover .article-date .date-md {
  color: var(--accent);
}

.btn-origin {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.28rem 0.8rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent-on);
  background: var(--accent);
  border: 1px solid var(--accent);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 28%, transparent);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  text-decoration: none;
}
.btn-origin:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 38%, transparent);
  filter: brightness(1.05);
}

.article-heading {
  margin: 0;
  min-width: 0;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.45;
}
.article-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.7;
  text-indent: 2em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-detail {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-align: left;
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-detail:hover,
.article-detail:focus-visible {
  color: var(--accent);
}
.article-detail:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
  outline-offset: 2px;
  border-radius: 4px;
}

.article-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.1rem;
}
.mentioned-link {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.45rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: transparent;
  opacity: 0.85;
  transition: color 0.2s, border-color 0.2s, opacity 0.2s;
  text-decoration: none;
}
.mentioned-link:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  background: transparent;
  opacity: 1;
}

/* article detail overrides */
.detail-head {
  flex-direction: row;
  gap: 1rem 1.15rem;
}
.detail-date-badge {
  flex: 0 0 auto;
  align-self: center;
  min-width: 4.5rem;
  padding: 0.7rem 0.75rem;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-family: var(--font-display);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  line-height: 1.1;
}
.detail-date-badge .d-m {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.9;
}
.detail-date-badge .d-sep {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1;
}
.detail-date-badge .d-d {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.detail-name {
  flex: 1;
  min-width: 0;
  font-size: clamp(1.15rem, 2.8vw, 1.5rem);
  line-height: 1.35;
  text-align: center;
}
.detail-desc {
  font-size: 0.92rem;
  line-height: 1.65;
  text-align: left;
  text-indent: 2em;
}
.detail-links-block { margin: 0; }
.detail-links-label {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.detail-links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.detail-links li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--fill);
  transition: border-color 0.2s, background 0.2s;
}
.detail-links li a:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.detail-links .link-name {
  font-weight: 600;
  font-size: 0.92rem;
}
.detail-links .link-url {
  font-size: 0.72rem;
  color: var(--muted);
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.detail-links-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .article {
    gap: 0.45rem;
    padding: 0.85rem 0.9rem 0.95rem;
  }
  .article-top {
    gap: 0.5rem;
  }
  .article-date .date-md {
    font-size: 0.86rem;
  }
  .article-heading {
    font-size: 1rem;
    line-height: 1.4;
  }
  .article-desc {
    font-size: 0.8rem;
    line-height: 1.65;
  }
  .btn-origin {
    font-size: 0.7rem;
    padding: 0.26rem 0.7rem;
  }
  .mentioned-link {
    display: none;
  }

  /* 文章详情弹窗 · 手机 */
  .detail-date-badge {
    display: none;
  }
  .detail-head {
    justify-content: center;
  }
  .detail-name {
    text-align: left;
    font-size: 1.1rem;
  }
  .detail-download {
    width: 100%;
    align-self: stretch;
    box-sizing: border-box;
  }
  .detail-links-label {
    font-size: 0.75rem;
    opacity: 0.75;
    margin-bottom: 0.4rem;
  }
  .detail-links {
    gap: 0.2rem;
  }
  .detail-links li a {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    padding: 0.35rem 0;
    border: none;
    border-radius: 0;
    background: transparent;
  }
  .detail-links li a:hover {
    border-color: transparent;
    background: transparent;
  }
  .detail-links .link-name {
    font-weight: 500;
    font-size: 0.82rem;
    color: var(--muted);
  }
  .detail-links .link-url {
    max-width: 100%;
    font-size: 0.68rem;
    opacity: 0.7;
    white-space: normal;
    word-break: break-all;
  }
  .detail-links-empty {
    font-size: 0.8rem;
    opacity: 0.7;
  }
}
