/* Project QA workspace */
.sidebar #new-project {
  margin: 24px 0 16px;
  width: 100%;
}
.sidebar #project-list {
  max-height: 50vh;
  overflow: auto;
  margin-top: 10px;
}
.nav-button small {
  display: block;
  font-size: 10px;
  line-height: 1.6;
  font-weight: 400;
  margin-top: 4px;
  color: #75816e;
}
#clear-projects {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 4px 0;
  font-size: 11px;
  color: var(--muted);
  text-align: left;
}
#clear-projects:hover {
  color: var(--danger, #c0392b);
}
.sidebar-footer button {
  padding: 0;
}
.welcome-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 34px;
  max-width: 820px;
  margin: 28px 0;
}
.welcome-card h2 {
  font-family: Georgia, serif;
  font-size: 29px;
  font-weight: 400;
  margin: 0 0 17px;
}
.welcome-card p {
  font-size: 15px;
  line-height: 1.8;
  max-width: 690px;
  color: #5e6d55;
  margin-bottom: 25px;
}
.welcome-flow {
  display: flex;
  gap: 22px;
  margin-top: 30px;
  color: #829174;
  font-size: 12px;
}
.welcome-flow span + span:before {
  content: "→";
  margin-right: 22px;
}
.setup-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #fff8e8;
  border: 1px solid #e6d8b9;
  border-radius: 5px;
  padding: 18px 22px;
  margin-bottom: 25px;
}
.setup-banner > div {
  flex: 1;
}
.setup-banner p {
  font-size: 13px;
  line-height: 1.6;
  margin: 6px 0 0;
  color: #827349;
}
.setup-banner[hidden] {
  display: none;
}
.workspace-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 15px 0 30px;
}
.workspace-heading h1 {
  font-size: 36px;
  margin: 10px 0;
}
.workspace-heading p {
  font-size: 12px;
  color: #839075;
}
.workspace-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 390px;
}
.primary-button,
.secondary-button {
  font-size: 13px;
  padding: 12px 17px;
}
.pipeline {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  background: #fff;
}
.pipeline-step {
  padding: 17px 10px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #929b88;
}
.pipeline-step span {
  font-family: Georgia, serif;
  font-size: 18px;
}
.pipeline-step.current {
  background: #e9eee2;
  color: #345944;
}
.job-status {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  margin: 20px 0;
}
.job-status p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #66725e;
}
#reasoning-progress {
  grid-column: 2;
  font-size: 12px;
}
.next-step {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 20px 24px;
  background: #edf1e7;
  border: 1px solid #cad4c0;
  border-radius: 5px;
  margin: 20px 0;
}
.next-step[hidden],
#open-updated-app[hidden] {
  display: none;
}
.next-step h2 {
  font-size: 18px;
  margin: 0 0 8px;
}
.next-step p {
  margin: 0;
  color: #66725e;
  font-size: 13px;
  line-height: 1.7;
}
.next-step button {
  flex-shrink: 0;
}
@media (max-width: 700px) {
  .next-step {
    align-items: stretch;
    flex-direction: column;
  }
}
.workspace-tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  margin: 25px 0;
}
.workspace-tabs button {
  border: 0;
  background: transparent;
  padding: 14px 0;
  color: #839176;
  font-size: 14px;
  border-bottom: 2px solid transparent;
}
.workspace-tabs button.active {
  color: var(--forest);
  border-bottom-color: var(--forest);
}
.workspace-tabs span {
  margin-left: 5px;
  font-size: 11px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 24px;
}
.metrics > div {
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}
.metrics strong {
  font-family: Georgia, serif;
  font-size: 32px;
  display: block;
  font-weight: 400;
}
.metrics span {
  text-transform: capitalize;
  color: #7e8c71;
  font-size: 12px;
  display: block;
  margin-top: 5px;
}
.purpose-document h2 {
  font-family: Georgia, serif;
  font-size: 25px;
  font-weight: 400;
}
.purpose-document p {
  font-size: 14px;
  line-height: 1.8;
  color: #66765a;
  margin: 14px 0;
}
.stack-tag {
  display: inline-block;
  font-size: 11px;
  background: #edf1e7;
  padding: 6px 10px;
  border-radius: 3px;
  margin: 0 6px 6px 0;
}
.source-summary {
  margin-top: 22px;
}
.file-button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 11px 0;
  font-family: var(--mono);
  font-size: 11px;
  color: #526b45;
  overflow-wrap: anywhere;
}
.file-button small {
  float: right;
  font-size: 10px;
  color: #93a083;
}
.running-test {
  margin: 20px 0;
  padding: 16px 20px;
  border-left: 3px solid var(--forest);
  background: #edf2e7;
  font-size: 14px;
}
.issue-card {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  padding: 25px;
  margin: 18px 0;
  min-width: 0;
}
.issue-heading {
  display: flex;
  align-items: start;
  gap: 15px;
}
.issue-heading h3 {
  font-size: 18px;
  font-weight: 550;
  line-height: 1.5;
}
.issue-heading small {
  display: block;
  font-size: 11px;
  color: #85917a;
  margin-top: 4px;
}
.issue-card > p,
.issue-grid p {
  font-size: 14px;
  line-height: 1.8;
  color: #68775e;
  margin: 16px 0;
}
.issue-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}
.issue-grid h4,
.fix-preview h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #7e8e6e;
  margin-top: 17px;
}
.issue-card details {
  margin: 15px 0;
  font-size: 12px;
}
.issue-card summary {
  cursor: pointer;
  color: #657b55;
}
.source-code,
.patch-diff {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f6f8f1;
  border: 1px solid #e5eadd;
  border-radius: 3px;
  padding: 17px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.7;
  max-height: 500px;
  overflow: auto;
  margin: 13px 0;
}
.log-console {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #243229;
  color: #dce6d6;
  border-radius: 5px;
  padding: 24px;
  max-height: 650px;
  overflow: auto;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.7;
}
.fix-preview {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.fix-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.test-screenshot {
  display: block;
  width: 100%;
  max-width: 900px;
  border: 1px solid var(--line);
  margin-top: 12px;
}
.workspace-status {
  font-size: 13px;
  line-height: 1.7;
  margin-top: 20px;
}
.workflow-footnote {
  font-size: 12px;
  line-height: 1.8;
}
.text-button {
  font-size: 12px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 30px;
  color: var(--ink);
  background: #fff;
  width: 680px;
  max-width: calc(100vw - 32px);
  max-height: 85vh;
  overflow: auto;
}
dialog::backdrop {
  background: #202b255c;
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
}
.dialog-heading h2 {
  font-family: Georgia, serif;
  font-size: 27px;
  font-weight: 400;
}
dialog p {
  font-size: 14px;
  line-height: 1.8;
  color: #75806c;
  margin: 15px 0;
}
dialog h3 {
  font-size: 16px;
  margin: 24px 0 10px;
}
dialog pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f4f7ee;
  border: 1px solid var(--line);
  padding: 15px;
  font-size: 12px;
  line-height: 1.6;
}
.form-label {
  display: block;
  font-size: 12px;
  color: #6a7b5d;
  margin: 20px 0;
}
.form-label input {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 12px;
  margin-top: 8px;
  background: #fafcf6;
  color: #3c5232;
  font-size: 14px;
}
.edit-source {
  display: block;
  width: 100%;
  min-height: 300px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  padding: 15px;
  background: #f8faf3;
  border: 1px solid var(--line);
  margin-top: 10px;
}
.error-text {
  color: #a54e34;
}
#workspace[hidden],
#welcome[hidden],
section[hidden] {
  display: none !important;
}
@media (max-width: 900px) {
  .sidebar #new-project {
    width: auto;
    margin: 15px 0 0;
  }
  .sidebar #project-list {
    max-height: 100px;
    display: flex;
  }
  .sidebar-footer {
    display: block;
    position: static;
  }
  .sidebar-footer p {
    display: none;
  }
  .pipeline-step {
    font-size: 10px;
    gap: 5px;
    padding: 14px 8px;
  }
  .workspace-heading {
    display: block;
  }
  .workspace-actions {
    justify-content: flex-start;
    max-width: none;
    margin-top: 18px;
  }
}
@media (max-width: 650px) {
  .job-status {
    grid-template-columns: 1fr;
  }
  #reasoning-progress {
    grid-column: 1;
  }
  .welcome-card {
    padding: 24px;
  }
  .welcome-card h2 {
    font-size: 25px;
  }
  .welcome-flow {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .welcome-flow span + span:before {
    display: none;
  }
  .setup-banner {
    align-items: start;
    flex-direction: column;
  }
  .pipeline {
    grid-template-columns: repeat(3, 1fr);
  }
  .metrics {
    gap: 8px;
    grid-template-columns: repeat(2, 1fr);
  }
  .metrics > div {
    padding: 16px;
  }
  .workspace-tabs {
    gap: 17px;
    overflow: auto;
  }
  .workspace-tabs button {
    font-size: 12px;
    white-space: nowrap;
  }
  .issue-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .issue-card {
    padding: 20px;
  }
  .workspace-heading h1 {
    font-size: 30px;
  }
  .issue-heading h3 {
    font-size: 16px;
  }
  .fix-actions {
    flex-direction: column;
    align-items: stretch;
  }
  dialog {
    padding: 22px;
  }
  .source-code,
  .patch-diff {
    font-size: 10px;
  }
}

.section-heading {
  display: flex;
  align-items: start;
  gap: 14px;
  margin: 24px 0 21px;
}
.section-heading > div {
  flex: 1;
}
.section-heading h2 {
  font-size: 20px;
}
.section-heading p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}
.purpose-document {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  padding: 24px;
  min-width: 0;
}
.languages-document {
  margin-top: 20px;
}
.languages-document h3 {
  margin: 0 0 16px;
}
.language-row {
  display: grid;
  grid-template-columns: 150px 70px 1fr;
  gap: 16px;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.language-row span {
  color: var(--muted);
  font-size: 13px;
}
.language-row p {
  margin: 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.capabilities-list {
  padding-left: 20px;
  line-height: 1.8;
}
@media (max-width: 700px) {
  .language-row {
    grid-template-columns: 1fr auto;
  }
  .language-row p {
    grid-column: 1 / -1;
  }
}
.workspace-status.error {
  color: var(--red);
  background: #fff1e8;
  padding: 12px;
}

.language-row details {
  min-width: 0;
}
.language-row details p {
  margin-top: 10px;
}
