:root {
  --ink: #172622;
  --muted: #687872;
  --line: #dbe4df;
  --canvas: #f4f6f3;
  --surface: #ffffff;
  --brand: #0f5a4d;
  --brand-deep: #113b33;
  --brand2: #d9eee3;
  --danger: #a64038;
}

body {
  background: var(--canvas);
  letter-spacing: -0.01em;
}

.topbar {
  height: 72px;
  border-bottom-color: #e3ebe6;
  box-shadow: 0 2px 10px rgba(24, 48, 40, 0.035);
}

.brand {
  font-size: 17px;
  letter-spacing: -0.05em;
}

.userbar {
  gap: 14px;
}

.avatar {
  width: 34px;
  height: 34px;
  background: #e0f2e6;
  border: 1px solid #c6e5d2;
}

.dashboard {
  max-width: 1320px;
  padding-top: 52px;
}

.page-head {
  align-items: flex-end;
  border-bottom: 1px solid var(--line);
  padding-bottom: 28px;
  margin-bottom: 30px;
}

.page-head h1 {
  font-size: clamp(29px, 4vw, 38px);
  max-width: 580px;
}

.page-head p {
  font-size: 14px;
  max-width: 620px;
}

.section-title {
  margin-bottom: 16px;
}

.section-title h2 {
  font-size: 16px;
}

.section-title span {
  background: #e9f0ec;
  border-radius: 999px;
  color: #5e716a;
  padding: 4px 9px;
}

.project-list,
.client-list {
  gap: 12px;
}

