:root {
  --bg: #f5f7fa;
  --card: #ffffff;
  --ink: #1d2733;
  --muted: #5b6b7c;
  --brand: #0a66c2;
  --brand-dark: #084e96;
  --accent: #e8f1fb;
  --border: #dde5ee;
  --radius: 12px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 32px 20px 80px; }
header.site { display: flex; align-items: baseline; gap: 10px; margin-bottom: 28px; }
header.site .logo { font-size: 22px; font-weight: 800; color: var(--brand); text-decoration: none; }
header.site .tag { color: var(--muted); font-size: 14px; }
h1 { font-size: 30px; margin: 0 0 8px; }
h2 { font-size: 20px; margin: 28px 0 10px; }
p.lede { color: var(--muted); font-size: 17px; margin-top: 0; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin: 16px 0; }
label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 4px; }
label .hint { font-weight: 400; color: var(--muted); }
input, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font: inherit; background: #fff; color: var(--ink);
}
textarea { min-height: 110px; resize: vertical; }
button {
  font: inherit; font-weight: 700; color: #fff; background: var(--brand);
  border: 0; border-radius: 999px; padding: 12px 24px; cursor: pointer;
}
button:hover { background: var(--brand-dark); }
button.secondary { background: var(--accent); color: var(--brand); }
.faq-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-bottom: 8px; }
.pill { display: inline-block; background: var(--accent); color: var(--brand); border-radius: 999px; padding: 3px 12px; font-size: 13px; font-weight: 600; }
.muted { color: var(--muted); font-size: 14px; }
.result-links a { display: block; margin: 6px 0; font-weight: 600; color: var(--brand); word-break: break-all; }
.error { color: #b3261e; font-weight: 600; }

/* talk page */
.talk-header { text-align: center; margin-bottom: 18px; }
.avatar {
  width: 72px; height: 72px; border-radius: 50%; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800;
  margin: 0 auto 10px;
}
.ai-badge {
  display: inline-flex; gap: 6px; align-items: center; background: #fff7e6; color: #8a5a00;
  border: 1px solid #f0dcae; border-radius: 999px; padding: 4px 14px; font-size: 13px; font-weight: 600;
}
.chat { display: flex; flex-direction: column; gap: 10px; min-height: 220px; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: 15px; }
.msg.bot { background: var(--accent); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.me { background: var(--brand); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.ask-row { display: flex; gap: 8px; margin-top: 14px; }
.ask-row input { flex: 1; }

/* dashboard */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.stat .n { font-size: 28px; font-weight: 800; color: var(--brand); }
.stat .l { color: var(--muted); font-size: 13px; }
