.page-news {
  --news-line: rgba(29, 74, 115, .16);
  --news-line-soft: rgba(29, 74, 115, .08);
  --news-line-ink: rgba(246, 241, 230, .18);
  --news-cut: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  --news-cut-sm: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
  color: var(--ink-900);
}

.page-news .visually-hidden-title {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.page-news .section {
  padding-block: clamp(56px, 8vw, 112px);
}

/* ---------- 首屏 ---------- */

.page-news .news-hero {
  padding-top: clamp(18px, 3vw, 34px);
  padding-bottom: clamp(40px, 6vw, 84px);
}

.page-news .hero-grid {
  display: grid;
  gap: clamp(28px, 4vw, 48px);
  margin-top: clamp(22px, 3vw, 40px);
}

.page-news .hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.page-news .hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: .1em;
  color: var(--coral-700);
  padding: 5px 12px 5px 10px;
  background: rgba(255, 107, 74, .1);
  clip-path: var(--news-cut-sm);
}

.page-news .hero-kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral-500);
}

.page-news .hero-title {
  margin: clamp(14px, 2vw, 22px) 0 0;
  line-height: .98;
  letter-spacing: -.03em;
}

.page-news .hero-lede {
  margin-top: clamp(16px, 2.4vw, 26px);
  max-width: 40em;
}

.page-news .hero-actions {
  margin-top: clamp(24px, 3vw, 36px);
}

.page-news .hero-figure {
  margin: 0;
  position: relative;
  clip-path: var(--news-cut);
  background: var(--cream-200);
  overflow: hidden;
}

.page-news .hero-figure img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
}

/* ---------- 置顶公告 ---------- */

.page-news .pinned-band {
  padding-bottom: clamp(40px, 6vw, 88px);
}

.page-news .pinned-card {
  padding: clamp(24px, 3.6vw, 44px);
  color: var(--cream-100);
}

.page-news .pinned-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: clamp(14px, 2vw, 22px);
  border-bottom: 1px solid var(--news-line-ink);
}

.page-news .pinned-label {
  color: var(--cyan-400);
}

.page-news .pinned-ver {
  font-size: 14px;
  color: var(--cyan-400);
  letter-spacing: .06em;
}

.page-news .pinned-title {
  margin: clamp(18px, 2.4vw, 26px) 0 0;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.3;
  letter-spacing: -.01em;
  color: var(--cream-100);
}

.page-news .pinned-text {
  margin: clamp(12px, 1.6vw, 18px) 0 0;
  max-width: 40em;
  font-size: 16px;
  line-height: 1.85;
  color: rgba(246, 241, 230, .82);
}

.page-news .pinned-scope {
  list-style: none;
  margin: clamp(20px, 2.6vw, 30px) 0 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--news-line-ink);
}

.page-news .pinned-scope li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  padding: 12px 4px;
  background: var(--ink-900);
  font-size: 15px;
  line-height: 1.7;
  color: rgba(246, 241, 230, .9);
}

.page-news .pinned-scope .mono {
  color: var(--cyan-400);
  font-size: 13px;
  letter-spacing: .04em;
  min-width: 82px;
}

.page-news .pinned-actions {
  margin-top: clamp(22px, 3vw, 32px);
}

.page-news .pinned-actions .btn-ghost {
  color: var(--cream-100);
  border-color: rgba(246, 241, 230, .38);
}

/* ---------- 归档区 ---------- */

.page-news .archive {
  display: grid;
  gap: clamp(26px, 4vw, 40px);
}

.page-news .tag-rail {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}

.page-news .rail-title {
  display: none;
}

.page-news .tag-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 9px 14px;
  font-size: 14px;
  color: var(--ink-700);
  text-decoration: none;
  background: var(--cream-200);
  clip-path: var(--news-cut-sm);
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}

.page-news .tag-link:hover,
.page-news .tag-link:focus-visible {
  background: var(--ink-900);
  color: var(--cream-100);
  outline: none;
}

.page-news .tag-count {
  font-size: 12px;
  color: var(--graphite-600);
}

.page-news .tag-link:hover .tag-count,
.page-news .tag-link:focus-visible .tag-count {
  color: var(--cyan-400);
}

.page-news .tag-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.page-news .tag-dot--version { background: var(--cyan-400); }
.page-news .tag-dot--log { background: var(--azure-500); }
.page-news .tag-dot--guide { background: var(--coral-500); }
.page-news .tag-dot--ux { background: var(--ink-700); }
.page-news .tag-dot--ops { background: var(--graphite-600); }

.page-news .entry-stream {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 6vw, 84px);
}

