* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  color: #1f2328;
  background: #f6f7f9;
  line-height: 1.55;
}

a { color: #b45309; }
a:hover { color: #f6821f; }

.topbar {
  background: #14171f;
  color: white;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar .brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-weight: 700;
  padding: 14px 0;
  color: white;
  text-decoration: none;
  white-space: nowrap;
}
.topbar .brand span { font-weight: 400; color: #9aa4b2; font-size: 0.85rem; }
.topbar nav { display: flex; gap: 4px; flex-wrap: wrap; }
.topbar nav a {
  color: #cbd5e1;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.92rem;
}
.topbar nav a:hover { background: #2a2f3a; color: white; }
.topbar nav a.active { background: #f6821f; color: white; }

main { max-width: 860px; margin: 0 auto; padding: 32px 24px 72px; }
main.wide { max-width: 1100px; }

h1 { margin: 0 0 8px; font-size: 1.9rem; }
h2 { margin: 32px 0 8px; font-size: 1.3rem; }
h3 { margin: 24px 0 6px; font-size: 1.05rem; }
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 12px; padding-left: 22px; }
li { margin-bottom: 6px; }

.lede { font-size: 1.05rem; color: #4b5563; margin-bottom: 24px; }
.muted { color: #6b7280; }
.crumb { font-size: 0.85rem; color: #6b7280; margin-bottom: 16px; }

.card {
  background: white;
  border-radius: 10px;
  padding: 18px 22px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  margin-bottom: 16px;
}
.card h3 { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 16px; }
.grid .card { margin-bottom: 0; }

.callout {
  border-left: 4px solid #f6821f;
  background: #fff7ed;
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 16px;
}
.callout.warn { border-left-color: #dc2626; background: #fef2f2; }
.callout.ok { border-left-color: #16a34a; background: #f0fdf4; }
.callout > :last-child { margin-bottom: 0; }
.callout strong { display: block; margin-bottom: 4px; }

pre {
  background: #14171f;
  color: #e5e7eb;
  padding: 14px 16px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.45;
  margin: 0 0 16px;
}
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; }
p code, li code, td code { background: #eef0f2; padding: 1px 5px; border-radius: 4px; }

.prompt {
  background: white;
  border: 1px solid #fed7aa;
  border-left: 4px solid #f6821f;
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  margin-bottom: 16px;
  font-size: 1.02rem;
}
.prompt .label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #b45309;
  margin-bottom: 6px;
}
.prompt q { font-style: italic; }

.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: #eef0f2;
  color: #374151;
  white-space: nowrap;
}
.tag.hr { background: #dbeafe; color: #1d4ed8; }
.tag.crm { background: #dcfce7; color: #15803d; }
.tag.collab { background: #fef9c3; color: #92620a; }
.tag.wiki { background: #ede9fe; color: #6d28d9; }
.tag.intentional { background: #fee2e2; color: #b91c1c; }
.tag.accidental { background: #ffedd5; color: #9a3412; }
.tag.injection { background: #1f2937; color: #f9fafb; }
.tag.cross { background: #e0f2fe; color: #0369a1; }

table { width: 100%; border-collapse: collapse; background: white; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); margin-bottom: 16px; }
th, td { text-align: left; padding: 9px 14px; border-bottom: 1px solid #eef0f2; vertical-align: top; font-size: 0.92rem; }
th { background: #fafbfc; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; }

.demo-list { list-style: none; padding: 0; }
.demo-list li { margin-bottom: 10px; }
.demo-list a { font-weight: 600; text-decoration: none; }
.demo-list a:hover { text-decoration: underline; }
.demo-list .meta { display: block; color: #6b7280; font-size: 0.9rem; }

footer.site {
  border-top: 1px solid #e5e7eb;
  padding: 20px 24px 40px;
  text-align: center;
  color: #6b7280;
  font-size: 0.85rem;
}

.steps { counter-reset: step; list-style: none; padding-left: 0; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 34px;
  margin-bottom: 14px;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #14171f;
  color: white;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
