/* 策信智库 · 设计令牌与自定义视觉层
   Tailwind 负责布局，本文件负责品牌色、质感与动效 */

:root {
  --cx-brand-50: #EEF4FF;
  --cx-brand-100: #DBE7FF;
  --cx-brand-300: #7FA8FF;
  --cx-brand: #165DFF;
  --cx-brand-700: #0E3FBF;
  --cx-cyan: #36BFFA;
  --cx-accent: #FF9A2E;
  --cx-accent-700: #E07800;
  --cx-ink: #060C1F;
  --cx-ink-soft: #0D1730;
  --cx-slate: #4A5B7B;
  --cx-line: rgba(22, 93, 255, .14);
  --cx-shadow-soft: 0 6px 24px rgba(9, 22, 48, .07);
  --cx-shadow-hover: 0 18px 46px rgba(9, 22, 48, .13);
  --cx-shadow-glow: 0 0 0 1px rgba(54, 191, 250, .35), 0 20px 60px rgba(22, 93, 255, .28);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* 字体：Noto Sans SC / Noto Serif SC 均为 SIL Open Font License 1.1，可免费商用与再分发；
   页面以非阻塞方式加载，取不到时回落到系统已装中文字体（不产生字体授权风险） */
body {
  font-family: "Noto Sans SC", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei",
    "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans CJK SC", system-ui, -apple-system,
    "Segoe UI", sans-serif;
  color: #1B2437;
  background: #F6F8FC;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--cx-brand);
  color: #fff;
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #EAEFF7; }
::-webkit-scrollbar-thumb { background: #B7C6DE; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--cx-brand-300); }

/* ---------- 文字与线条 ---------- */
.cx-gradient-text {
  background-image: linear-gradient(96deg, #165DFF 0%, #36BFFA 55%, #7FA8FF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cx-rule {
  width: 68px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #165DFF, #36BFFA);
}

.cx-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .5px;
  color: var(--cx-brand-700);
  background: rgba(22, 93, 255, .08);
  border: 1px solid var(--cx-line);
}

.cx-serif { font-family: "Noto Serif SC", "Songti SC", "STSong", "Source Han Serif SC", "SimSun", serif; }

/* ---------- 背景纹理 ---------- */
.cx-grid {
  background-image:
    linear-gradient(rgba(22, 93, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 93, 255, .07) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(80% 60% at 50% 35%, #000 30%, transparent 78%);
  mask-image: radial-gradient(80% 60% at 50% 35%, #000 30%, transparent 78%);
}

.cx-dots {
  background-image: radial-gradient(rgba(255, 255, 255, .22) 1px, transparent 1px);
  background-size: 22px 22px;
}

.cx-aurora::before,
.cx-aurora::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}
.cx-aurora::before {
  width: 460px; height: 460px;
  top: -120px; left: -80px;
  background: radial-gradient(circle, rgba(54, 191, 250, .38), transparent 68%);
  animation: cxDrift 16s ease-in-out infinite alternate;
}
.cx-aurora::after {
  width: 520px; height: 520px;
  bottom: -180px; right: -120px;
  background: radial-gradient(circle, rgba(22, 93, 255, .35), transparent 68%);
  animation: cxDrift 20s ease-in-out infinite alternate-reverse;
}

@keyframes cxDrift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(40px, -30px, 0) scale(1.12); }
}

/* ---------- 卡片 ---------- */
.cx-card {
  position: relative;
  background: #fff;
  border: 1px solid #E7EDF6;
  border-radius: 20px;
  box-shadow: var(--cx-shadow-soft);
  transition: transform .32s cubic-bezier(.22, .68, .32, 1), box-shadow .32s ease, border-color .32s ease;
}
.cx-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--cx-shadow-hover);
  border-color: rgba(22, 93, 255, .35);
}
.cx-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(22, 93, 255, .08), transparent 45%);
  opacity: 0;
  transition: opacity .32s ease;
  pointer-events: none;
}
.cx-card:hover::after { opacity: 1; }

