:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #203338;
  background: #f3f6f5;
  font-size: 16px;
  --ink: #112c32;
  --teal: #176657;
  --line: #dde5e2;
  --muted: #617572;
  --white: #fff;
  --warm: #9c5c18;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  outline-offset: 4px;
}
button {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  border-radius: 8px;
  padding: 0.65rem 1rem;
  cursor: pointer;
  font-weight: 600;
}
button:hover {
  background: #edf4f0;
  border-color: #b3c9bf;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button.primary {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}
button.primary:hover {
  background: #125044;
}
button.danger {
  color: #a33134;
}
button.link {
  border: 0;
  background: none;
  padding: 0.25rem 0;
  text-align: left;
  color: var(--teal);
}
a {
  color: var(--teal);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 2.05rem;
  letter-spacing: -0.055em;
  font-weight: 650;
  line-height: 1.15;
  margin-bottom: 0.65rem;
}
h2 {
  font-size: 1.2rem;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}
h3 {
  font-size: 1rem;
  line-height: 1.45;
}
p {
  line-height: 1.65;
}
small,
.small {
  font-size: 0.875rem;
  line-height: 1.5;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--teal);
  margin-bottom: 1rem;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 224px;
  background: var(--ink);
  color: #dce8e4;
  padding: 2.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.brand {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  color: white;
  letter-spacing: 0.16em;
  font-weight: 750;
  margin-bottom: 2.7rem;
}
.brandmark {
  display: grid;
  place-items: center;
  background: #d1ebd3;
  color: #173c31;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  font-family: Georgia, serif;
  font-size: 1.6rem;
  letter-spacing: 0;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.nav a {
  color: #bdceca;
  border-radius: 7px;
  padding: 0.75rem 0.85rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.nav a.active {
  color: #fff;
  background: #24464a;
}
.nav a:hover {
  text-decoration: none;
  background: #24464a;
}
.nav-label {
  margin-top: 2rem;
  color: #91aaa4;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  padding: 0 0.85rem;
}
.sidebar-foot {
  margin-top: auto;
  padding-top: 2rem;
  font-size: 0.8rem;
  color: #a9bfba;
  line-height: 1.6;
}
.sidebar-foot button {
  color: #bcd0c9;
}
.main {
  margin-left: 224px;
  padding: 1.8rem 2.5rem 4rem;
  max-width: 1800px;
  min-height: 100vh;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-bottom: 2.2rem;
  font-size: 0.875rem;
  color: var(--muted);
}
.topbar .connection {
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 0.35rem 0.75rem;
  background: #fff;
}
.pagehead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.pagehead p {
  max-width: 650px;
  color: var(--muted);
  margin-bottom: 0;
}
.toolbar {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  margin-bottom: 2rem;
}
.stat {
  padding: 1.2rem 1.4rem;
  border-right: 1px solid var(--line);
}
.stat:last-child {
  border: 0;
}
.stat strong {
  display: block;
  font-size: 1.8rem;
  letter-spacing: -0.04em;
  margin-bottom: 0.3rem;
}
.stat span {
  font-size: 0.875rem;
  color: var(--muted);
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.grid.wide {
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr);
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.5rem;
  min-width: 0;
}
.card.feature {
  background: #e8f0e8;
  border-color: #d2e0cf;
}
.card + .card.vertical {
  margin-top: 1.25rem;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0 1rem;
}
.section-head h2 {
  margin: 0;
}
.cardhead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 1rem;
}
.project-card {
  transition:
    box-shadow 0.15s,
    transform 0.15s;
  display: block;
  color: inherit;
  min-height: 230px;
}
.project-card:hover {
  text-decoration: none;
  box-shadow: 0 5px 22px #133c2510;
  transform: translateY(-2px);
}
.project-card h2 {
  font-size: 1.35rem;
  margin: 0.8rem 0;
}
.project-card .project-foot {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  margin-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
}
.badge {
  display: inline-block;
  padding: 0.23rem 0.6rem;
  border-radius: 6px;
  background: #edf1ef;
  color: #526960;
  font-size: 0.75rem;
  font-weight: 650;
  text-transform: capitalize;
  white-space: nowrap;
}
.badge.active,
.badge.completed,
.badge.approved,
.badge.evidence_backed {
  background: #e0efe2;
  color: #2b6438;
}
.badge.draft,
.badge.dialogue,
.badge.proposed,
.badge.pending,
.badge.awaiting_approval,
.badge.unverified,
.badge.deferred {
  background: #fbf0dc;
  color: #90601d;
}
.badge.failed,
.badge.rejected,
.badge.blocked {
  background: #f9e6e4;
  color: #a1473e;
}
.badge.running {
  background: #e4edf9;
  color: #3d6297;
}
.empty {
  padding: 1.5rem 0;
  color: var(--muted);
  line-height: 1.7;
}
.empty.large {
  padding: 3rem 1rem;
  text-align: center;
}
.empty strong {
  display: block;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.list li {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
  line-height: 1.55;
}
.list li:last-child {
  border-bottom: 0;
}
.list-number {
  padding-left: 1.3rem;
  line-height: 1.8;
}
.tabs {
  display: flex;
  gap: 0.6rem;
  border-bottom: 1px solid var(--line);
  margin: 1.4rem 0 1.5rem;
  overflow-x: auto;
}
.tabs button {
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: none;
  padding: 0.85rem 0.65rem;
  white-space: nowrap;
  font-size: 0.875rem;
  color: var(--muted);
}
.tabs button.active {
  border-bottom-color: var(--teal);
  color: var(--teal);
}
label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 0.4rem;
}
input,
textarea,
select {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid #cddbd5;
  background: #fff;
  border-radius: 7px;
  color: var(--ink);
  font-size: 1rem;
}
textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.6;
}
input[type="checkbox"] {
  width: auto;
  margin-right: 0.5rem;
  accent-color: var(--teal);
}
.field {
  margin-bottom: 1.15rem;
}
.field small {
  color: var(--muted);
  display: block;
  margin-top: 0.35rem;
}
.formfoot {
  display: flex;
  justify-content: flex-end;
  gap: 0.7rem;
  margin-top: 1.3rem;
  align-items: center;
  flex-wrap: wrap;
}
.login {
  max-width: 470px;
  margin: 12vh auto;
  padding: 2rem;
}
.login .brand {
  color: var(--ink);
  margin-bottom: 2rem;
}
.login h1 {
  font-size: 1.8rem;
}
.login small {
  overflow-wrap: anywhere;
}
.login .card {
  margin-top: 1.8rem;
}
.login button {
  width: 100%;
}
.formwide {
  max-width: 850px;
}
.chat {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 620px;
  overflow: auto;
  margin: 1rem 0 1.5rem;
  padding: 0.2rem;
}
.message {
  padding: 1rem 1.15rem;
  border-radius: 10px;
  background: #f1f5f3;
  max-width: 92%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.65;
}
.message.human {
  align-self: flex-end;
  background: #e4eee5;
}
.message.system {
  background: #fbf4e7;
  font-size: 0.9rem;
}
.message .author {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.document {
  white-space: pre-wrap;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.document h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.document ul {
  padding-left: 1.25rem;
}
.manifesto-banner {
  padding: 1rem 1.2rem;
  background: #edf4ec;
  border: 1px solid #d7e5d3;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.7;
}
.question {
  margin-bottom: 1.2rem;
}
.question h3 {
  font-size: 1.1rem;
  margin-top: 0.7rem;
}
.question .context {
  color: var(--muted);
  white-space: pre-wrap;
  font-size: 0.9rem;
}
.question .recommendation {
  border-left: 3px solid #91b29a;
  padding: 0.1rem 0 0.1rem 0.85rem;
  margin: 1.1rem 0;
  font-size: 0.9rem;
}
.choice {
  display: inline-block;
  border: 1px solid var(--line);
  padding: 0.35rem 0.6rem;
  margin: 0.2rem 0.4rem 0.4rem 0;
  border-radius: 6px;
  font-size: 0.875rem;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.875rem;
}
th {
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  padding: 0.8rem 0.6rem;
  white-space: nowrap;
}
td {
  padding: 1rem 0.6rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.5;
}
td .mono {
  font-size: 0.7rem;
}
.evidence {
  margin-top: 0.8rem;
  padding: 0.8rem;
  background: #f5f7f5;
  border-radius: 7px;
  font-size: 0.875rem;
}
.evidence button {
  font-size: 0.8rem;
  margin-top: 0.6rem;
}
.objective {
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}
.objective:last-child {
  border-bottom: 0;
}
.objective h3 {
  margin-bottom: 0.4rem;
}
.key-result {
  padding: 0.6rem 0.8rem;
  margin-top: 0.7rem;
  border-left: 2px solid #adc6b5;
  background: #f7f9f6;
}
.timeline li {
  border-left: 2px solid #dce6df;
  padding: 0.4rem 0 1.5rem 1rem;
  margin-left: 0.25rem;
  list-style: none;
}
.timeline strong {
  display: block;
  font-size: 0.95rem;
}
.timeline p {
  margin: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.timeline {
  padding: 0;
}
.notice {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  max-width: 480px;
  padding: 1rem 1.25rem;
  border-radius: 9px;
  background: #173d32;
  color: white;
  box-shadow: 0 8px 30px #0002;
  z-index: 30;
}
.notice.error {
  background: #8e3633;
}
.loading {
  padding: 4rem;
  text-align: center;
  color: var(--muted);
}
.split-note {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.8rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.stack {
  display: grid;
  gap: 1.25rem;
}
.spacer {
  margin-top: 1.5rem;
}
details {
  margin-top: 1rem;
}
summary {
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--teal);
  padding: 0.5rem 0;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f4f6f5;
  border-radius: 7px;
  padding: 1rem;
  font-size: 0.8rem;
  line-height: 1.6;
  max-height: 400px;
  overflow: auto;
}
.tall {
  min-height: 180px;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 0.3rem;
  font-weight: 400;
}
.check input {
  margin-top: 0.3rem;
}
.inline-title {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}
.inline-title h3 {
  margin: 0;
}
.note {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.7;
}
.activity-error {
  color: #a1473e;
  white-space: pre-wrap;
}
.resource-label {
  font-size: 0.85rem;
  color: var(--muted);
}
@media (min-width: 1550px) {
  .main {
    padding-left: 3.5rem;
    padding-right: 3.5rem;
  }
  .grid.projects {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 1050px) {
  .sidebar {
    width: 190px;
    padding: 1.8rem 1rem;
  }
  .main {
    margin-left: 190px;
    padding: 1.5rem;
  }
  .grid.wide {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat:nth-child(2) {
    border-right: 0;
  }
  .stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}
@media (max-width: 700px) {
  .sidebar {
    position: sticky;
    inset: auto;
    width: 100%;
    padding: 0.8rem 1rem;
  }
  .brand {
    margin: 0 0 0.6rem;
    font-size: 0.9rem;
  }
  .brandmark {
    width: 30px;
    height: 30px;
  }
  .nav {
    flex-direction: row;
    overflow: auto;
    gap: 0.2rem;
  }
  .nav a {
    font-size: 0.8rem;
    padding: 0.5rem 0.6rem;
    white-space: nowrap;
  }
  .sidebar-foot,
  .nav-label {
    display: none;
  }
  .main {
    margin: 0;
    padding: 1.2rem 1rem 3rem;
  }
  .topbar {
    padding-bottom: 1.6rem;
  }
  .topbar .connection {
    font-size: 0.75rem;
  }
  .pagehead {
    flex-direction: column;
    margin-bottom: 1.3rem;
    gap: 1rem;
  }
  h1 {
    font-size: 1.75rem;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 1.15rem;
  }
  .stats {
    margin-bottom: 1.2rem;
  }
  .stat {
    padding: 1rem;
  }
  .stat strong {
    font-size: 1.5rem;
  }
  .tabs {
    gap: 0.25rem;
  }
  .tabs button {
    font-size: 0.8rem;
  }
  .login {
    padding: 1.5rem 1rem;
    margin: 8vh auto;
  }
  .notice {
    right: 1rem;
    left: 1rem;
    bottom: 1rem;
    max-width: none;
  }
  .message {
    max-width: 100%;
  }
  .table-wrap {
    margin: 0 -0.4rem;
  }
  .pagehead .toolbar {
    width: 100%;
  }
  .pagehead .toolbar button {
    flex: 1;
  }
}

h1,
h2,
h3,
p,
.list li {
  overflow-wrap: anywhere;
}
