.page-news,
.page-news *,
.page-news *::before,
.page-news *::after {
  box-sizing: border-box;
}

.page-news {
  --slant: 8px;
  background: var(--bg-base);
  color: var(--text-high);
  overflow-x: hidden;
}

/* ---------- Hero 封面区 ---------- */
.page-news .news-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: calc(100vh - var(--header-h));
  padding: calc(var(--header-h) + 1rem) var(--container-pad) 2.5rem;
  overflow: hidden;
  isolation: isolate;
}

.page-news .news-hero .breadcrumb {
  position: absolute;
  top: calc(var(--header-h) + 0.5rem);
  left: var(--container-pad);
  z-index: 5;
  margin: 0;
  font-size: 0.8rem;
}

.page-news .news-hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.page-news .news-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 14, 20, 0.82) 0%, rgba(11, 14, 20, 0.5) 38%, rgba(11, 14, 20, 0.94) 100%),
    repeating-linear-gradient(0deg, transparent 0 2px, rgba(0, 212, 255, 0.04) 2px 4px);
}

.page-news .news-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-news .news-hero__content {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  display: grid;
  gap: 1rem;
}

.page-news .news-hero__content h1 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(2.6rem, 8vw, 5.5rem);
  line-height: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--text-high);
  text-shadow: 0 0 24px rgba(255, 46, 136, 0.35);
}

.page-news .news-hero__lead {
  max-width: 40rem;
  margin: 0.5rem 0 0.75rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-dim);
}

.page-news .news-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.page-news .news-hero__meta span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1;
  color: var(--text-high);
  background: rgba(29, 38, 55, 0.85);
  border: 1px solid var(--line-color);
  border-left: 3px solid var(--accent-magenta);
  padding: 0.55rem 0.8rem;
  clip-path: polygon(var(--slant) 0, 100% 0, calc(100% - var(--slant)) 100%, 0 100%);
}

/* ---------- 筛选区 ---------- */
.page-news .news-filter-zone {
  position: relative;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

.page-news .news-topic-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.page-news .news-topic-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line-color);
  margin-bottom: 2.5rem;
}

.page-news .news-topic-bar .section-label {
  margin-right: 1rem;
  flex: 0 0 100%;
}

.page-news .news-topic-label {
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  background: var(--bg-surface);
  border: 1px solid var(--line-color);
  padding: 0.45rem 1rem;
  cursor: pointer;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
  clip-path: polygon(var(--slant) 0, 100% 0, calc(100% - var(--slant)) 100%, 0 100%);
}

.page-news .news-topic-label:hover {
  color: var(--accent-orange);
  border-color: var(--accent-orange);
}

.page-news .news-topic-input#nf-all:focus-visible ~ .news-topic-bar label[for="nf-all"],
.page-news .news-topic-input#nf-feature:focus-visible ~ .news-topic-bar label[for="nf-feature"],
.page-news .news-topic-input#nf-archive:focus-visible ~ .news-topic-bar label[for="nf-archive"],
.page-news .news-topic-input#nf-tag:focus-visible ~ .news-topic-bar label[for="nf-tag"] {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.page-news .news-topic-input#nf-all:checked ~ .news-topic-bar label[for="nf-all"],
.page-news .news-topic-input#nf-feature:checked ~ .news-topic-bar label[for="nf-feature"],
.page-news .news-topic-input#nf-archive:checked ~ .news-topic-bar label[for="nf-archive"],
.page-news .news-topic-input#nf-tag:checked ~ .news-topic-bar label[for="nf-tag"] {
  color: var(--bg-base);
  background: var(--accent-magenta);
  border-color: var(--accent-magenta);
}

/* ---------- 更新日志列表 ---------- */
.page-news .update-log {
  padding-bottom: 3rem;
}

.page-news .update-log__head {
  margin-bottom: 1.5rem;
}

.page-news .update-log__head h2 {
  margin: 0.4rem 0 0.25rem;
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1;
  color: var(--text-high);
}

