/* ==========================================================================
   xringo1root — 研究档案页
   仅作用于 .xring-page，以及首页项目的 xr-card 组件
   ========================================================================== */

.xring-page {
  --bg: #f5f5f7;
  --text: #111318;
  --text2: #5f6672;
  --nav-bg: rgba(245, 245, 247, 0.8);
  --nav-border: rgba(17, 19, 24, 0.07);

  --xr-ink: #111318;
  --xr-ink-2: #3c424c;
  --xr-line: rgba(17, 19, 24, 0.1);
  --xr-line-2: rgba(17, 19, 24, 0.2);
  --xr-grid: rgba(17, 19, 24, 0.045);
  --xr-paper: #ffffff;
  --xr-signal: #d63a1c;
  --xr-signal-ink: #a82c13;
  --xr-signal-soft: rgba(214, 58, 28, 0.075);
  --xr-ok: #0a7a54;
  --xr-deep: #0b0e13;
  --xr-deep-line: rgba(255, 255, 255, 0.13);
  --xr-deep-text: rgba(255, 255, 255, 0.66);
  --xr-code-bg: #0b0f15;
  --xr-code-line: rgba(255, 255, 255, 0.09);
  --xr-code-ink: #dde5ee;
  --xr-code-dim: #77828f;
  --xr-btn-ink: #ffffff;
  --xr-shadow: 0 30px 70px -34px rgba(11, 14, 19, 0.5);

  background: var(--bg);
  color: var(--text);
  color-scheme: light;
  height: auto;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

:root[data-theme="dark"] .xring-page {
  --bg: #06070a;
  --text: #f2f4f7;
  --text2: #9aa3af;
  --nav-bg: rgba(6, 7, 10, 0.8);
  --nav-border: rgba(255, 255, 255, 0.08);

  --xr-ink: #f2f4f7;
  --xr-ink-2: #c9d1db;
  --xr-line: rgba(255, 255, 255, 0.11);
  --xr-line-2: rgba(255, 255, 255, 0.22);
  --xr-grid: rgba(255, 255, 255, 0.05);
  --xr-paper: rgba(255, 255, 255, 0.032);
  --xr-signal: #ff6444;
  --xr-signal-ink: #ff8a70;
  --xr-signal-soft: rgba(255, 100, 68, 0.11);
  --xr-ok: #45d69d;
  --xr-deep: #040507;
  --xr-deep-line: rgba(255, 255, 255, 0.12);
  --xr-code-bg: #080b10;
  --xr-line: rgba(255, 255, 255, 0.11);
  --xr-btn-ink: #07080a;
  --xr-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.9);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .xring-page {
    --bg: #06070a;
    --text: #f2f4f7;
    --text2: #9aa3af;
    --nav-bg: rgba(6, 7, 10, 0.8);
    --nav-border: rgba(255, 255, 255, 0.08);

    --xr-ink: #f2f4f7;
    --xr-ink-2: #c9d1db;
    --xr-line: rgba(255, 255, 255, 0.11);
    --xr-line-2: rgba(255, 255, 255, 0.22);
    --xr-grid: rgba(255, 255, 255, 0.05);
    --xr-paper: rgba(255, 255, 255, 0.032);
    --xr-signal: #ff6444;
    --xr-signal-ink: #ff8a70;
    --xr-signal-soft: rgba(255, 100, 68, 0.11);
    --xr-ok: #45d69d;
    --xr-deep: #040507;
    --xr-deep-line: rgba(255, 255, 255, 0.12);
    --xr-code-bg: #080b10;
    --xr-btn-ink: #07080a;
    --xr-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.9);
    color-scheme: dark;
  }
}

/* ---------- 基础 ---------- */

.xring-page nav { z-index: 100; }
.xring-page .xr-main { position: relative; z-index: 1; }
.xring-page .bg-glow { display: block; }
.xring-page .bg-glow .glow-orb { opacity: 0.12; }
.xring-page .glow-1 { background: radial-gradient(circle, rgba(214, 58, 28, 0.22), transparent 70%); }
.xring-page .glow-2 { background: radial-gradient(circle, rgba(62, 92, 138, 0.16), transparent 70%); }
.xring-page .glow-3 { background: radial-gradient(circle, rgba(255, 100, 68, 0.12), transparent 70%); }

.xr-container {
  margin-inline: auto;
  width: min(1140px, calc(100% - 56px));
}

.xring-page section[id],
.xring-page #top { scroll-margin-top: 92px; }

.xr-main a { color: inherit; }
.xr-main :focus-visible {
  outline: 2px solid var(--xr-signal);
  outline-offset: 3px;
}

.xr-mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
}

/* ---------- 顶部阅读进度 ---------- */

