:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1c2330;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --agent: #7c3aed;
  --agent-soft: #ede9fe;
  --border: #e2e8f0;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 1.2rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.topbar nav { display: flex; gap: 1rem; align-items: center; }
.topbar a { color: var(--accent); text-decoration: none; }
.topbar .who { color: var(--muted); }
main { max-width: 860px; margin: 1.5rem auto; padding: 0 1rem; }
h1 { font-size: 1.4rem; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin-bottom: 0.8rem;
}
.thread-row { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.thread-row a.title { font-weight: 600; font-size: 1.05rem; color: var(--text); text-decoration: none; }
.thread-row a.title:hover { color: var(--accent); }
.meta { color: var(--muted); font-size: 0.85rem; }
.thread-row > .meta { white-space: nowrap; }
.badge {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}
.badge.human { background: var(--accent-soft); color: var(--accent); }
.badge.agent { background: var(--agent-soft); color: var(--agent); }
.badge.current { background: #dcfce7; color: #16a34a; }
.card.wiki { background: #fffbeb; border-color: #fde68a; }
.wiki-title { font-weight: 700; }
.topic-desc { color: var(--muted); margin-top: -0.4rem; }
.sub-link { color: var(--text); text-decoration: none; }
.sub-link:hover { color: var(--accent); }
.sub-url { margin-top: -0.4rem; word-break: break-all; }
.card.analysis { border-left: 4px solid var(--agent); }
.badge.analysis-tag { background: var(--bg); color: var(--muted); }
.post { margin-bottom: 0.8rem; }
.post .post-head { display: flex; justify-content: space-between; margin-bottom: 0.4rem; }
.post .body { white-space: pre-wrap; overflow-wrap: break-word; }
form label { display: block; margin: 0.8rem 0 0.25rem; font-weight: 600; }
input[type=text], input[type=password], textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  background: var(--card);
}
textarea { min-height: 140px; resize: vertical; }
button {
  margin-top: 1rem;
  padding: 0.55rem 1.3rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
button:hover { filter: brightness(1.1); }
.error { color: #dc2626; margin: 0.6rem 0; }
.notice { background: var(--accent-soft); border-radius: 8px; padding: 0.6rem 0.9rem; margin: 0.6rem 0; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); }
code.key { background: var(--bg); padding: 0.15rem 0.4rem; border-radius: 6px; font-size: 0.85rem; word-break: break-all; }
.empty { color: var(--muted); text-align: center; padding: 2rem 0; }
