/* ================================================================
   ============ 升级层：星系 · 理论 · 图解 · 酷炫化 ============
   ================================================================ */

/* ---------- 滚动浮现 ---------- */
.rv{opacity:0;transform:translateY(20px);transition:opacity .7s cubic-bezier(.2,.6,.2,1),transform .7s cubic-bezier(.2,.6,.2,1)}
.rv.in{opacity:1;transform:none}
@media (prefers-reduced-motion:reduce){.rv{opacity:1;transform:none;transition:none}}

/* ---------- 首页 hero 粒子 ---------- */
.hero{position:relative}
#heroFx{position:absolute;inset:-30px -60px -10px;width:calc(100% + 120px);height:calc(100% + 40px);pointer-events:none;opacity:.9}
.hero-in{position:relative;z-index:1}

/* ---------- 门户卡 ---------- */
.portals-sec{margin-top:8px}
.portals{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.portal{
  position:relative;display:block;padding:26px 26px 22px;border-radius:18px;overflow:hidden;
  border:1px solid var(--line-2);background:
    radial-gradient(420px 200px at 88% -30%,var(--gold-dim),transparent 70%),
    linear-gradient(160deg,var(--bg-3),var(--bg-2));
  transition:transform .25s,border-color .25s,box-shadow .25s;
}
.portal::before{
  content:"";position:absolute;inset:0;border-radius:18px;padding:1px;pointer-events:none;opacity:0;transition:.3s;
  background:linear-gradient(130deg,var(--gold-2),transparent 40%,transparent 60%,var(--gold));
  -webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);
  -webkit-mask-composite:xor;mask-composite:exclude;
}
.portal:hover{transform:translateY(-4px);border-color:transparent;box-shadow:0 22px 44px -20px rgba(201,162,74,.35)}
.portal:hover::before{opacity:1}
.portal-glyph{
  position:absolute;right:18px;top:6px;font-size:74px;line-height:1;color:var(--gold);opacity:.14;
  font-family:var(--serif);transition:.3s;
}
.portal:hover .portal-glyph{opacity:.3;transform:rotate(12deg) scale(1.06)}
.portal-tag{
  display:inline-block;font-size:10.5px;letter-spacing:.22em;color:var(--gold);border:1px solid color-mix(in srgb,var(--gold) 45%,transparent);
  border-radius:100px;padding:3px 11px;margin-bottom:13px;font-weight:600;
}
.portal h3{font-family:var(--serif);font-size:23px;font-weight:700;margin-bottom:8px}
.portal p{font-size:13.8px;color:var(--txt-2);line-height:1.75;max-width:400px}
.portal-go{display:inline-block;margin-top:14px;font-size:13.5px;color:var(--gold);font-weight:600;transition:.2s}
.portal:hover .portal-go{letter-spacing:.06em}

/* ---------- 模块页水印编号 ---------- */
.mod-hero{position:relative;overflow:visible}
.mod-wm{
  position:absolute;right:-10px;top:8px;font-family:var(--serif);font-weight:700;
  font-size:clamp(110px,17vw,190px);line-height:1;color:transparent;pointer-events:none;user-select:none;
  -webkit-text-stroke:1px color-mix(in srgb,var(--gold) 26%,transparent);
  opacity:.6;
}
.theory-hero .th-line{font-size:13px;letter-spacing:.3em;color:var(--gold);margin-top:12px;font-weight:600}

