/* ==========================================================================
   obs-pages.css · 深空观测站 —— 子页面访客样式（第 4 份 CSS）
   --------------------------------------------------------------------------
   管辖范围（访客态页面级样式，五个子页面）：
     1. /transmissions/  信号档案库（archive-*）
     2. /pages/          档案正文页（custom-page-* 访客态；编辑台归 developer-layout.css）
     3. /lab/            仪器操作台（lab-* / astralyn-*，主题锁定深色）
     4. /changelog/      版本轨迹时间线（changelog-*）
     5. /404.html        信号丢失页（lost-signal-*，主题锁定深色）
   依赖：styles.css 的 :root 设计令牌（--bg/--ink/--signal/--font-* 等），
   本文件只消费 var()，绝不重新定义令牌；obs-* 体验层样式由 styles.css 提供。
   不含任何 .ude-* / developer-mode / dialog 外壳规则（各有归属）。
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. 子页面公共底座：切角变量 + 隐藏守卫
   -------------------------------------------------------------------------- */
html { background: var(--bg); }

.archive-body,
.custom-page-body,
.lab-body,
.changelog-body,
.lost-signal-page {
  --obs-notch: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  --obs-notch-sm: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.archive-empty[hidden],
.custom-page-main[hidden],
.custom-page-empty[hidden] { display: none !important; }

/* Editor assets load only after an authenticated developer session. Keep their
   public markup inert when the visitor stylesheet is the only layer present. */
.custom-page-editor,
.custom-page-settings,
.page-block-controls,
.page-preview-exit { display: none; }

/* ==========================================================================
   1. ARCHIVE · 信号档案库  /transmissions/
   ========================================================================== */
.archive-body { min-height: 100vh; }

.archive-page {
  position: relative;
  width: min(1260px, 100%);
  min-height: 75vh;
  margin: 0 auto;
  padding: calc(var(--header-h) + 104px) 40px 150px;
}

/* ---- 档案库门楣：大字 + 巨型计数 -------------------------------------- */
.archive-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0 clamp(24px, 5vw, 64px);
  padding-bottom: 54px;
  border-bottom: 1px solid var(--line);
}
.archive-hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  width: 88px;
  height: 1px;
  background: var(--signal);
  box-shadow: 0 0 18px var(--signal-soft);
  pointer-events: none;
}
.archive-hero .eyebrow { grid-column: 1 / -1; }
.archive-hero h1 {
  position: relative;
  /* 同上：压在 z-index:0 的巨型序号之上。 */
  z-index: 1;
  margin: 0;
  font-family: var(--font-title);
  font-size: clamp(46px, 7vw, 92px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: .01em;
}
.archive-hero > div > p {
  max-width: 460px;
  margin: 20px 0 0;
  color: var(--ink-dim);
  font-size: 13px;
  line-height: 1.9;
}
/* #archiveCount —— 空心描边巨型读数 */
.archive-hero > strong {
  position: relative;
  color: var(--signal-text);
  font-family: var(--font-display);
  font-size: clamp(58px, 8vw, 108px);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: .82;
}
@supports (-webkit-text-stroke: 1px black) {
  .archive-hero > strong {
    color: transparent;
    -webkit-text-stroke: 1.5px var(--signal-text);
  }
}
.archive-hero > strong::before {
  content: "LOGGED / 已归档";
  position: absolute;
  top: -20px;
  right: 2px;
  color: var(--ink-faint);
  -webkit-text-stroke: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 400;
  letter-spacing: .22em;
  white-space: nowrap;
}

/* ---- 控制排：分类筛选 + 检索 ------------------------------------------ */
.archive-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 30px 0 56px;
}
.archive-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px;
  margin: -4px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.archive-filters .filter-chip {
  flex: 0 0 auto;
  white-space: nowrap;
}

.archive-search {
  position: relative;
  width: min(330px, 42vw);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color .3s var(--ease-out);
}
.archive-search::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s var(--ease-out);
}
.archive-search:focus-within::after { transform: scaleX(1); }
.archive-search span {
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .2em;
  text-transform: uppercase;
}
.archive-search input {
  width: 100%;
  min-width: 0;
  height: 42px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  caret-color: var(--signal-text);
}
.archive-search input::placeholder { color: var(--ink-faint); }

/* ---- 分类简介面板（JS 注入 --journal-accent）--------------------------- */
.archive-category-intro {
  --journal-accent: var(--accent);
  position: relative;
  display: grid;
  grid-template-columns: minmax(130px, .42fr) minmax(0, 1.3fr) auto;
  align-items: center;
  gap: clamp(20px, 4vw, 54px);
  min-height: 128px;
  margin: 0 0 56px;
  padding: 24px 28px;
  background: linear-gradient(110deg, color-mix(in srgb, var(--journal-accent) 8%, transparent), transparent 62%);
  border-top: 1px solid var(--journal-accent);
  border-bottom: 1px solid var(--line);
  clip-path: var(--obs-notch);
  overflow: hidden;
}
.archive-category-intro:empty { display: none; }
.archive-category-intro::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 54px;
  height: 1px;
  background: var(--journal-accent);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--journal-accent) 28%, transparent);
  pointer-events: none;
}
.archive-category-intro[data-category='all'] { --journal-accent: var(--accent); }
.archive-category-intro small {
  display: block;
  color: var(--journal-accent);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .2em;
  text-transform: uppercase;
}
.archive-category-intro strong {
  display: block;
  margin-top: 8px;
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 600;
  line-height: 1.2;
}
.archive-category-intro p {
  min-width: 0;
  max-width: 620px;
  margin: 0;
  color: var(--ink-dim);
  font-size: 12px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.archive-category-intro dl {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 6px 18px;
  min-width: 118px;
  margin: 0;
}
.archive-category-intro dt {
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .14em;
}
.archive-category-intro dd {
  margin: 0;
  color: var(--journal-accent);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  text-align: right;
}

/* ---- 档案网格：全量列表的双列节奏 -------------------------------------- */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(48px, 6vw, 80px) clamp(30px, 4vw, 64px);
  align-items: start;
}