.page-news .update-log__head p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.page-news .update-log__list {
  display: grid;
  gap: 0.85rem;
}

.page-news .update-item {
  position: relative;
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--line-color);
  border-left: 3px solid var(--line-color);
  transition: border-color var(--transition), transform var(--transition);
}

.page-news .update-item::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 1.35rem;
  width: 9px;
  height: 9px;
  background: var(--accent-blue);
  transform: rotate(45deg);
  z-index: 2;
  transition: background var(--transition);
}

.page-news .update-item::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -80%;
  width: 55%;
  background: linear-gradient(100deg, transparent, rgba(0, 212, 255, 0.08), transparent);
  transform: skewX(-18deg);
  pointer-events: none;
  transition: left 0.65s ease;
  z-index: 3;
}

.page-news .update-item:hover {
  border-color: var(--accent-magenta);
  transform: translateX(4px);
}

.page-news .update-item:hover::before {
  background: var(--accent-orange);
}

.page-news .update-item:hover::after {
  left: 120%;
}

.page-news .update-item summary {
  list-style: none;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.3rem 0.85rem;
  padding: 1rem 1.1rem;
  cursor: pointer;
}

.page-news .update-item summary::-webkit-details-marker {
  display: none;
}

.page-news .update-item__batch {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-magenta);
  white-space: nowrap;
  grid-row: 1 / span 2;
}

.page-news .update-item__type {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-orange);
  border: 1px solid var(--accent-orange);
  background: rgba(255, 138, 0, 0.06);
  padding: 0.15rem 0.5rem;
  white-space: nowrap;
  justify-self: start;
}

.page-news .update-item__title {
  font-size: 0.92rem;
  color: var(--text-high);
  line-height: 1.35;
}

.page-news .update-item[open] {
  border-left-color: var(--accent-blue);
}

.page-news .update-item__detail {
  padding: 0 1.25rem 1.1rem;
  border-top: 1px dashed var(--line-color);
  margin: 0 1.1rem;
  padding-top: 0.8rem;
}

.page-news .update-item__detail p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.75;
}

.page-news .update-item__detail a {
  color: var(--accent-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 筛选隐藏逻辑 */
.page-news .news-topic-input:checked ~ .update-log .update-item {
  display: none;
}

.page-news .news-topic-input#nf-all:checked ~ .update-log .update-item,
.page-news .news-topic-input#nf-feature:checked ~ .update-log .update-item[data-cat="功能"],
.page-news .news-topic-input#nf-archive:checked ~ .update-log .update-item[data-cat="归档"],
.page-news .news-topic-input#nf-tag:checked ~ .update-log .update-item[data-cat="标签"] {
  display: block;
}

/* ---------- 归档结构变化 ---------- */
.page-news .arch-section {
  display: grid;
  gap: 2rem;
  padding: var(--section-gap) var(--container-pad);
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-base) 100%);
  border-top: 1px solid var(--line-color);
  border-bottom: 1px solid var(--line-color);
}

.page-news .arch-section__text h2,
.page-news .mobile-section__text h2,
.page-news .protocol-section__text h2 {
  margin: 0.4rem 0 1rem;
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.05;
  color: var(--text-high);
}

.page-news .arch-section__text > p,
.page-news .mobile-section__text > p {
  margin: 0 0 1.25rem;
  color: var(--text-dim);
  line-height: 1.7;
}

.page-news .arch-list,
.page-news .mobile-list {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

.page-news .arch-list li,
.page-news .mobile-list li {
  position: relative;
  padding: 1rem 1rem 1rem 1.6rem;
  background: var(--bg-raised);
  border: 1px solid var(--line-color);
  border-right: 3px solid var(--accent-blue);
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.65;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}

.page-news .arch-list li::before,
.page-news .mobile-list li::before {
  content: "";
  position: absolute;
  left: 0.55rem;
  top: 1.2rem;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--accent-orange);
  transform: rotate(45deg);
}