.project-card,
.client-card {
  border-color: #e0e8e3;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(26, 54, 43, 0.045);
  padding: 19px 20px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.project-card {
  border-left: 4px solid var(--brand);
}

.project-card:hover,
.client-card:hover {
  border-color: #bed6ca;
  box-shadow: 0 13px 28px rgba(26, 54, 43, 0.09);
  transform: translateY(-2px);
}

.project-card h3,
.client-card h3 {
  font-size: 15px;
}

.status {
  background: #eff3f0;
  border: 1px solid #dde7e1;
  border-radius: 999px;
  padding: 5px 8px;
}

.progress-line {
  height: 8px;
  background: #e3ebe6;
}

.progress-line > i {
  background: linear-gradient(90deg, #0f5a4d, #2a8a72);
}

.button {
  border-radius: 8px;
  min-height: 44px;
  padding: 0 17px;
}

.button-primary {
  box-shadow: 0 7px 15px rgba(15, 90, 77, 0.18);
}

.button-primary:hover {
  box-shadow: 0 10px 20px rgba(15, 90, 77, 0.25);
}

.button-secondary {
  border-color: #cddbd4;
}

.project-layout {
  grid-template-columns: 264px minmax(0, 1fr);
}

.project-nav {
  background: var(--brand-deep);
  border-right: 0;
  padding: 30px 16px;
  top: 72px;
  height: calc(100vh - 72px);
}

.back-link {
  color: #c8e6d9;
  margin-bottom: 24px;
}

.project-nav h2 {
  color: #ffffff;
  font-size: 15px;
  line-height: 1.4;
  margin-bottom: 9px;
}

.nav-progress {
  border-top: 1px solid rgba(255,255,255,0.16);
  border-bottom: 1px solid rgba(255,255,255,0.16);
  margin: 18px 6px 24px;
  padding: 17px 0;
}

.nav-progress div {
  color: #bdd4ca;
}

.nav-progress strong {
  color: #ffffff;
}

.nav-progress .progress-line {
  background: rgba(255,255,255,0.16);
}

.stage-nav {
  gap: 6px;
}

.stage-button {
  border: 1px solid transparent;
  color: #c6d9d1;
  padding: 12px 11px;
}

.stage-button:hover {
  background: rgba(255,255,255,0.07);
  color: #ffffff;
}

.stage-button.active {
  background: #f7faf8;
  box-shadow: none;
  color: var(--brand-deep);
}

.stage-button small {
  color: inherit;
  opacity: 0.68;
}

.project-main {
  max-width: 1110px;
  padding: 48px 54px 72px;
}

.stage-header {
  align-items: end;
  border-bottom: 0;
  margin-bottom: 30px;
  padding: 25px 28px;
  background: var(--surface);
  border: 1px solid #e2eae5;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(26, 54, 43, 0.04);
}

.stage-header h1 {
  font-size: 30px;
}

.stage-header p {
  font-size: 14px;
}

.form-grid,
.strategy-grid {
  gap: 20px;
}

.field {
  background: var(--surface);
  border: 1px solid #e2eae5;
  border-radius: 10px;
  padding: 13px;
  box-shadow: 0 4px 12px rgba(26, 54, 43, 0.025);
}

.field label {
  color: #31463f;
  font-size: 12px;
}

.field input,
.field textarea,
.field select,
.question textarea,
.internal-note {
  border-color: #d3dfd8;
  border-radius: 7px;
  background: #fcfdfc;
}

.field textarea:focus,
.field input:focus,
.field select:focus,
.question textarea:focus,
.internal-note:focus {
  background: #ffffff;
}

.question-group {
  gap: 22px;
}

.question-block {
  background: var(--surface);
  border: 1px solid #e2eae5;
  border-radius: 11px;
  padding: 22px;
  box-shadow: 0 5px 14px rgba(26, 54, 43, 0.03);
}

.question-block + .question-block {
  border-top: 1px solid #e2eae5;
}

.question-number {
  align-items: center;
  background: #e1f1e9;
  border-radius: 50%;
  display: inline-flex;
  height: 25px;
  justify-content: center;
  min-width: 25px;
  padding: 0;
}

.example {
  border-left-color: #4d9c80;
  border-radius: 0 6px 6px 0;
  background: #f2f8f5;
  color: #596c64;
}

.block-heading {
  color: var(--brand-deep);
  margin-top: 42px;
}

.notice {
  border-left-width: 4px;
  border-radius: 0 8px 8px 0;
  padding: 14px 16px;
}

.project-summary {
  background: var(--surface);
  border: 1px solid #e2eae5;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(26, 54, 43, 0.035);
  padding: 10px 22px;
}

.summary-item {
  padding: 17px 0;
}

.summary-item dd {
  color: #3a5149;
}

.agent-section {
  border-top-color: #d6e9df;
}

.report-output {
  border: 1px solid #1d4439;
  border-radius: 10px;
  box-shadow: 0 10px 26px rgba(15, 40, 32, 0.16);
  padding: 27px;
}

.history-row {
  background: var(--surface);
  border: 1px solid #e2eae5;
  border-radius: 9px;
  margin-bottom: 9px;
  padding: 15px 16px;
}

.history-row + .history-row {
  border-top: 1px solid #e2eae5;
}

.empty {
  border-radius: 10px;
}

.modal-backdrop {
  backdrop-filter: blur(3px);
}

.modal {
  border: 1px solid #dce7e1;
  box-shadow: 0 26px 60px rgba(8, 31, 24, 0.24);
}

#toast {
  background: var(--brand-deep);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 12px 28px rgba(11, 42, 34, 0.25);
}

@media (max-width: 800px) {
  .topbar {
    height: 64px;
  }

  .dashboard {
    padding-top: 32px;
  }

  .page-head {
    padding-bottom: 22px;
  }

  .project-nav {
    background: var(--brand-deep);
    padding: 13px 12px;
  }

  .back-link {
    color: #d7ede3;
    margin-bottom: 10px;
  }

  .stage-button {
    border-color: rgba(255,255,255,0.1);
  }

  .project-main {
    padding: 24px 16px 48px;
  }

  .stage-header {
    padding: 20px;
  }

  .stage-header h1 {
    font-size: 26px;
  }

  .question-block {
    padding: 17px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .stage-header,
  .question-block,
  .field,
  .project-summary {
    animation: surface-in 220ms ease-out both;
  }

  @keyframes surface-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