/* ---- 归档票据卡：在 .post-card 基线上的紧凑变体 ------------------------ */
.archive-card { position: relative; margin: 0; padding: 20px 0 26px; }
.archive-card:nth-child(even) { margin-top: 0; }
/* 顶缘：分类色刻线，悬停时横扫整条票据 */
.archive-card::before {
  content: "";
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  width: 56px;
  height: 2px;
  background: var(--post-accent, var(--accent));
  transition: width .55s var(--ease-out);
  pointer-events: none;
}
.archive-card:hover::before,
.archive-card:focus-within::before { width: 100%; }
/* 底缘：票据打孔虚线 */
.archive-card::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  border-bottom: 1px dashed var(--line-strong);
  pointer-events: none;
}
.archive-card .post-meta {
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.archive-card h2 {
  margin: 14px 0 10px;
  font-family: var(--font-title);
  font-size: clamp(20px, 1.9vw, 26px);
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
  transition: color .3s var(--ease-out);
}
.archive-card:hover h2 { color: var(--signal-text); }
.archive-card > p {
  margin: 0 0 20px;
  color: var(--ink-dim);
  font-size: 12.5px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
.archive-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.archive-card-tags span {
  padding: 3px 8px;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  clip-path: var(--obs-notch-sm);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .08em;
}

.archive-empty {
  min-height: 380px;
  display: grid;
  place-content: center;
}

/* ---- 档案库页脚 -------------------------------------------------------- */
.archive-footer {
  width: min(1260px, 100%);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 34px;
  padding: 36px 40px 46px;
  border-top: 1px solid var(--line);
}
.archive-footer > p {
  margin: 0;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-style: normal;
  letter-spacing: .22em;
}
.archive-footer-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .14em;
}
.archive-footer-links a { transition: color .3s var(--ease-out); }
.archive-footer-links a:hover { color: var(--signal-text); }

/* ==========================================================================
   2. CUSTOM PAGE · 档案正文页  /pages/
   ========================================================================== */
.custom-page-header {
  position: sticky;
  /* sticky 元素只需 top 让出 HUD 高度；再加 margin-top 会把偏移算两次。 */
  top: var(--chrome-top, 0px);
  transition: top .55s var(--ease-swift);
  z-index: var(--z-header);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 28px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.custom-page-header nav {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.custom-page-header a {
  flex: 0 0 auto;
  padding: 4px 0;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .18em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  transition: color .3s var(--ease-out), border-color .3s var(--ease-out);
}
html.obs-scrolled .custom-page-header { top: 0; }
.custom-page-header nav a:hover { color: var(--signal-text); }
.custom-page-header nav a.is-active {
  color: var(--signal-text);
  border-bottom-color: var(--signal-text);
}
.custom-page-callsign {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 12px;
  font: 500 var(--fs-micro)/1 var(--font-mono);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  clip-path: var(--notch);
  white-space: nowrap;
}
.custom-page-callsign .icon { width: 12px; height: 12px; color: var(--signal-text); }
.custom-page-callsign b { color: var(--signal-text); font-weight: 500; margin-right: 2px; }

.custom-page-main { min-height: calc(100vh - var(--header-h)); }

/* ---- 封面首屏（高度 / 遮罩由 JS 内联覆盖，这里给等值默认）-------------- */
.custom-page-hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: end;
  padding: 110px clamp(24px, 8vw, 120px) 72px;
  overflow: hidden;
  color: #fff;
}
.custom-page-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.custom-page-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(5, 6, 10, .7), rgba(5, 6, 10, .154));
}
/* 观测取景框四角刻线 */
.custom-page-hero::after {
  content: "";
  position: absolute;
  inset: 18px;
  z-index: 2;
  pointer-events: none;
  opacity: .55;
  background:
    linear-gradient(rgba(238, 241, 230, .8), rgba(238, 241, 230, .8)) left 0 top 0 / 16px 1px,
    linear-gradient(rgba(238, 241, 230, .8), rgba(238, 241, 230, .8)) left 0 top 0 / 1px 16px,
    linear-gradient(rgba(238, 241, 230, .8), rgba(238, 241, 230, .8)) right 0 top 0 / 16px 1px,
    linear-gradient(rgba(238, 241, 230, .8), rgba(238, 241, 230, .8)) right 0 top 0 / 1px 16px,
    linear-gradient(rgba(238, 241, 230, .8), rgba(238, 241, 230, .8)) left 0 bottom 0 / 16px 1px,
    linear-gradient(rgba(238, 241, 230, .8), rgba(238, 241, 230, .8)) left 0 bottom 0 / 1px 16px,
    linear-gradient(rgba(238, 241, 230, .8), rgba(238, 241, 230, .8)) right 0 bottom 0 / 16px 1px,
    linear-gradient(rgba(238, 241, 230, .8), rgba(238, 241, 230, .8)) right 0 bottom 0 / 1px 16px;
  background-repeat: no-repeat;
}
.custom-page-hero-copy { position: relative; z-index: 1; max-width: 940px; }
.custom-page-kicker {
  margin: 0;
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .24em;
  text-transform: uppercase;
}
.custom-page-hero h1 {
  margin: 10px 0 18px;
  font-family: var(--font-title);
  font-size: clamp(42px, 6.5vw, 88px);
  font-weight: 600;
  line-height: 1.08;
  text-wrap: pretty;
}
.custom-page-intro {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, .76);
  font-size: 14px;
  line-height: 1.9;
}

/* ---- 正文：--page-width 控宽的档案纸面 --------------------------------- */
.custom-page-article {
  width: min(var(--page-width, 860px), calc(100% - 48px));
  min-height: 360px;
  margin: 0 auto;
  padding: 84px 0 130px;
  color: var(--ink);
  font-size: 15px;
  line-height: 2;
}
.custom-page-article h2 {
  margin: 58px 0 20px;
  font-family: var(--font-serif);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 600;
  line-height: 1.3;
}
.custom-page-article h2::before {
  content: "";
  display: block;
  width: 44px;
  height: 1px;
  margin-bottom: 16px;
  background: linear-gradient(90deg, var(--signal), transparent);
}
.custom-page-article h3 {
  margin: 42px 0 14px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
}
.custom-page-article img {
  max-width: 100%;
  height: auto;
  margin: 34px 0;
  border-radius: var(--radius);
}
.custom-page-article figure { margin: 38px 0; }
.custom-page-article figure img { display: block; width: 100%; margin: 0; }
.custom-page-article figure[data-media-width='full'] { width: 100%; }
.custom-page-article figure[data-media-width='wide'] {
  width: min(1120px, calc(100vw - 48px));
  margin-left: 50%;
  transform: translateX(-50%);
}
.custom-page-article figure[data-media-width='half'] { width: 50%; }
.custom-page-article figcaption {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--line-strong);
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .08em;
}
.custom-page-article blockquote {
  margin: 38px 0;
  padding-left: 24px;
  border-left: 2px solid var(--signal-text);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 21px;
  line-height: 1.9;
}
.custom-page-article details {
  margin: 26px 0;
  padding: 16px 20px;
  border: 1px solid var(--line);
  clip-path: var(--obs-notch);
  transition: border-color .3s var(--ease-out);
}
.custom-page-article details[open] { border-color: var(--line-strong); }
.custom-page-article summary {
  cursor: pointer;
  color: var(--ink);
  list-style: none;
  font-size: 14px;
}
.custom-page-article summary::-webkit-details-marker { display: none; }
.custom-page-article summary::before {
  content: "+";
  display: inline-block;
  margin-right: 10px;
  color: var(--signal-text);
  font-family: var(--font-mono);
}
.custom-page-article details[open] summary::before { content: "−"; }
.custom-page-article a {
  color: var(--ice);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--ice) 40%, transparent);
  transition: border-color .3s var(--ease-out);
}
.custom-page-article a:hover { border-bottom-color: var(--ice); }
.custom-page-article pre {
  margin: 32px 0;
  padding: 22px;
  overflow-x: auto;
  color: var(--ink);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 2px solid var(--signal-text);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.8;
}
.custom-page-article hr {
  margin: 58px 0;
  border: 0;
  border-top: 1px dashed var(--line-strong);
}
.custom-page-article ul,
.custom-page-article ol { padding-left: 1.5em; }

/* ---- 页面未找到 -------------------------------------------------------- */
.custom-page-empty {
  min-height: 70vh;
  display: grid;
  place-items: center;
  padding: 40px 24px;
  text-align: center;
}
.custom-page-empty h1 {
  margin: 0 0 12px;
  font-family: var(--font-title);
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 600;
}
.custom-page-empty p:not(.signal-code) {
  margin: 0 0 26px;
  color: var(--ink-dim);
  font-size: 13px;
}

/* ==========================================================================
   3. LAB · 仪器操作台  /lab/
   ========================================================================== */