.cx-glass {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.cx-icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px; height: 54px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(22, 93, 255, .12), rgba(54, 191, 250, .16));
  color: var(--cx-brand);
  transition: transform .3s ease, background .3s ease, color .3s ease;
}
.cx-card:hover .cx-icon-tile,
.cx-hoverable:hover .cx-icon-tile {
  background: linear-gradient(135deg, var(--cx-brand), var(--cx-cyan));
  color: #fff;
  transform: scale(1.06) rotate(-3deg);
}
.cx-icon-tile svg { width: 26px; height: 26px; }

/* ---------- 按钮 ---------- */
.cx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
  cursor: pointer;
}
.cx-btn svg { width: 18px; height: 18px; }
.cx-btn-primary {
  color: #fff;
  background: linear-gradient(96deg, var(--cx-brand), #2E7CF6 60%, var(--cx-cyan));
  background-size: 180% 100%;
  box-shadow: 0 10px 28px rgba(22, 93, 255, .32);
}
.cx-btn-primary:hover {
  transform: translateY(-2px);
  background-position: 100% 0;
  box-shadow: 0 16px 34px rgba(22, 93, 255, .42);
}
.cx-btn-ghost {
  color: var(--cx-brand-700);
  background: #fff;
  border: 1px solid rgba(22, 93, 255, .28);
}
.cx-btn-ghost:hover {
  transform: translateY(-2px);
  background: var(--cx-brand-50);
  border-color: var(--cx-brand);
}
.cx-btn-accent {
  color: #3A2000;
  background: linear-gradient(96deg, #FFC24B, var(--cx-accent));
  box-shadow: 0 10px 26px rgba(255, 154, 46, .34);
}
.cx-btn-accent:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(255, 154, 46, .45); }

.cx-link-more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  color: var(--cx-brand);
}
.cx-link-more svg { width: 16px; height: 16px; transition: transform .25s ease; }
.cx-link-more:hover svg { transform: translateX(4px); }

