:root {
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    sans-serif;
  color: #24312e;
  background: #f4f5f2;
  --muted: #62716b;
  --line: #dce2dd;
  --accent: #1d604d;
  --soft: #edf4ef;
  --error: #a0362d;
  font-size: 16px;
  font-synthesis: none;
  font-variant-numeric: tabular-nums;
  --paper: #fff;
  --sidebar: #222d2a;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  background: #fff;
  color: inherit;
  border: 1px solid var(--line);
  padding: 9px 14px;
  transition: background 0.16s ease-out;
  color: inherit;
}
button,
input,
select,
textarea {
  border-radius: 5px;
}
button:hover {
  background: #edf3ee;
}
button:active {
  background: #e0eae2;
}
button:disabled {
  cursor: wait;
  opacity: 0.5;
}
input,
select,
textarea {
  border: 1px solid #cbd5ce;
  background: #fff;
  color: inherit;
  padding: 10px 12px;
  max-width: 100%;
  min-width: 0;
}
textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.8;
}
input::placeholder,
textarea::placeholder {
  color: #68776e;
}
input,
textarea {
  caret-color: var(--accent);
}
a {
  color: var(--accent);
  text-underline-offset: 4px;
}
.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.primary:hover {
  background: #124b3a;
}
.danger {
  color: var(--error);
}
.quiet {
  border-color: transparent;
  background: transparent;
}
.small {
  font-size: 12px;
  padding: 6px 10px;
}
.muted {
  color: var(--muted);
}
:focus-visible {
  outline: 3px solid #6aa78e;
  outline-offset: 3px;
}
::selection {
  background: #c5e0d1;
  color: #17372b;
}
* {
  scrollbar-width: thin;
  scrollbar-color: #b7c5bd transparent;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  text-wrap: balance;
}
h1 {
  font-family: Georgia, "Songti SC", serif;
  font-size: 31px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.3;
}
h2 {
  font-size: 18px;
  line-height: 1.45;
  font-weight: 650;
}
h3 {
  font-size: 15px;
}
p {
  line-height: 1.8;
}
svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}
.skip-link {
  position: absolute;
  top: -70px;
  left: 12px;
  background: #fff;
  padding: 12px;
  z-index: 50;
}
.skip-link:focus {
  top: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 650;
}
.brand-mark {
  width: 27px;
  height: 27px;
}
.auth-wrap {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 30px;
  background: #f5f6f2;
}
.auth-card {
  width: 100%;
  max-width: 450px;
}
.auth-card h1 {
  margin: 45px 0 14px;
  font-size: 32px;
}
.auth-card form {
  margin-top: 28px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.field label {
  font-weight: 550;
  font-size: 13px;
}
.hint,
.field .hint {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.auth-card .primary {
  width: 100%;
  padding: 12px;
}
.auth-foot {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.workspace {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  height: 100dvh;
}
.sidebar {
  background: var(--sidebar);
  color: #edf4ef;
  padding: 27px 16px 18px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.sidebar .brand {
  padding: 0 7px 29px;
  letter-spacing: 0.02em;
}
.sidebar-section {
  margin: 25px 9px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #adbbb3;
}
.sidebar .quiet {
  color: #b7cac0;
}
.sidebar button {
  color: inherit;
}
.sidebar button:hover {
  background: #34453f;
}
.nav-list {
  display: grid;
  gap: 5px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 11px 12px;
  border: 0;
  background: transparent;
  min-width: 0;
  width: 100%;
  font-size: 13px;
}
.nav-item span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar .nav-item.selected {
  background: #344d42;
  color: #eef9f1;
}
.sidebar .nav-item svg {
  width: 17px;
  height: 17px;
}
.project-index {
  overflow: auto;
  min-height: 0;
  flex: 1;
}
.project-category {
  margin: 19px 0 23px;
}
.project-category h2 {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: #a8b9b0;
  padding: 0 11px;
  margin-bottom: 8px;
}
.project-link {
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px;
  border-radius: 4px;
  text-align: left;
  font-size: 13px;
  line-height: 1.5;
}
.project-link svg {
  width: 16px;
  height: 16px;
  color: #9ab5a5;
}
.project-link > span:first-of-type {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-link.selected {
  background: #3a5044;
  color: #f0f8f2;
}
.project-archived {
  font-size: 12px;
  color: #c3cfc7;
  margin-left: auto;
  white-space: nowrap;
}
.sidebar-bottom {
  padding-top: 20px;
}
.self {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 19px 7px 0;
  border-top: 1px solid #415048;
  margin-top: 19px;
}
.self > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}
.self-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}
.self .muted {
  font-size: 12px;
  color: #b2c0b8;
}
.self button {
  padding: 5px;
}
.avatar {
  height: 30px;
  width: 30px;
  flex-shrink: 0;
  border-radius: 5px;
  background: #e9f0e9;
  color: #315844;
  display: grid;
  place-items: center;
  font-weight: 600;
}
.sidebar .avatar {
  background: #455a4e;
  color: #eef6ed;
  font-size: 12px;
}
.content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  min-height: 0;
}
.topbar {
  padding: 27px 40px 23px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.title-group {
  min-width: 0;
}
.breadcrumb {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 13px;
  letter-spacing: 0.02em;
}
.breadcrumb > span {
  color: #a9b6ae;
}
.project-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.sync-state {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.project-tabs {
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 0 40px;
  border-bottom: 1px solid var(--line);
  height: 46px;
  min-height: 46px;
  overflow-x: auto;
}
.project-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  border-radius: 0;
  padding: 12px 1px;
  height: 46px;
  color: #68746d;
  white-space: nowrap;
  font-size: 13px;
}
.project-tabs button[aria-current="page"] {
  border-bottom-color: var(--accent);
  color: var(--accent);
  font-weight: 650;
}
.mobile-project {
  display: none;
}
.document-page {
  padding: 30px 40px 55px;
  overflow: auto;
  flex: 1;
  min-height: 0;
  animation: document-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes document-in {
  from {
    clip-path: inset(0 0 2% 0);
  }
  to {
    clip-path: inset(0);
  }
}
.catalog-intro {
  max-width: 70ch;
  margin: 0 0 36px;
  padding: 12px 0 26px;
  border-bottom: 1px solid var(--line);
}
.catalog-intro h2 {
  font-family: Georgia, "Songti SC", serif;
  font-size: 25px;
  font-weight: 500;
}
.catalog-intro p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
}
.catalog-section {
  margin-bottom: 38px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
}
.section-head p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.catalog-columns,
.catalog-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 100px 55px 110px;
  gap: 20px;
  align-items: center;
  text-align: left;
}
.catalog-columns {
  font-size: 12px;
  color: var(--muted);
  padding: 10px 15px;
  border-bottom: 1px solid var(--line);
}
.catalog-row {
  width: 100%;
  padding: 22px 15px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.catalog-row strong {
  font-size: 15px;
  font-weight: 600;
}
.catalog-row p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 7px;
  max-width: 65ch;
  overflow-wrap: anywhere;
}
.catalog-row > span,
.catalog-row time {
  font-size: 12px;
}
.catalog-row time {
  color: var(--muted);
}
.version-mark {
  color: var(--accent);
  font-weight: 650;
}
.tabular {
  font-variant-numeric: tabular-nums;
}
.overview-description {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 28px;
}
.overview-description p {
  max-width: 72ch;
  color: var(--muted);
  font-size: 13px;
  white-space: pre-wrap;
}
.overview-description button {
  flex-shrink: 0;
}
.prd-feature {
  display: grid;
  grid-template-columns: 45px minmax(0, 1fr) auto;
  gap: 19px;
  align-items: center;
  background: #f4f7f1;
  padding: 29px 26px;
  margin-bottom: 38px;
}
.document-symbol {
  width: 44px;
  height: 54px;
  border: 1px solid #bacdbe;
  border-radius: 3px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: #fff;
}
.document-symbol svg {
  width: 23px;
  height: 23px;
}
.prd-feature h2 {
  font-size: 20px;
}
.prd-feature .muted {
  font-size: 12px;
  margin-top: 7px;
}
.prd-summary {
  font-size: 13px;
  line-height: 1.9;
  margin-top: 14px;
  max-width: 70ch;
  white-space: pre-line;
  overflow-wrap: anywhere;
  color: #46594c;
}
.archive-section {
  margin-top: 34px;
}
.decision-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 17px;
  align-items: start;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.decision-row > .status {
  margin-top: 3px;
}
.decision-body {
  font-size: 14px;
  line-height: 1.85;
  max-width: 72ch;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.record-meta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 6px;
}
.source-link {
  padding-left: 0;
  margin-top: 5px;
  color: var(--accent);
}
.status {
  display: inline-block;
  font-size: 12px;
  line-height: 1.5;
  padding: 4px 7px;
  border-radius: 3px;
  color: #52645b;
  background: #edf1ec;
  white-space: nowrap;
}
.status-running {
  color: #31596a;
  background: #e9f1f3;
}
.status-review {
  color: #785313;
  background: #f7efd8;
}
.status-succeeded {
  color: #246043;
  background: #e6f1e7;
}
.status-failed {
  color: #9d3b32;
  background: #f9e8e5;
}
.empty {
  padding: 36px 10px;
  max-width: 460px;
  color: var(--muted);
}
.empty h3 {
  color: #3e5147;
  font-size: 15px;
  font-weight: 550;
  margin-bottom: 9px;
}
.empty p {
  font-size: 12px;
}
.empty button {
  margin-top: 17px;
}
.catalog-page > .empty {
  margin: auto;
}
.prd-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
}
.prd-toolbar strong {
  font-size: 16px;
}
.markdown {
  font-size: 15px;
  line-height: 1.9;
  max-width: 73ch;
  color: #2b3731;
  overflow-wrap: anywhere;
}
.markdown h1 {
  font-size: 29px;
  font-family: Georgia, "Songti SC", serif;
  margin: 32px 0 18px;
}
.markdown h1:first-child {
  margin-top: 0;
}
.markdown h2 {
  font-size: 21px;
  margin: 34px 0 13px;
}
.markdown h3 {
  font-size: 17px;
  margin: 28px 0 12px;
}
.markdown h4,
.markdown h5,
.markdown h6 {
  font-size: 15px;
  margin: 23px 0 10px;
}
.markdown p {
  white-space: pre-wrap;
  margin: 14px 0;
}
.markdown ul,
.markdown ol {
  padding-left: 24px;
  margin: 14px 0;
}
.markdown li {
  margin: 6px 0;
}
.markdown blockquote,
.source-quote {
  margin: 16px 0;
  border-left: 1px solid #8fae99;
  padding: 8px 20px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f6f8f4;
  color: #405b49;
}
.markdown code {
  font-family: ui-monospace, monospace;
  background: #edf2eb;
  padding: 2px 5px;
  font-size: 0.86em;
}
.markdown pre {
  padding: 18px;
  background: #f2f5ef;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.markdown pre code {
  padding: 0;
  background: transparent;
}
.markdown hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 30px 0;
}
.prd-history {
  margin-top: 45px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  font-size: 12px;
}
.prd-history summary {
  cursor: pointer;
  color: var(--muted);
  padding: 5px 0;
}
.revision-row {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.revision-row .record-meta {
  margin: 0;
  flex: 1;
}
.prd-editor-form textarea {
  display: block;
  width: 100%;
  min-height: 380px;
  font-family: ui-monospace, "PingFang SC", monospace;
  font-size: 13px;
  line-height: 1.9;
  padding: 20px;
  resize: vertical;
}
.prd-editor-form .hint {
  margin-top: 12px;
}
.prd-editor-actions {
  display: flex;
  gap: 9px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 22px;
}
.file-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.file-row > div {
  flex: 1;
  min-width: 0;
}
.file-row a {
  overflow-wrap: anywhere;
}
.file-row svg {
  color: var(--accent);
}
.body-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  min-height: 0;
  flex: 1;
}
.conversation {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}
.discussion-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 30px 0;
  flex-wrap: wrap;
}
.discussion-tools select {
  font-size: 12px;
  padding: 6px 9px;
}
.searchbar {
  padding: 13px 30px;
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #edf0e9;
}
.searchbar input {
  flex: 1;
  font-size: 12px;
  padding: 7px 10px;
}
.timeline {
  flex: 1;
  overflow: auto;
  padding: 5px 30px 20px;
  min-height: 120px;
  scroll-behavior: smooth;
}
.message {
  padding: 19px 0;
  border-bottom: 1px solid #e8ede7;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
}
.message-meta {
  display: flex;
  align-items: baseline;
  gap: 9px;
  flex-wrap: wrap;
  font-size: 12px;
  margin-bottom: 8px;
}
.author {
  font-size: 13px;
  font-weight: 650;
}
.agent-label {
  color: #315a49;
  background: #edf3ee;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
}
.direct-label {
  color: #79602c;
  font-size: 12px;
}
.timestamp {
  color: var(--muted);
  font-size: 12px;
}
.message-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.85;
  max-width: 73ch;
}
.message-actions {
  margin-top: 9px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.message-actions button {
  font-size: 12px;
  padding: 2px 0;
  color: #5e7568;
  background: transparent;
  border: 0;
}
.attachments {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.attachment {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 12px;
  word-break: break-all;
}
.composer {
  padding: 14px 30px 20px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.composer textarea {
  width: 100%;
  min-height: 74px;
  border: 0;
  padding: 4px 0;
  resize: none;
  outline-offset: 0;
}
.composer-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
}
.composer-options {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
  flex: 1;
}
.composer-options select {
  font-size: 12px;
  padding: 6px 8px;
  max-width: 180px;
}
.composer-tools > div:last-child {
  flex-shrink: 0;
}
.composer-tools .primary {
  white-space: nowrap;
  flex-shrink: 0;
}
.composer .hint {
  font-size: 12px;
}
.reply-context,
#reply-context {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  color: var(--muted);
  font-size: 12px;
}
.file-pending {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tasks-aside {
  border-left: 1px solid var(--line);
  background: #fafbf8;
  padding: 23px 19px;
  overflow: auto;
}
.aside-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.aside-header h2 {
  font-size: 15px;
}
.tasks-aside .task-row {
  display: block;
  padding: 17px 0;
}
.tasks-aside .task-row > .creator-cell,
.tasks-aside .task-row > .task-date {
  display: none;
}
.tasks-aside .task-row .status {
  margin-top: 10px;
}
.tasks-aside .task-row strong {
  font-size: 12px;
}
.task-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 80px 80px 110px;
  gap: 15px;
  align-items: center;
  text-align: left;
  width: 100%;
  padding: 20px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  font-size: 13px;
}
.task-row strong {
  font-weight: 550;
  overflow-wrap: anywhere;
}
.task-row > .muted {
  font-size: 12px;
}
.task-row .record-meta {
  font-size: 12px;
}
.settings-page {
  max-width: 1080px;
}
.settings-block {
  padding: 29px 0;
  border-bottom: 1px solid var(--line);
}
.settings-block:first-child {
  padding-top: 0;
}
.settings-block > p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
  max-width: 72ch;
}
.settings-block form {
  margin-top: 22px;
}
.inline-form {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}
.inline-form .field {
  margin: 0;
  flex: 1;
  min-width: 120px;
}
.inline-form .field:first-child {
  flex: 2;
}
.inline-form > .form-error {
  width: 100%;
  margin: 0;
}
.token-row,
.agent-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 19px 0;
  border-bottom: 1px solid #e9eee8;
}
.token-row p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.agent-row > div:nth-child(2) {
  flex: 1;
}
.member-row {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 23px 0;
  border-bottom: 1px solid var(--line);
}
.member-details {
  flex: 1;
  min-width: 0;
}
.member-details p {
  font-size: 12px;
  margin-top: 5px;
  color: var(--muted);
}
.member-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.8;
  padding: 18px;
  background: #f1f5ee;
  border: 0;
  border-radius: 5px;
  max-height: 320px;
  overflow: auto;
  user-select: all;
}
.form-error {
  color: var(--error);
  font-size: 13px;
  line-height: 1.7;
  margin: 12px 0;
  min-height: 0;
}
.detail-description {
  white-space: pre-wrap;
  line-height: 1.8;
  margin: 20px 0;
  overflow-wrap: anywhere;
}
.detail-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
}
.history {
  list-style: none;
  margin: 14px 0 22px;
  padding: 0;
}
.history li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.8;
}
.history pre {
  font: inherit;
  white-space: pre-wrap;
  word-break: break-word;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 22px;
}
dialog {
  border: 0;
  border-radius: 10px;
  width: min(720px, calc(100vw - 32px));
  padding: 30px;
  color: inherit;
  box-shadow: 0 22px 70px #132b252b;
  max-height: 87dvh;
  overflow: auto;
}
dialog::backdrop {
  background: #182b2566;
}
dialog header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
}
dialog header button {
  padding: 5px;
  border: 0;
  background: transparent;
}
.dialog-copy {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}
#notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  max-width: min(600px, 90vw);
  padding: 0;
  background: #224e3f;
  color: #fff;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.8;
}
#notice.visible {
  padding: 12px 18px;
}
#notice.error {
  background: #842e29;
}
.error-banner {
  padding: 10px 30px;
  background: #fbede7;
  color: #8e3726;
  font-size: 12px;
}
.load-older {
  display: block;
  margin: 10px auto;
}
.helper-note {
  padding: 15px 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
}
.file-input {
  max-width: 230px;
  font-size: 12px;
}
@media (max-width: 1200px) {
  .topbar {
    padding: 25px 30px 20px;
  }
  .project-tabs {
    padding: 0 30px;
  }
  .document-page {
    padding: 27px 30px 45px;
  }
  .body-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .tasks-aside {
    display: none;
  }
  .prd-feature {
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 24px;
  }
  .prd-feature > button {
    grid-column: 2;
    justify-self: start;
  }
  .catalog-columns,
  .catalog-row {
    grid-template-columns: minmax(160px, 1fr) 80px 45px 105px;
    gap: 14px;
  }
  .composer-tools .hint {
    display: none;
  }
}
@media (max-width: 760px) {
  .workspace {
    display: flex;
    flex-direction: column;
    height: 100dvh;
  }
  .sidebar {
    display: none;
  }
  .content {
    flex: 1;
  }
  .mobile-project {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 23px;
  }
  .mobile-project select {
    font-size: 12px;
    padding: 7px 8px;
    max-width: calc(100vw - 112px);
    flex: 1;
  }
  .mobile-project button {
    font-size: 12px;
  }
  .topbar {
    display: block;
    padding: 16px 20px 19px;
  }
  .breadcrumb {
    font-size: 12px;
    margin-bottom: 10px;
  }
  .topbar h1 {
    font-size: 28px;
  }
  .topbar .top-actions {
    position: absolute;
    right: 20px;
    top: 85px;
  }
  .topbar .top-actions button {
    font-size: 12px;
    padding: 7px 9px;
  }
  .topbar .sync-state {
    display: none;
  }
  .title-group h1 {
    padding-right: 90px;
  }
  .project-meta {
    font-size: 12px;
    margin-top: 8px;
    max-width: 100%;
  }
  .project-tabs {
    padding: 0 20px;
    gap: 29px;
    min-height: 44px;
    height: 44px;
  }
  .project-tabs button {
    height: 44px;
    font-size: 12px;
  }
  .document-page {
    padding: 23px 20px 40px;
  }
  .catalog-intro {
    margin-bottom: 26px;
    padding: 3px 0 23px;
  }
  .catalog-intro h2 {
    font-size: 21px;
  }
  .catalog-intro p {
    font-size: 12px;
  }
  .catalog-columns,
  .catalog-row {
    grid-template-columns: minmax(0, 1fr) 64px;
    gap: 15px;
    padding-left: 0;
    padding-right: 0;
  }
  .catalog-columns > span:nth-child(n + 3),
  .catalog-row > span:nth-child(3),
  .catalog-row > time {
    display: none;
  }
  .catalog-row strong {
    font-size: 14px;
  }
  .catalog-row p {
    font-size: 12px;
  }
  .catalog-section {
    margin-bottom: 30px;
  }
  .section-head {
    gap: 10px;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 14px;
  }
  .section-head h2 {
    font-size: 17px;
  }
  .section-head p {
    font-size: 12px;
  }
  .section-head button {
    font-size: 12px;
  }
  .overview-description {
    margin-bottom: 22px;
  }
  .overview-description p {
    font-size: 12px;
  }
  .overview-description button {
    font-size: 12px;
    padding: 5px 0;
  }
  .prd-feature {
    padding: 21px 18px;
    gap: 14px;
    grid-template-columns: 32px minmax(0, 1fr);
    margin-bottom: 29px;
  }
  .document-symbol {
    width: 31px;
    height: 42px;
  }
  .document-symbol svg {
    width: 18px;
    height: 18px;
  }
  .prd-feature h2 {
    font-size: 18px;
  }
  .prd-feature .muted {
    font-size: 12px;
  }
  .prd-summary {
    font-size: 12px;
    margin-top: 12px;
  }
  .prd-feature > button {
    font-size: 12px;
    margin-top: 1px;
  }
  .decision-row {
    grid-template-columns: 55px minmax(0, 1fr);
    gap: 12px;
    padding: 18px 0;
  }
  .decision-row > button {
    grid-column: 2;
    justify-self: start;
    padding-left: 0;
  }
  .decision-body {
    font-size: 13px;
  }
  .record-meta {
    font-size: 12px;
  }
  .task-row {
    grid-template-columns: minmax(0, 1fr) 66px;
    gap: 11px;
    padding: 18px 0;
  }
  .task-row .task-date,
  .task-row .creator-cell {
    display: none;
  }
  .task-row strong {
    font-size: 12px;
  }
  .task-row .record-meta {
    font-size: 12px;
  }
  .prd-toolbar {
    flex-wrap: wrap;
    gap: 15px;
    padding-bottom: 20px;
    margin-bottom: 23px;
  }
  .prd-toolbar .top-actions {
    flex-wrap: wrap;
  }
  .prd-toolbar .top-actions button {
    font-size: 12px;
    padding: 7px 9px;
  }
  .markdown {
    font-size: 14px;
  }
  .markdown h1 {
    font-size: 25px;
  }
  .markdown h2 {
    font-size: 19px;
  }
  .markdown h3 {
    font-size: 16px;
  }
  .prd-editor-form textarea {
    min-height: 340px;
    padding: 14px;
    font-size: 12px;
  }
  .prd-editor-actions button {
    font-size: 12px;
    padding: 7px 9px;
  }
  .revision-row {
    gap: 8px;
    flex-wrap: wrap;
  }
  .revision-row .record-meta {
    font-size: 12px;
  }
  .file-row {
    gap: 12px;
  }
  .file-row button {
    font-size: 12px;
    padding: 5px;
  }
  .file-row a {
    font-size: 12px;
  }
  .discussion-tools {
    padding: 13px 20px 0;
    gap: 7px;
  }
  .discussion-tools button {
    font-size: 12px;
  }
  .searchbar {
    padding: 11px 20px;
  }
  .timeline {
    padding: 3px 20px 15px;
  }
  .message {
    gap: 9px;
    grid-template-columns: 25px minmax(0, 1fr);
    padding: 16px 0;
  }
  .message .avatar {
    width: 25px;
    height: 25px;
    font-size: 12px;
  }
  .message-body {
    font-size: 13px;
  }
  .message-meta {
    gap: 7px;
  }
  .author {
    font-size: 12px;
  }
  .composer {
    padding: 12px 20px 16px;
  }
  .composer textarea {
    min-height: 67px;
    font-size: 13px;
  }
  .composer-tools {
    align-items: end;
  }
  .composer-options {
    gap: 6px;
  }
  .composer-options select {
    max-width: 160px;
    font-size: 12px;
  }
  .file-picker {
    font-size: 12px;
    padding: 5px 7px;
  }
  .composer .primary {
    font-size: 12px;
    padding: 8px 10px;
  }
  .composer .hint {
    font-size: 12px;
  }
  .member-row {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
  }
  .member-details {
    min-width: 150px;
  }
  .member-actions {
    margin-left: 42px;
  }
  .member-actions button {
    font-size: 12px;
  }
  .token-row {
    align-items: flex-start;
    gap: 12px;
  }
  .token-row strong,
  .agent-row strong {
    font-size: 12px;
  }
  .token-row p {
    font-size: 12px;
  }
  .token-row button {
    font-size: 12px;
    white-space: nowrap;
  }
  .agent-row {
    gap: 12px;
    flex-wrap: wrap;
  }
  .agent-row > .record-meta {
    margin-left: 42px;
  }
  .settings-block > p {
    font-size: 12px;
  }
  .inline-form .field:first-child {
    flex-basis: 100%;
  }
  .inline-form > .primary {
    width: 100%;
  }
  .inline-form .field {
    min-width: 100px;
  }
  .auth-wrap {
    padding: 26px;
  }
  .auth-card h1 {
    font-size: 29px;
  }
  .auth-card .muted {
    font-size: 13px;
  }
  dialog {
    padding: 23px;
  }
  dialog h2 {
    font-size: 18px;
  }
  .dialog-actions button {
    font-size: 12px;
  }
  .empty {
    padding: 27px 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.decision-row.source-highlight {
  background: #f5f5e8;
  outline: 1px solid #b8c6a6;
  outline-offset: 8px;
}

/* The primary surface is deliberately small; secondary records remain one step away. */
.workspace-menu > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 12px;
  font-size: 14px;
  color: #e9f2ec;
  list-style: none;
}
.workspace-menu[open] > summary {
  margin-bottom: 7px;
}
.workspace-menu .nav-item {
  padding-left: 23px;
}
.project-tabs {
  overflow: visible;
  position: relative;
  gap: 31px;
  z-index: 3;
}
.project-more {
  margin-left: auto;
  position: relative;
  font-size: 14px;
}
.project-more > summary,
.catalog-more > summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 4px;
  color: var(--muted);
}
.more-options {
  position: absolute;
  right: 0;
  top: 43px;
  width: 170px;
  padding: 7px;
  background: #fff;
  box-shadow: 0 10px 30px #1e39252b;
  border-radius: 7px;
  display: grid;
  gap: 3px;
  z-index: 10;
}
.more-options button {
  text-align: left;
  border: 0;
  background: transparent;
  padding: 11px 12px;
  font-size: 14px;
}
.more-options button:hover {
  background: var(--soft);
}
.catalog-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  min-height: 30px;
}
.catalog-more {
  position: relative;
  margin-left: auto;
}
.catalog-entry {
  display: flex;
  align-items: center;
  gap: 18px;
}
.catalog-entry > .catalog-row {
  flex: 1;
  min-width: 0;
}
.catalog-entry > button.small {
  flex-shrink: 0;
}
.prd-feature {
  margin-bottom: 30px;
  padding: 25px 26px;
  align-items: center;
}
.prd-summary {
  font-size: 15px;
  line-height: 1.85;
  max-width: 70ch;
  margin-top: 12px;
  white-space: normal;
}
.prd-feature h2 {
  font-size: 21px;
}
.archive-section {
  margin-top: 28px;
}
.conclusion-disclosure {
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding-top: 19px;
}
.conclusion-disclosure > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
}
.conclusion-content {
  padding-top: 24px;
}
.collaborate-button {
  margin-top: 28px;
}
.empty {
  padding: 27px 0;
}
.empty p {
  font-size: 15px;
}
.decision-row {
  grid-template-columns: 65px minmax(0, 1fr);
}
.decision-body,
.message-body,
.detail-description,
.markdown {
  font-size: 15px;
}
.record-details {
  margin-top: 9px;
  font-size: 13px;
}
.record-details > summary {
  color: var(--muted);
  cursor: pointer;
}
.record-details button {
  margin: 10px 10px 0 0;
}
.record-meta,
.timestamp,
.project-meta,
.breadcrumb,
.hint,
.status {
  font-size: 12px;
}
.status {
  padding: 4px 7px;
}
.task-row .record-meta {
  font-size: 12px;
}
.task-row strong {
  font-size: 15px;
}
.catalog-row strong {
  font-size: 16px;
}
.catalog-row p {
  font-size: 15px;
}
.catalog-columns,
.catalog-row > span,
.catalog-row time {
  font-size: 12px;
}
.discussion-options {
  padding: 12px 30px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.discussion-options > summary {
  cursor: pointer;
  color: var(--muted);
}
.discussion-options .discussion-tools {
  padding: 16px 0 0;
}
.discussion-options .searchbar {
  padding: 12px 0 3px;
  border: 0;
}
.tasks-aside {
  display: none;
}
.body-grid {
  grid-template-columns: minmax(0, 1fr);
}
.message-actions {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.message-actions > summary {
  cursor: pointer;
  list-style: none;
  padding: 4px 0;
}
.message-actions > div {
  display: flex;
  gap: 15px;
  margin-top: 5px;
}
.message-actions button {
  font-size: 13px;
}
.composer textarea {
  font-size: 15px;
}
.composer .hint {
  font-size: 12px;
}
.composer-options select {
  font-size: 14px;
}
.file-limits {
  font-size: 12px;
  position: relative;
}
.file-limits > summary {
  cursor: pointer;
  color: var(--muted);
}
.file-limits[open] > p {
  position: absolute;
  bottom: 26px;
  left: 0;
  background: #fff;
  width: 230px;
  padding: 13px;
  box-shadow: 0 6px 25px #1e392526;
  z-index: 4;
}
.composer-tools > div:last-child > .hint {
  display: none;
}
.agent-onboarding {
  max-width: 680px;
}
.agent-create-main {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}
.agent-create-main > .field {
  flex: 1;
  margin: 0;
}
.agent-create-main > .primary {
  flex-shrink: 0;
}
.agent-create input {
  font-size: 16px;
}
.advanced-settings {
  margin-top: 17px;
  font-size: 13px;
}
.advanced-settings > summary {
  cursor: pointer;
  color: var(--muted);
}
.advanced-fields {
  display: flex;
  gap: 20px;
  padding-top: 20px;
}
.advanced-fields > .field {
  flex: 1;
  max-width: 240px;
}
.settings-disclosure {
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}
.settings-disclosure > summary {
  cursor: pointer;
  font-size: 15px;
}
.settings-disclosure > p {
  font-size: 15px;
  margin-top: 18px;
  max-width: 70ch;
}
.settings-disclosure form {
  margin-top: 20px;
}
.token-row {
  align-items: flex-start;
}
.token-row > div {
  flex: 1;
}
.token-options {
  font-size: 13px;
  text-align: right;
  max-width: 55%;
}
.token-options > summary {
  cursor: pointer;
  color: var(--muted);
}
.token-options button {
  margin-top: 10px;
}
.token-row strong,
.agent-row strong {
  font-size: 15px;
}
.token-row p {
  font-size: 12px;
}
.prompt-copy {
  justify-content: flex-start;
  margin: 25px 0;
}
.prompt-copy > .primary {
  font-size: 16px;
  padding: 12px 18px;
}
.prompt-preview {
  margin-top: 23px;
  font-size: 13px;
}
.prompt-preview > summary {
  cursor: pointer;
  color: var(--muted);
}
.field label {
  font-size: 14px;
}
.settings-block > p {
  font-size: 15px;
}
.member-details p {
  font-size: 12px;
}
@media (max-width: 760px) {
  .project-tabs {
    gap: 29px;
    padding: 0 20px;
  }
  .project-tabs button {
    font-size: 14px;
  }
  .project-more {
    font-size: 14px;
  }
  .project-more > summary {
    padding: 12px 0;
  }
  .topbar .top-actions {
    top: 86px;
  }
  .project-meta,
  .breadcrumb {
    font-size: 12px;
  }
  .title-group h1 {
    padding-right: 0;
  }
  .topbar h1 {
    font-size: 28px;
  }
  .topbar:has(.top-actions > button) .title-group h1 {
    padding-right: 100px;
  }
  .mobile-project select {
    font-size: 14px;
  }
  .mobile-project button {
    font-size: 13px;
  }
  .prd-feature {
    padding: 23px 18px;
    gap: 15px;
  }
  .prd-feature h2 {
    font-size: 20px;
  }
  .prd-feature > button {
    font-size: 14px;
  }
  .prd-summary {
    font-size: 15px;
  }
  .decision-body,
  .message-body,
  .detail-description,
  .markdown {
    font-size: 15px;
  }
  .section-head h2 {
    font-size: 19px;
  }
  .section-head button {
    font-size: 13px;
  }
  .decision-row {
    grid-template-columns: 65px minmax(0, 1fr);
    gap: 12px;
  }
  .decision-row .record-meta {
    font-size: 12px;
  }
  .record-meta,
  .task-row .record-meta,
  .status {
    font-size: 12px;
  }
  .task-row strong {
    font-size: 15px;
  }
  .task-row {
    grid-template-columns: minmax(0, 1fr) 75px;
  }
  .catalog-row strong {
    font-size: 16px;
  }
  .catalog-row p {
    font-size: 15px;
  }
  .catalog-entry {
    gap: 10px;
  }
  .catalog-entry > button.small {
    font-size: 12px;
    padding: 7px;
  }
  .prd-toolbar strong {
    font-size: 16px;
  }
  .prd-toolbar .top-actions button {
    font-size: 14px;
  }
  .prd-editor-form textarea {
    font-size: 15px;
    min-height: 360px;
  }
  .prd-editor-actions button {
    font-size: 14px;
  }
  .prd-editor-actions {
    gap: 8px;
  }
  .revision-row .record-meta {
    font-size: 12px;
  }
  .discussion-options {
    padding: 12px 20px;
    font-size: 13px;
  }
  .composer-options {
    gap: 9px;
  }
  .composer-options select {
    font-size: 14px;
    max-width: 180px;
  }
  .file-picker {
    font-size: 13px;
    padding: 7px 9px;
  }
  .composer .primary {
    font-size: 14px;
    padding: 9px 12px;
  }
  .composer-tools {
    align-items: flex-end;
    flex-wrap: wrap;
  }
  .composer-tools > div:last-child {
    margin-left: auto;
  }
  .file-limits {
    font-size: 12px;
  }
  .message-body {
    line-height: 1.85;
  }
  .author {
    font-size: 14px;
  }
  .timestamp {
    font-size: 12px;
  }
  .searchbar input {
    font-size: 15px;
  }
  .discussion-tools button {
    font-size: 13px;
  }
  .discussion-tools select {
    font-size: 14px;
  }
  .agent-create-main {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }
  .agent-create-main > .primary {
    align-self: flex-start;
    font-size: 15px;
  }
  .advanced-fields {
    gap: 12px;
  }
  .settings-block > p {
    font-size: 15px;
  }
  .agent-row > .record-meta {
    font-size: 12px;
  }
  .token-row strong,
  .agent-row strong {
    font-size: 15px;
  }
  .token-row p,
  .token-row button {
    font-size: 12px;
  }
  .token-options {
    max-width: 50%;
  }
  .member-actions button {
    font-size: 13px;
  }
  .file-row a {
    font-size: 15px;
  }
  .file-row button {
    font-size: 12px;
  }
  .project-tabs {
    height: 48px;
    min-height: 48px;
  }
  .project-tabs button {
    height: 48px;
  }
  .section-head .top-actions {
    flex-wrap: wrap;
    flex-shrink: 1;
  }
  .section-head .top-actions label {
    font-size: 13px;
  }
}

.auth-card > .muted,
.file-row a,
.source-quote,
.helper-note {
  font-size: 15px;
}
.workspace-menu > summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  margin-left: auto;
}
.workspace-menu[open] > summary::after {
  transform: rotate(225deg);
}
