:root {
  --sage: #8a9a82;
  --sage-dark: #64705e;
  --cream: #faf8f4;
  --ink: #2b2a26;
  --muted: #767267;
  --line: #e6e1d6;
  --danger: #b3452f;
  --white: #fff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--cream);
  color: var(--ink);
}

.wordmark, .brand-wordmark, .wordmark-lg, .eyebrow {
  font-family: 'Cormorant Garamond', Georgia, serif;
}

a { color: var(--sage-dark); }

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
.topbar-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand.center { justify-content: center; margin-bottom: 10px; }
.logo-mark { color: var(--ink); flex: none; }
.brand-wordmark {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.brand-sub {
  font-size: 12px;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.wordmark-lg {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.eyebrow {
  font-size: 15px;
  font-style: italic;
  color: var(--sage-dark);
  margin: 0 0 2px;
}
.hero h1 { margin: 0 0 4px; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 40px; }
.muted { color: var(--muted); }

.callout {
  margin-top: 18px;
  background: #f2f0e8;
  border: 1px solid var(--line);
  border-left: 4px solid var(--sage-dark);
  border-radius: 8px;
  padding: 14px 18px;
}
.callout-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--sage-dark);
  margin-bottom: 4px;
}
.callout strong { font-size: 15px; }
.callout p { margin: 4px 0 0; font-size: 14px; }

.access-note { font-size: 13px; margin-top: 12px; }
.further-card { padding: 14px; }
.further-card strong { display: block; margin-bottom: 4px; font-size: 14px; }
.further-card p { margin: 0; font-size: 13px; }

.chat-box {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.chat-log {
  max-height: 360px;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-empty { font-size: 14px; padding: 8px 0; }
.chat-msg {
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  white-space: pre-wrap;
  line-height: 1.45;
}
.chat-role {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 3px;
}
.chat-user { align-self: flex-end; background: var(--sage); color: var(--white); }
.chat-user .chat-role { color: rgba(255,255,255,0.75); }
.chat-assistant { align-self: flex-start; background: #f2f0e8; }
.chat-error { align-self: flex-start; background: #f4ded7; color: #8a2f1c; }
.chat-thinking { opacity: 0.6; font-style: italic; }

.chat-form {
  border-top: 1px solid var(--line);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-form-row { display: flex; gap: 8px; align-items: center; }
.chat-form-row textarea { flex: 1; resize: vertical; }
.chat-form-row select { padding: 8px 10px; }
#chat-clear { margin-left: auto; }

.stat-row { display: flex; gap: 24px; margin-top: 20px; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 14px 20px; min-width: 120px; }
.stat-num { display: block; font-size: 26px; font-weight: 700; color: var(--sage-dark); }
.stat-label { font-size: 13px; color: var(--muted); }

.section { margin-top: 44px; }
.section h2 { border-bottom: 1px solid var(--line); padding-bottom: 8px; }

.action-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.action-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px;
}
.action-item.priority-critical { border-left-color: #b3452f; }
.action-item.priority-high { border-left-color: #c98a2c; }
.action-item.priority-medium { border-left-color: #8a9a82; }
.action-item.priority-blocked { border-left-color: #9c9284; }
.action-item.done { opacity: 0.55; }
.action-item.done strong { text-decoration: line-through; }

.check {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1.5px solid var(--sage-dark);
  background: var(--white);
  color: var(--sage-dark);
  font-weight: 700;
  cursor: pointer;
  flex: none;
}

.action-item-body { flex: 1; }
.action-item-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; flex-wrap: wrap; }
.action-item-body p { margin: 4px 0 0; font-size: 14px; }

.pill {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--line);
  color: var(--ink);
}
.pill-critical { background: #f4ded7; color: #8a2f1c; }
.pill-high { background: #f6e8cf; color: #8a5c11; }
.pill-medium { background: #e7ede4; color: var(--sage-dark); }
.pill-blocked { background: #ece9e3; color: #6b6557; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
th { background: #f2efe8; font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); }
tr:last-child td { border-bottom: none; }

.inline-form { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.inline-form input { flex: 1; min-width: 120px; }

input, textarea {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: var(--white);
  color: var(--ink);
}
textarea { width: 100%; resize: vertical; }

.integration-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.integration-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.status-badge { font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; }
.status-pending { background: #ece9e3; color: #6b6557; }
.status-connected { background: #dfeee0; color: #2f6b34; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary { background: var(--sage-dark); color: var(--white); }
.btn-primary:hover { background: #55604f; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-small { padding: 6px 12px; font-size: 13px; }

.login-card {
  max-width: 360px;
  margin: 80px auto 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
}
.login-card h1 { margin: 0 0 2px; font-size: 22px; }
.stack { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; text-align: left; }
.stack label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.error { color: var(--danger); font-size: 14px; }