.lab-body {
  min-height: 100vh;
  overflow-x: hidden;
  background: transparent !important;
}
.lab-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.lab-header .archive-back { justify-self: end; }
.lab-system-state {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .18em;
}
.lab-system-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px color-mix(in srgb, var(--amber) 65%, transparent);
  transition: background .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
body.lab-running .lab-system-state i {
  background: var(--signal);
  box-shadow: 0 0 12px var(--signal);
  animation: obsp-lamp 1.4s var(--ease-swift) infinite;
}
.lab-system-state b { color: var(--ink-dim); font-weight: 400; }
body.lab-running .lab-system-state b { color: var(--ink); }

.lab-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 0;
  padding-top: calc(var(--header-h) + 1px);
  background: transparent !important;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 1;
}
.lab-console,
.lab-readout,
.astralyn-console,
.astralyn-readout {
  background: transparent !important;
}
.lab-console {
  min-width: 0;
  padding: clamp(30px, 5vw, 68px);
  border-right: 1px solid var(--line);
}

.lab-console-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 26px;
}
.lab-console-head p,
.lab-readout small,
.lab-ledger > small {
  display: block;
  margin: 0 0 8px;
  color: var(--signal-text);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .22em;
  text-transform: uppercase;
}
.lab-console-head h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 600;
  line-height: 1.05;
}
.lab-console-head > span {
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .2em;
}
.lab-console-head > span::before { content: "[ "; }
.lab-console-head > span::after { content: " ]"; }
body.lab-running .lab-console-head > span {
  color: var(--signal-text);
  animation: obsp-blink 2.2s steps(2, start) infinite;
}

/* ---- 叉丝取景器 -------------------------------------------------------- */
.lab-viewport {
  position: relative;
  min-height: 420px;
  height: min(54vh, 620px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  transition: border-color .5s var(--ease-out), box-shadow .5s var(--ease-out);
}
body.lab-running .lab-viewport {
  border-color: color-mix(in srgb, var(--signal) 45%, transparent);
  box-shadow: 0 0 44px var(--signal-soft), inset 0 0 60px rgba(0, 0, 0, .4);
}
#signalCanvas { display: block; width: 100%; height: 100%; }
/* 取景器四角括号 */
.lab-viewport::before {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 2;
  pointer-events: none;
  opacity: .7;
  background:
    linear-gradient(var(--signal), var(--signal)) left 0 top 0 / 14px 1px,
    linear-gradient(var(--signal), var(--signal)) left 0 top 0 / 1px 14px,
    linear-gradient(var(--signal), var(--signal)) right 0 top 0 / 14px 1px,
    linear-gradient(var(--signal), var(--signal)) right 0 top 0 / 1px 14px,
    linear-gradient(var(--signal), var(--signal)) left 0 bottom 0 / 14px 1px,
    linear-gradient(var(--signal), var(--signal)) left 0 bottom 0 / 1px 14px,
    linear-gradient(var(--signal), var(--signal)) right 0 bottom 0 / 14px 1px,
    linear-gradient(var(--signal), var(--signal)) right 0 bottom 0 / 1px 14px;
  background-repeat: no-repeat;
}
/* 状态角标：待机 → REC */
.lab-viewport::after {
  content: "IDLE";
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 18px;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .22em;
  pointer-events: none;
}
body.lab-running .lab-viewport::after {
  content: "● REC";
  color: var(--alert);
  animation: obsp-blink 1.2s steps(2, start) infinite;
}
.lab-crosshair { position: absolute; inset: 0; pointer-events: none; }
.lab-crosshair::before,
.lab-crosshair::after { content: ""; position: absolute; pointer-events: none; }
.lab-crosshair::before {
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    color-mix(in srgb, var(--signal) 30%, transparent) 14%,
    color-mix(in srgb, var(--signal) 30%, transparent) 86%,
    transparent);
}
.lab-crosshair::after {
  top: 0;
  left: 50%;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg,
    transparent,
    color-mix(in srgb, var(--signal) 30%, transparent) 14%,
    color-mix(in srgb, var(--signal) 30%, transparent) 86%,
    transparent);
}
.lab-coordinates {
  position: absolute;
  z-index: 2;
  right: 16px;
  bottom: 13px;
  display: flex;
  gap: 16px;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .1em;
}

/* ---- 推子控制排 -------------------------------------------------------- */
.lab-control-deck {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  padding-top: 28px;
}
.lab-control-deck label {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 8px;
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .18em;
  text-transform: uppercase;
}
.lab-control-deck output {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.lab-control-deck input { grid-column: 1 / -1; }
.lab-control-deck input[type='range'],
.astralyn-deck input[type='range'] {
  min-height: 44px;
  touch-action: pan-x;
}

.lab-command-row {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  padding-top: 6px;
}
.lab-command-row button,
.astralyn-deck-actions button {
  position: relative;
  min-height: 44px;
  padding: 0 18px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-strong);
  clip-path: var(--obs-notch-sm);
  cursor: pointer;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .18em;
  text-transform: uppercase;
  transition: color .3s var(--ease-out), border-color .3s var(--ease-out), background .3s var(--ease-out);
}
.lab-command-row button::after,
.astralyn-deck-actions button::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: repeating-linear-gradient(0deg,
    transparent 0 3px,
    color-mix(in srgb, var(--signal) 8%, transparent) 3px 4px);
  transition: opacity .3s var(--ease-out);
}
.lab-command-row button:hover,
.astralyn-deck-actions button:hover {
  color: var(--signal-text);
  border-color: color-mix(in srgb, var(--signal) 55%, transparent);
}
.lab-command-row button:hover::after,
.astralyn-deck-actions button:hover::after { opacity: 1; }
.lab-command-row button:first-child,
.astralyn-deck-actions button:first-child {
  color: #131a05;
  background: var(--signal);
  border-color: var(--signal);
  font-weight: 500;
}
.lab-command-row button:first-child:hover,
.astralyn-deck-actions button:first-child:hover {
  color: #131a05;
  background: color-mix(in srgb, var(--signal) 88%, #fff);
}
.lab-command-row button:first-child::after,
.astralyn-deck-actions button:first-child::after {
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(19, 26, 5, .12) 3px 4px);
}
.lab-command-row button span { margin-left: 6px; }

/* ---- 接收读出侧栏 ------------------------------------------------------ */
.lab-readout { padding: clamp(48px, 7vh, 66px) 28px 90px; }
.lab-readout > div:first-child { padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.lab-readout > div:first-child strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: .02em;
}
body.lab-running .lab-readout > div:first-child strong { color: var(--signal-text); }
.lab-readout > p {
  min-height: 120px;
  margin: 25px 0;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.95;
}
.lab-readout dl { margin: 0; border-top: 1px solid var(--line); }
.lab-readout dl div {
  display: grid;
  grid-template-columns: 1fr auto;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line-strong);
}
.lab-readout dt {
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .18em;
}
.lab-readout dd {
  margin: 0;
  color: var(--ice);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-variant-numeric: tabular-nums;
}
.lab-ledger { margin-top: 40px; }
.lab-ledger ol {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: lab-log;
}
.lab-ledger li {
  counter-increment: lab-log;
  padding: 10px 0;
  color: var(--ink-dim);
  border-bottom: 1px dashed var(--line);
  font-size: 11px;
  line-height: 1.7;
}
.lab-ledger li::before {
  content: "0" counter(lab-log) " / ";
  color: var(--signal-text);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .08em;
}

