.page-news {
  --news-axis: 56px;
  --news-rule: rgba(245, 241, 230, 0.16);
  --news-soft-yellow: rgba(255, 210, 63, 0.08);
}

@media (min-width: 900px) {
  .page-news {
    --news-axis: 76px;
  }
}

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

.page-news .news-hero {
  position: relative;
  overflow: hidden;
  background-color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: clamp(30px, 6vw, 62px);
}

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

.page-news .news-hero__bg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  filter: saturate(0.75) contrast(1.05);
}

.page-news .news-hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(14, 15, 19, 0.5) 0%, rgba(14, 15, 19, 0.84) 62%, var(--ink) 100%),
    linear-gradient(90deg, var(--ink) 0%, rgba(14, 15, 19, 0.2) 72%);
}

.page-news .news-hero__inner {
  position: relative;
  z-index: 1;
}

.page-news .news-hero__title {
  margin: 16px 0 0;
  max-width: 22ch;
  font-size: clamp(31px, 7.2vw, 68px);
  font-weight: 300;
  line-height: 1.14;
  letter-spacing: -0.025em;
  color: var(--paper);
}

.page-news .news-hero__lead {
  margin: 20px 0 0;
  max-width: 60ch;
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.8;
  color: rgba(245, 241, 230, 0.78);
}

.page-news .news-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.page-news .news-hero__meta span {
  padding-left: 10px;
  border-left: 3px solid var(--line-strong);
}

.page-news .news-hero__meta span:nth-child(1) {
  border-left-color: var(--yellow);
}

.page-news .news-hero__meta span:nth-child(2) {
  border-left-color: var(--magenta);
}

.page-news .news-hero__meta span:nth-child(3) {
  border-left-color: var(--blue);
}

/* ---------- 周切换 ---------- */

.page-news .news-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 24px 0 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.page-news .news-switch__item {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 7px 12px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
}

.page-news .news-switch__item.is-current {
  background: var(--yellow-soft);
  border-color: var(--yellow-soft);
  color: var(--ink);
}

.page-news .news-switch__hint {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

/* ---------- 时间轴 ---------- */

.page-news .news-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  background-image: linear-gradient(var(--news-rule), var(--news-rule));
  background-repeat: no-repeat;
  background-size: 1px 100%;
  background-position: calc(var(--news-axis) - 1px) 0;
}

.page-news .news-day {
  display: grid;
  grid-template-columns: var(--news-axis) minmax(0, 1fr);
  gap: 0 14px;
  padding-bottom: 14px;
}

@media (min-width: 900px) {
  .page-news .news-day {
    gap: 0 22px;
    padding-bottom: 18px;
  }
}

.page-news .news-day__axis {
  position: relative;
  padding: 15px 14px 0 0;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.page-news .news-day.is-today .news-day__axis {
  color: var(--yellow);
}

.page-news .news-day__dot {
  position: absolute;
  top: 18px;
  right: -5px;
  width: 10px;
  height: 10px;
  background: var(--yellow);
}

.page-news .news-day--new .news-day__dot {
  background: var(--magenta);
}

.page-news .news-day--merge .news-day__dot {
  background: var(--blue);
}

.page-news .news-day--event .news-day__dot {
  background: var(--yellow);
}

.page-news .news-day__card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  padding: 14px 16px 16px;
  transition:
    transform var(--speed) ease,
    border-color var(--speed) ease;
}

.page-news .news-day--new .news-day__card {
  border-left-color: var(--magenta);
}

.page-news .news-day--merge .news-day__card {
  border-left-color: var(--blue);
}

.page-news .news-day--event .news-day__card {
  border-left-color: var(--yellow);
}

.page-news .news-day__card:hover {
  transform: translateX(3px);
  border-top-color: var(--line-strong);
  border-right-color: var(--line-strong);
  border-bottom-color: var(--line-strong);
}

.page-news .news-day.is-today .news-day__card {
  background: #20242d;
}

.page-news .news-day__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 9px;
}

.page-news .news-day__ver {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--link);
}

.page-news .news-day__title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--paper);
}

.page-news .news-day__desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
}

/* ---------- 笔记列表 ---------- */

.page-news .news-notes__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 24px;
}

