/* 项目雷达（静态版）— Cyberpunk 2077 UI: 标志黄 #FCEE0A + 近黑底, 45° 切角,
   HUD 角框, 扫描线 + glitch. 与 Muse 全栈版（slug: space）同一套视觉语言，
   由原 theme.css 移植为无构建的纯 CSS。 */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=Barlow+Condensed:wght@500;600;700&display=swap');

:root {
  color-scheme: dark;
  --bg: #0a0a0c;
  --surface: #131316;
  --surface-2: #1c1c20;
  --surface-3: #232329;
  --text: #f2f2f0;
  --dim: #9d9da6;
  --dim-2: #6e6e78;
  --border: #2e2e35;
  --border-strong: #3f3f49;
  --accent: #fcee0a;
  --accent-ink: #0a0a0c;
  --accent-2: #00f0ff;
  --bad: #ff003c;
  --warn: #ffb000;
  --font-display: "Rajdhani", "Barlow Condensed", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-condensed: "Barlow Condensed", "Rajdhani", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }
html, body { overflow-x: hidden; }
body {
  margin: 0;
  background: var(--bg);
  background-image:
    linear-gradient(rgba(252, 238, 10, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(252, 238, 10, 0.018) 1px, transparent 1px);
  background-size: 44px 44px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
}

/* ---- global scanlines overlay ---- */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0, 0, 0, 0.14) 3px,
    rgba(0, 0, 0, 0.14) 4px
  );
  opacity: 0.55;
  mix-blend-mode: multiply;
}

h1, h3, p, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
a { color: var(--accent-2); }
.font-display { font-family: var(--font-display); }
.text-sm { font-size: 14px; }
.text-dim { color: var(--dim); }
.text-bad { color: var(--bad); }
.text-cc { color: var(--accent-2); }