/* ---- EXPERIMENT 002 · ASTRALYN 卡片舞台 -------------------------------- */
.astralyn-experiment {
  min-height: 100vh;
  padding: 110px clamp(24px, 6vw, 88px) 120px;
  color: var(--ink);
  background: var(--panel);
  border-top: 1px solid var(--line);
}
.astralyn-experiment-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 46px;
}
.astralyn-experiment-head p {
  margin: 0 0 8px;
  color: var(--signal-text);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .22em;
  text-transform: uppercase;
}
.astralyn-experiment-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(30px, 4vw, 50px);
  font-weight: 600;
  line-height: 1.1;
}
.astralyn-experiment-head nav {
  display: flex;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .16em;
}
.astralyn-experiment-head nav a {
  padding-bottom: 7px;
  color: var(--ink-dim);
  border-bottom: 1px solid transparent;
  transition: color .3s var(--ease-out), border-color .3s var(--ease-out);
}
.astralyn-experiment-head nav a:hover { color: var(--ink); }
.astralyn-experiment-head nav a.is-active {
  color: var(--signal-text);
  border-color: var(--signal-text);
}

.astralyn-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.astralyn-stage {
  min-width: 0;
  min-height: 620px;
  display: grid;
  place-items: center;
  padding: clamp(28px, 5vw, 56px);
  overflow: hidden;
  background:
    radial-gradient(60% 60% at 50% 42%, color-mix(in srgb, var(--signal) 4%, transparent), transparent 70%),
    var(--bg);
}