.page-news .stream-head {
  padding-bottom: clamp(16px, 2vw, 24px);
  border-bottom: 1px solid var(--news-line);
}

.page-news .stream-title {
  margin: 10px 0 0;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.25;
  letter-spacing: -.01em;
  color: var(--ink-900);
}

.page-news .stream-note {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.8;
  color: var(--graphite-600);
}

/* ---------- 版本说明条目 ---------- */

.page-news .entry {
  display: block;
  border-top: 1px solid var(--news-line);
  transition: background-color 160ms var(--ease);
}

.page-news .entry:last-of-type {
  border-bottom: 1px solid var(--news-line);
}

.page-news .entry:first-of-type {
  border-top-color: transparent;
}

.page-news .entry:hover {
  background: var(--cream-200);
}

.page-news .entry-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  padding: 16px 14px;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
}

.page-news .entry-summary::-webkit-details-marker { display: none; }
.page-news .entry-summary::marker { content: ""; }

.page-news .entry-summary .tag-dot {
  align-self: center;
}

.page-news .entry-title {
  flex: 1 1 200px;
  min-width: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink-900);
}

.page-news .entry-time {
  font-size: 12.5px;
  color: var(--graphite-600);
  letter-spacing: .04em;
}

.page-news .entry-ver {
  font-size: 13px;
  color: var(--ink-700);
  letter-spacing: .04em;
  padding: 3px 9px;
  background: rgba(23, 209, 200, .16);
  clip-path: var(--news-cut-sm);
}

.page-news .entry[open] .entry-ver {
  background: var(--cyan-400);
  color: var(--ink-900);
}

.page-news .entry-summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1;
  color: var(--cyan-600);
  margin-left: auto;
}

.page-news .entry[open] .entry-summary::after {
  content: "−";
  color: var(--coral-700);
}

.page-news .entry-body {
  padding: 0 14px 20px 36px;
}

.page-news .entry-body p {
  margin: 0;
  max-width: 38em;
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--ink-700);
}

/* ---------- 导出记录 ---------- */

.page-news .log-figure {
  margin: clamp(20px, 3vw, 32px) 0 0;
  clip-path: var(--news-cut);
  background: var(--cream-200);
  overflow: hidden;
}

.page-news .log-figure img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: cover;
}

.page-news .log-scroll {
  margin-top: clamp(22px, 3vw, 34px);
  min-width: 0;
}

.page-news .log-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.page-news .log-table th {
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .1em;
  color: var(--ink-700);
  border-bottom: 1px solid var(--news-line);
}

.page-news .log-table td {
  padding: 14px 12px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-900);
  border-bottom: 1px solid var(--news-line-soft);
  vertical-align: top;
}

.page-news .log-table tbody tr {
  transition: background-color 160ms var(--ease);
}

.page-news .log-table tbody tr:hover {
  background: var(--cream-200);
}

.page-news .log-ver {
  display: inline-block;
  font-size: 13.5px;
  color: var(--ink-900);
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}

.page-news .log-flag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--white);
  background: var(--coral-700);
}

.page-news .log-table td:nth-child(2) {
  color: var(--ink-700);
}

.page-news .log-table td:nth-child(3) {
  color: var(--graphite-600);
}

/* ---------- 资源指南 ---------- */

.page-news .guide-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--news-line-soft);
}

.page-news .guide-item {
  display: grid;
  grid-template-columns: 8px 1fr;
  grid-template-areas:
    "dot name"
    ". state"
    ". note";
  align-items: center;
  gap: 6px 12px;
  padding: 16px 14px;
  background: var(--cream-100);
  transition: background-color 160ms var(--ease);
}

.page-news .guide-item:hover {
  background: var(--cream-200);
}

.page-news .guide-item .tag-dot { grid-area: dot; align-self: start; margin-top: 8px; }

.page-news .guide-name {
  grid-area: name;
  font-size: 16.5px;
  font-weight: 600;
  color: var(--ink-900);
}

.page-news .guide-state {
  grid-area: state;
  justify-self: start;
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--ink-700);
  padding: 3px 9px;
  background: rgba(18, 42, 66, .07);
  clip-path: var(--news-cut-sm);
}

.page-news .guide-note {
  grid-area: note;
  margin: 2px 0 0;
  max-width: 38em;
  font-size: 15px;
  line-height: 1.8;
  color: var(--graphite-600);
}

/* ---------- 栏目与标签索引 ---------- */

.page-news .index-grid {
  display: grid;
  gap: clamp(28px, 4vw, 56px);
}