/* ---- clip-path shapes: 2077 signature 45° cuts ---- */
.clip-cut {
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}
.clip-cut-sm {
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
}
.clip-chip {
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

/* ---- hazard stripes ---- */
.hazard {
  height: 8px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0px, var(--accent) 12px, #0a0a0c 12px, #0a0a0c 24px);
}
.hazard-thin {
  height: 5px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0px, var(--accent) 8px, #0a0a0c 8px, #0a0a0c 16px);
}
.hazard-gap { margin-top: 16px; }
.hazard-gap-lg { margin-top: 32px; }

/* ---- layout ---- */
.container { max-width: 1152px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.main-pad { padding-bottom: 40px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 2px solid var(--accent);
  background: rgba(10, 10, 12, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding-top: env(safe-area-inset-top);
}
.header-inner { padding-bottom: 12px; }
.header-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 12px; }
.site-title { font-size: 30px; line-height: 1.2; }
.title-size { font-size: 30px; }
.header-sub {
  padding-bottom: 4px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.35;
  color: var(--dim);
}
.stats-grid { margin-top: 12px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat-cell {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  padding: 6px 8px;
  text-align: center;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
}
.stat-label { margin-top: 4px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; color: var(--dim); }

.state-msg { padding: 64px 0; text-align: center; font-size: 14px; }
#loading { font-family: var(--font-mono); color: var(--dim); }
.btn-pad { margin-top: 12px; padding: 8px 16px; font-size: 14px; }

/* ---- panels & cards ---- */
.cp-panel { background: var(--surface); border: 1px solid var(--border-strong); }
.note-panel { margin-top: 16px; padding: 12px; }
.note-toggle {
  display: flex; width: 100%; align-items: center; justify-content: space-between;
  background: none; border: none; padding: 0; text-align: left; color: var(--text);
}
.note-arrow { font-family: var(--font-mono); color: var(--dim); }
.note-body { margin-top: 8px; font-size: 13px; line-height: 1.65; color: #d6d6d2; }

.cp-card {
  position: relative;
  background: linear-gradient(180deg, #17171b 0%, var(--surface) 90px);
  border: 1px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  padding: 16px 16px 16px 20px;
}
.cp-card-cut {
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}
.hud-corner { position: absolute; width: 16px; height: 16px; pointer-events: none; z-index: 2; }
.hud-tl { top: -1px; left: -1px; border-top: 2px solid var(--accent); border-left: 2px solid var(--accent); }
.hud-br { bottom: -1px; right: -1px; border-bottom: 2px solid var(--accent); border-right: 2px solid var(--accent); }
.verdict-bar { position: absolute; top: 0; bottom: 0; left: 0; width: 5px; }

/* Yellow inverse title block — the 2077 signature */
.cp-title-block {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 2px 14px 4px 10px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.1;
}
.cp-label-yellow, .cp-label-cyan, .cp-label-red, .cp-label-dark {
  display: inline-block;
  font-weight: 700;
  padding: 1px 8px 2px 6px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 7px) 100%, 0 100%);
}
.cp-label-yellow { background: var(--accent); color: var(--accent-ink); }
.cp-label-cyan { background: var(--accent-2); color: #00181c; }
.cp-label-red { background: var(--bad); color: #fff; }
.cp-label-dark {
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--border-strong);
  font-weight: 600;
  padding: 1px 7px 2px 6px;
}
.label-xs { font-size: 12px; }

/* ---- intermittent glitch pulse (PowerGlitch-style, restrained) ---- */
.glitch-pulse { position: relative; display: inline-block; }
.glitch-pulse::before,
.glitch-pulse::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}
.glitch-pulse::before { color: var(--bad); }
.glitch-pulse::after { color: var(--accent-2); }

@keyframes cp-glitch-jitter {
  0%, 92.9%, 97.1%, 100% { transform: translate(0, 0); }
  93.5% { transform: translate(-1px, 0); }
  95% { transform: translate(1px, 0); }
  96.5% { transform: translate(-1px, 0); }
}
@keyframes cp-glitch-a {
  0%, 92.9%, 97.1%, 100% { opacity: 0; transform: translate(0, 0); clip-path: inset(0 0 0 0); }
  93% { opacity: 0.9; transform: translate(-3px, 1px); clip-path: inset(8% 0 58% 0); }
  94.5% { opacity: 0.9; transform: translate(3px, -1px); clip-path: inset(62% 0 6% 0); text-shadow: 2px 0 var(--bad); }
  96% { opacity: 0.9; transform: translate(-2px, 0); clip-path: inset(34% 0 38% 0); }
}
@keyframes cp-glitch-b {
  0%, 92.9%, 97.1%, 100% { opacity: 0; transform: translate(0, 0); clip-path: inset(0 0 0 0); }
  93% { opacity: 0.9; transform: translate(3px, -1px); clip-path: inset(52% 0 12% 0); text-shadow: -2px 0 var(--accent-2); }
  94.5% { opacity: 0.9; transform: translate(-3px, 1px); clip-path: inset(4% 0 74% 0); }
  96% { opacity: 0.9; transform: translate(2px, 0); clip-path: inset(70% 0 2% 0); }
}
@media (prefers-reduced-motion: no-preference) {
  .glitch-pulse { animation: cp-glitch-jitter 6.5s linear infinite; animation-delay: var(--glitch-delay, 0s); }
  .glitch-pulse::before { animation: cp-glitch-a 6.5s linear infinite; animation-delay: var(--glitch-delay, 0s); }
  .glitch-pulse::after { animation: cp-glitch-b 6.5s linear infinite; animation-delay: var(--glitch-delay, 0s); }
}
@media (prefers-reduced-motion: reduce) {
  .glitch-pulse::before, .glitch-pulse::after { display: none; }
}

/* ---- glitch on hover (titles) ---- */
@keyframes cp-glitch {
  0% { transform: translate(0); text-shadow: none; }
  20% { transform: translate(-2px, 1px); text-shadow: 2px 0 var(--bad), -2px 0 var(--accent-2); }
  40% { transform: translate(2px, -1px); text-shadow: -2px 0 var(--bad), 2px 0 var(--accent-2); }
  60% { transform: translate(-1px, 0); text-shadow: 1px 0 var(--bad), -1px 0 var(--accent-2); }
  100% { transform: translate(0); text-shadow: none; }
}
.glitch-hover { display: inline-block; }
.glitch-hover:hover { animation: cp-glitch 0.28s steps(2, end) 2; }
@media (prefers-reduced-motion: reduce) {
  .glitch-hover:hover { animation: none; }
}

/* ---- chips / buttons / inputs ---- */
.chip-active {
  background: var(--accent) !important;
  color: var(--accent-ink) !important;
  border-color: var(--accent) !important;
  font-weight: 700;
}
.cp-btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  border: none;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  transition: filter 0.15s ease, transform 0.1s ease;
}
.cp-btn-primary:hover { filter: brightness(1.08); }
.cp-btn-primary:active { transform: translateY(1px); }
.cp-btn-secondary {
  background: #0a0a0c;
  color: var(--accent);
  border: 1px solid var(--accent);
  font-weight: 700;
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  transition: background 0.15s ease, transform 0.1s ease;
}
.cp-btn-secondary:hover { background: rgba(252, 238, 10, 0.14); }
.cp-btn-secondary:active { transform: translateY(1px); }
.cp-input {
  background: var(--surface);
  border: 2px solid var(--border-strong);
  border-left: 4px solid var(--border-strong);
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
  color: var(--text);
  font-family: inherit;
}
.cp-input:focus { border-color: var(--accent); border-left-color: var(--accent-2); outline: none; }
.cp-input::placeholder { color: var(--dim-2); }
.cp-chip { border-radius: 0; transition: border-color 0.15s ease, color 0.15s ease; }
.cp-chip:hover { border-color: var(--accent); color: var(--text); }

/* ---- segmented score blocks ---- */
.seg { height: 10px; flex: 1; clip-path: polygon(18% 0, 100% 0, 82% 100%, 0 100%); }
.seg-on-yellow { background: var(--accent); }
.seg-on-cyan { background: var(--accent-2); }
.seg-on-red { background: var(--bad); }
.seg-off { background: #2c2c33; }

/* ---- filters ---- */
.filters { margin-top: 16px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.module-chip {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  padding: 4px 10px;
  font-size: 12px;
  color: var(--dim);
}
.module-chip .chip-count { margin-left: 4px; font-family: var(--font-mono); font-weight: 700; }
.filter-row { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.verdict-group {
  display: flex;
  border: 1px solid var(--border-strong);
  background: var(--surface);
}
.verdict-btn {
  flex: 1;
  padding: 8px 10px;
  font-size: 12px;
  background: none;
  border: none;
  color: var(--dim);
}
.verdict-btn:hover { color: var(--text); }
.verdict-btn.active-yellow { background: var(--accent); font-weight: 700; color: #000; }
.verdict-btn.active-cyan { background: var(--accent-2); font-weight: 700; color: #000; }
.verdict-btn.active-red { background: var(--bad); font-weight: 700; color: #fff; }
.search-input { min-width: 0; flex: 1; padding: 8px 12px; font-size: 14px; }
.sort-label { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--dim); }
.sort-select { padding: 8px; font-size: 14px; }
.hit-count { margin-top: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--dim); }
.hit-count b { color: var(--accent); }
@media (min-width: 640px) {
  .filter-row { flex-direction: row; align-items: center; }
  .verdict-btn { flex: none; }
}

/* ---- cards grid ---- */
.cards-grid { margin-top: 16px; display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 640px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .cards-grid { grid-template-columns: repeat(3, 1fr); } }

.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.card-head-left { min-width: 0; }
.project-code { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em; color: var(--dim); }
.project-code b { margin-left: 8px; }
.card-tags { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tag-module { font-size: 11px; }
.tag-top8 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.05em; }
.score-block { flex-shrink: 0; text-align: right; }
.score-total { font-family: var(--font-display); font-size: 32px; font-weight: 700; line-height: 1; letter-spacing: -0.01em; }
.score-cap { margin-top: 2px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.05em; color: var(--dim); }
.card-name {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--text);
}
.card-oneliner { margin-top: 4px; font-size: 14px; line-height: 1.65; color: #d6d6d2; }
.card-verdict { margin-top: 10px; }

.meta-list { margin-top: 12px; border-top: 2px solid var(--border); padding-top: 12px; font-size: 13px; line-height: 1.65; }
.meta-row { display: flex; gap: 8px; margin-top: 6px; }
.meta-row:first-child { margin-top: 0; }
.meta-row dt { width: 64px; flex-shrink: 0; font-family: var(--font-mono); font-size: 12px; line-height: 20px; color: var(--dim); }
.meta-row dd { color: var(--text); }
.meta-evidence { font-weight: 700; color: var(--accent); }

.scores { margin-top: 12px; border-top: 2px solid var(--border); padding-top: 12px; }
.score-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.score-row:first-child { margin-top: 0; }
.score-row-label { width: 72px; flex-shrink: 0; font-size: 12px; color: var(--dim); }
.score-segs { display: flex; flex: 1; gap: 4px; }
.score-num { width: 16px; flex-shrink: 0; text-align: right; font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--text); }

.signals { margin-top: 12px; border-top: 2px solid var(--border); padding-top: 12px; }
.signals ul { margin-top: 8px; }
.signals li { padding-left: 12px; text-indent: -12px; font-size: 13px; line-height: 1.65; color: #d6d6d2; margin-top: 4px; }
.signals li:first-child { margin-top: 0; }
.signals .sig-arrow { font-weight: 700; color: var(--accent-2); }
.rationale { margin-top: 12px; font-size: 13px; line-height: 1.65; color: var(--dim); }
.rationale b { color: var(--text); }

/* ---- tracking block ---- */
.tracking-box {
  margin-top: 12px;
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--accent-2);
  background: var(--surface-2);
  padding: 10px;
}
.tracking-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tracking-title { font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.05em; color: var(--accent-2); }
.tracking-status { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--accent); }
.tracking-status-pending { border: 1px solid var(--border-strong); padding: 2px 6px; font-size: 11px; color: var(--dim); }
.tracking-cap { margin-top: 6px; font-size: 12px; color: var(--dim); }
.author-chips { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px; }
.author-chip { background: var(--surface-3); padding: 2px 6px; font-size: 11px; color: var(--text); }
.cross-result { margin-top: 8px; font-size: 12px; line-height: 1.65; color: var(--text); }
.cross-result .cross-note { color: var(--dim); }

.tk-box { margin-top: 10px; border-top: 1px dashed var(--border-strong); padding-top: 10px; }
.tk-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.tk-title { font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.05em; color: var(--accent); }
.tk-date { font-family: var(--font-mono); font-size: 11px; color: var(--dim); }
.tk-result { margin-top: 6px; font-size: 12px; line-height: 1.65; color: var(--text); }
.tk-accounts { margin-top: 8px; }
.tk-account { background: var(--surface-3); padding: 8px; margin-top: 6px; }
.tk-account:first-child { margin-top: 0; }
.tk-account-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.tk-handle { font-size: 13px; font-weight: 700; text-decoration: underline; text-decoration-color: rgba(0, 240, 255, 0.45); text-underline-offset: 2px; }
.tk-followers { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--accent); }
.tk-account-name { margin-top: 2px; font-size: 12px; color: var(--text); }
.tk-account-meta { margin-top: 2px; font-size: 11px; line-height: 1.6; color: var(--dim); }

/* ---- source videos ---- */
.expand-btn { margin-top: 12px; width: 100%; padding: 8px 0; font-size: 14px; }
.video-list { margin-top: 8px; }
.video-item { background: var(--surface-2); padding: 10px; margin-top: 8px; }
.video-item:first-child { margin-top: 0; }
.video-title { font-size: 13px; line-height: 1.65; text-decoration: underline; text-decoration-color: rgba(0, 240, 255, 0.45); text-underline-offset: 2px; }
.video-author { margin-top: 2px; font-size: 12px; color: var(--dim); }

/* ---- footer ---- */
.footer-panel { margin-top: 16px; padding: 16px; font-size: 13px; line-height: 1.65; color: var(--dim); }
.footer-line { margin-top: 8px; }