/* 观测卡片：448×279 桌面小组件的等比复刻（cqw 依赖 container-type） */
.astralyn-card {
  container-type: inline-size;
  position: relative;
  width: min(896px, 100%);
  aspect-ratio: 448 / 279;
  overflow: hidden;
  isolation: isolate;
  color: #181920;
  background: #e7eedf;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 2.902cqw;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .45);
  font-family: "Microsoft YaHei UI", "Noto Sans SC", sans-serif;
}
.astralyn-card > img {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
}
.astralyn-legibility { position: absolute; z-index: -2; pointer-events: none; }
.astralyn-legibility-left {
  inset: 0 auto 0 0;
  width: 50.446%;
  background: linear-gradient(90deg, rgba(238, 239, 234, .14), rgba(229, 228, 199, .08) 70%, transparent);
}
.astralyn-legibility-bottom {
  right: 0;
  bottom: 0;
  left: 0;
  height: 42.652%;
  background: linear-gradient(0deg, rgba(26, 23, 19, .23), rgba(49, 43, 34, .08) 54%, transparent);
}
.astralyn-card-header,
.astralyn-status,
.astralyn-token,
.astralyn-token-split,
.astralyn-runtime,
.astralyn-heat,
.astralyn-calls,
.astralyn-messages,
.astralyn-models,
.astralyn-slogan { position: absolute; z-index: 1; }
.astralyn-card-header { top: 2.902cqw; left: 3.795cqw; line-height: 1.2; }
.astralyn-card-header b { color: #48342b; font-size: 3.348cqw; font-weight: 600; }
.astralyn-status {
  top: 7.589cqw;
  left: 4.018cqw;
  display: flex;
  align-items: center;
  gap: 1.116cqw;
  color: #314339;
  font-size: 2.232cqw;
  line-height: 1;
}
.astralyn-status i {
  flex: 0 0 auto;
  width: 1.339cqw;
  height: 1.339cqw;
  border-radius: 50%;
  background: #3d8251;
  box-shadow: 0 0 1.1cqw rgba(61, 130, 81, .28);
}
.astralyn-token { top: 12.277cqw; left: 3.795cqw; display: flex; align-items: baseline; gap: 1.786cqw; line-height: 1; }
.astralyn-token strong { color: #48342b; font-size: 4.688cqw; font-weight: 700; }
.astralyn-token span { color: #314339; font-size: 2.455cqw; font-weight: 600; }
.astralyn-token-split { top: 19.42cqw; left: 3.795cqw; color: #314339; font-size: 2.232cqw; line-height: 1; }
.astralyn-runtime,
.astralyn-messages {
  display: flex;
  align-items: center;
  color: #d1dad2;
  background: rgba(16, 19, 24, .66);
  border-radius: 1.116cqw;
  backdrop-filter: blur(1.34cqw) saturate(.85);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .025);
  font-size: 2.232cqw;
  white-space: nowrap;
}
.astralyn-runtime { top: 18.75cqw; left: 62.277cqw; width: 33.929cqw; height: 5.357cqw; padding: 0 1.339cqw; }
.astralyn-slogan {
  top: 3.125cqw;
  right: 2.679cqw;
  width: 43.75cqw;
  height: 4.464cqw;
  overflow: hidden;
  color: #f3e8c6;
  background: linear-gradient(90deg, #d5bf96 0%, #f8f8f4 46%, #c6d4c2 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: "Segoe UI", "Microsoft YaHei UI", sans-serif;
  font-size: 3.125cqw;
  font-weight: 700;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
  -webkit-text-stroke: .16cqw rgba(60, 50, 37, .92);
  paint-order: stroke fill;
  text-shadow: 0 .28cqw .65cqw rgba(60, 50, 37, .32);
}

/* 热力图：信号绿五档（Token 偏柠檬，消息偏冷杉，均为浅 → 深）*/
.astralyn-heat {
  top: 24.777cqw;
  width: 43.75cqw;
  height: 12.5cqw;
  display: grid;
  grid-template-columns: repeat(10, 3.571cqw);
  grid-auto-rows: 3.571cqw;
  gap: .893cqw;
}
.astralyn-heat-token { left: 3.795cqw; }
.astralyn-heat-message { left: 52.455cqw; }
.astralyn-heat [data-tooltip] {
  display: block;
  width: 3.571cqw;
  height: 3.571cqw;
  padding: 0;
  border: 0;
  border-radius: 1.116cqw;
  cursor: crosshair;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04);
  transition: transform .12s var(--ease-out), filter .12s var(--ease-out);
}
.astralyn-heat [data-tooltip]:hover {
  z-index: 2;
  filter: brightness(1.1);
  outline: 0;
  transform: scale(1.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04), 0 0 .9cqw rgba(214, 255, 115, .55);
}
.astralyn-heat [data-inactive="true"] { opacity: .28; }
.astralyn-heat-token [data-level="0"] { background: rgba(214, 255, 115, .18); }
.astralyn-heat-token [data-level="1"] { background: rgba(193, 233, 96, .46); }
.astralyn-heat-token [data-level="2"] { background: rgba(160, 202, 68, .66); }
.astralyn-heat-token [data-level="3"] { background: rgba(118, 156, 42, .82); }
.astralyn-heat-token [data-level="4"] { background: rgba(85, 112, 28, .95); }
.astralyn-heat-message [data-level="0"] { background: rgba(208, 230, 178, .4); }
.astralyn-heat-message [data-level="1"] { background: rgba(160, 202, 124, .55); }
.astralyn-heat-message [data-level="2"] { background: rgba(108, 158, 88, .68); }
.astralyn-heat-message [data-level="3"] { background: rgba(64, 114, 62, .8); }
.astralyn-heat-message [data-level="4"] { background: rgba(30, 68, 44, .9); }

.astralyn-calls { top: 39.286cqw; left: 3.795cqw; color: #48342b; font-size: 2.232cqw; line-height: 1; }
.astralyn-messages {
  top: 38.393cqw;
  left: 76.116cqw;
  width: 20.089cqw;
  height: 5.357cqw;
  justify-content: flex-end;
  padding: 0 1.339cqw;
}
.astralyn-models {
  top: 44.643cqw;
  left: 3.795cqw;
  width: 92.411cqw;
  height: 16.071cqw;
  display: grid;
  grid-template-columns: repeat(2, 43.75cqw);
  grid-auto-rows: 4.464cqw;
  gap: .893cqw 4.911cqw;
}
.astralyn-model-row {
  min-width: 0;
  height: 4.464cqw;
  display: grid;
  grid-template-columns: 25cqw 18.75cqw;
  font-size: 2.232cqw;
  line-height: 1;
}
.astralyn-model-row:focus-visible {
  outline: 1px solid rgba(214, 255, 115, .7);
  outline-offset: 2px;
}
.astralyn-model-name,
.astralyn-model-value {
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 1.116cqw;
  backdrop-filter: blur(1.34cqw) saturate(.85);
}
.astralyn-model-name { padding: 0 1.339cqw; color: #48342b; background: rgba(239, 243, 233, .76); }
.astralyn-model-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.astralyn-model-value { color: #f8f8f4; background: rgba(16, 19, 24, .66); }
.astralyn-model-value em {
  position: absolute;
  top: .446cqw;
  right: 1.339cqw;
  z-index: 1;
  font-style: normal;
  font-weight: 600;
}
.astralyn-model-track {
  position: absolute;
  right: 1.339cqw;
  bottom: .446cqw;
  width: 16.071cqw;
  height: .67cqw;
  overflow: hidden;
  border-radius: .446cqw;
  background: rgba(178, 190, 174, .82);
}
.astralyn-model-track b {
  display: block;
  min-width: .67cqw;
  height: 100%;
  border-radius: inherit;
  background: #284434;
}

/* 提示浮签：left/top 百分比由 JS 写入 */
.astralyn-tooltip {
  position: absolute;
  z-index: 8;
  max-width: 48cqw;
  padding: 1.339cqw 1.786cqw;
  color: var(--ink);
  background: rgba(8, 11, 6, .92);
  border: 1px solid rgba(214, 255, 115, .28);
  border-radius: 2px;
  box-shadow: 0 1.8cqw 5cqw rgba(0, 0, 0, .38);
  font-family: var(--font-mono);
  font-size: 2.009cqw;
  line-height: 1.5;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 1.339cqw));
  white-space: nowrap;
}

/* ---- 参数甲板 ---------------------------------------------------------- */
.astralyn-deck {
  display: grid;
  align-content: start;
  gap: 28px;
  padding: 42px 28px;
  background: var(--panel-2);
}
.astralyn-deck > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.astralyn-deck small,
.astralyn-deck dt {
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.astralyn-deck strong {
  color: var(--signal-text);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: .12em;
}
.astralyn-deck label {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 10px;
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .14em;
}
.astralyn-deck output {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.astralyn-deck input { grid-column: 1 / -1; }
.astralyn-sample-browser output {
  grid-column: 1 / -1;
  min-height: 2.8em;
  padding-top: 4px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.astralyn-deck-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.astralyn-deck-actions button { min-height: 44px; padding: 0 10px; font-size: var(--fs-micro); }
.astralyn-deck dl { margin: 8px 0 0; border-top: 1px solid var(--line); }
.astralyn-deck dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line-strong);
}
.astralyn-deck dd {
  margin: 0;
  color: var(--ice);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
}

/* ==========================================================================
   4. CHANGELOG · 版本轨迹  /changelog/
   ========================================================================== */
.changelog-page {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: calc(var(--header-h) + 104px) 40px 140px;
}
.changelog-hero {
  position: relative;
  padding-bottom: 70px;
  border-bottom: 1px solid var(--line);
}
.changelog-hero h1 {
  position: relative;
  /* 巨型章节序号是 z-index:0 的描边装饰，标题必须确定压在它上面。 */
  z-index: 1;
  margin: 0;
  font-family: var(--font-title);
  font-size: clamp(48px, 8vw, 104px);
  font-weight: 600;
  line-height: 1;
}
.changelog-hero > p:not(.eyebrow) {
  max-width: 460px;
  margin: 24px 0 0;
  color: var(--ink-dim);
  font-size: 13px;
  line-height: 1.9;
}
/* 当前版本仪表小面板 */
.changelog-hero > div {
  position: absolute;
  right: 0;
  bottom: 68px;
  display: grid;
  justify-items: end;
  gap: 4px;
  padding: 16px 20px;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  border: 1px solid var(--line);
  clip-path: var(--obs-notch);
}
.changelog-hero > div span,
.changelog-hero > div small {
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .18em;
  text-transform: uppercase;
}
.changelog-hero > div strong {
  color: var(--signal-text);
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 600;
  line-height: 1.1;
}

/* ---- 竖向轨道 ---------------------------------------------------------- */
.changelog-timeline { position: relative; padding-top: 48px; }
.changelog-timeline::before {
  content: "";
  position: absolute;
  top: 48px;
  bottom: 0;
  left: 180px;
  width: 1px;
  background: linear-gradient(180deg, var(--signal), var(--line) 140px);
}
.changelog-entry {
  position: relative;
  display: grid;
  grid-template-columns: 180px 1fr;
  min-height: 140px;
  padding: 30px 0 42px;
}
/* 轨道节点：纵坐标由 --changelog-node-y 给出，版本描迹的 ping（route-motion.css）共用同一个值。 */
.changelog-entry { --changelog-node-y: 37px; }
.changelog-entry::before {
  content: "";
  position: absolute;
  top: var(--changelog-node-y);
  left: 176px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--ink-faint);
}
.changelog-entry.is-current::before {
  background: var(--signal);
  border-color: var(--signal);
  box-shadow: 0 0 16px color-mix(in srgb, var(--signal) 50%, transparent);
  animation: obsp-node 2.6s var(--ease-out) infinite;
}
.changelog-entry.is-current {
  background: linear-gradient(90deg, var(--signal-soft), transparent 46%);
}
/* 日期与当天版本数排在一行，放不下时版本数自动折到下一行，不会越过时间线。 */
.changelog-entry header {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: baseline;
  gap: 6px 10px;
  padding-right: 35px;
}
.changelog-entry header strong { flex-basis: 100%; }
.changelog-day-count {
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .06em;
  white-space: nowrap;
}
.changelog-entry time {
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .1em;
  font-variant-numeric: tabular-nums;
}
.changelog-entry header strong {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
}
.changelog-entry header span {
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .2em;
  text-transform: uppercase;
}
/* 纸面上柠檬绿系不能作细小文字，当前版本标记压成墨绿。 */
.changelog-entry.is-current header span { color: var(--signal-text); }
html[data-theme="light"] .changelog-entry.is-current header span { color: #3f5314; }
.changelog-entry > div { min-width: 0; padding: 0 0 0 54px; }
.changelog-entry h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(21px, 2.4vw, 27px);
  font-weight: 600;
  line-height: 1.4;
}
.changelog-entry ul {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.changelog-entry li {
  position: relative;
  padding: 6px 0 6px 20px;
  color: var(--ink-dim);
  font-size: 12.5px;
  line-height: 1.8;
}
.changelog-entry li::before {
  content: "+";
  position: absolute;
  left: 0;
  color: var(--signal-text);
  font-family: var(--font-mono);
}
/* 服务端生成的历史条目：只有 header + h2，压缩为轨迹刻度行 */
.changelog-entry.generated-entry { min-height: 0; padding: 20px 0 28px; }
.changelog-entry.generated-entry h2 { font-size: 18px; color: var(--ink-dim); font-weight: 500; }
/* 同一天的后续版本：日期只留给读屏，节点收成一道短刻度，与当天首条读成一组。 */
.changelog-entry.is-same-day { --changelog-node-y: 9px; }
.changelog-entry.is-same-day time {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.changelog-entry.is-same-day::before {
  top: calc(var(--changelog-node-y) + 4px);
  height: 1px;
  border: 0;
  border-radius: 0;
  background: var(--ink-faint);
}

/* ==========================================================================
   5. 404 · 信号丢失（全屏故障坐标）
   ========================================================================== */
.lost-signal-page {
  min-height: 100vh;
  overflow: hidden;
  color: #fff;
  background: var(--bg);
}
.lost-signal-image,
.lost-signal-shade {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}
.lost-signal-image {
  object-fit: cover;
  filter: saturate(.5) contrast(1.08) brightness(.86);
  animation: obsp-drift 26s var(--ease-out) both;
}
.lost-signal-shade {
  /* 正文与仪表读数都压在星云上，右端留太亮会让 10px 小字掉到 2:1 以下。 */
  background: linear-gradient(90deg, rgba(4, 5, 10, .94), rgba(4, 5, 10, .78) 60%, rgba(4, 5, 10, .62));
}
/* 静态扫描线纹理 + 缓慢下行的扫描带 */
.lost-signal-shade::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .5;
  background: repeating-linear-gradient(0deg,
    rgba(238, 241, 230, .028) 0 1px,
    transparent 1px 3px);
}
.lost-signal-shade::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -160px;
  height: 160px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(214, 255, 115, .07), transparent);
  animation: obsp-scan 8s linear infinite;
}
.lost-signal-page > header {
  position: relative;
  z-index: 1;
  margin-top: var(--chrome-top, 0px);
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 6vw, 82px);
  border-bottom: 1px solid rgba(238, 241, 230, .14);
}
.lost-signal-page > header > span {
  position: relative;
  z-index: 1;
  color: rgba(238, 241, 230, .72);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .2em;
}
.lost-signal-page main {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 60px clamp(24px, 10vw, 150px) 100px;
}
.lost-signal-page .lost-signal-retry {
  margin: 0;
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .26em;
}
.lost-signal-page .lost-signal-retry::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--alert);
  box-shadow: 0 0 12px color-mix(in srgb, var(--alert) 70%, transparent);
  animation: obsp-blink 1.3s steps(2, start) infinite;
}
/* 巨型 404：空心刻字，半沉入右缘 */
.lost-signal-page main > strong {
  position: absolute;
  top: 50%;
  right: clamp(25px, 8vw, 120px);
  transform: translateY(-50%);
  color: rgba(238, 241, 230, .08);
  font-family: var(--font-display);
  font-size: clamp(150px, 25vw, 370px);
  font-weight: 600;
  line-height: .8;
  letter-spacing: -.02em;
  pointer-events: none;
  user-select: none;
}
@supports (-webkit-text-stroke: 1px black) {
  .lost-signal-page main > strong {
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(238, 241, 230, .2);
  }
}
.lost-signal-page h1 {
  margin: 14px 0 28px;
  font-family: var(--font-title);
  font-size: clamp(46px, 7vw, 96px);
  font-weight: 600;
  line-height: 1.08;
}
.lost-signal-page h1 em {
  color: var(--ice);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}