.page-news .news-chip {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.page-news .news-chip.is-on {
  border-color: var(--yellow);
  color: var(--yellow);
  background: var(--news-soft-yellow);
}

.page-news .news-notes__featured {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-bottom: 26px;
}

@media (min-width: 820px) {
  .page-news .news-notes__featured {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.page-news .news-feature {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  transition:
    transform var(--speed) ease,
    border-color var(--speed) ease;
}

.page-news .news-feature:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
}

.page-news .news-feature__media {
  border-bottom: 1px solid var(--line);
}

.page-news .news-feature__body {
  padding: 16px 18px 20px;
}

.page-news .news-feature__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.page-news .news-feature__time {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.page-news .news-feature h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--paper);
}

.page-news .news-feature p {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
}

.page-news .news-notes__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line);
}

@media (min-width: 820px) {
  .page-news .news-notes__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 32px;
  }
}

.page-news .news-note {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.page-news .news-note__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.page-news .news-note__time {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.page-news .news-note__title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--paper);
}

.page-news .news-note__desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
}

/* ---------- 版本摘要 ---------- */

.page-news .news-versions__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 780px) {
  .page-news .news-versions__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.page-news .news-version {
  padding: 20px;
  background: var(--deep);
  border: 1px solid var(--line);
  border-top: 3px solid var(--line-strong);
}

.page-news .news-version--stable {
  border-top-color: var(--yellow);
}

.page-news .news-version--beta {
  border-top-color: var(--magenta);
}

.page-news .news-version--classic {
  border-top-color: var(--blue);
}

.page-news .news-version__id {
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(20px, 2.8vw, 27px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.page-news .news-version--stable .news-version__id {
  color: var(--yellow);
}

.page-news .news-version--beta .news-version__id {
  color: var(--magenta);
}

.page-news .news-version--classic .news-version__id {
  color: var(--blue);
}

.page-news .news-version__meta {
  margin: 8px 0 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.page-news .news-version p:last-child {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: rgba(245, 241, 230, 0.82);
}

.page-news .news-versions__foot {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 68ch;
}

.page-news .news-link {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid rgba(124, 196, 255, 0.35);
  padding-bottom: 1px;
}

.page-news .news-link:hover {
  border-bottom-color: var(--link);
}

/* ---------- 周一动线 ---------- */

.page-news .news-monday__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 900px) {
  .page-news .news-monday__grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 44px;
    align-items: start;
  }
}

.page-news .news-monday .section__title {
  margin-top: 10px;
}

.page-news .news-steps {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
}

.page-news .news-steps li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 0 14px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.page-news .news-steps li:last-child {
  border-bottom: 1px solid var(--line);
}

.page-news .news-steps__num {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--yellow);
}

.page-news .news-steps h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  color: var(--paper);
}

.page-news .news-steps p {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
}

.page-news .news-monday__aside {
  padding: 22px;
  border-top: 3px solid var(--blue);
}

.page-news .news-monday__aside-title {
  margin: 10px 0 12px;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--paper);
}

.page-news .news-monday__aside-text {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.78;
  color: rgba(245, 241, 230, 0.78);
}

.page-news .news-monday__aside .btn {
  margin-top: 6px;
}

/* ---------- 问答 ---------- */

.page-news .news-faq__list {
  border-top: 1px solid var(--line);
  max-width: 78ch;
}

.page-news .news-faq__item {
  border-bottom: 1px solid var(--line);
}

.page-news .news-faq__item summary {
  position: relative;
  cursor: pointer;
  list-style: none;
  padding: 18px 34px 18px 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--paper);
  transition: color var(--speed) ease;
}

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

.page-news .news-faq__item summary::after {
  content: "+";
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--yellow);
}

.page-news .news-faq__item[open] summary::after {
  content: "−";
}

.page-news .news-faq__item summary:hover {
  color: var(--yellow-soft);
}

.page-news .news-faq__item p {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.85;
  color: var(--muted);
}

/* ---------- 焦点与窄屏 ---------- */

.page-news a:focus-visible,
.page-news summary:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

@media (max-width: 480px) {
  .page-news .news-hero__title {
    max-width: none;
  }

  .page-news .news-switch__hint {
    margin-left: 0;
    flex-basis: 100%;
  }

  .page-news .news-day {
    gap: 0 10px;
  }

  .page-news .news-day__axis {
    padding-right: 10px;
    font-size: 11px;
  }

  .page-news .news-day__card {
    padding: 12px 13px 14px;
  }

  .page-news .news-day__title {
    font-size: 16px;
  }

  .page-news .news-steps li {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 0 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-news .news-day__card,
  .page-news .news-feature {
    transition: none;
  }

  .page-news .news-day__card:hover,
  .page-news .news-feature:hover {
    transform: none;
  }
}