.xr-progress {
  background: transparent;
  height: 2px;
  left: 0;
  pointer-events: none;
  position: fixed;
  right: 0;
  top: 48px;
  z-index: 105;
}
.xr-progress span {
  background: var(--xr-signal);
  display: block;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  width: 100%;
}

/* ---------- Hero ---------- */

.xr-hero {
  border-bottom: 1px solid var(--xr-line);
  overflow: hidden;
  padding: 128px 0 88px;
  position: relative;
}

.xr-hero-bg {
  background-image:
    linear-gradient(to right, var(--xr-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--xr-grid) 1px, transparent 1px);
  background-size: 92px 92px;
  inset: 0;
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.55) 48%, transparent 88%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.55) 48%, transparent 88%);
  pointer-events: none;
  position: absolute;
}

.xr-hero::after {
  background: radial-gradient(closest-side, var(--xr-signal-soft), transparent 72%);
  content: "";
  height: 620px;
  pointer-events: none;
  position: absolute;
  right: -60px;
  top: -140px;
  width: 620px;
}

.xr-hero-grid {
  align-items: center;
  display: grid;
  gap: clamp(40px, 6vw, 84px);
  grid-template-columns: minmax(0, 1.06fr) minmax(300px, 0.94fr);
  position: relative;
  z-index: 1;
}

