/* HELIOS · styles — 暗色调查工作台 */
:root {
  --bg: #0b0c10;
  --bg2: #101218;
  --panel: #151821;
  --panel2: #1a1e29;
  --line: rgba(255, 255, 255, 0.07);
  --line2: rgba(255, 255, 255, 0.13);
  --text: #e8e6e0;
  --dim: #8b8f98;
  --accent: #e0a458;
  --accent-dim: rgba(224, 164, 88, 0.15);
  --ok: #5fbf8a;
  --warn: #e0a458;
  --bad: #d96a6a;
  --info: #6aa9e0;
  --mute: #5a5f6a;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.mono { font-family: var(--mono); font-size: 0.9em; }
.dim { color: var(--dim); }
.small { font-size: 13px; }
.muted { color: var(--dim); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* hidden 属性优先级低于任何作者 display 规则（如 .modal/.chips 的 display:flex），
   会导致标记 hidden 的元素依然渲染（例如设置弹窗覆盖全站）。用 !important 全局兜底。 */
[hidden] { display: none !important; }

/* ---------- banner ---------- */
.banner {
  background: linear-gradient(90deg, rgba(224, 164, 88, 0.12), rgba(224, 164, 88, 0.04));
  border-bottom: 1px solid var(--line2);
}
.banner-inner {
  max-width: 1080px; margin: 0 auto; padding: 12px 24px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; font-size: 13.5px;
}
.banner-inner strong { color: var(--accent); letter-spacing: 0.08em; }
.banner-actions { margin-left: auto; display: flex; gap: 8px; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 12, 16, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .brand, .topbar .nav { max-width: 1080px; }
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 12px 24px; }
.brand { display: flex; align-items: baseline; gap: 10px; cursor: pointer; }
.brand-mark {
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--accent); box-shadow: 0 0 12px rgba(224, 164, 88, 0.5);
  align-self: center;
}
.brand-name { font-weight: 700; letter-spacing: 0.22em; font-size: 15px; }
.brand-sub { color: var(--dim); font-size: 12.5px; }
.nav { display: flex; align-items: center; gap: 18px; font-size: 13px; flex-wrap: wrap; }
.nav a { color: var(--dim); cursor: pointer; }
.nav a:hover { color: var(--text); text-decoration: none; }

/* ---------- layout ---------- */
main { max-width: 1080px; margin: 0 auto; padding: 8px 24px 40px; }
.section { padding: 44px 0; border-bottom: 1px solid var(--line); }
.sec-head { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 26px; }
.sec-no {
  font-family: var(--mono); color: var(--accent); font-size: 13px; letter-spacing: 0.15em;
  border: 1px solid var(--line2); border-radius: 6px; padding: 3px 8px; margin-top: 4px;
}
.sec-head h1 { margin: 0 0 4px; font-size: 24px; font-weight: 650; letter-spacing: 0.01em; }
.sec-desc { margin: 0; color: var(--dim); max-width: 680px; font-size: 14px; }
.sec-head-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; width: 100%; }
.console-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- form ---------- */
.input-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.span-6 { grid-column: span 6; }
.span-12 { grid-column: span 12; }
.field-label { font-size: 12.5px; letter-spacing: 0.06em; color: var(--dim); text-transform: uppercase; }
.field-label em { text-transform: none; letter-spacing: 0; color: var(--mute); font-style: normal; }
.field input {
  background: var(--panel); border: 1px solid var(--line2); border-radius: 8px;
  color: var(--text); padding: 10px 12px; font-size: 14.5px; font-family: inherit;
  outline: none; transition: border-color 0.15s;
}
.field input:focus { border-color: var(--accent); }
.field input::placeholder { color: var(--mute); }
.field-help { font-size: 12px; color: var(--mute); }
.form-actions { flex-direction: row; align-items: center; gap: 12px; }
.hint { font-size: 12.5px; color: var(--mute); }
.form-error { color: var(--bad); margin-top: 10px; }
.file-mode-note {
  background: rgba(190, 150, 60, 0.08); border: 1px solid rgba(190, 150, 60, 0.4);
  border-radius: 10px; padding: 10px 14px; margin: 0 0 14px; font-size: 13px; line-height: 1.6;
}

