/* ==========================================================================
   成果展示样式
   用于：成果页（项目 / 专利 / 论文三段）+ 三类详情页
   参考 Nature research-articles 的信息层级；配色沿用站点编辑风格
   （refinement.css 的 navy / teal 体系）。独立文件，不改动 style.css。
   ========================================================================== */

:root {
  --ach-ink: #163750;
  --ach-ink-soft: #4f6072;
  --ach-ink-mute: #8b97a4;
  --ach-line: #e2e8ee;
  --ach-line-soft: #eef2f6;
  --ach-accent: #367b80;
  --ach-blue: #0a5ba8;
  --ach-amber: #9b6d00;
  --ach-green: #3b6d11;
  --ach-bg-soft: #f7f9fb;
}

/* ---------- 筛选条 ---------- */

.ach-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ach-line);
}

.ach-search {
  position: relative;
  flex: 1 1 280px;
  min-width: 200px;
}

.ach-search input {
  width: 100%;
  padding: 10px 36px 10px 14px;
  border: 1px solid var(--ach-line);
  border-radius: 6px;
  background: #fff;
  color: var(--ach-ink);
  font: inherit;
  font-size: 14px;
}

.ach-search input:focus {
  outline: none;
  border-color: #b7cfe6;
  box-shadow: 0 0 0 3px #e8f1fb;
}

.ach-search i {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ach-ink-mute);
  font-size: 13px;
  pointer-events: none;
}

.ach-select {
  appearance: none;
  padding: 10px 32px 10px 14px;
  border: 1px solid var(--ach-line);
  border-radius: 6px;
  background-color: #fff;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M1 1l4 4 4-4' stroke='%234f6072' stroke-width='1.6' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  color: var(--ach-ink-soft);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.ach-select:focus {
  outline: none;
  border-color: #b7cfe6;
  box-shadow: 0 0 0 3px #e8f1fb;
}

.ach-count {
  margin-left: auto;
  color: var(--ach-ink-mute);
  font-size: 13.5px;
  white-space: nowrap;
}

.ach-count b {
  color: var(--ach-ink);
  font-size: 16px;
}

/* ---------- 年份分组 ---------- */

.ach-year {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 34px 0 4px;
}

.ach-year-group:first-child .ach-year {
  margin-top: 24px;
}

.ach-year b {
  color: var(--ach-ink);
  font: 500 30px/1 'Times New Roman', Times, serif;
  letter-spacing: -.5px;
}

.ach-year span {
  color: var(--ach-ink-mute);
  font-size: 13px;
  white-space: nowrap;
}

.ach-year i {
  flex: 1;
  height: 1px;
  background: var(--ach-line);
}

/* ---------- 条目 ---------- */

.ach-item {
  padding: 28px 0 30px;
  border-bottom: 1px solid var(--ach-line-soft);
}

.ach-item:last-child {
  border-bottom: none;
}

/* 有配图时左右分栏，没配图时文字铺满整行 */
.ach-item.has-media {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 34px;
  align-items: start;
}

.ach-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 13px;
}