.xr-eyebrow {
  align-items: center;
  color: var(--text2);
  display: flex;
  flex-wrap: wrap;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10.5px;
  gap: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.xr-eyebrow span:first-child { color: var(--xr-signal); font-weight: 700; }
.xr-eyebrow .xr-eyebrow-line {
  background: var(--xr-line-2);
  display: inline-block;
  height: 1px;
  width: 26px;
}

.xr-chip {
  border: 1px solid var(--xr-signal);
  border-radius: 999px;
  color: var(--xr-signal);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 9px;
  text-transform: uppercase;
}

.xr-brandline {
  align-items: center;
  display: flex;
  gap: 15px;
  margin: 30px 0 22px;
}

.xr-mark {
  display: block;
  flex: 0 0 auto;
  height: 54px;
  object-fit: contain;
  width: 54px;
}

.xr-kicker {
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
}
.xr-subkicker {
  color: var(--text2);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.03em;
  margin-top: 6px;
}

.xr-title {
  color: var(--xr-ink);
  font-size: clamp(52px, 7vw, 84px);
  font-weight: 780;
  letter-spacing: -0.045em;
  line-height: 0.96;
  margin: 0;
}

.xr-thesis {
  color: var(--xr-ink);
  font-size: clamp(20px, 2.3vw, 26px);
  font-weight: 620;
  letter-spacing: -0.012em;
  line-height: 1.4;
  margin: 20px 0 0;
  max-width: 21em;
}

.xr-lead {
  color: var(--text2);
  font-size: 15.5px;
  line-height: 1.85;
  margin: 16px 0 0;
  max-width: 37em;
}

.xr-spec {
  border-top: 1px solid var(--xr-line);
  display: grid;
  gap: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 32px 0 0;
  padding-top: 16px;
}
.xr-spec > div { padding-right: 14px; }
.xr-spec > div + div {
  border-left: 1px solid var(--xr-line);
  padding-left: 14px;
}
.xr-spec dt {
  color: var(--text2);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9.5px;
  letter-spacing: 0.13em;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.xr-spec dd {
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
}
.xr-spec dd small {
  color: var(--text2);
  display: block;
  font-weight: 400;
  font-size: 11px;
  margin-top: 3px;
}

.xr-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.xr-btn {
  align-items: center;
  border-radius: 9px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 650;
  gap: 9px;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  text-decoration: none;
  transition: background-color 0.22s ease, border-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}
.xr-btn:hover { transform: translateY(-2px); }
.xr-btn--primary {
  background: var(--xr-ink);
  color: var(--xr-btn-ink) !important;
}
.xr-btn--primary:hover { box-shadow: 0 14px 28px -14px rgba(11, 14, 19, 0.6); }
.xr-btn--quiet {
  border: 1px solid var(--xr-line-2);
  color: var(--text) !important;
}
.xr-btn--quiet:hover { border-color: var(--xr-ink); }
.xr-btn b { font-weight: 400; }

.xr-hero-note {
  border-left: 2px solid var(--xr-signal);
  color: var(--text2);
  font-size: 11.5px;
  line-height: 1.7;
  margin: 26px 0 0;
  max-width: 39em;
  padding-left: 12px;
}

.xr-hero-visual {
  justify-self: end;
  margin: 0;
  position: relative;
  width: min(100%, 318px);
}
.xr-hero-visual::before {
  background: radial-gradient(closest-side, var(--xr-signal-soft), transparent 74%);
  content: "";
  inset: -36px -40px -52px;
  position: absolute;
  z-index: -1;
}

.xr-shot {
  background: var(--xr-deep);
  border: 1px solid var(--xr-deep-line);
  border-radius: 24px;
  box-shadow: var(--xr-shadow);
  padding: 8px;
  position: relative;
}
.xr-shot::after {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 17px;
  content: "";
  inset: 7px;
  pointer-events: none;
  position: absolute;
}
.xr-shot img {
  border-radius: 17px;
  display: block;
  height: auto;
  max-width: 100%;
  width: 100%;
}

.xr-hero-visual figcaption {
  border-top: 1px solid var(--xr-line);
  color: var(--text2);
  display: flex;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  gap: 16px;
  justify-content: space-between;
  letter-spacing: 0.09em;
  margin-top: 18px;
  padding-top: 12px;
}
.xr-hero-visual figcaption b { color: var(--xr-signal); font-weight: 700; }

/* ---------- 结论带 ---------- */

.xr-verdict {
  background: var(--xr-deep);
  border-top: 1px solid var(--xr-line);
  color: #fff;
  overflow: hidden;
  padding: 92px 0 84px;
  position: relative;
}
.xr-verdict::before {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 116px 116px;
  content: "";
  inset: 0;
  mask-image: radial-gradient(115% 120% at 18% 0%, #000 24%, transparent 76%);
  -webkit-mask-image: radial-gradient(115% 120% at 18% 0%, #000 24%, transparent 76%);
  pointer-events: none;
  position: absolute;
}
.xr-verdict::after {
  background: radial-gradient(closest-side, rgba(214, 58, 28, 0.3), transparent 72%);
  content: "";
  height: 560px;
  pointer-events: none;
  position: absolute;
  right: -140px;
  top: -260px;
  width: 560px;
}
.xr-verdict > .xr-container { position: relative; z-index: 1; }

.xr-verdict-head {
  align-items: end;
  display: grid;
  gap: 48px;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  margin-bottom: 54px;
}

.xr-verdict .xr-index { border-color: rgba(255, 255, 255, 0.28); color: rgba(255, 255, 255, 0.6); }
.xr-verdict h2 {
  text-wrap: balance;
  font-size: clamp(38px, 5.4vw, 62px);
  font-weight: 760;
  letter-spacing: -0.04em;
  line-height: 1.06;
  margin: 18px 0 0;
}
.xr-verdict h2 em {
  color: var(--xr-signal);
  font-style: normal;
}
.xr-verdict-head p {
  color: var(--xr-deep-text);
  font-size: 14.5px;
  line-height: 1.85;
  margin: 0 0 6px;
  max-width: 34em;
}

.xr-evidence {
  border-top: 1px solid var(--xr-deep-line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.xr-evidence article {
  border-left: 1px solid var(--xr-deep-line);
  padding: 26px 26px 8px;
  transition: background-color 0.25s ease;
}
.xr-evidence article:first-child { border-left: 0; padding-left: 0; }
.xr-evidence article:hover { background: rgba(255, 255, 255, 0.028); }
.xr-evidence span {
  color: var(--xr-signal);
  display: block;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin-bottom: 16px;
}
.xr-evidence h3 {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.01em;
  margin-bottom: 9px;
}
.xr-evidence p {
  color: var(--xr-deep-text);
  font-size: 12.5px;
  line-height: 1.75;
  margin: 0;
}
.xr-evidence p code {
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11.5px;
}
.xr-evidence em {
  color: #fff;
  display: block;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 20px;
  font-style: normal;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin-top: 18px;
}

.xr-verdict-foot {
  border-top: 1px solid var(--xr-deep-line);
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  flex-wrap: wrap;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10.5px;
  gap: 12px 28px;
  justify-content: space-between;
  letter-spacing: 0.05em;
  margin-top: 40px;
  padding-top: 18px;
}
.xr-verdict-foot a { color: rgba(255, 255, 255, 0.78); text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.28); }
.xr-verdict-foot a:hover { color: #fff; border-color: var(--xr-signal); }

/* ---------- 章节骨架 ---------- */

.xr-section {
  border-bottom: 1px solid var(--xr-line);
  padding: 100px 0;
  position: relative;
}
.xr-section--paper { background: var(--xr-paper); }

.xr-head {
  align-items: start;
  display: grid;
  gap: 36px;
  grid-template-columns: 150px minmax(0, 1fr);
  margin-bottom: 46px;
}
.xr-index {
  border-top: 1px solid var(--xr-signal);
  color: var(--xr-signal);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.6;
  margin: 0;
  padding-top: 10px;
  text-transform: uppercase;
  white-space: nowrap;
}
.xr-head h2 {
  color: var(--xr-ink);
  text-wrap: balance;
  font-size: clamp(27px, 3.5vw, 40px);
  font-weight: 730;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0;
  max-width: 20em;
}
.xr-head p {
  color: var(--text2);
  font-size: 14.5px;
  line-height: 1.8;
  margin: 14px 0 0;
  max-width: 42em;
}

.xr-split {
  align-items: start;
  display: grid;
  gap: clamp(32px, 5vw, 64px);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
}

.xr-prose p {
  color: var(--text2);
  font-size: 14.5px;
  line-height: 1.9;
  margin-bottom: 15px;
}
.xr-prose p:first-child {
  color: var(--text);
  font-size: 15.5px;
}
.xr-prose p:last-child { margin-bottom: 0; }
.xr-prose code,
.xr-inline-code {
  background: var(--xr-signal-soft);
  border-radius: 4px;
  color: var(--xr-signal-ink);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.88em;
  padding: 1px 5px;
}
.xr-prose a {
  border-bottom: 1px solid var(--xr-line-2);
  color: var(--text);
  text-decoration: none;
}
.xr-prose a:hover { border-color: var(--xr-signal); color: var(--xr-signal-ink); }

/* ---------- 代码面板 ---------- */

.xr-panel {
  background: var(--xr-code-bg);
  border: 1px solid var(--xr-code-line);
  border-radius: 13px;
  color: var(--xr-code-ink);
  overflow: hidden;
}
.xr-panel-head {
  align-items: center;
  border-bottom: 1px solid var(--xr-code-line);
  color: var(--xr-code-dim);
  display: flex;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9.5px;
  gap: 12px;
  justify-content: space-between;
  letter-spacing: 0.12em;
  padding: 11px 15px;
}
.xr-panel-head b { color: #fff; font-weight: 600; letter-spacing: 0.04em; text-transform: none; }
.xr-copy {
  background: transparent;
  border: 1px solid var(--xr-code-line);
  border-radius: 6px;
  color: var(--xr-code-dim);
  cursor: pointer;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9.5px;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.xr-copy:hover { border-color: rgba(255, 255, 255, 0.32); color: #fff; }
.xr-copy.is-done { border-color: var(--xr-ok); color: var(--xr-ok); }

.xr-panel pre {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  line-height: 1.9;
  margin: 0;
  overflow-x: auto;
  padding: 17px 18px 19px;
  tab-size: 2;
  white-space: pre;
}
.xr-panel pre code { font: inherit; }
.xr-panel .c { color: var(--xr-code-dim); }
.xr-panel .k { color: #ff9d7e; }
.xr-panel .g { color: #74d3a8; }
.xr-panel .y { color: #e8c97a; }
.xr-panel .r { background: rgba(255, 100, 68, 0.12); border-left: 2px solid var(--xr-signal); color: #ffb9a6; display: inline-block; margin-left: -18px; padding: 0 16px 0 16px; width: calc(100% + 18px); }

.xr-panel-foot {
  border-top: 1px solid var(--xr-code-line);
  color: var(--xr-code-dim);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  padding: 10px 15px;
}

/* ---------- 提示块 ---------- */

.xr-callout {
  background: linear-gradient(180deg, var(--xr-signal-soft), transparent 85%);
  border: 1px solid var(--xr-line);
  border-left: 3px solid var(--xr-signal);
  border-radius: 0 12px 12px 0;
  margin-top: 22px;
  padding: 18px 20px;
}
.xr-callout h4 {
  color: var(--xr-signal);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 9px;
}
.xr-callout p {
  color: var(--text2);
  font-size: 13px;
  line-height: 1.8;
  margin: 0;
}
.xr-callout p + p { margin-top: 8px; }
.xr-callout strong { color: var(--text); font-weight: 650; }

/* ---------- 统计卡 ---------- */

.xr-stats {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.xr-stat {
  background: var(--xr-paper);
  border: 1px solid var(--xr-line);
  border-radius: 14px;
  padding: 22px 22px 20px;
}
.xr-stat span {
  color: var(--text2);
  display: block;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9.5px;
  letter-spacing: 0.13em;
  margin-bottom: 14px;
  text-transform: uppercase;
}
.xr-stat strong {
  color: var(--xr-ink);
  display: block;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: clamp(32px, 3.6vw, 42px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}
.xr-stat strong i {
  color: var(--text2);
  font-size: 0.5em;
  font-style: normal;
  letter-spacing: 0;
}
.xr-stat small {
  color: var(--text2);
  display: block;
  font-size: 11.5px;
  line-height: 1.6;
  margin-top: 10px;
}
.xr-stat--signal { border-color: color-mix(in srgb, var(--xr-signal) 42%, var(--xr-line)); }
.xr-stat--signal strong { color: var(--xr-signal); }

/* ---------- 表格 ---------- */

.xr-table {
  border-collapse: collapse;
  font-size: 13px;
  width: 100%;
}
.xr-table caption {
  color: var(--text2);
  font-size: 11px;
  line-height: 1.7;
  padding-bottom: 12px;
  text-align: left;
}
.xr-table th {
  border-bottom: 1px solid var(--xr-line-2);
  color: var(--text2);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.11em;
  padding: 9px 12px 9px 0;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.xr-table td {
  border-bottom: 1px solid var(--xr-line);
  color: var(--text2);
  line-height: 1.65;
  padding: 11px 12px 11px 0;
  vertical-align: top;
}
.xr-table td:first-child {
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11.5px;
  white-space: nowrap;
}
.xr-table tr:last-child td { border-bottom: 0; }
.xr-table .xr-num { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; text-align: right; white-space: nowrap; }
.xr-table .xr-strong { color: var(--text); font-weight: 600; }
.xr-table .xr-signal { color: var(--xr-signal); }
.xr-table-wrap { overflow-x: auto; }

/* ---------- 折叠 ---------- */

.xr-fold {
  background: var(--xr-paper);
  border: 1px solid var(--xr-line);
  border-radius: 12px;
  margin-top: 14px;
  overflow: hidden;
}
.xr-fold > summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-size: 13px;
  font-weight: 600;
  gap: 14px;
  justify-content: space-between;
  list-style: none;
  padding: 14px 18px;
}
.xr-fold > summary::-webkit-details-marker { display: none; }
.xr-fold > summary::after {
  color: var(--xr-signal);
  content: "+";
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
}
.xr-fold[open] > summary::after { content: "−"; }
.xr-fold[open] > summary { border-bottom: 1px solid var(--xr-line); }
.xr-fold .xr-panel { border: 0; border-radius: 0; }

/* ---------- 攻击链 ---------- */

.xr-chain {
  border-top: 1px solid var(--xr-line);
  list-style: none;
  margin: 0;
  padding: 0;
}
.xr-chain li {
  border-bottom: 1px solid var(--xr-line);
  display: grid;
  gap: 20px;
  grid-template-columns: 40px minmax(0, 1fr);
  padding: 20px 0;
  position: relative;
}
.xr-chain li::before {
  background: var(--xr-line);
  bottom: 0;
  content: "";
  left: 17px;
  position: absolute;
  top: 0;
  width: 1px;
}
.xr-chain li:first-child::before { top: 22px; }
.xr-chain li:last-child::before { bottom: calc(100% - 42px); }
.xr-chain .xr-step-no {
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--xr-line-2);
  border-radius: 50%;
  color: var(--text);
  display: flex;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10.5px;
  font-weight: 700;
  height: 35px;
  justify-content: center;
  position: relative;
  width: 35px;
  z-index: 1;
}
.xr-chain li.is-key .xr-step-no {
  background: var(--xr-signal);
  border-color: var(--xr-signal);
  color: #fff;
}
.xr-chain h3 {
  color: var(--xr-ink);
  font-size: 15px;
  font-weight: 650;
  margin: 4px 0 7px;
}
.xr-chain p {
  color: var(--text2);
  font-size: 13px;
  line-height: 1.8;
  margin: 0;
}
.xr-chain code {
  color: var(--xr-signal-ink);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11.5px;
}

/* ---------- 设备事实 ---------- */

.xr-facts {
  background: var(--xr-line);
  border: 1px solid var(--xr-line);
  border-radius: 14px;
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  overflow: hidden;
}
.xr-fact {
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 118px;
  padding: 20px 20px 22px;
}
.xr-fact dt {
  color: var(--text2);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.xr-fact dd {
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  margin: 0;
}
.xr-fact dd small {
  color: var(--text2);
  display: block;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10.5px;
  font-weight: 400;
  line-height: 1.55;
  margin-top: 6px;
}
.xr-fact--signal { background: color-mix(in srgb, var(--xr-signal) 7%, var(--bg)); }
.xr-fact--signal dd { color: var(--xr-signal-ink); }

/* ---------- 双栏资料 ---------- */

.xr-files {
  display: grid;
  gap: clamp(28px, 4vw, 52px);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-top: 34px;
}
.xr-files .xr-panel { align-self: start; }
.xr-files .xr-panel pre { font-size: 11px; line-height: 1.85; }
.xr-panel--wrap pre { overflow-wrap: anywhere; white-space: pre-wrap; }

/* ---------- 时间线 ---------- */

.xr-timeline {
  border-top: 1px solid var(--xr-line);
  list-style: none;
  margin: 0;
  padding: 0;
}
.xr-timeline li {
  border-bottom: 1px solid var(--xr-line);
  display: grid;
  gap: 28px;
  grid-template-columns: 116px minmax(0, 1fr);
  padding: 20px 0;
}
.xr-timeline time {
  color: var(--xr-signal);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding-top: 2px;
}
.xr-timeline h3 {
  color: var(--xr-ink);
  font-size: 14.5px;
  font-weight: 650;
  margin: 0 0 6px;
}
.xr-timeline p {
  color: var(--text2);
  font-size: 13px;
  line-height: 1.75;
  margin: 0;
}

/* ---------- 边界 ---------- */

.xr-boundary {
  background: var(--xr-deep);
  color: #fff;
  padding: 96px 0 0;
  position: relative;
}
.xr-boundary::before {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 116px 116px;
  content: "";
  inset: 0;
  mask-image: radial-gradient(110% 130% at 80% 0%, #000 20%, transparent 72%);
  -webkit-mask-image: radial-gradient(110% 130% at 80% 0%, #000 20%, transparent 72%);
  pointer-events: none;
  position: absolute;
}
.xr-boundary > .xr-container { position: relative; z-index: 1; }
.xr-boundary .xr-index { border-color: rgba(255, 255, 255, 0.24); color: rgba(255, 255, 255, 0.55); }
.xr-boundary .xr-head h2 { color: #fff; }

.xr-boundary-grid {
  display: grid;
  gap: clamp(32px, 5vw, 60px);
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
}
.xr-boundary h3 {
  color: rgba(255, 255, 255, 0.5);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  margin: 0 0 16px;
  text-transform: uppercase;
}
.xr-limits {
  list-style: none;
  margin: 0;
  padding: 0;
}
.xr-limits li {
  border-top: 1px solid var(--xr-deep-line);
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.8;
  padding: 13px 0 13px 18px;
  position: relative;
}
.xr-limits li::before {
  background: var(--xr-signal);
  content: "";
  height: 5px;
  left: 0;
  position: absolute;
  top: 21px;
  width: 5px;
}
.xr-limits strong { color: #fff; font-weight: 650; }

.xr-credits {
  border-top: 1px solid var(--xr-deep-line);
  list-style: none;
  margin: 0;
  padding: 0;
}
.xr-credits li {
  border-bottom: 1px solid var(--xr-deep-line);
  display: grid;
  gap: 16px;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  padding: 14px 0;
}
.xr-credits b {
  color: #fff;
  font-size: 12.5px;
  font-weight: 650;
}
.xr-credits span {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  line-height: 1.75;
}
.xr-credits em {
  color: var(--xr-signal);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9.5px;
  font-style: normal;
  letter-spacing: 0.08em;
  padding-top: 2px;
  text-align: right;
  white-space: nowrap;
}
.xr-boundary .xr-limits code,
.xr-boundary .xr-disclaimer code,
.xr-boundary .xr-credits code {
  color: rgba(255, 255, 255, 0.92);
}

.xr-disclaimer {
  border-left: 2px solid var(--xr-signal);
  color: rgba(255, 255, 255, 0.5);
  font-size: 11.5px;
  line-height: 1.8;
  margin-top: 26px;
  padding-left: 12px;
}

.xr-footer {
  border-top: 1px solid var(--xr-deep-line);
  color: rgba(255, 255, 255, 0.42);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  margin-top: 84px;
  padding: 22px 0;
  position: relative;
  z-index: 1;
}
.xr-footer .xr-container {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  justify-content: space-between;
}
.xr-footer a { color: rgba(255, 255, 255, 0.72); text-decoration: none; }
.xr-footer a:hover { color: #fff; }

/* ---------- 右侧目录 ---------- */

.xr-toc {
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  border: 1px solid var(--xr-line);
  border-radius: 13px;
  box-shadow: 0 18px 42px -22px rgba(11, 14, 19, 0.4);
  display: none;
  flex-direction: column;
  gap: 1px;
  padding: 10px;
  position: fixed;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 116px;
  z-index: 60;
}
.xr-toc-label {
  color: var(--text2);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 8.5px;
  letter-spacing: 0.2em;
  padding: 2px 8px 8px;
}
.xr-toc a {
  align-items: baseline;
  border-radius: 7px;
  color: var(--text2);
  display: flex;
  font-size: 11.5px;
  gap: 8px;
  padding: 7px 8px;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.xr-toc a i {
  color: var(--xr-line-2);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9px;
  font-style: normal;
}
.xr-toc a:hover { color: var(--text); }
.xr-toc a.is-active {
  background: var(--xr-signal-soft);
  color: var(--xr-ink);
  font-weight: 600;
}
.xr-toc a.is-active i { color: var(--xr-signal); }

@media (min-width: 1440px) {
  .xr-toc { display: flex; }
}

/* ---------- 回顶 ---------- */

.xr-top {
  align-items: center;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--xr-line-2);
  border-radius: 50%;
  bottom: 22px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  height: 40px;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  right: 22px;
  transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
  transform: translateY(6px);
  width: 40px;
  z-index: 70;
}
.xr-top.is-on { opacity: 1; pointer-events: auto; transform: none; }
.xr-top:hover { border-color: var(--xr-signal); color: var(--xr-signal); }

/* ---------- 滚动出现 ---------- */

.xr-js .xr-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.xr-js .xr-reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 首页项目卡 ---------- */

.project-media--xring {
  --xr-deep: #0b0e13;
  --xr-deep-line: rgba(255, 255, 255, 0.13);
  --xr-signal: #d63a1c;
  --xr-shadow: 0 30px 70px -34px rgba(11, 14, 19, 0.5);
}

:root[data-theme="dark"] .project-media--xring {
  --xr-deep: #040507;
  --xr-signal: #ff6444;
}

.project-mark--xring,
:root[data-theme="dark"] .project-mark--xring {
  background: transparent;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  padding: 0;
}

.xr-card-shot {
  background: var(--xr-deep);
  border: 1px solid var(--xr-deep-line);
  border-radius: 20px;
  box-shadow: var(--xr-shadow);
  margin-left: auto;
  max-width: 286px;
  padding: 7px;
  position: relative;
  transform: rotate(-1.2deg);
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.project-media--xring:hover .xr-card-shot { transform: rotate(0deg) translateY(-4px); }
.xr-card-shot img {
  border-radius: 14px;
  display: block;
  height: auto;
  width: 100%;
}
.xr-card-caption {
  color: var(--text2);
  display: flex;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9.5px;
  gap: 14px;
  justify-content: flex-end;
  letter-spacing: 0.08em;
  margin-top: 16px;
}
.xr-card-caption b { color: var(--xr-signal); font-weight: 700; }

/* ---------- 通用小件 ---------- */

.xr-note {
  color: var(--text2);
  font-size: 12px;
  line-height: 1.8;
  margin: 14px 0 0;
}
.xr-note strong { color: var(--text); font-weight: 650; }
.xr-note code,
.xr-box p code,
.xr-callout code,
.xr-deflist dd code,
.xr-limits code,
.xr-credits code,
.xr-statusrow p code {
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.9em;
}

.xr-box {
  background: var(--xr-paper);
  border: 1px solid var(--xr-line);
  border-radius: 14px;
  padding: 20px 22px;
}
.xr-box > .xr-table + .xr-note { margin-top: 12px; }

.xr-hash {
  color: var(--text) !important;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10.5px !important;
  word-break: break-all;
}

.xr-deflist {
  border-top: 1px solid var(--xr-line);
  margin: 0;
}
.xr-deflist > div {
  border-bottom: 1px solid var(--xr-line);
  display: grid;
  gap: 18px;
  grid-template-columns: 132px minmax(0, 1fr);
  padding: 15px 0;
}
.xr-deflist dt {
  color: var(--xr-ink);
  font-size: 13px;
  font-weight: 650;
  padding-top: 1px;
}
.xr-deflist dd {
  color: var(--text2);
  font-size: 13px;
  line-height: 1.8;
  margin: 0;
}
.xr-deflist em {
  color: var(--xr-signal-ink);
  font-style: normal;
}

.xr-statusrow {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: 56px minmax(0, 1fr) auto;
}
.xr-badge {
  align-items: center;
  background: var(--xr-deep);
  border-radius: 11px;
  color: #fff;
  display: flex;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11.5px;
  font-weight: 700;
  height: 46px;
  justify-content: center;
  letter-spacing: 0.06em;
  width: 46px;
}
.xr-statusrow strong {
  color: var(--xr-ink);
  display: block;
  font-size: 14px;
  font-weight: 650;
  margin-bottom: 6px;
}
.xr-statusrow p {
  color: var(--text2);
  font-size: 12px;
  line-height: 1.7;
  margin: 0;
  word-break: break-all;
}
.xr-pill {
  border: 1px solid var(--xr-line-2);
  border-radius: 999px;
  color: var(--text2);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  white-space: nowrap;
}

.xr-pitfalls {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(196px, 1fr));
  margin-top: 16px;
}
.xr-pitfalls article {
  background: var(--xr-paper);
  border: 1px solid var(--xr-line);
  border-radius: 12px;
  padding: 18px 18px 20px;
}
.xr-pitfalls span {
  color: var(--xr-signal);
  display: block;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin-bottom: 14px;
}
.xr-pitfalls h3 {
  color: var(--xr-ink);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.01em;
  margin: 0 0 8px;
}
.xr-pitfalls p {
  color: var(--text2);
  font-size: 12px;
  line-height: 1.75;
  margin: 0;
}
.xr-pitfalls code {
  background: var(--xr-signal-soft);
  border-radius: 3px;
  color: var(--xr-signal-ink);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.92em;
  padding: 0 3px;
}

.xr-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}
.xr-checks li {
  align-items: center;
  background: var(--xr-paper);
  border: 1px solid var(--xr-line);
  border-radius: 8px;
  color: var(--text);
  display: flex;
  font-size: 11.5px;
  gap: 9px;
  padding: 7px 11px;
}
.xr-checks span {
  color: var(--xr-ok);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
}
.xr-table--hash { table-layout: fixed; }
.xr-table--hash th:nth-child(1) { width: 30%; }
.xr-table--hash th:nth-child(2) { width: 15%; }
.xr-table--hash th:nth-child(3) { width: 55%; }
.xr-table--hash td:nth-child(2) { white-space: nowrap; }
/* ---------- 响应式 ---------- */

@media (max-width: 1080px) {
  .xr-hero { padding: 116px 0 76px; }
  .xr-hero-grid { gap: 40px; grid-template-columns: minmax(0, 1fr) minmax(260px, 0.78fr); }
  .xr-spec { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; }
  .xr-spec > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .xr-spec > div:nth-child(3),
  .xr-spec > div:nth-child(4) { border-top: 1px solid var(--xr-line); padding-top: 14px; }
  .xr-spec > div:nth-child(4) { border-left: 1px solid var(--xr-line); }
  .xr-verdict-head { gap: 32px; grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .xr-section { padding: 76px 0; }
  .xr-head { gap: 18px; grid-template-columns: minmax(0, 1fr); margin-bottom: 34px; }
  .xr-index { max-width: 128px; }
  .xr-split,
  .xr-files,
  .xr-boundary-grid { grid-template-columns: minmax(0, 1fr); }
  .xr-evidence { grid-template-columns: minmax(0, 1fr); }
  .xr-evidence article {
    border-left: 0;
    border-top: 1px solid var(--xr-deep-line);
    padding: 20px 0 22px;
  }
  .xr-evidence article:first-child { border-top: 0; padding-top: 22px; }
  .xr-evidence em { margin-top: 12px; }
  .xr-facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .xr-timeline li { gap: 10px; grid-template-columns: 84px minmax(0, 1fr); }
  .xr-boundary { padding-top: 76px; }
  .xr-footer { margin-top: 60px; }
}

@media (max-width: 760px) {
  .xr-container { width: calc(100% - 40px); }
  .xr-hero { padding: 104px 0 64px; }
  .xr-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .xr-hero-visual { justify-self: start; margin-top: 12px; width: min(100%, 288px); }
  .xr-title { font-size: clamp(46px, 13vw, 62px); }
  .xr-thesis { font-size: 19px; }
  .xr-lead { font-size: 14.5px; }
  .xr-verdict { padding: 68px 0 60px; }
  .xr-verdict h2 { font-size: clamp(32px, 9vw, 44px); }
  .xr-stats { grid-template-columns: minmax(0, 1fr); }
  .xr-chain li { gap: 14px; grid-template-columns: 34px minmax(0, 1fr); }
  .xr-chain li::before { left: 16px; }
  .xr-chain li:last-child::before { bottom: calc(100% - 40px); }
  .xr-chain .xr-step-no { height: 32px; width: 32px; }
  .xr-facts { grid-template-columns: minmax(0, 1fr); }
  .xr-fact { min-height: 0; }
  .xr-credits li { gap: 4px; grid-template-columns: minmax(0, 1fr); }
  .xr-panel pre { font-size: 11px; padding: 15px; }
  .xr-table { font-size: 12px; }
  .xr-verdict-foot { flex-direction: column; }
  .xr-box { padding: 17px 16px; }
  .xr-deflist > div { gap: 6px; grid-template-columns: minmax(0, 1fr); }
  .xr-statusrow { gap: 12px; grid-template-columns: 46px minmax(0, 1fr); }
  .xr-statusrow .xr-pill { grid-column: 2; justify-self: start; }
}

@media (max-width: 520px) {
  .xr-eyebrow { font-size: 9.5px; gap: 8px; }
  .xr-chip { font-size: 9px; }
  .xr-mark { height: 46px; width: 46px; }
  .xr-actions { gap: 8px; }
  .xr-btn { flex: 1 1 100%; }
  .xr-btn--quiet { flex: 0 1 auto; }
  .xr-timeline li { grid-template-columns: minmax(0, 1fr); }
  .xr-timeline time { padding-top: 0; }
  .xr-card-shot { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .xr-js .xr-reveal { opacity: 1; transform: none; transition: none; }
  .xr-btn:hover,
  .project-media--xring:hover .xr-card-shot { transform: none; }
}


/* 详情页在 html 上滚动：提前预留滚动条槽位，解析中途量到的 hero 位置才和最终一致。 */
html { scrollbar-gutter: stable; }

/* 首屏之外的区块延迟布局/绘制：缩短详情页首帧时间，点击「查看研究记录」后的停顿更短。 */
.xr-verdict,
.xr-section,
.xr-boundary,
.xr-footer {
  content-visibility: auto;
  contain-intrinsic-size: auto 640px;
}
