/* alpha-research 界面。零依赖、零外部请求 —— 字体走系统栈,不拉 CDN。 */

:root {
  --bg:      #f7f7f5;
  --panel:   #ffffff;
  --ink:     #1b1b19;
  --muted:   #6b6b66;
  --line:    #e2e1dc;
  --accent:  #1a5c4a;
  --warn:    #8a5a12;
  --warn-bg: #fdf6e6;
  --stop:    #7d3030;
  --stop-bg: #fbf0f0;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16171a; --panel: #1e2024; --ink: #e8e7e3; --muted: #9a9a94;
    --line: #2e3136; --accent: #6fc0a4; --warn: #e0b465; --warn-bg: #2a2418;
    --stop: #e39292; --stop-bg: #2b1c1c;
  }
}

* { box-sizing: border-box; }

/* `hidden` 属性靠的是 UA 样式表里的 `display: none`,**任何作者写的
   `display` 都能把它压过去**。下面 `.login` 就有 `display: grid` ——
   于是登录成功后 `login.hidden = true` 一点用都没有,页面照旧停在登录页,
   而 DOM 里 `hidden` 明明是 `true`。查 DOM 会说通过,看屏幕才看得见。 */
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.65 -apple-system, BlinkMacSystemFont, "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-weight: 600; letter-spacing: .01em; }
button { font: inherit; cursor: pointer; }
code, .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92em;
}

/* ---------------------------------------------------------- 登录 */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login .card {
  width: 100%; max-width: 380px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 28px; display: grid; gap: 14px;
}
.login h1 { margin: 0; font-size: 26px; }
.tagline { margin: -6px 0 8px; color: var(--muted); font-size: 13.5px; }
.login label { display: grid; gap: 5px; font-size: 13px; color: var(--muted); }
.login input {
  font: inherit; padding: 9px 11px; border-radius: 7px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
}
.login input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.login button[type=submit] {
  margin-top: 6px; padding: 10px; border: 0; border-radius: 7px;
  background: var(--accent); color: #fff; font-weight: 600;
}
.login button[disabled] { opacity: .55; cursor: progress; }
.err { margin: 0; color: var(--stop); font-size: 13px; }
.fine { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

/* ---------------------------------------------------------- 框架 */
main { max-width: 980px; margin: 0 auto; padding: 22px 20px 72px; }
header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
}
header h1 { margin: 0; font-size: 21px; }
.who { color: var(--muted); font-size: 12.5px; }
.head-right { display: flex; align-items: center; gap: 12px; }
.health { font-size: 12.5px; color: var(--muted); }
.ghost {
  background: none; border: 1px solid var(--line); color: var(--muted);
  border-radius: 7px; padding: 5px 11px; font-size: 13px;
}

.banner {
  border: 1px solid var(--line); border-left: 3px solid var(--warn);
  background: var(--warn-bg); border-radius: var(--radius);
  padding: 13px 16px; margin-bottom: 18px; font-size: 13.5px;
}
.banner b { color: var(--warn); }

.stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.stat {
  flex: 1 1 120px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 11px 14px;
}
.stat .n { font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat .k { font-size: 12px; color: var(--muted); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab {
  background: none; border: 0; border-bottom: 2px solid transparent;
  padding: 9px 13px; color: var(--muted); font-size: 14px; margin-bottom: -1px;
}
.tab.on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }

/* ---------------------------------------------------------- 卡片 */
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card2 {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 15px 17px; text-align: left;
  width: 100%; color: inherit; display: grid; gap: 7px;
}
button.card2:hover { border-color: var(--accent); }
.sym { font-size: 17px; font-weight: 600; }
.sym small { font-weight: 400; color: var(--muted); font-size: 12.5px; margin-left: 7px; }
.row { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.band {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 12.5px; border: 1px solid var(--line); background: var(--bg);
}
.band.hot { border-color: var(--accent); color: var(--accent); }
.score { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.score small { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.tag {
  font-size: 11.5px; padding: 1px 7px; border-radius: 4px;
  background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn);
}
.tag.stop { background: var(--stop-bg); color: var(--stop); border-color: var(--stop); }
.meta { font-size: 12px; color: var(--muted); }

/* ---------------------------------------------------------- 详情 */
.back { margin-bottom: 14px; }
.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px;
}
.panel > h3 { margin: 0 0 11px; font-size: 14.5px; }
.dim { border-top: 1px solid var(--line); padding: 13px 0; }
.dim:first-of-type { border-top: 0; padding-top: 2px; }
.dim-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.dim-name { font-weight: 600; font-size: 14px; }
.dim-score { font-variant-numeric: tabular-nums; font-weight: 600; }
.rationale { margin: 7px 0 0; font-size: 13.5px; color: var(--ink); white-space: pre-wrap; }
.lineage { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  font-size: 11.5px; padding: 2px 8px; border-radius: 5px;
  border: 1px solid var(--line); color: var(--muted); background: var(--bg);
}
.pill b { color: var(--ink); font-weight: 600; }
.stoplist { margin: 0; padding-left: 20px; font-size: 13.5px; }
.stoplist li { margin-bottom: 6px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 6px 9px 6px 0; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; font-size: 12px; }
td.num { font-variant-numeric: tabular-nums; }
.scroll { overflow-x: auto; }
.empty { color: var(--muted); font-size: 13.5px; }
.quote {
  border-left: 2px solid var(--line); padding-left: 11px; margin: 6px 0 0;
  color: var(--muted); font-size: 12.5px;
}
.about p { font-size: 14px; }
.about ol { padding-left: 22px; }
.about li { margin-bottom: 10px; font-size: 14px; }

/* ---------------------------------------------------- 过滤与分页 */
.filters { display: flex; flex-direction: column; gap: 9px; margin-bottom: 14px; }
.filter-q {
  width: 100%; max-width: 320px; padding: 7px 10px; font: inherit; font-size: 13.5px;
  border: 1px solid var(--line); border-radius: 7px;
  background: var(--bg); color: var(--ink);
}
.filter-q:focus { outline: none; border-color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font: inherit; font-size: 12.5px; padding: 4px 11px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg); color: var(--muted);
}
.chip:hover { color: var(--ink); }
/* 选中态用实心 —— 只描边的话在一排 chip 里认不出哪个在生效。 */
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.pager {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin-top: 18px;
}
.pager .ghost { padding: 4px 12px; }
.pager .ghost[disabled] { opacity: .35; cursor: default; }

/* 已裁不适用:理由是这一节的主体,给它读得下去的行宽与行距。 */
.panel.excl { margin-bottom: 10px; }
.panel.excl .sym { margin-bottom: 6px; }
.panel.excl p { margin: 0; font-size: 13.5px; line-height: 1.65; color: var(--muted); }