.page-news .arch-list strong,
.page-news .mobile-list strong {
  color: var(--text-high);
  font-weight: 600;
}

.page-news .arch-section__img,
.page-news .mobile-section__img,
.page-news .protocol-section__img {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-color);
  box-shadow: 10px 10px 0 rgba(255, 46, 136, 0.12);
}

.page-news .arch-section__img img,
.page-news .mobile-section__img img,
.page-news .protocol-section__img img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.page-news .mobile-section__img {
  max-width: 340px;
  margin-inline: auto;
  width: 100%;
}

/* ---------- 移动端与回访更新 ---------- */
.page-news .mobile-section {
  display: grid;
  gap: 2rem;
  padding: var(--section-gap) var(--container-pad);
  background: var(--bg-base);
}

/* ---------- 固定更新协议 ---------- */
.page-news .protocol-section {
  position: relative;
  overflow: hidden;
  padding: var(--section-gap) var(--container-pad);
  background:
    repeating-linear-gradient(45deg, rgba(255, 46, 136, 0.03) 0 2px, transparent 2px 12px),
    var(--bg-surface);
  border-top: 1px solid var(--line-color);
}

.page-news .protocol-section__inner {
  display: grid;
  gap: 2rem;
  max-width: var(--container-w);
  margin-inline: auto;
}

.page-news .protocol-card {
  margin: 1.5rem 0;
  border: 1px solid var(--line-color);
  background: var(--bg-base);
  display: grid;
}

.page-news .protocol-card__row {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 1rem;
  align-items: baseline;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line-color);
}

.page-news .protocol-card__row:last-child {
  border-bottom: 0;
}

.page-news .protocol-card__day {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-magenta);
}

.page-news .protocol-card__type {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-orange);
  border: 1px solid var(--accent-orange);
  padding: 0.15rem 0.5rem;
  white-space: nowrap;
}

.page-news .protocol-card__desc {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.page-news .protocol-note {
  max-width: 42rem;
  margin: 0;
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.75;
}

.page-news .protocol-note a {
  color: var(--accent-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 页脚免责提示行 ---------- */
.page-news .news-disclaimer {
  padding: 1.5rem var(--container-pad);
  border-top: 1px solid var(--line-color);
  background: var(--bg-base);
}

.page-news .news-disclaimer p {
  max-width: var(--container-w);
  margin-inline: auto;
  color: var(--text-dim);
  font-size: 0.8rem;
  line-height: 1.6;
}

.page-news .news-disclaimer a {
  color: var(--accent-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 桌面端栅格与排版 ---------- */
@media (min-width: 768px) {
  .page-news .news-topic-bar .section-label {
    flex: 0 0 auto;
  }

  .page-news .update-item summary {
    grid-template-columns: auto auto 1fr;
    align-items: baseline;
    gap: 0.4rem 0.9rem;
  }

  .page-news .update-item__batch {
    grid-row: auto;
  }

  .page-news .update-item__title {
    font-size: 0.95rem;
  }

  .page-news .arch-section,
  .page-news .mobile-section {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: clamp(2rem, 6vw, 5rem);
  }

  .page-news .mobile-section__img {
    max-width: none;
  }
}

@media (min-width: 900px) {
  .page-news .news-hero {
    min-height: calc(100vh - var(--header-h));
    padding-bottom: 3rem;
  }

  .page-news .news-hero__content {
    grid-template-columns: 1.5fr 1fr;
    align-items: end;
    gap: 2rem;
  }

  .page-news .news-hero__lead {
    grid-column: 1;
  }

  .page-news .news-hero__meta {
    grid-column: 2;
    grid-row: 1 / span 2;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
  }

  .page-news .arch-section__img {
    order: 2;
  }

  .page-news .arch-section__text {
    order: 1;
  }

  .page-news .mobile-section__img {
    order: 1;
  }

  .page-news .mobile-section__text {
    order: 2;
  }

  .page-news .protocol-section__inner {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: clamp(2rem, 6vw, 5rem);
  }
}
