:root {
  --bg: #0e1320; --bg2: #131a2b; --card: #182136; --card-h: #1d2946;
  --text: #e7eaf2; --muted: #8b93a7; --line: #232e47;
  --accent: #5b8cff; --accent2: #3d6ae0;
  --green: #3ecf8e; --orange: #f5a623; --blue: #6ea1ff; --red: #ff6b6b;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.6 system-ui, -apple-system, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: var(--card); border: 1px solid var(--line);
         color: var(--text); border-radius: 8px; padding: 7px 12px; transition: border-color .15s; }
button:hover { border-color: var(--accent); }
button.on { background: var(--accent2); border-color: var(--accent2); color: #fff; }
input[type="search"] { background: var(--bg2); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 8px 12px; font: inherit; outline: none; }
input[type="search"]:focus { border-color: var(--accent); }
input::placeholder { color: #5c6478; }
.hidden { display: none !important; }

header { position: sticky; top: 0; z-index: 10; background: rgba(14,19,32,.92);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
  padding: 10px 20px; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.brand { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.logo { font-size: 20px; font-weight: 700; letter-spacing: .04em; color: var(--accent); }
.sub { font-size: 12px; color: var(--muted); }

/* 页面级导航（列表 / 统计 互链，两页共用） */
.pagenav { display: flex; gap: 4px; }
.pagenav a { padding: 6px 12px; border-radius: 8px; font-size: 13.5px; color: var(--muted); }
.pagenav a:hover { color: var(--text); background: var(--card); }
.pagenav a.on { background: var(--accent2); color: #fff; }

/* 统计页板块锚点导航 */
.secnav { flex-basis: 100%; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.secnav::-webkit-scrollbar { display: none; }
.secnav a { padding: 4px 10px; font-size: 12.5px; color: var(--muted); border-radius: 6px; white-space: nowrap; }
.secnav a:hover { color: var(--text); background: var(--card); }
.searchbar { flex: 1; min-width: 280px; display: flex; gap: 8px; }
.searchbar input { flex: 1; min-width: 120px; }
.scope { display: flex; background: var(--bg2); border: 1px solid var(--line);
  border-radius: 8px; overflow: hidden; }
.scope button { border: none; border-radius: 0; padding: 8px 12px; font-size: 13px; color: var(--muted); }
.scope button.on { background: var(--accent2); color: #fff; }

.layout { display: grid; grid-template-columns: 300px 1fr; gap: 18px;
  max-width: 1280px; margin: 18px auto; padding: 0 20px; }
aside { position: sticky; top: 74px; align-self: start; max-height: calc(100vh - 92px);
  overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.types button { padding: 7px 4px; font-size: 13.5px; text-align: center; }
.cloud { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.dims { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.dims button { padding: 4px 10px; font-size: 12.5px; border-radius: 999px; }
#tagq { width: 100%; margin-bottom: 8px; padding: 6px 10px; font-size: 13px; }
.cloud-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 48vh; overflow-y: auto; }
.cloud-note { color: var(--muted); font-size: 12px; }

.chip { border: 1px solid var(--line); background: var(--card); color: var(--text);
  border-radius: 999px; padding: 3px 10px; font-size: 12.5px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--accent2); border-color: var(--accent2); color: #fff; }
.chip .cnt { color: var(--muted); font-size: 11px; }
.chip.on .cnt { color: #cdd9ff; }
.chip .x { font-weight: 700; margin-left: 2px; }
.chip.clear { color: var(--red); }

main { min-width: 0; }
.activebar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-bottom: 10px; min-height: 32px; }
.resultstat { color: var(--muted); font-size: 13px; margin-left: auto; }
.resultstat b { color: var(--text); font-weight: 600; }
.resultstat .hint { color: var(--orange); }

.progress { display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
  font-size: 13px; color: var(--muted); }
.progress .bar { flex: 1; max-width: 320px; height: 6px; border-radius: 3px;
  background: var(--bg2); overflow: hidden; }
.progress .bar i { display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent2), var(--accent)); transition: width .3s; }

.list { display: flex; flex-direction: column; gap: 10px; }
.card { display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; transition: border-color .15s, background .15s; }
.card:hover, .card:focus-visible { border-color: var(--accent); background: var(--card-h); }
.card .meta { display: flex; align-items: center; gap: 8px; font-size: 12px;
  color: var(--muted); margin-bottom: 5px; }
.card time { font-variant-numeric: tabular-nums; }
.tbadge { padding: 1px 8px; border-radius: 4px; font-size: 11px; }
.t0 .tbadge { background: rgba(91,140,255,.16); color: var(--blue); }
.t1 .tbadge { background: rgba(62,207,142,.16); color: var(--green); }
.t2 .tbadge { background: rgba(245,166,35,.16); color: var(--orange); }
.rbadge { color: #ff9f9f; background: rgba(255,107,107,.12); padding: 1px 8px;
  border-radius: 4px; font-size: 11px; }
.card h3 { margin: 0 0 6px; font-size: 15.5px; line-height: 1.5; font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .info { font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.card .info .org { color: var(--blue); }
.card .info .dot { color: var(--muted); }
.card .info .stock { color: var(--green); }
.card .sub { margin-top: 4px; font-size: 12px; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 4px 12px; }

.sentinel { text-align: center; color: var(--muted); padding: 22px 0 44px;
  font-size: 13px; user-select: none; }
.empty { text-align: center; padding: 60px 0; color: var(--muted); font-size: 15px; }
.empty .sub { font-size: 13px; margin-top: 6px; }

footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px;
  padding: 18px 20px 32px; max-width: 1280px; margin: 0 auto; line-height: 1.9; }
footer a { color: var(--blue); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: #3a1f2b; color: #ffb4b4; border: 1px solid #6b2f3f; padding: 10px 18px;
  border-radius: 8px; z-index: 50; font-size: 13px; max-width: 90vw; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  aside { position: static; max-height: none; }
  .cloud-chips { max-height: 180px; }
  .searchbar { order: 3; flex-basis: 100%; }
}