/* ---------- 图解 ---------- */
.viz-box{
  border:1px solid var(--line);border-radius:var(--radius);padding:18px 14px 8px;overflow-x:auto;
  background:
    radial-gradient(600px 300px at 80% 0%,var(--gold-dim),transparent 70%),
    var(--bg-2);
}
.viz-box svg{display:block;width:100%;min-width:640px;height:auto;stroke:none;stroke-width:1}
.viz-cap{margin-top:12px;font-size:13.6px;color:var(--txt-2);line-height:1.75}
/* SVG 通用件（stroke:none 挡住 style.css 全局 svg 描边的继承，否则文字会被描粗） */
.viz-box svg text{font-family:var(--sans);stroke:none}
.vb{fill:var(--bg-3);stroke:var(--line-2);stroke-width:1}
.vbgold{fill:color-mix(in srgb,var(--gold) 13%,var(--bg-3));stroke:color-mix(in srgb,var(--gold) 55%,transparent);stroke-width:1.2}
.vbg{fill:color-mix(in srgb,var(--green) 12%,var(--bg-3));stroke:color-mix(in srgb,var(--green) 45%,transparent);stroke-width:1}
.vbr{fill:color-mix(in srgb,var(--red) 10%,var(--bg-3));stroke:color-mix(in srgb,var(--red) 45%,transparent);stroke-width:1}
.vchip{fill:var(--bg-4);stroke:var(--line-2);stroke-width:1}
.vgate{fill:color-mix(in srgb,var(--gold) 8%,var(--bg-3));stroke:var(--gold);stroke-width:1.2}
.vgatebox{fill:var(--bg-3);stroke:var(--gold);stroke-width:1;stroke-dasharray:5 4}
.vt{fill:var(--txt);font-size:13.5px}
.vt2{fill:var(--txt-2);font-size:12.5px}
.vtg{fill:var(--green);font-size:13.5px;font-weight:500}
.vtr{fill:var(--red);font-size:12.5px}
.vth{fill:var(--gold);font-size:19px;font-weight:600}
.vth2{fill:#0c0d10;font-size:15px;font-weight:600}
.vth3{fill:var(--txt);font-size:14.5px;font-weight:550}
.vtdark{fill:#0c0d10;font-size:12px;font-weight:500}
html[data-theme="light"] .vth2,html[data-theme="light"] .vtdark{fill:#fffdf7}
.vs{fill:var(--txt-3);font-size:11.5px}
.vs2{fill:var(--txt-2);font-size:12.5px}
.vsr{fill:var(--red);font-size:11.5px}
.vsg{fill:var(--green);font-size:11.5px}
.vsg2{fill:var(--green);font-size:12px}
.vsgold{fill:var(--gold);font-size:12.5px;font-weight:500}
.vlab{fill:var(--gold);font-size:12.5px;font-weight:600;letter-spacing:.12em}
.vl{stroke:var(--gold);stroke-width:1.6;fill:none}
.vlg{stroke:var(--green);stroke-width:1.5;fill:none}
.vlg2{stroke:var(--gold);stroke-width:1.6;fill:none;opacity:.9}
.vlr{stroke:var(--red);stroke-width:1.4;fill:none}
.vlm{stroke:var(--txt-3);stroke-width:1.2;fill:none}
.vld{stroke:var(--txt-3);stroke-width:1.1;fill:none;stroke-dasharray:4 4}
.vaxis{stroke:var(--line-2);stroke-width:1.3;fill:none}
.vground{stroke:var(--line-2);stroke-width:2;stroke-dasharray:7 5}
.vlead{stroke:color-mix(in srgb,var(--gold) 45%,transparent);stroke-width:1;stroke-dasharray:3 4}
.vbrace{stroke:var(--txt-3);stroke-width:1.2;fill:none}
.vring{fill:none;stroke:var(--gold);stroke-width:1.1;opacity:.7}
.vring2{fill:none;stroke:var(--line-2);stroke-width:1.2;stroke-dasharray:5 5}
.vcore{fill:var(--gold);stroke:var(--gold-2);stroke-width:2}
.vhalo{fill:var(--gold-dim);stroke:var(--gold);stroke-width:1.2}
.vdot-g{fill:var(--gold)}
.vdot-m{fill:var(--txt-3)}
.vdot-r{fill:var(--red)}
.vnode-m{fill:var(--bg-4);stroke:var(--txt-3);stroke-width:1.4}
.vletter{fill:var(--gold)}
.vletter-t{fill:#0c0d10;font-size:14px;font-weight:700}
html[data-theme="light"] .vletter-t{fill:#fffdf7}
.vzone{fill:var(--gold-dim);opacity:.55}
.vzone-r{fill:color-mix(in srgb,var(--red) 7%,transparent)}
.vzone-g{fill:var(--gold-dim)}
.vspec{fill:none;stroke:var(--line-2);stroke-width:1.4}
.vtri{fill:var(--gold-dim);stroke:var(--gold);stroke-width:1.4}
.vcurve-base{stroke:var(--txt-2);stroke-width:2.4;fill:none}
.vcurve-r{stroke:var(--red);stroke-width:2.4;fill:none}
.vcurve-rd{stroke:var(--red);stroke-width:1.8;fill:none;stroke-dasharray:7 5}
.vcurve-g{stroke:var(--gold);stroke-width:2.4;fill:none}
.vcurve-gr{stroke:var(--green);stroke-width:2.4;fill:none}
.vcurve-g2{stroke:var(--gold);stroke-width:2.6;fill:none}
.vcurve-audit{stroke:var(--green);stroke-width:1.6;fill:none}
.vbar-gold{fill:var(--gold)}
.vbar-green{fill:var(--green)}
.vbar-red{fill:var(--red)}
.vbar-m{fill:var(--txt-3)}
.vfig{stroke:var(--gold);stroke-width:2.6;fill:none}
.vfig circle{fill:var(--gold-dim)}
.vfig2{stroke:var(--txt-2);stroke-width:2.2;fill:none}
.vcard{cursor:default}
.vcard.on rect{stroke:var(--gold)}
.vcard.on .vlead{stroke:var(--gold);stroke-dasharray:none;stroke-width:1.6}

/* ---------- 硬核模型 / 理论页 ---------- */
.eq-grid{display:grid;gap:13px}
.eq-card{
  border:1px solid var(--line);border-radius:var(--radius);padding:20px 22px;background:var(--bg-2);
  transition:border-color .25s,box-shadow .25s;position:relative;overflow:hidden;
}
.eq-card::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:linear-gradient(var(--gold-2),var(--gold));opacity:.8}
.eq-card:hover{border-color:color-mix(in srgb,var(--gold) 40%,transparent);box-shadow:0 14px 34px -20px rgba(201,162,74,.3)}
.eq-name{font-size:12px;letter-spacing:.2em;color:var(--txt-3);font-weight:700;margin-bottom:9px}
.frm{
  font-family:var(--serif);font-size:19.5px;color:var(--txt);letter-spacing:.02em;line-height:1.5;
  padding:13px 18px;border-radius:10px;background:var(--bg-3);border:1px solid var(--line);
  display:inline-block;margin-bottom:13px;
}
.frm-big{font-size:clamp(19px,3vw,25px);display:block;text-align:center;padding:20px 18px;
  background:radial-gradient(400px 120px at 50% 0%,var(--gold-dim),transparent 75%),var(--bg-3)}
.eq-read{font-size:14.2px;color:var(--txt-2);line-height:1.8;margin-bottom:11px}
.eq-use{
  display:flex;gap:10px;align-items:baseline;font-size:13.6px;color:var(--txt-2);line-height:1.75;
  border-top:1px dashed var(--line-2);padding-top:11px;margin-top:2px;
}
.eq-use b{flex:none;color:var(--gold);font-size:11px;letter-spacing:.18em;font-weight:700}
.ax-card{
  border:1px solid var(--line);border-radius:var(--radius);padding:20px 22px;background:var(--bg-2);
  transition:.25s;
}
.ax-card:hover{border-color:color-mix(in srgb,var(--gold) 40%,transparent);transform:translateY(-2px)}
.ax-card.law{background:linear-gradient(170deg,var(--bg-3),var(--bg-2))}
.ax-head{display:flex;align-items:center;gap:11px;margin-bottom:11px}
.ax-head h4{font-size:16.5px;font-weight:700}
.ax-id{
  flex:none;font-family:var(--serif);font-size:13px;font-weight:700;color:var(--gold);
  border:1px solid color-mix(in srgb,var(--gold) 50%,transparent);border-radius:8px;padding:3px 9px;
  background:var(--gold-dim);
}
.ax-s{font-size:14.6px;color:var(--txt);line-height:1.8;margin-bottom:9px}
.ax-ev{font-size:12.8px;color:var(--txt-3);line-height:1.7;margin-bottom:11px}
.eq-big{
  border:1px solid var(--line);border-radius:16px;padding:26px 28px;background:var(--bg-2);margin-bottom:18px;
  position:relative;overflow:hidden;
}
.eq-big::after{
  content:"";position:absolute;right:-40px;top:-40px;width:180px;height:180px;border-radius:50%;
  background:radial-gradient(circle,var(--gold-dim),transparent 70%);pointer-events:none;
}
.eq-terms{display:grid;gap:7px;margin:14px 0}
.eq-term{display:grid;grid-template-columns:88px 1fr;gap:12px;font-size:13.6px;color:var(--txt-2);line-height:1.7}
.eq-term .frm-td{font-family:var(--serif);color:var(--gold);font-size:15px;text-align:right}

/* ---------- 依赖栈 ---------- */
.stack{display:flex;flex-direction:column;gap:10px}
.stack-layer{
  display:grid;grid-template-columns:120px 1fr;gap:16px;border:1px solid var(--line);border-radius:14px;
  padding:16px 20px;background:linear-gradient(90deg,var(--gold-dim),transparent 30%),var(--bg-2);
  transition:.25s;
}
.stack-layer:hover{border-color:color-mix(in srgb,var(--gold) 45%,transparent);transform:translateX(4px)}
.stack-side{display:flex;align-items:center}
.stack-k{font-family:var(--serif);font-size:16px;font-weight:700;color:var(--gold)}
.stack-items{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:8px}
.stack-items a{
  font-size:13px;padding:5px 13px;border-radius:100px;border:1px solid var(--line-2);color:var(--txt);
  transition:.18s;background:var(--bg-3);
}
.stack-items a:hover{border-color:var(--gold);color:var(--gold)}
.stack-d{font-size:13.2px;color:var(--txt-2);line-height:1.7}
.stack-foot{text-align:center;font-size:12.5px;color:var(--gold);margin-top:8px;letter-spacing:.08em}

/* ---------- 概念闪光（星系直达） ---------- */
@keyframes cflash{0%,100%{box-shadow:0 0 0 0 transparent}25%{box-shadow:0 0 0 4px color-mix(in srgb,var(--gold) 45%,transparent)}60%{box-shadow:0 0 0 2px color-mix(in srgb,var(--gold) 30%,transparent)}}
.concept.flash{animation:cflash 2.4s ease-out}

/* ---------- 侧栏星标项 ---------- */
.sb-star{color:var(--gold);font-weight:600}
.sb-star:hover{background:var(--gold-dim)}

/* ---------- 地位星系 ---------- */
body.route-map main{padding:60px 0 0;margin-left:var(--sb-w)}
.cosmos{position:relative;height:calc(100vh - 60px);height:calc(100dvh - 60px);overflow:hidden;background:#07080c}
#cosCanvas{position:absolute;inset:0;cursor:grab;touch-action:none}
#cosCanvas:active{cursor:grabbing}
.cos-top{
  position:absolute;top:0;left:0;right:0;padding:20px 26px 0;display:flex;justify-content:space-between;
  align-items:flex-start;gap:14px;pointer-events:none;z-index:3;flex-wrap:wrap;
}
.cos-title h1{font-family:var(--serif);font-size:26px;font-weight:700;color:#e8e9ee;letter-spacing:.04em}
.cos-title p{font-size:12px;color:#6f7686;margin-top:4px;letter-spacing:.05em}
.cos-chips{display:flex;gap:7px;flex-wrap:wrap;pointer-events:auto}
.cos-chip{
  display:inline-flex;align-items:center;gap:7px;font-size:12px;color:#a8adba;padding:6px 13px;
  border:1px solid #262b36;border-radius:100px;background:rgba(17,19,24,.7);backdrop-filter:blur(8px);
  transition:.18s;opacity:.45;
}
.cos-chip.on{opacity:1;border-color:color-mix(in srgb,var(--pc) 55%,transparent)}
.cos-chip-dot{width:8px;height:8px;border-radius:50%;background:var(--pc)}
.cos-chip:hover{color:#e8e9ee}
.cos-search{position:absolute;left:26px;bottom:24px;z-index:4;width:min(320px,72vw)}
.cos-search input{
  width:100%;padding:11px 16px;border-radius:12px;border:1px solid #262b36;background:rgba(17,19,24,.85);
  color:#e8e9ee;font:inherit;font-size:13.5px;outline:none;backdrop-filter:blur(8px);
}
.cos-search input:focus{border-color:rgba(201,162,74,.6)}
.cos-hints{position:absolute;bottom:calc(100% + 8px);left:0;right:0;display:flex;flex-direction:column;gap:4px}
.cos-hint-item{
  text-align:left;font-size:13px;color:#e8e9ee;padding:9px 13px;border-radius:10px;
  border:1px solid #262b36;background:rgba(17,19,24,.92);cursor:pointer;transition:.15s;
}
.cos-hint-item:hover{border-color:rgba(201,162,74,.55);background:rgba(29,33,42,.95)}
.cos-hint{
  position:absolute;right:26px;bottom:26px;z-index:3;font-size:11.5px;color:#6f7686;letter-spacing:.08em;
  pointer-events:none;
}
.cos-panel{
  position:absolute;top:16px;right:16px;bottom:16px;width:min(400px,calc(100vw - 32px));z-index:5;
  border:1px solid #262b36;border-radius:18px;background:rgba(12,13,16,.9);backdrop-filter:blur(18px) saturate(1.4);
  transform:translateX(calc(100% + 24px));transition:transform .35s cubic-bezier(.3,.7,.2,1);
  display:flex;flex-direction:column;box-shadow:0 30px 80px -20px rgba(0,0,0,.8);
}
.cos-panel.on{transform:none}
.cos-close{
  position:absolute;top:12px;right:12px;width:32px;height:32px;border-radius:9px;color:#6f7686;
  display:grid;place-items:center;font-size:14px;transition:.18s;z-index:2;
}
.cos-close:hover{background:#1d212a;color:#e8e9ee}
.cos-panel-body{padding:26px 26px 22px;overflow-y:auto;color:#e8e9ee}
.cos-panel-body::-webkit-scrollbar{width:6px}
.cos-panel-body::-webkit-scrollbar-thumb{background:#333a49;border-radius:3px}
.cos-k{font-size:10.5px;letter-spacing:.26em;color:var(--gold);font-weight:700;margin-bottom:10px}
.cos-panel-body h2{font-family:var(--serif);font-size:21px;line-height:1.4;font-weight:700;margin-bottom:12px}
.cos-en{display:block;font-family:var(--sans);font-size:12px;color:#6f7686;letter-spacing:.08em;margin-top:4px;font-weight:400}
.cos-lab{font-size:10.5px;letter-spacing:.2em;color:#6f7686;font-weight:700;margin:14px 0 5px}
.cos-d{font-size:13.8px;color:#c6cad4;line-height:1.85}
.cos-d b{color:#e8e9ee}
.cos-d .mk{color:var(--gold);font-style:normal}
.cos-meta{font-size:12px;color:#6f7686;margin-top:12px}
.cos-go{
  display:block;text-align:center;margin-top:20px;padding:12px 18px;border-radius:11px;font-size:13.8px;font-weight:600;
  background:linear-gradient(140deg,var(--gold-2),var(--gold));color:#0c0d10;transition:.2s;
}
.cos-go:hover{transform:translateY(-2px);box-shadow:0 12px 28px -10px rgba(201,162,74,.5)}

/* ---------- 升级层响应式 ---------- */
@media (max-width:900px){
  body.route-map main{margin-left:0}
  .portals{grid-template-columns:1fr}
  .mod-wm{font-size:clamp(90px,20vw,130px);right:0}
  .stack-layer{grid-template-columns:1fr;gap:8px}
  .eq-term{grid-template-columns:64px 1fr}
  .eq-term .frm-td{text-align:left}
}
@media (max-width:640px){
  .cos-top{padding:14px 14px 0}
  .cos-title h1{font-size:20px}
  .cos-panel{top:auto;left:10px;right:10px;bottom:10px;max-height:62vh;width:auto;transform:translateY(calc(100% + 16px))}
  .cos-panel.on{transform:none}
  .cos-search{bottom:auto;top:118px;left:14px}
  .cos-hints{bottom:auto;top:calc(100% + 8px)}
  .cos-hint{display:none}
  .frm{font-size:16.5px;padding:11px 13px}
  .eq-big{padding:20px 18px}
  .viz-box svg{min-width:560px}
}