/* ---------- 滚动揭示 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s cubic-bezier(.2, .65, .28, 1), transform .7s cubic-bezier(.2, .65, .28, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal].is-in { opacity: 1; transform: none; }

@keyframes cxFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
.cx-float { animation: cxFloat 7s ease-in-out infinite; }
.cx-float-slow { animation: cxFloat 10s ease-in-out infinite; }

@keyframes cxSpinSlow { to { transform: rotate(360deg); } }
.cx-orbit { animation: cxSpinSlow 26s linear infinite; }

/* ---------- 信号脉冲（舆情/监测） ---------- */
.cx-pulse { position: relative; width: 10px; height: 10px; border-radius: 50%; background: #22C55E; }
.cx-pulse::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(34, 197, 94, .55);
  animation: cxPulseRing 2.2s ease-out infinite;
}
@keyframes cxPulseRing {
  0% { transform: scale(.55); opacity: .9; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ---------- 跑马灯 ---------- */
.cx-marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.cx-marquee-track { display: flex; width: max-content; animation: cxMarquee 32s linear infinite; }
.cx-marquee:hover .cx-marquee-track { animation-play-state: paused; }
@keyframes cxMarquee { to { transform: translateX(-50%); } }

/* ---------- 深色区块 ---------- */
.cx-dark {
  background:
    radial-gradient(120% 80% at 12% 0%, rgba(22, 93, 255, .45), transparent 60%),
    radial-gradient(100% 70% at 90% 100%, rgba(54, 191, 250, .28), transparent 55%),
    linear-gradient(160deg, #071023 0%, #0B1836 45%, #060C1F 100%);
  color: #E8EEFA;
}
.cx-dark h1, .cx-dark h2, .cx-dark h3, .cx-dark h4 { color: #fff; }
.cx-dark .cx-card {
  background: rgba(255, 255, 255, .05);
  border-color: rgba(255, 255, 255, .12);
  box-shadow: none;
  color: #DCE6F7;
}
.cx-dark .cx-card:hover {
  border-color: rgba(54, 191, 250, .5);
  box-shadow: var(--cx-shadow-glow);
}
.cx-dark .cx-icon-tile { background: rgba(255, 255, 255, .1); color: #8FD4FF; }

/* ---------- 数据可视化构件 ---------- */
.cx-bar {
  height: 100%;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--cx-cyan), var(--cx-brand));
  transition: height .9s cubic-bezier(.2, .7, .2, 1);
}
.cx-bar.is-muted { background: linear-gradient(180deg, #C6D6EE, #9DB2D6); }

.cx-spark { stroke-dasharray: 600; stroke-dashoffset: 600; animation: cxDraw 2.4s ease forwards; }
@keyframes cxDraw { to { stroke-dashoffset: 0; } }

.cx-ring { transform: rotate(-90deg); }
.cx-ring circle { fill: none; stroke-width: 10; stroke-linecap: round; }
.cx-ring .track { stroke: rgba(255, 255, 255, .16); }
.cx-ring .value { stroke: url(#cxRingGrad); animation: cxRing 1.8s ease forwards; }
@keyframes cxRing { from { stroke-dashoffset: var(--ring-len, 264); } to { stroke-dashoffset: var(--ring-off, 60); } }

/* ---------- 表单 ---------- */
.cx-input {
  width: 100%;
  padding: 15px 18px;
  border-radius: 14px;
  border: 1px solid #DCE5F2;
  background: #fff;
  font-size: 15px;
  color: #1B2437;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.cx-input:focus {
  outline: none;
  border-color: var(--cx-brand);
  box-shadow: 0 0 0 4px rgba(22, 93, 255, .13);
}
.cx-input::placeholder { color: #98A8C4; }

.cx-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  background: #EEF3FB;
  color: #46577A;
  border: 1px solid #E1E9F5;
  transition: all .25s ease;
}
.cx-chip:hover { background: var(--cx-brand); color: #fff; border-color: var(--cx-brand); transform: translateY(-1px); }
.cx-chip.is-active { background: var(--cx-brand); color: #fff; border-color: var(--cx-brand); }
.cx-chip:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(22, 93, 255, .18); }

.cx-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3px;
}
.cx-tag-blue { background: rgba(22, 93, 255, .1); color: var(--cx-brand-700); }
.cx-tag-amber { background: rgba(255, 154, 46, .16); color: #A15C00; }
.cx-tag-green { background: rgba(34, 197, 94, .13); color: #157347; }
.cx-tag-red { background: rgba(239, 68, 68, .12); color: #B3261E; }
.cx-tag-cyan { background: rgba(54, 191, 250, .16); color: #04688F; }
.cx-tag-dark { background: rgba(255, 255, 255, .12); color: #CFE3FF; }

/* ---------- 时间轴 ---------- */
.cx-timeline { position: relative; }
.cx-timeline::before {
  content: "";
  position: absolute;
  left: 15px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--cx-brand), var(--cx-cyan), rgba(54, 191, 250, .1));
}
.cx-timeline-item { position: relative; padding-left: 54px; }
.cx-timeline-item::before {
  content: "";
  position: absolute;
  left: 8px; top: 22px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--cx-brand);
  box-shadow: 0 0 0 4px rgba(22, 93, 255, .12);
}

/* ---------- 步骤条 ---------- */
.cx-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--cx-brand), var(--cx-cyan));
  box-shadow: 0 6px 16px rgba(22, 93, 255, .3);
}

/* ---------- 表格 ---------- */
.cx-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14.5px; }
.cx-table th {
  text-align: left;
  padding: 14px 16px;
  font-weight: 600;
  color: #46577A;
  background: #F2F6FC;
  border-bottom: 1px solid #E2EAF5;
  white-space: nowrap;
}
.cx-table td { padding: 14px 16px; border-bottom: 1px solid #EDF2F8; color: #2B3A5A; }
.cx-table tbody tr { transition: background .2s ease; }
.cx-table tbody tr:hover { background: #F7FAFF; }
.cx-table th:first-child { border-top-left-radius: 12px; }
.cx-table th:last-child { border-top-right-radius: 12px; }

/* ---------- 导航 ---------- */
#cx-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  transition: background .3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
#cx-header[data-tone="dark"] { background: rgba(6, 12, 31, .55); }
#cx-header.is-stuck { box-shadow: 0 4px 24px rgba(9, 22, 48, .1); }
#cx-header.is-stuck[data-tone="dark"] { background: rgba(6, 12, 31, .88); }
.cx-navlink {
  position: relative;
  font-weight: 500;
  font-size: 15px;
  color: #4A5B7B;
  padding: 8px 2px;
  transition: color .25s ease;
  white-space: nowrap;
}
.cx-navlink:hover { color: var(--cx-brand); }
.cx-navlink::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cx-brand), var(--cx-cyan));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}
.cx-navlink:hover::after,
.cx-navlink.is-active::after { transform: scaleX(1); }
.cx-navlink.is-active { color: var(--cx-brand); font-weight: 600; }
#cx-header[data-tone="dark"] .cx-navlink { color: rgba(232, 238, 250, .82); }
#cx-header[data-tone="dark"] .cx-navlink:hover,
#cx-header[data-tone="dark"] .cx-navlink.is-active { color: #fff; }
#cx-header[data-tone="light"] .cx-navlink.is-active { color: var(--cx-brand); }
/* 深色头部下蓝底 logo 不可读，转为白色剪影（保留透明通道） */
#cx-header[data-tone="dark"] .cx-logo { filter: brightness(0) invert(1); }
.cx-logo--invert { filter: brightness(0) invert(1); }

/* ---------- 锚点定位（固定头部遮挡补偿） ---------- */
[id] { scroll-margin-top: 92px; }

/* ---------- 回到顶部 ---------- */
#cx-top {
  position: fixed;
  right: 22px; bottom: 26px;
  width: 46px; height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--cx-brand), var(--cx-cyan));
  box-shadow: 0 12px 28px rgba(22, 93, 255, .38);
  opacity: 0;
  transform: translateY(16px) scale(.9);
  pointer-events: none;
  transition: all .3s ease;
  z-index: 55;
}
#cx-top.is-on { opacity: 1; transform: none; pointer-events: auto; }
#cx-top svg { width: 20px; height: 20px; }

/* ---------- 进度条 ---------- */
#cx-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--cx-brand), var(--cx-cyan), var(--cx-accent));
  z-index: 70;
  transition: width .12s linear;
}