.lost-signal-data {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  color: rgba(238, 241, 230, .5);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .12em;
}
.lost-signal-data span::before {
  content: "/ ";
  color: color-mix(in srgb, var(--signal) 60%, transparent);
}
.lost-signal-data b { margin-right: 6px; }
.lost-signal-page nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 48px;
}
.lost-signal-page nav a:not(.text-link) {
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(238, 241, 230, .3);
  font-size: 12px;
  transition: color .3s var(--ease-out), border-color .3s var(--ease-out);
}
.lost-signal-page nav a:not(.text-link):hover { border-color: var(--signal); }
.lost-signal-page nav a:first-child:not(.text-link) { color: var(--signal); }
.lost-signal-page nav a span {
  display: inline-block;
  transition: transform .3s var(--ease-out);
}
.lost-signal-page nav a:hover span { transform: translateX(4px); }

html[data-theme="light"] .lost-signal-page {
  color: var(--ink);
  background: var(--bg);
}
html[data-theme="light"] .lost-signal-image {
  opacity: .38;
  filter: grayscale(.45) saturate(.4) contrast(.82) brightness(1.5);
  mix-blend-mode: multiply;
}
html[data-theme="light"] .lost-signal-shade {
  /* 右端原来只压到 .48，星云透过来会把细小的仪表读数吃掉，
     纸面这一侧必须留够不透明度才能保住 4.5:1。 */
  background: linear-gradient(90deg, rgba(243, 239, 228, .97), rgba(243, 239, 228, .93) 62%, rgba(243, 239, 228, .86));
}
html[data-theme="light"] .lost-signal-shade::before {
  background: repeating-linear-gradient(0deg, rgba(29, 35, 42, .035) 0 1px, transparent 1px 3px);
}
html[data-theme="light"] .lost-signal-page > header {
  border-bottom-color: var(--line-strong);
}
html[data-theme="light"] .lost-signal-page > header > span,
html[data-theme="light"] .lost-signal-data {
  color: var(--ink-dim);
}
/* 纸面上柠檬绿只能作色块底：这行是细小文字，压成墨绿才读得出。 */
html[data-theme="light"] .lost-signal-page .lost-signal-retry { color: #3f5314; }
html[data-theme="light"] .lost-signal-page nav a:first-child:not(.text-link) { color: #3f5314; }
html[data-theme="light"] .lost-signal-page .public-shell-footer a { color: var(--ink-dim); }
html[data-theme="light"] .lost-signal-page main > strong {
  color: rgba(29, 35, 42, .07);
  -webkit-text-stroke-color: rgba(29, 35, 42, .24);
}

/* ==========================================================================
   6. 仪器推子：range input 自定义（track / thumb，两主题）
   ========================================================================== */
.lab-control-deck input[type='range'],
.astralyn-deck input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 24px;
  margin: 4px 0 0;
  background: transparent;
  cursor: pointer;
}
/* WebKit / Blink */
.lab-control-deck input[type='range']::-webkit-slider-runnable-track,
.astralyn-deck input[type='range']::-webkit-slider-runnable-track {
  height: 2px;
  background: repeating-linear-gradient(90deg,
    var(--line-strong) 0 9px,
    color-mix(in srgb, var(--line-strong) 35%, transparent) 9px 13px);
}
.lab-control-deck input[type='range']::-webkit-slider-thumb,
.astralyn-deck input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 22px;
  margin-top: -10px;
  background:
    linear-gradient(var(--signal), var(--signal)) center / 1px 10px no-repeat,
    var(--panel-2);
  border: 1px solid var(--signal);
  border-radius: 2px;
  box-shadow: 0 0 0 3px var(--signal-soft);
  transition: box-shadow .3s var(--ease-out);
}
.lab-control-deck input[type='range']:hover::-webkit-slider-thumb,
.astralyn-deck input[type='range']:hover::-webkit-slider-thumb {
  box-shadow: 0 0 0 5px var(--signal-soft), 0 0 14px var(--signal-soft);
}
/* Firefox */
.lab-control-deck input[type='range']::-moz-range-track,
.astralyn-deck input[type='range']::-moz-range-track {
  height: 2px;
  background: repeating-linear-gradient(90deg,
    var(--line-strong) 0 9px,
    color-mix(in srgb, var(--line-strong) 35%, transparent) 9px 13px);
}
.lab-control-deck input[type='range']::-moz-range-progress,
.astralyn-deck input[type='range']::-moz-range-progress {
  height: 2px;
  background: var(--signal);
}
.lab-control-deck input[type='range']::-moz-range-thumb,
.astralyn-deck input[type='range']::-moz-range-thumb {
  width: 12px;
  height: 22px;
  background:
    linear-gradient(var(--signal), var(--signal)) center / 1px 10px no-repeat,
    var(--panel-2);
  border: 1px solid var(--signal);
  border-radius: 2px;
  box-shadow: 0 0 0 3px var(--signal-soft);
}
.lab-control-deck input[type='range']:focus-visible,
.astralyn-deck input[type='range']:focus-visible {
  outline: 2px solid var(--signal-text);
  outline-offset: 4px;
}
/* 浅色主题（日间图纸）：墨线轨道 + 深信号色描边推子 */
html[data-theme="light"] .lab-control-deck input[type='range']::-webkit-slider-thumb,
html[data-theme="light"] .astralyn-deck input[type='range']::-webkit-slider-thumb {
  background:
    linear-gradient(var(--signal-text), var(--signal-text)) center / 1px 10px no-repeat,
    var(--panel);
  border-color: var(--signal-text);
}
html[data-theme="light"] .lab-control-deck input[type='range']::-moz-range-thumb,
html[data-theme="light"] .astralyn-deck input[type='range']::-moz-range-thumb {
  background:
    linear-gradient(var(--signal-text), var(--signal-text)) center / 1px 10px no-repeat,
    var(--panel);
  border-color: var(--signal-text);
}
html[data-theme="light"] .lab-control-deck input[type='range']::-moz-range-progress,
html[data-theme="light"] .astralyn-deck input[type='range']::-moz-range-progress {
  background: var(--signal-text);
}