.page-news .index-copy .section-title {
  margin: 12px 0 0;
  letter-spacing: -.01em;
}

.page-news .index-copy .text-body {
  margin-top: 16px;
}

.page-news .index-list {
  list-style: none;
  margin: clamp(22px, 3vw, 32px) 0 0;
  padding: 0;
  border-top: 1px solid var(--news-line);
}

.page-news .index-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--news-line);
}

.page-news .index-item .tag-dot { align-self: center; }

.page-news .index-name {
  flex: 0 0 auto;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-900);
}

.page-news .index-desc {
  flex: 1 1 200px;
  min-width: 0;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--graphite-600);
}

.page-news .index-figure {
  margin: 0;
  align-self: start;
  clip-path: var(--news-cut);
  background: var(--cream-100);
  overflow: hidden;
}

.page-news .index-figure img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: cover;
}

/* ---------- 按版本号回溯 ---------- */

.page-news .trace-grid {
  display: grid;
  gap: clamp(30px, 4vw, 52px);
}

.page-news .trace-copy .section-title {
  margin: 12px 0 0;
  letter-spacing: -.01em;
}

.page-news .trace-copy .text-body {
  margin-top: 16px;
}

.page-news .trace-actions {
  margin-top: clamp(22px, 3vw, 30px);
}

.page-news .trace-steps {
  display: grid;
  gap: 1px;
  background: var(--news-line-soft);
  align-self: start;
}

.page-news .trace-step {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 20px 18px 20px 22px;
  background: var(--cream-100);
}

.page-news .trace-step::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--cyan-400), var(--azure-500));
}

.page-news .step-index {
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--coral-700);
}

.page-news .step-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink-900);
}

.page-news .step-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
  color: var(--graphite-600);
}

/* ---------- 底部条带 ---------- */

.page-news .trace-band {
  margin: 0;
  display: block;
  line-height: 0;
  overflow: hidden;
}

.page-news .trace-band img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: cover;
}

/* ---------- 断点 ---------- */

@media (min-width: 640px) {
  .page-news .entry-body {
    padding-left: 40px;
  }

  .page-news .guide-item {
    grid-template-columns: 8px 200px 1fr;
    grid-template-areas:
      "dot name state"
      ". note note";
    align-items: start;
  }

  .page-news .guide-name { margin-top: 2px; }
  .page-news .guide-state { justify-self: start; }
}

@media (min-width: 900px) {
  .page-news .hero-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: end;
  }

  .page-news .hero-figure {
    aspect-ratio: 3 / 2;
  }

  .page-news .archive {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: clamp(40px, 5vw, 76px);
    align-items: start;
  }

  .page-news .tag-rail {
    position: sticky;
    top: 104px;
    flex-direction: column;
    flex-wrap: nowrap;
    overflow: visible;
    gap: 2px;
    padding-bottom: 0;
  }

  .page-news .rail-title {
    display: block;
    padding: 0 0 12px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--news-line);
  }

  .page-news .tag-link {
    width: 100%;
    justify-content: flex-start;
    background: transparent;
    padding: 10px 12px;
    clip-path: none;
    border-left: 2px solid transparent;
    transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease);
  }

  .page-news .tag-link:hover,
  .page-news .tag-link:focus-visible {
    background: var(--cream-200);
    color: var(--ink-900);
    border-left-color: var(--coral-500);
  }

  .page-news .tag-link:hover .tag-count,
  .page-news .tag-link:focus-visible .tag-count {
    color: var(--ink-700);
  }

  .page-news .tag-count {
    margin-left: auto;
  }

  .page-news .index-grid {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    align-items: start;
  }

  .page-news .trace-grid {
    grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
    align-items: start;
  }
}

@media (min-width: 1180px) {
  .page-news .archive {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

@media (max-width: 719px) {
  .page-news .log-table thead {
    display: none;
  }

  .page-news .log-table,
  .page-news .log-table tbody,
  .page-news .log-table tr,
  .page-news .log-table td {
    display: block;
    width: 100%;
  }

  .page-news .log-table tr {
    padding: 16px 0;
    border-bottom: 1px solid var(--news-line);
  }

  .page-news .log-table td {
    padding: 2px 0;
    border: 0;
  }

  .page-news .log-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: .1em;
    color: var(--graphite-600);
  }

  .page-news .log-table td + td {
    margin-top: 10px;
  }

  .page-news .log-flag {
    margin-left: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-news .entry,
  .page-news .tag-link,
  .page-news .guide-item,
  .page-news .log-table tbody tr {
    transition-duration: 120ms;
  }
}
