/* 冷调极简：近白底、石墨色文字、细线分隔、全站无衬线、一个青绿强调色。
   只有两页：登录，和首页（MCP 连接 + 健康报告） */
:root {
  --bg: #f7f8fa; --panel: #ffffff; --fg: #15181d; --muted: #6b7384; --faint: #9aa1b0;
  --line: #e5e8ee; --hair: #eef0f4; --hover: #eef1f5; --press: #e3e7ee;
  --accent: #0e7c66; --accent-bg: #dcf2ea; --accent-fg: #ffffff;
  --ai: #2b63c7; --bad: #c0392b;
  --shadow: 0 1px 2px rgba(16, 20, 28, .04), 0 8px 24px rgba(16, 20, 28, .06);
  --f-body: system-ui, -apple-system, "PingFang SC", "Noto Sans SC", sans-serif;
  --f-display: var(--f-body);
  --f-mono: ui-monospace, Menlo, monospace;
  --r: 10px; --r-sm: 6px;
  --top-h: 52px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1115; --panel: #161920; --fg: #e8eaf0; --muted: #8f97a8; --faint: #5f6677;
    --line: #262a33; --hair: #1d2029; --hover: #1c2028; --press: #232833;
    --accent: #3ecfa7; --accent-bg: #123b31; --accent-fg: #06201a;
    --ai: #86b4ff; --bad: #ff8d7e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font: 15px/1.6 var(--f-body); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent-bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- 顶栏 ---------- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); }
.top-in, .main { max-width: 720px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: var(--top-h); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.brand svg { width: 20px; height: 20px; color: var(--accent); }

/* ---------- 首页 ---------- */
.main { padding-block: 24px 48px; display: flex; flex-direction: column; gap: 22px; }
section { display: flex; flex-direction: column; gap: 8px; }
h2 { font: 600 13px/1.4 var(--f-body); letter-spacing: .04em; color: var(--muted); margin: 0; }
p { margin: 0; }
.muted { color: var(--muted); }
.mono, code { font-family: var(--f-mono); font-variant-numeric: tabular-nums; font-size: .9em; }
code { overflow-wrap: anywhere; }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 6px 13px; cursor: pointer; font-size: 14px; font-weight: 500; line-height: 1.4; transition: background .12s, border-color .12s; flex: none; }
.btn:hover { background: var(--hover); border-color: var(--faint); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn.ghost { border-color: transparent; background: none; color: var(--muted); }
.btn.ghost:hover { background: var(--hover); color: var(--fg); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.panel.flush { padding: 0; overflow: hidden; }

.hero { display: flex; flex-direction: column; gap: 6px; padding: 20px; }
.state { display: flex; align-items: center; gap: 10px; font: 600 26px/1.25 var(--f-display); letter-spacing: -.02em; margin-bottom: 4px; }
.dot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); flex: none; }
.state.bad .dot { background: var(--bad); }
.state.run .dot { background: var(--ai); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.bad { color: var(--bad); font-weight: 600; }

.mcp { display: flex; flex-direction: column; gap: 14px; }
.url { display: flex; align-items: center; gap: 10px; justify-content: space-between; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 8px 8px 12px; }
.url code { font-size: 15px; }
dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; font-size: 14px; }
dt { font-weight: 500; }
dd { margin: 0; color: var(--muted); min-width: 0; }

table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 16px; text-align: right; border-bottom: 1px solid var(--hair); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { font-weight: 500; color: var(--muted); font-size: 13px; }
tbody tr:last-child td { border-bottom: 0; }

ul.kv, ul.jobs { list-style: none; margin: 0; padding: 4px 16px; font-size: 14px; }
.kv li, .jobs li { display: flex; gap: 6px 14px; padding: 9px 0; border-bottom: 1px solid var(--hair); flex-wrap: wrap; }
.kv li:last-child, .jobs li:last-child { border-bottom: 0; }
.kv li > :last-child { margin-left: auto; text-align: right; }
.jobs .muted { flex-basis: 100%; overflow-wrap: anywhere; }

/* ---------- 登录 ---------- */
.login { min-height: 100svh; display: grid; place-items: center; padding: 24px 16px; }
.login form { width: min(360px, 100%); display: flex; flex-direction: column; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px 24px; box-shadow: var(--shadow); }
.login .brand { font-size: 20px; }
.login .brand svg { width: 26px; height: 26px; }
.login input { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); }
.login input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.login .btn { justify-content: center; padding: 9px 14px; }

@media (max-width: 520px) {
  .main { padding-block: 18px 40px; gap: 18px; }
  .state { font-size: 23px; }
  .url code { font-size: 14px; }
  dl { grid-template-columns: 1fr; gap: 2px; }
  dd + dt { margin-top: 8px; }
  th, td { padding: 8px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