/* ==========================================================================
   7. 统一 focus-visible（信号色描边）
   ========================================================================== */
.archive-footer-links a:focus-visible,
.custom-page-header a:focus-visible,
.custom-page-article a:focus-visible,
.custom-page-article summary:focus-visible,
.lab-command-row button:focus-visible,
.astralyn-deck-actions button:focus-visible,
.astralyn-experiment-head nav a:focus-visible,
.lost-signal-page nav a:focus-visible {
  outline: 2px solid var(--signal-text);
  outline-offset: 3px;
}

/* ==========================================================================
   8. 浅色主题（日间观测图纸）微调
   ========================================================================== */
/* 分类注入色在纸面上向墨色靠拢，保证对比度 */
html[data-theme="light"] .archive-category-intro small,
html[data-theme="light"] .archive-category-intro dd {
  /* 分类色多为柠檬绿一类亮色，55% 混墨在纸面上仍不足 4.5:1。 */
  color: color-mix(in srgb, var(--journal-accent) 26%, var(--ink));
}
html[data-theme="light"] .archive-category-intro {
  background: linear-gradient(110deg, color-mix(in srgb, var(--journal-accent) 12%, transparent), transparent 62%);
  border-top-color: color-mix(in srgb, var(--journal-accent) 70%, var(--ink));
}
html[data-theme="light"] .archive-hero::after { background: var(--signal-text); box-shadow: none; }
html[data-theme="light"] .archive-search::after { background: var(--signal-text); }
html[data-theme="light"] .custom-page-header {
  background: color-mix(in srgb, var(--bg) 84%, transparent);
}
/* 封面上文字恒为白（遮罩保证），仅正文随图纸 */
html[data-theme="light"] .custom-page-article pre {
  border-left-color: var(--signal-text);
}
html[data-theme="light"] .changelog-timeline::before {
  background: linear-gradient(180deg, var(--signal-text), var(--line) 140px);
}
html[data-theme="light"] .changelog-entry.is-current::before {
  background: var(--signal);
  border-color: var(--signal-text);
  box-shadow: 0 0 10px color-mix(in srgb, var(--signal-text) 35%, transparent);
}

/* ==========================================================================
   9. 响应式 · 移动端同等精致
   ========================================================================== */
@media (max-width: 1080px) {
  .lab-page { grid-template-columns: minmax(0, 1fr); }
  .lab-readout { padding: 50px 24px 90px; border-top: 1px solid var(--line); }
  .lab-readout > p { min-height: 0; }
  .astralyn-workbench { grid-template-columns: 1fr; }
  .astralyn-stage { min-height: 480px; }
  .astralyn-deck { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
  .astralyn-deck > div:first-child,
  .astralyn-deck-actions,
  .astralyn-deck dl { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .archive-grid { grid-template-columns: minmax(0, 1fr); }
  .archive-category-intro {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 15px 24px;
    min-height: 0;
    margin-bottom: 42px;
    padding: 20px 22px;
  }
  .archive-category-intro p { grid-column: 1 / -1; }
  .archive-category-intro dl { grid-column: 2; grid-row: 1; align-self: center; }
}

@media (max-width: 720px) {
  /* -- archive -- */
  .archive-page { padding: calc(var(--header-h) + 64px) 20px 96px; }
  .archive-hero { padding-bottom: 38px; }
  .archive-hero h1 { font-size: clamp(38px, 11vw, 56px); }
  .archive-hero > strong { font-size: clamp(44px, 13vw, 64px); }
  .archive-controls { align-items: stretch; flex-direction: column; gap: 20px; padding-bottom: 44px; }
  .archive-filters { margin-right: -20px; padding-right: 20px; }
  .archive-search { width: 100%; }
  .archive-grid { gap: 52px; }
  .archive-footer { flex-direction: column; align-items: flex-start; gap: 16px; padding: 30px 20px 42px; }
  .archive-footer-links { flex-wrap: wrap; gap: 16px 22px; }

  /* -- custom page -- */
  .custom-page-header { gap: 12px; padding: 0 16px; }
  .custom-page-callsign { display: none; }
  .custom-page-header nav { min-width: 0; max-width: 50vw; margin-left: auto; }
  .custom-page-header > .icon-button { flex: 0 0 auto; }
  .custom-page-hero { min-height: 460px; padding: 90px 22px 46px; }
  .custom-page-hero::after { inset: 12px; opacity: .4; }
  .custom-page-hero h1 { font-size: clamp(34px, 10vw, 46px); }
  .custom-page-article { width: calc(100% - 40px); padding: 56px 0 96px; font-size: 14.5px; }
  .custom-page-article figure[data-media-width='wide'] { width: 100%; margin-left: 0; transform: none; }
  .custom-page-article figure[data-media-width='half'] { width: 100%; }
  .custom-page-article blockquote { font-size: 18px; padding-left: 18px; }

  /* -- lab -- */
  .lab-header { grid-template-columns: 1fr auto; }
  .lab-header .icon-button,
  .lab-header .platform-mobile-nav-toggle { width: 44px; height: 44px; }
  .lab-header .archive-back { min-height: 44px; padding-block: 10px; }
  .lab-system-state { display: none; }
  .lab-console { padding: 38px 20px 50px; }
  .lab-console-head { align-items: start; flex-direction: column; gap: 14px; }
  .lab-viewport { min-height: 340px; height: 50vh; }
  .lab-control-deck { grid-template-columns: 1fr; gap: 20px; }
  .lab-command-row { display: grid; grid-template-columns: 1fr 1fr; }
  .lab-command-row button:first-child { grid-column: 1 / -1; }
  .lab-command-row button,
  .astralyn-deck-actions button { font-size: 12px; letter-spacing: .1em; }
  .lab-console-head p,
  .lab-console-head > span,
  .lab-control-deck label,
  .lab-control-deck output,
  .lab-readout small,
  .lab-readout dt,
  .lab-readout dd,
  .lab-ledger li,
  .lab-ledger li::before,
  .astralyn-experiment-head p,
  .astralyn-deck small,
  .astralyn-deck strong,
  .astralyn-deck label,
  .astralyn-deck output,
  .astralyn-deck dt,
  .astralyn-deck dd { font-size: 11px; }
  .lab-control-deck label,
  .astralyn-deck label { font-size: 12px; }
  .astralyn-experiment-head nav { width: 100%; gap: 8px; }
  .astralyn-experiment-head nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--line-strong);
    font-size: 11px;
  }
  .astralyn-experiment { padding: 80px 20px 96px; }
  .astralyn-experiment-head { align-items: start; flex-direction: column; gap: 18px; margin-bottom: 34px; }
  .astralyn-stage { min-height: 320px; padding: 16px; }
  .astralyn-deck { grid-template-columns: 1fr; padding: 30px 18px; }
  .astralyn-deck > div:first-child,
  .astralyn-deck-actions,
  .astralyn-deck dl { grid-column: auto; }

  /* -- changelog -- */
  .changelog-page { padding: calc(var(--header-h) + 64px) 20px 96px; }
  .changelog-hero { padding-bottom: 46px; }
  .changelog-hero > div { position: static; justify-items: start; margin-top: 34px; }
  .changelog-timeline::before { left: 104px; }
  .changelog-entry { grid-template-columns: 104px 1fr; }
  .changelog-entry::before { left: 100px; }
  .changelog-entry header { padding-right: 24px; }
  .changelog-entry > div { padding-left: 28px; }

  /* -- 404 -- */
  .lost-signal-page { overflow-y: auto; }
  .lost-signal-page > header > span { display: none; }
  .lost-signal-page main { justify-content: flex-end; }
  .lost-signal-page .eyebrow { width: 100%; }
  .lost-signal-page .lost-signal-retry {
    max-width: 100%;
    overflow-wrap: anywhere;
    letter-spacing: .14em;
    line-height: 1.7;
  }
  .lost-signal-page main > strong { top: 22%; right: 20px; }
  .lost-signal-page nav { align-items: flex-start; flex-direction: column; gap: 16px; }
}

