/* 制作组消息页：时间脊。日期固定在左侧，一条脊线随滚动被金色填满，节点逐个点亮。 */
:root {
  --nt-ease: cubic-bezier(.16, 1, .3, 1);
  --nt-head: 64px;
}
.nt-page { min-height: 100vh; background: var(--bg); }

/* ---------- 阅读进度 + 页头 ---------- */
.nt-progress { position: fixed; inset: 0 0 auto; z-index: 30; height: 2px; pointer-events: none; }
.nt-progress > span {
  display: block; height: 100%; transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(90deg, color-mix(in oklch, var(--gold) 26%, transparent), var(--gold));
  box-shadow: 0 0 12px color-mix(in oklch, var(--gold) 52%, transparent);
  transition: transform .14s linear;
}
.nt-top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 24px;
  min-height: var(--nt-head); padding: 12px var(--gutter);
  border-bottom: 1px solid var(--line-soft);
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  transition: box-shadow .35s var(--nt-ease);
}
.nt-top.is-scrolled { box-shadow: 0 10px 30px oklch(0 0 0 / .22); }
.nt-back, .nt-join { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; text-decoration: none; }
.nt-back { gap: 6px; color: var(--muted); transition: color .3s var(--nt-ease); }
.nt-back:hover { color: var(--text); }
.nt-back-arrow { display: inline-block; transition: transform .45s var(--nt-ease); }
.nt-back:hover .nt-back-arrow { transform: translateX(-4px); }
.nt-join {
  padding: 7px 18px; border: 1px solid var(--gold-soft); border-radius: 999px; color: var(--gold); font-weight: 700;
  transition: background-color .3s var(--nt-ease), color .3s var(--nt-ease), border-color .3s var(--nt-ease), transform .45s var(--nt-ease), box-shadow .45s var(--nt-ease);
}
.nt-join:hover { background: var(--gold); color: var(--bg); border-color: var(--gold); transform: translateY(-1px); box-shadow: 0 8px 22px color-mix(in oklch, var(--gold) 24%, transparent); }

/* ---------- 版面 ---------- */
.nt-main { width: min(100%, 1000px); margin-inline: auto; padding: clamp(48px, 9vw, 104px) var(--gutter) clamp(88px, 13vw, 152px); }
.nt-hero { margin-bottom: clamp(40px, 6vw, 72px); }
.nt-hero h1 { margin: 0 0 18px; font-size: clamp(36px, 6vw, 64px); font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.nt-hero-line { display: block; overflow: hidden; padding-block: .05em .1em; margin-block: -.05em -.1em; }
.nt-hero-word { display: block; }
.nt-lede { max-width: 58ch; margin: 0; color: var(--muted); font-size: clamp(15px, 1.4vw, 17px); line-height: 1.9; }
.nt-updated { margin: 18px 0 0; color: var(--faint); font-size: 13px; letter-spacing: .02em; animation: nt-fade-up .9s var(--nt-ease) both; }

.nt-stage {
  --nt-col: clamp(92px, 13vw, 150px);
  --nt-gap: clamp(32px, 5vw, 68px);
  --nt-x: calc(var(--nt-col) + var(--nt-gap) / 2);
  --nt-pad: clamp(36px, 6vw, 64px);
  position: relative;
}
/* 脊线：底线先随页面长出来，金色填充再跟着滚动推进。 */
.nt-spine {
  position: absolute; left: var(--nt-x); top: 0; bottom: 0; width: 1px; background: var(--line-soft);
  transform-origin: 50% 0;
}
.nt-spine > span {
  display: block; height: 100%; transform: scaleY(0); transform-origin: 50% 0;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  box-shadow: 0 0 10px color-mix(in oklch, var(--gold) 50%, transparent);
  transition: transform .18s linear;
}
.nt-stage:not(.has-items) .nt-spine { visibility: hidden; }

.nt-feed { position: relative; }
.nt-item {
  position: relative;
  display: grid; grid-template-columns: var(--nt-col) minmax(0, 1fr); column-gap: var(--nt-gap);
  padding: var(--nt-pad) 0;
  scroll-margin-top: calc(var(--nt-head) + 12px);
}
/* 节点：未到是空心，读过是实心浅金，正在读的是亮金并扩出一圈。 */
.nt-item::before {
  content: ''; position: absolute; z-index: 1;
  left: calc(var(--nt-x) - 5.5px); top: calc(var(--nt-pad) + 13px); width: 11px; height: 11px;
  border-radius: 50%; background: var(--bg); border: 1px solid var(--line);
  transition: background-color .5s var(--nt-ease), border-color .5s var(--nt-ease), transform .7s var(--nt-ease);
}
.nt-item.is-past::before { background: var(--gold-soft); border-color: var(--gold-soft); }
.nt-item.is-current::before { background: var(--gold); border-color: var(--gold); transform: scale(1.18); animation: nt-ping 1.6s var(--nt-ease) 1; }
@keyframes nt-ping {
  0% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--gold) 55%, transparent); }
  100% { box-shadow: 0 0 0 14px transparent; }
}