.ach-tag {
  padding: 3px 11px;
  border-radius: 4px;
  background: #eef4fa;
  color: var(--ach-blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3px;
  white-space: nowrap;
}

.ach-tag.is-direction {
  background: #e8f4f4;
  color: var(--ach-accent);
}

.ach-tag.is-status {
  background: #eaf3de;
  color: var(--ach-green);
}

.ach-tag.is-status-done {
  background: #eef1f4;
  color: #5c6b7a;
}

.ach-tag.is-status-pending {
  background: #faf3e6;
  color: var(--ach-amber);
}

.ach-meta {
  color: var(--ach-ink-soft);
  font-size: 14px;
  font-style: italic;
  line-height: 1.6;
}

.ach-title {
  margin: 0;
  font-size: 25px;
  font-weight: 600;
  line-height: 1.42;
  letter-spacing: -.2px;
}

.ach-title a {
  color: var(--ach-ink);
  text-decoration: none;
}

.ach-title a:hover {
  color: var(--ach-blue);
}

.ach-people {
  margin: 12px 0 0;
  color: var(--ach-ink-mute);
  font-size: 14px;
  line-height: 1.8;
}

.ach-desc {
  max-width: 860px;
  margin: 14px 0 0;
  color: var(--ach-ink-soft);
  font-size: 15px;
  line-height: 1.9;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ach-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.ach-link {
  padding: 6px 15px;
  border: 1px solid #cfe0f2;
  border-radius: 6px;
  background: #f6faff;
  color: var(--ach-blue);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.ach-link:hover {
  background: #e8f1fb;
}

.ach-link.is-code {
  border-color: #d5e6e6;
  background: #f4fafa;
  color: var(--ach-accent);
}

.ach-link.is-code:hover {
  background: #e6f2f2;
}

.ach-link.is-more {
  border-color: var(--ach-line);
  background: #fafbfd;
  color: var(--ach-ink-soft);
}

.ach-link.is-more:hover {
  background: #f2f5f9;
}

.ach-media img {
  display: block;
  width: 100%;
  height: 172px;
  object-fit: cover;
  border: 1px solid var(--ach-line);
  border-radius: 8px;
  background: #f2f5f9;
}

.ach-empty {
  padding: 56px 0;
  color: var(--ach-ink-mute);
  font-size: 15px;
  text-align: center;
}

/* ---------- 详情页 ---------- */

.detail-head {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--ach-line);
}

.detail-head h1 {
  margin: 14px 0 0;
  color: var(--ach-ink);
  font-size: 32px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -.3px;
}

.detail-people {
  margin: 16px 0 0;
  color: var(--ach-ink-soft);
  font-size: 15px;
  line-height: 1.9;
}

.detail-people i {
  margin-right: 6px;
  color: var(--ach-accent);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: 18px 0 0;
  color: var(--ach-ink-mute);
  font-size: 14px;
}

.detail-meta i {
  margin-right: 6px;
  color: var(--ach-accent);
}

.detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 0;
  padding: 20px 0;
  border-top: 1px solid var(--ach-line);
  border-bottom: 1px solid var(--ach-line);
}

.detail-links .ach-link {
  padding: 9px 20px;
  font-size: 13.5px;
}

.detail-abstract {
  margin: 28px 0 0;
  padding: 24px 28px;
  border-left: 4px solid var(--ach-accent);
  border-radius: 0 8px 8px 0;
  background: var(--ach-bg-soft);
}

.detail-abstract h2 {
  margin: 0 0 12px;
  color: var(--ach-ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.detail-abstract p {
  margin: 0;
  color: var(--ach-ink-soft);
  font-size: 16px;
  line-height: 2;
}

.detail-cover {
  margin: 28px 0 0;
  text-align: center;
}

.detail-cover img {
  max-width: 100%;
  max-height: 560px;
  border: 1px solid var(--ach-line);
  border-radius: 8px;
}

.detail-body {
  margin: 30px 0 0;
  font-size: 16px;
  line-height: 2;
}

.detail-body > .article-content > *:first-child {
  margin-top: 0;
}

.detail-related {
  margin: 44px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--ach-line);
}

.detail-related h2 {
  margin: 0 0 16px;
  color: var(--ach-ink);
  font-size: 16px;
  font-weight: 600;
}

.detail-related ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.detail-related li {
  padding: 13px 0;
  border-bottom: 1px dashed var(--ach-line);
}

.detail-related li:last-child {
  border-bottom: none;
}

.detail-related a {
  color: var(--ach-ink);
  font-size: 15.5px;
  line-height: 1.65;
  text-decoration: none;
}

.detail-related a:hover {
  color: var(--ach-blue);
}

.detail-related small {
  display: block;
  margin-top: 5px;
  color: var(--ach-ink-mute);
  font-size: 13px;
}

.detail-empty {
  padding: 52px 0;
  color: var(--ach-ink-mute);
  font-size: 15px;
  text-align: center;
}

/* ---------- 响应式 ---------- */

@media (max-width: 900px) {
  .ach-item.has-media {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .ach-media {
    order: -1;
  }

  .ach-media img {
    height: 200px;
  }
}

@media (max-width: 720px) {
  .ach-count {
    margin-left: 0;
    flex-basis: 100%;
  }

  .ach-title {
    font-size: 20px;
  }

  .ach-year b {
    font-size: 24px;
  }

  .ach-desc {
    font-size: 14.5px;
  }

  .detail-head h1 {
    font-size: 23px;
  }

  .detail-abstract {
    padding: 18px 20px;
  }

  .detail-abstract p,
  .detail-body {
    font-size: 15px;
  }
}

/* ---------- 筛选隐藏（必须放在最后，覆盖上面的 display 声明）---------- */

.ach-item[hidden],
.ach-year-group[hidden],
.ach-empty[hidden] {
  display: none;
}
