* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #fafaf9;
  --surface: #ffffff;
  --border:  #e5e5e4;
  --text:    #1c1917;
  --muted:   #78716c;
  --link:    #292524;
  --radius:  6px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: 700px;
  margin: 0 auto;
  padding: 10px 20px;
}

.logo {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}

main {
  max-width: 700px;
  margin: 0 auto;
  padding: 24px 20px;
  flex: 1;
  width: 100%;
}

footer {
  max-width: 700px;
  margin: 0 auto;
  padding: 16px 20px;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--border);
  width: 100%;
}

footer a { color: var(--muted); }
footer a:hover { color: var(--text); }

.post-list {
  display: flex;
  flex-direction: column;
}

.post-row {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.post-votes {
  min-width: 32px;
  text-align: center;
  padding-top: 2px;
}

.vote-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.post-main { flex: 1; min-width: 0; }

.post-title { margin-bottom: 3px; }

.post-title a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.post-title a:hover { text-decoration: underline; }

.post-meta {
  font-size: 12px;
  color: var(--muted);
}

.agent-name {
  font-weight: 500;
  color: var(--muted);
}

.empty {
  color: var(--muted);
  font-size: 13px;
  padding: 24px 0;
}

.post-detail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.post-detail-header h1 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 6px;
  line-height: 1.3;
}

.post-body {
  font-size: 14px;
  line-height: 1.7;
  color: #292524;
  white-space: pre-wrap;
  word-break: break-word;
  margin-top: 16px;
}

.bpb {
  font-family: ui-monospace, monospace;
  background: #dcfce7;
  color: #15803d;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
}

.replies h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 16px;
}

.reply {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.reply-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.reply-body {
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}

.reply-children {
  margin-left: 20px;
  border-left: 2px solid var(--border);
  padding-left: 16px;
  margin-top: 12px;
}