.nt-when { position: sticky; top: calc(var(--nt-head) + 28px); align-self: start; text-align: right; }
.nt-date { display: block; }
.nt-day {
  display: block; font-size: clamp(40px, 5.2vw, 64px); font-weight: 700; line-height: 1; letter-spacing: -.03em;
  color: var(--muted); font-variant-numeric: tabular-nums; transition: color .5s var(--nt-ease);
}
.nt-item.is-current .nt-day { color: var(--gold); }
.nt-digit { display: inline-block; overflow: hidden; padding-block: .08em .1em; margin-block: -.08em -.1em; vertical-align: top; }
.nt-digit i { display: block; font-style: normal; }
.nt-month { display: block; margin-top: 10px; color: var(--gold-soft); font-size: 12px; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.nt-month .news-fresh { margin-left: 6px; }
/* 时分：比年月再浅一档，跟着月份一起进场。 */
.nt-hour { display: block; margin-top: 6px; color: var(--faint); font-size: 12px; letter-spacing: .08em; font-variant-numeric: tabular-nums; }

.nt-content { min-width: 0; }
.nt-title {
  margin: 0 0 22px; padding-bottom: 8px;
  font-size: clamp(24px, 3.2vw, 36px); font-weight: 700; line-height: 1.32; letter-spacing: -.015em; text-wrap: balance; overflow-wrap: anywhere;
  background-image: linear-gradient(var(--gold), var(--gold)); background-repeat: no-repeat;
  background-size: 0 2px; background-position: 0 100%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.nt-item.is-target .nt-title { animation: nt-target 2.2s var(--nt-ease) .15s both; }
@keyframes nt-target {
  0% { background-size: 0 2px; background-position: 0 100%; }
  38% { background-size: 100% 2px; background-position: 0 100%; }
  72% { background-size: 100% 2px; background-position: 100% 100%; }
  100% { background-size: 0 2px; background-position: 100% 100%; }
}

.nt-body { color: var(--muted); font-size: 16px; font-weight: 400; line-height: 1.95; overflow-wrap: anywhere; }
.nt-body > *:first-child { margin-top: 0; }
.nt-body > *:last-child { margin-bottom: 0; }
.nt-body p { margin: 0 0 18px; max-width: 64ch; }
.nt-body h2, .nt-body h3, .nt-body h4, .nt-body h5, .nt-body h6 { margin: 32px 0 12px; color: var(--text); font-weight: 700; line-height: 1.4; letter-spacing: 0; }
.nt-body h2 { font-size: 21px; }
.nt-body h3 { font-size: 18px; }
.nt-body h4, .nt-body h5, .nt-body h6 { font-size: 16px; }
.nt-body ul, .nt-body ol { margin: 0 0 18px; padding-left: 1.4em; max-width: 64ch; }
.nt-body li { margin-bottom: 6px; }
.nt-body blockquote { margin: 0 0 18px; padding: 2px 0 2px 18px; border-left: 1px solid var(--line); color: var(--faint); }
.nt-body blockquote > *:last-child { margin-bottom: 0; }
.nt-body hr { margin: 28px 0; border: 0; border-top: 1px solid var(--line-soft); }
.nt-body strong { color: var(--text); font-weight: 700; }
.nt-body a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.nt-body code { padding: 2px 6px; border: 1px solid var(--line-soft); border-radius: 4px; background: var(--surface); color: var(--text); font-size: .92em; }
.nt-body img {
  display: block; width: 100%; height: auto; margin: 24px 0; border: 1px solid var(--line-soft); border-radius: 6px;
  transition: opacity .7s var(--nt-ease), transform .9s var(--nt-ease);
}
.nt-body img.is-loading { opacity: 0; transform: scale(.995); }

.nt-feed .news-empty { margin: 0 0 0 calc(var(--nt-col) + var(--nt-gap)); padding: 32px 0; }
.nt-stage.is-empty .nt-spine { display: none; }

/* ---------- 回到顶部 ---------- */
.nt-up {
  position: fixed; right: clamp(16px, 4vw, 36px); bottom: clamp(16px, 4vw, 36px); z-index: 25;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: color-mix(in oklch, var(--surface) 84%, transparent);
  color: var(--gold); font-size: 16px; backdrop-filter: blur(10px);
  opacity: 0; transform: translateY(14px) scale(.9); pointer-events: none;
  transition: opacity .4s var(--nt-ease), transform .55s var(--nt-ease), background-color .3s var(--nt-ease), color .3s var(--nt-ease), border-color .3s var(--nt-ease);
}
.nt-up.is-visible, .nt-up:focus-visible { opacity: 1; transform: none; pointer-events: auto; }
.nt-up:hover { background: var(--gold); border-color: var(--gold); color: var(--bg); }

/* ---------- 入场编排 ---------- */
/* 初值只在 html 带 anim 时才藏起来，并且每处都有一个 3 秒后无条件放行的兜底动画。 */
@keyframes nt-unhide { to { opacity: 1; transform: none; clip-path: none; } }
@keyframes nt-rise { from { clip-path: inset(-6% 0 108% 0); transform: translateY(6px); } to { clip-path: inset(-6% 0 -8% 0); transform: none; } }
@keyframes nt-fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes nt-bar-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes nt-word-in { to { transform: translateY(0); } }
@keyframes nt-digit-in { from { transform: translateY(108%); } to { transform: none; } }
@keyframes nt-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes nt-spine-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

html.anim .nt-top { opacity: 0; transform: translateY(-8px); animation: nt-unhide 0s 3s forwards; }
html.anim .nt-lede { opacity: 0; animation: nt-unhide 0s 3s forwards; }
html.anim .nt-hero-word { transform: translateY(112%); animation: nt-unhide 0s 3s forwards; }
html.anim .nt-item:not(.nt-in) .nt-title { clip-path: inset(-6% 0 108% 0); transform: translateY(6px); animation: nt-unhide 0s 3s forwards; }
html.anim .nt-item:not(.nt-in) .nt-body > * { opacity: 0; transform: translateY(14px); animation: nt-unhide 0s 3s forwards; }
html.anim .nt-item:not(.nt-in) .nt-digit i { transform: translateY(108%); animation: nt-unhide 0s 3s forwards; }
html.anim .nt-item:not(.nt-in) .nt-month, html.anim .nt-item:not(.nt-in) .nt-hour { opacity: 0; animation: nt-unhide 0s 3s forwards; }
html.anim .nt-item:not(.nt-in) .nt-body img { clip-path: inset(0 100% 0 0); animation: nt-unhide 0s 3s forwards; }

html.page-ready .nt-top { animation: nt-bar-in .75s var(--nt-ease) .02s both; }
html.page-ready .nt-hero-word { animation: nt-word-in 1.05s var(--nt-ease) .06s forwards; }
html.page-ready .nt-lede { animation: nt-fade-up .95s var(--nt-ease) .2s both; }
html.page-ready .nt-spine { animation: nt-spine-grow 1.4s var(--nt-ease) .3s both; }

.nt-item.nt-in .nt-title { animation: nt-rise 1s var(--nt-ease) calc(var(--i, 0) * 80ms + 60ms) both; }
.nt-item.nt-in .nt-digit i { animation: nt-digit-in .9s var(--nt-ease) calc(var(--i, 0) * 80ms + var(--d, 0) * 70ms) both; }
.nt-item.nt-in .nt-month, .nt-item.nt-in .nt-hour { animation: nt-fade-up .9s var(--nt-ease) calc(var(--i, 0) * 80ms + 220ms) both; }
.nt-item.nt-in .nt-body > * { animation: nt-fade-up 1s var(--nt-ease) calc(var(--i, 0) * 80ms + 160ms + var(--p, 0) * 80ms) both; }
.nt-item.nt-in .nt-body img { animation: nt-wipe 1.2s var(--nt-ease) calc(var(--i, 0) * 80ms + 320ms) both; }
.nt-item.is-target.nt-in .nt-title { animation: nt-rise 1s var(--nt-ease) both, nt-target 2.2s var(--nt-ease) .15s both; }
.nt-body > :nth-child(2) { --p: 1; }
.nt-body > :nth-child(3) { --p: 2; }
.nt-body > :nth-child(4) { --p: 3; }
.nt-body > :nth-child(5) { --p: 4; }
.nt-body > :nth-child(n+6) { --p: 5; }

/* ---------- 窄屏：脊线靠到左边，日期移到标题上方 ---------- */
@media (max-width: 680px) {
  .nt-stage { --nt-col: 0px; --nt-gap: 0px; --nt-x: 5px; }
  .nt-top { gap: 16px; }
  .nt-back-arrow { display: none; }
  .nt-item { grid-template-columns: minmax(0, 1fr); padding-left: 30px; }
  .nt-item::before { left: calc(var(--nt-x) - 5.5px); top: calc(var(--nt-pad) + 12px); }
  .nt-when { position: static; display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; text-align: left; }
  .nt-date { display: flex; align-items: baseline; gap: 10px; }
  .nt-day { font-size: 40px; }
  .nt-month, .nt-hour { margin-top: 0; }
  .nt-body { font-size: 15.5px; }
  .nt-feed .news-empty { margin-left: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html.anim .nt-top, html.anim .nt-lede, html.anim .nt-item:not(.nt-in) .nt-month,
  html.anim .nt-item:not(.nt-in) .nt-hour,
  html.anim .nt-item:not(.nt-in) .nt-body > * { opacity: 1; transform: none; }
  html.anim .nt-hero-word, html.anim .nt-item:not(.nt-in) .nt-title,
  html.anim .nt-item:not(.nt-in) .nt-digit i { transform: none; clip-path: none; }
  html.anim .nt-item:not(.nt-in) .nt-body img { clip-path: none; }
  .nt-progress > span, .nt-spine > span { transition: none; }
}