/* ---------- buttons ---------- */
.btn {
  border: 1px solid var(--line2); background: var(--panel); color: var(--text);
  border-radius: 8px; padding: 8px 16px; font-size: 13.5px; font-family: inherit;
  cursor: pointer; transition: all 0.15s;
}
.btn:hover { border-color: var(--accent); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn:disabled:hover { border-color: var(--line2); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #14100a; font-weight: 600; }
.btn-accent:hover { filter: brightness(1.08); border-color: var(--accent); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 5px 12px; font-size: 12.5px; }
.btn-lg { padding: 12px 28px; font-size: 15px; }

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--panel); border: 1px solid var(--line2); border-radius: 20px;
  padding: 4px 12px; font-size: 12.5px; color: var(--text);
}
.chip .k { color: var(--dim); }

/* ---------- progress ---------- */
.progress-wrap {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; margin-bottom: 20px;
}
.progress-top { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 13px; }
.progress-bar { height: 4px; background: var(--panel2); border-radius: 2px; overflow: hidden; }
#progress-fill { height: 100%; width: 0; background: var(--accent); transition: width 0.4s; }
.src-status {
  list-style: none; margin: 14px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px 18px;
}
.src-status li { font-size: 12.5px; display: flex; gap: 8px; align-items: center; color: var(--dim); }
.src-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mute); flex: none; }
.src-status li.running .dot { background: var(--warn); animation: pulse 1s infinite; }
.src-status li.done .dot { background: var(--ok); }
.src-status li.failed .dot { background: var(--bad); }
.src-status li.skip .dot { background: var(--panel2); }
@keyframes pulse { 50% { opacity: 0.3; } }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line2); margin-bottom: 18px; flex-wrap: wrap; }
.tab {
  background: none; border: none; color: var(--dim); font-family: inherit; font-size: 13.5px;
  padding: 8px 14px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.tab-count {
  font-family: var(--mono); font-size: 11px; background: var(--panel2);
  border-radius: 10px; padding: 1px 7px; margin-left: 4px; color: var(--dim);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---------- evidence board ---------- */
.ev-group { margin-bottom: 22px; }
.ev-group h3 {
  font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--dim); margin: 0 0 10px; display: flex; align-items: center; gap: 10px;
}
.ev-group h3::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.ev {
  background: var(--panel); border: 1px solid var(--line); border-left-width: 3px;
  border-radius: 8px; padding: 12px 14px; margin-bottom: 10px;
}
.ev.st-verified { border-left-color: var(--ok); }
.ev.st-lead { border-left-color: var(--warn); }
.ev.st-info { border-left-color: var(--info); }
.ev.st-negative { border-left-color: var(--dim); opacity: 0.85; }
.ev.st-failed { border-left-color: var(--bad); }
.ev.st-blocked { border-left-color: var(--mute); opacity: 0.75; }
.ev-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.badge {
  font-size: 11px; letter-spacing: 0.08em; border-radius: 4px; padding: 2px 8px;
  border: 1px solid currentColor; font-family: var(--mono);
}
.st-ok { color: var(--ok); } .st-warn { color: var(--warn); } .st-info { color: var(--info); }
.st-neg { color: var(--dim); } .st-bad { color: var(--bad); } .st-mute { color: var(--mute); }
.ev .src-tag { font-size: 12px; color: var(--dim); font-family: var(--mono); }
.ev .conf-tag { font-size: 11.5px; color: var(--mute); }
.ev .ts-tag { margin-left: auto; font-size: 11.5px; color: var(--mute); font-family: var(--mono); }
.ev h4 { margin: 4px 0 2px; font-size: 14.5px; font-weight: 600; }
.ev .detail { margin: 4px 0 6px; color: #c9c7c0; font-size: 13.5px; word-break: break-word; white-space: pre-wrap; }
.ev .links { display: flex; flex-wrap: wrap; gap: 8px; }
.ev .links a {
  font-size: 12px; border: 1px solid var(--line2); border-radius: 5px; padding: 2px 9px; color: var(--info);
}
.ev .links a:hover { border-color: var(--info); text-decoration: none; }

/* ---------- graph ---------- */
.graph-box { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.g-label { fill: #e8e6e0; font-size: 11.5px; font-family: var(--mono); }
.g-sub { fill: #8b8f98; font-size: 10px; }
.g-node-t { fill: #e8e6e0; font-size: 11px; font-family: var(--mono); }
.g-center-t { fill: #e0a458; font-size: 12px; font-weight: 700; font-family: var(--mono); }
.g-empty { fill: #8b8f98; font-size: 14px; }
.g-empty2 { fill: #5a5f6a; font-size: 11px; }

/* ---------- timeline ---------- */
.timeline { max-height: 560px; overflow: auto; padding-right: 8px; }
.tl-item { display: grid; grid-template-columns: 150px 28px 1fr; gap: 0 10px; align-items: start; }
.tl-time { color: var(--dim); text-align: right; padding-top: 2px; }
.tl-rail { position: relative; }
.tl-rail::before { content: ''; position: absolute; left: 50%; top: 0; bottom: -14px; width: 1px; background: var(--line2); transform: translateX(-50%); }
.tl-item:last-child .tl-rail::before { display: none; }
.tl-dot {
  display: block; width: 9px; height: 9px; border-radius: 50%; background: var(--dim);
  transform: translateX(-50%); margin-left: 50%; margin-top: 4px; border: 2px solid var(--bg);
}
.tl-dot.st-ok { background: var(--ok); } .tl-dot.st-warn { background: var(--warn); }
.tl-dot.st-info { background: var(--info); } .tl-dot.st-bad { background: var(--bad); }
.tl-dot.st-mute { background: var(--mute); }
.tl-body { padding-bottom: 16px; }
.tl-label { font-size: 13.5px; }
.tl-src { font-size: 11.5px; color: var(--dim); font-family: var(--mono); }
.tl-link { font-size: 12px; }

/* ---------- search / manual ---------- */
.search-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.sg h3 { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); margin: 0 0 8px; }
.sg .sl { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.sg .sl .t { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg .sl a { flex: none; font-size: 11.5px; }
.manual-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.mcard { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mcard .t { font-size: 13.5px; font-weight: 600; }
.mcard a { font-size: 12px; }

/* ---------- cases ---------- */
.cases-box .case-row {
  display: grid; grid-template-columns: 1.2fr 1fr 2fr auto; gap: 12px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin-bottom: 8px;
  font-size: 13.5px;
}
.case-row .title { font-weight: 600; }
.case-row .meta { color: var(--dim); font-size: 12px; font-family: var(--mono); }
.case-row .acts { display: flex; gap: 6px; }
.empty-note { color: var(--mute); font-size: 13.5px; padding: 12px; border: 1px dashed var(--line2); border-radius: 8px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.doc-table th {
  text-align: left; font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim);
  padding: 10px 14px; border-bottom: 1px solid var(--line2); white-space: nowrap; background: var(--bg2);
}
.doc-table td { padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc-table tr:last-child td { border-bottom: none; }
.doc-table .mono { color: var(--info); }
.doc-table td.d { color: var(--dim); }

/* ---------- policy ---------- */
.policy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.policy-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.policy-card h3 { margin: 0 0 8px; font-size: 14.5px; color: var(--accent); }
.policy-card p { margin: 0; color: #c9c7c0; font-size: 13.5px; }

/* ---------- footer ---------- */
.footer { max-width: 1080px; margin: 0 auto; padding: 24px; font-size: 13px; }
.footer p { margin: 4px 0; }

/* ---------- modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, 0.6);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-card {
  background: var(--bg2); border: 1px solid var(--line2); border-radius: 12px;
  width: 100%; max-width: 520px; padding: 20px; display: flex; flex-direction: column; gap: 14px;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-actions { display: flex; justify-content: flex-end; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .span-6 { grid-column: span 12; }
  .tl-item { grid-template-columns: 110px 22px 1fr; }
  .sec-head { flex-direction: column; gap: 10px; }
  .case-row { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; align-items: flex-start; }
}