@media (max-width: 520px) {
  .archive-hero { grid-template-columns: 1fr; gap: 26px; }
  .archive-hero > strong { justify-self: end; }
  .archive-category-intro { grid-template-columns: 1fr; gap: 13px; padding: 18px; }
  .archive-category-intro strong { font-size: 26px; }
  .archive-category-intro p,
  .archive-category-intro dl { grid-column: 1; grid-row: auto; }
  .archive-category-intro dl {
    width: 100%;
    grid-template-columns: 1fr auto;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }
  .changelog-timeline::before { left: 7px; }
  /* 带上父级以压过 .generated-entry 的 padding 简写，文字始终让出左侧时间线。 */
  .changelog-timeline .changelog-entry { grid-template-columns: 1fr; padding-left: 28px; }
  .changelog-entry::before { left: 3px; }
  .changelog-entry > div { padding: 22px 0 0; }
  .lab-viewport { min-height: 300px; height: 46vh; }
}

/* ==========================================================================
   10. 动效定义 + 降级
   ========================================================================== */
@keyframes obsp-drift {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}
@keyframes obsp-scan {
  from { transform: translateY(0); }
  to { transform: translateY(calc(100vh + 320px)); }
}
@keyframes obsp-blink {
  50% { opacity: .25; }
}
@keyframes obsp-lamp {
  50% { box-shadow: 0 0 4px var(--signal); }
}
@keyframes obsp-node {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--signal) 45%, transparent); }
  100% { box-shadow: 0 0 0 12px transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .lost-signal-image { animation: none; transform: none; }
  .lost-signal-shade::after { animation: none; display: none; }
  .lost-signal-page main > p::before,
  body.lab-running .lab-system-state i,
  body.lab-running .lab-console-head > span,
  body.lab-running .lab-viewport::after,
  .changelog-entry.is-current::before { animation: none; }
  .archive-card::before,
  .archive-search::after,
  .archive-card h2,
  .lab-viewport,
  .astralyn-heat button { transition: none; }
}

/* ---------- 审计修复：归档卡去盒 / 404 补样式 / lab 底距 ---------- */
/* B-P1-1：archive-card 显式归零 post-card 基线盒子，贯彻"去盒票据"意图 */
.archive-card,
.archive-card:hover {
  border: 0;
  background: transparent;
  clip-path: none;
  box-shadow: none;
}
.archive-card::before { opacity: 1; }
/* B-P1-3：404 专用类补全 */
.lost-signal-page .lost-signal-note {
  margin: 0 0 18px;
  max-width: 560px;
  color: var(--ink-dim);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.9;
  letter-spacing: .02em;
}
.lost-signal-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .24em;
}
.lost-signal-status .icon { width: 13px; height: 13px; color: var(--alert); }
.lost-signal-status b { color: var(--alert); font-weight: 500; }
.lost-signal-data .is-alert,
.lost-signal-data .is-alert b { color: var(--alert); }
/* 巨型 404 的故障回声层（消费 data-text） */
.lost-signal-page main > strong[data-text] { z-index: 0; }
.lost-signal-page main > strong[data-text]::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: transparent;
  -webkit-text-stroke: 1px color-mix(in srgb, var(--alert) 45%, transparent);
  transform: translate(7px, -5px);
  animation: obsp-echo 5s var(--ease-swift) infinite;
  pointer-events: none;
}
@keyframes obsp-echo {
  0%, 88%, 100% { transform: translate(7px, -5px); opacity: .6; }
  92% { transform: translate(-4px, 3px); opacity: .95; }
  96% { transform: translate(10px, -8px); opacity: .4; }
}
/* C-P1-1：lab 命令行让出 HUD 底条 */
.lab-console { padding-bottom: 92px; }
/* 归档与版本页的大标题已经承担章节标识，隐藏会与正文重叠的竖排边注。 */
body.archive-body .obs-vertical,
body.changelog-body .obs-vertical { display: none; }
/* B-P1-5：custom-page h2 刻线浅色压深 */
html[data-theme="light"] .custom-page-article h2::before { background: var(--signal-text); }
@media (prefers-reduced-motion: reduce) {
  .lost-signal-page main > strong[data-text]::after { animation: none; }
}

#audioToggle .audio-on { display: none; }
#audioToggle[aria-pressed="true"] .audio-on,
#audioToggle.is-active .audio-on { display: block; }
#audioToggle[aria-pressed="true"] .audio-off,
#audioToggle.is-active .audio-off { display: none; }

.astralyn-lab-section {
  border-top: 1px solid var(--line);
}
.astralyn-stage {
  min-width: 0;
  display: grid;
  place-items: center;
  padding: clamp(24px, 4vw, 44px);
  background: rgba(6, 7, 11, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  backdrop-filter: blur(8px);
}
html[data-theme="light"] .astralyn-stage {
  background: rgba(13, 18, 23, 0.7);
}