/* ---------- 手风琴 ---------- */
.cx-acc-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .38s cubic-bezier(.2, .7, .2, 1);
}
.cx-acc.is-open .cx-acc-body { grid-template-rows: 1fr; }
.cx-acc-body > div { overflow: hidden; }
.cx-acc .cx-acc-sign { transition: transform .3s ease; }
.cx-acc.is-open .cx-acc-sign { transform: rotate(45deg); }

/* ---------- 选项卡 ---------- */
.cx-tab {
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14.5px;
  color: #5B6C8C;
  background: transparent;
  border: 1px solid transparent;
  transition: all .25s ease;
  cursor: pointer;
  white-space: nowrap;
}
.cx-tab:hover { color: var(--cx-brand); background: #EFF4FD; }
.cx-tab.is-active {
  color: #fff;
  background: linear-gradient(96deg, var(--cx-brand), #2E7CF6);
  box-shadow: 0 8px 20px rgba(22, 93, 255, .28);
}
.cx-panel { display: none; }
.cx-panel.is-active { display: block; animation: cxPanelIn .45s ease; }
tr.cx-panel.is-active { display: table-row; }
tbody.cx-panel.is-active { display: table-row-group; }
@keyframes cxPanelIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- 内页页头与面包屑 ---------- */
.cx-page-hero {
  position: relative;
  overflow: hidden;
  padding: 132px 0 64px;
  background:
    radial-gradient(90% 70% at 15% 0%, rgba(22, 93, 255, .16), transparent 60%),
    radial-gradient(70% 60% at 95% 100%, rgba(54, 191, 250, .16), transparent 55%),
    linear-gradient(180deg, #F2F6FE 0%, #F6F8FC 100%);
}
.cx-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; color: #8496B4; }
.cx-breadcrumb a { color: #5B6C8C; transition: color .2s ease; }
.cx-breadcrumb a:hover { color: var(--cx-brand); }
.cx-breadcrumb svg { width: 14px; height: 14px; opacity: .55; }

/* ---------- 正文排版 ---------- */
.cx-prose { font-size: 16px; line-height: 1.95; color: #33415C; }
.cx-prose > h2 { font-size: 22px; font-weight: 600; color: #131C2E; margin: 40px 0 14px; }
.cx-prose > h3 { font-size: 18px; font-weight: 600; color: #131C2E; margin: 30px 0 12px; }
.cx-prose > p { margin: 0 0 18px; }
.cx-prose > ul { margin: 0 0 20px; padding-left: 0; list-style: none; }
.cx-prose > ul > li { position: relative; padding-left: 22px; margin-bottom: 9px; }
.cx-prose > ul > li::before {
  content: ""; position: absolute; left: 4px; top: 13px;
  width: 7px; height: 7px; border-radius: 2px; transform: rotate(45deg);
  background: linear-gradient(135deg, var(--cx-brand), var(--cx-cyan));
}
.cx-prose > blockquote {
  margin: 26px 0; padding: 18px 22px; border-left: 3px solid var(--cx-brand);
  background: #F4F8FF; border-radius: 0 12px 12px 0; color: #33415C; font-size: 15.5px;
}
.cx-prose a { color: var(--cx-brand); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.cx-prose > table { width: 100%; margin: 22px 0; }
.cx-prose :is(code, kbd) {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: .88em; padding: 2px 6px; border-radius: 5px;
  background: #EEF3FB; color: #0E3FBF; word-break: break-all;
}

/* ---------- 体检表 ---------- */
.cx-check label {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
  border: 1px solid #E7EDF6; background: #fff;
  cursor: pointer; transition: all .22s ease;
}
.cx-check label:hover { border-color: rgba(22, 93, 255, .4); background: #F9FBFF; }
.cx-check input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 20px; height: 20px; flex: none; margin-top: 1px;
  border: 2px solid #C3D0E6; border-radius: 6px; background: #fff;
  display: grid; place-content: center; cursor: pointer; transition: all .2s ease;
}
.cx-check input[type="checkbox"]::after {
  content: ""; width: 10px; height: 10px; transform: scale(0);
  clip-path: polygon(14% 47%, 0 61%, 40% 100%, 100% 22%, 86% 8%, 39% 70%);
  background: #fff; transition: transform .18s ease;
}
.cx-check input[type="checkbox"]:checked { background: var(--cx-brand); border-color: var(--cx-brand); }
.cx-check input[type="checkbox"]:checked::after { transform: scale(1); }
.cx-check input[type="checkbox"]:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(22, 93, 255, .18); }
.cx-check label.is-done { background: #F5F9FF; border-color: rgba(22, 93, 255, .28); }
.cx-check label.is-done > span { color: #7B8BA8; }

/* ---------- 代码/终端块 ---------- */
.cx-code {
  background: #0B1836; color: #CFE3FF; border-radius: 14px;
  padding: 18px 20px; font-size: 13.5px; line-height: 1.8;
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  overflow-x: auto; border: 1px solid rgba(255, 255, 255, .1);
}
.cx-code .c { color: #6C84AE; }
.cx-code .k { color: #8FD4FF; }
.cx-code .s { color: #7ED9A8; }

/* ==========================================================
   编辑层：版式、纹理、图谱与栏目组件
   目标是打破「等宽圆角卡片」的模板感，建立可辨识的版面节奏
   ========================================================== */

/* ---------- 版式原子 ---------- */
.cx-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: #7C8DAE;
}
.cx-eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: .6;
}
.cx-dark .cx-eyebrow { color: #74A8DE; }

.cx-display {
  font-family: "Noto Serif SC", "Songti SC", "STSong", "Source Han Serif SC", "SimSun", serif;
  font-weight: 600;
  letter-spacing: -.012em;
}

.cx-nums { font-variant-numeric: tabular-nums; }

/* 章节幽灵大字：压在内容后面，形成刊物感 */
.cx-num-ghost {
  position: absolute;
  top: -18px;
  right: 6px;
  font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
  font-size: clamp(112px, 17vw, 208px);
  font-weight: 700;
  line-height: .74;
  letter-spacing: -.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(22, 93, 255, .13);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.cx-dark .cx-num-ghost { -webkit-text-stroke-color: rgba(143, 212, 255, .16); }

.cx-hair {
  height: 1px;
  background: linear-gradient(90deg, rgba(22, 93, 255, .34), rgba(54, 191, 250, .22), transparent);
}

.cx-mark {
  background: linear-gradient(180deg, transparent 58%, rgba(255, 154, 46, .34) 58%);
  padding: 0 2px;
}

/* 首字下沉与段落引号 */
.cx-drop::first-letter {
  float: left;
  font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
  font-size: 58px;
  font-weight: 700;
  line-height: .86;
  padding: 6px 12px 0 0;
  color: var(--cx-brand-700);
}

/* 编辑口径行：标签 ······ 值 */
.cx-facts { list-style: none; margin: 0; padding: 0; }
.cx-facts li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(22, 93, 255, .18);
  font-size: 14px;
}
.cx-facts li:last-child { border-bottom: 0; }
.cx-facts dt,
.cx-facts .cx-facts-k { color: #7B8BA8; flex: none; }
.cx-facts .cx-facts-dot {
  flex: 1;
  min-width: 12px;
  height: 1px;
  background-image: radial-gradient(circle, rgba(120, 140, 175, .5) 1px, transparent 1px);
  background-size: 6px 1px;
  background-repeat: repeat-x;
  background-position: 0 100%;
  opacity: .8;
}
.cx-facts .cx-facts-v { color: #131C2E; font-weight: 600; text-align: right; }
.cx-dark .cx-facts li { border-bottom-color: rgba(255, 255, 255, .14); }
.cx-dark .cx-facts .cx-facts-v { color: #fff; }

/* ---------- 纹理 ---------- */
.cx-paper { position: relative; background: #F7F9FD; }
.cx-paper::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .38;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E");
}
.cx-paper > * { position: relative; z-index: 1; }

.cx-grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .5;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)' opacity='.22'/%3E%3C/svg%3E");
}

.cx-diag {
  background-image: repeating-linear-gradient(135deg, rgba(22, 93, 255, .07) 0 1px, transparent 1px 9px);
}

/* 指针光斑：仅精确指针设备，由 JS 写入 --mx/--my */
.cx-spot { --mx: 50%; --my: 20%; }
@media (pointer: fine) {
  .cx-spot::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(340px circle at var(--mx) var(--my), rgba(54, 191, 250, .16), transparent 62%);
    transition: opacity .4s ease;
  }
}

/* ---------- 卡片变体：印刷铭牌 / 深色石板 ---------- */
.cx-plate {
  position: relative;
  background: #fff;
  border: 1px solid #DCE5F1;
  border-radius: 3px;
  transition: transform .3s cubic-bezier(.22, .68, .32, 1), border-color .3s ease, box-shadow .3s ease;
}
.cx-plate::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  width: 46px;
  height: 3px;
  background: linear-gradient(90deg, var(--cx-brand), var(--cx-cyan));
  transition: width .34s ease;
}
.cx-plate:hover {
  transform: translateY(-4px);
  border-color: rgba(22, 93, 255, .42);
  box-shadow: 0 14px 34px rgba(9, 22, 48, .1);
}
.cx-plate:hover::before { width: 100%; }

.cx-slab {
  position: relative;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .13);
  border-left: 3px solid var(--cx-cyan);
  border-radius: 3px 14px 14px 3px;
  transition: background .3s ease, border-left-color .3s ease, transform .3s ease;
}
.cx-slab:hover {
  background: rgba(255, 255, 255, .085);
  border-left-color: var(--cx-accent);
  transform: translateX(4px);
}

/* 角标折角 */
.cx-fold::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 20px 20px;
  border-color: transparent transparent #EDF2FA transparent;
}

/* ---------- 引言块 ---------- */
.cx-pull {
  position: relative;
  padding: 30px 30px 30px 34px;
  border-top: 1px solid rgba(22, 93, 255, .2);
  border-bottom: 1px solid rgba(22, 93, 255, .2);
  font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
  font-size: clamp(19px, 2.4vw, 25px);
  line-height: 1.75;
  color: #1A2740;
}
.cx-pull::before {
  content: "\201C";
  position: absolute;
  left: 4px;
  top: -6px;
  font-size: 74px;
  line-height: 1;
  color: rgba(22, 93, 255, .2);
}
.cx-dark .cx-pull { color: #E8EEFA; border-color: rgba(255, 255, 255, .18); }
.cx-dark .cx-pull::before { color: rgba(143, 212, 255, .34); }

/* ---------- 依据印章 ---------- */
.cx-stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  padding: 6px;
  border-radius: 50%;
  border: 1px dashed rgba(22, 93, 255, .45);
  color: var(--cx-brand-700);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  transform: rotate(-7deg);
  background: rgba(22, 93, 255, .05);
}
.cx-dark .cx-stamp { border-color: rgba(143, 212, 255, .45); color: #8FD4FF; background: rgba(143, 212, 255, .07); }

/* ---------- 资产关系图谱 ---------- */
.cx-graph .cx-glink {
  stroke: rgba(54, 191, 250, .5);
  stroke-width: 1.4;
  fill: none;
  stroke-dasharray: 5 9;
  animation: cxFlow 7s linear infinite;
}
@keyframes cxFlow { to { stroke-dashoffset: -140; } }
.cx-graph .cx-gnode {
  fill: rgba(255, 255, 255, .07);
  stroke: rgba(143, 212, 255, .55);
  stroke-width: 1.4;
  transition: fill .3s ease, stroke .3s ease, r .3s ease;
}
.cx-graph .cx-glabel {
  font-size: 12.5px;
  font-weight: 600;
  fill: #BFD4F2;
  transition: fill .3s ease;
}
.cx-graph .cx-gsub { font-size: 10.5px; fill: #6C84AE; }
.cx-graph [data-node] { cursor: pointer; }
.cx-graph [data-node]:hover .cx-gnode,
.cx-graph [data-node].is-on .cx-gnode {
  fill: rgba(54, 191, 250, .26);
  stroke: #7FE3FF;
}
.cx-graph [data-node]:hover .cx-glabel,
.cx-graph [data-node].is-on .cx-glabel { fill: #fff; }
.cx-graph.is-focus [data-node]:not(.is-on) { opacity: .34; }
.cx-graph .cx-halo {
  fill: none;
  stroke: rgba(54, 191, 250, .35);
  stroke-width: 1;
  transform-origin: center;
  animation: cxHalo 3.6s ease-out infinite;
}
@keyframes cxHalo {
  0% { transform: scale(.7); opacity: .85; }
  100% { transform: scale(1.55); opacity: 0; }
}

/* ---------- 情报流轮播 ---------- */
.cx-ticker { position: relative; display: grid; }
.cx-ticker > li {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .5s ease, transform .5s cubic-bezier(.2, .65, .28, 1);
  pointer-events: none;
}
.cx-ticker > li.is-on { opacity: 1; transform: none; pointer-events: auto; }
.cx-ticker-dots { display: flex; gap: 6px; }
.cx-ticker-dots button {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(22, 93, 255, .24);
  transition: all .3s ease;
}
.cx-ticker-dots button.is-on { width: 22px; background: var(--cx-brand); }

/* ---------- 侧栏目录（scrollspy） ---------- */
.cx-sticky { position: sticky; top: 104px; }
.cx-toc { list-style: none; margin: 0; padding: 0; border-left: 1px solid #DFE7F2; }
.cx-toc a {
  display: block;
  padding: 8px 0 8px 16px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  font-size: 14px;
  color: #7B8BA8;
  transition: color .25s ease, border-color .25s ease, background .25s ease;
}
.cx-toc a:hover { color: var(--cx-brand); background: #F5F9FF; }
.cx-toc a.is-on { color: var(--cx-brand-700); font-weight: 600; border-left-color: var(--cx-brand); }

/* ---------- 节点日历卡 ---------- */
.cx-date {
  flex: none;
  width: 78px;
  border-radius: 8px;
  border: 1px solid rgba(22, 93, 255, .2);
  background: linear-gradient(180deg, #F2F7FF, #fff);
  text-align: center;
  padding: 8px 4px;
}
.cx-date .cx-date-m { font-size: 11px; letter-spacing: .1em; color: #7B8BA8; }
.cx-date .cx-date-d { font-size: 26px; font-weight: 700; line-height: 1.1; color: var(--cx-brand-700); }
.cx-date.is-soon { border-color: rgba(255, 154, 46, .5); background: linear-gradient(180deg, #FFF6E9, #fff); }
.cx-date.is-soon .cx-date-d { color: #A15C00; }

.cx-countdown { display: flex; gap: 3px; }
.cx-countdown span {
  min-width: 30px;
  padding: 5px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #fff;
  text-align: center;
}
.cx-countdown i { font-style: normal; font-size: 10.5px; color: #7E93B5; display: block; font-weight: 500; }

/* ---------- 术语条 ---------- */
.cx-term {
  position: relative;
  padding: 20px 22px;
  border-bottom: 1px solid #E7EDF6;
  transition: background .25s ease, border-color .25s ease;
}
.cx-term:hover { background: #FAFCFF; border-color: rgba(22, 93, 255, .3); }
.cx-term abbr { text-decoration: none; border-bottom: 1px dashed rgba(22, 93, 255, .4); cursor: help; }
.cx-term-abbr {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: .06em;
  color: #7B8BA8;
}
.cx-letter {
  position: sticky;
  top: 72px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--cx-brand-700);
  background: linear-gradient(180deg, #fff 70%, rgba(255, 255, 255, .0));
  padding: 10px 0 8px;
}
.cx-letter::after { content: ""; flex: 1; height: 1px; background: rgba(22, 93, 255, .16); }

/* ---------- 反向前缀跑马灯 ---------- */
.cx-marquee--rev .cx-marquee-track { animation-direction: reverse; }
.cx-marquee--slow .cx-marquee-track { animation-duration: 62s; }
.cx-mono {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  letter-spacing: .02em;
}

/* ---------- 擦除式标题揭示 ---------- */
[data-reveal].cx-wipe {
  clip-path: inset(0 100% 0 0);
  transition: clip-path .9s cubic-bezier(.3, .7, .2, 1), opacity .6s ease, transform .7s cubic-bezier(.2, .65, .28, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].cx-wipe.is-in { clip-path: inset(0 0 0 0); }

/* ---------- 打印与降低动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  [data-reveal].cx-wipe { clip-path: none; }
  .cx-graph .cx-glink { animation: none; stroke-dasharray: 5 9; }
  .cx-graph .cx-halo { animation: none; opacity: 0; }
  .cx-marquee-track { animation: none; width: auto; flex-wrap: wrap; justify-content: center; }
}

@media print {
  #cx-header, #cx-top, #cx-progress, .cx-marquee { display: none !important; }
}
