:root {
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #243a3c;
  background: #f5f6f3;
  font-synthesis: none;
  --teal: #177c70;
  --dark: #183736;
  --line: #e1e6e1;
  --muted: #728080;
  --paper: #fff;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea,
a,
summary {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--teal);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 29px;
  letter-spacing: -0.8px;
  line-height: 1.35;
  font-weight: 650;
}
h2 {
  font-size: 18px;
  font-weight: 650;
}
h3 {
  font-size: 14px;
  font-weight: 650;
  margin-top: 20px;
  margin-bottom: 10px;
}
p + p {
  margin-top: 10px;
}
small {
  font-size: 11px;
}
.shell {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--dark);
  color: #dae9e5;
  padding: 32px 20px;
  position: fixed;
  top: 0;
  bottom: 0;
  width: 224px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.5px;
  margin: 0 6px 49px;
}
.brand-mark {
  width: 35px;
  height: 39px;
  background: #f2f4df;
  color: #264e45;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-family: Georgia, serif;
  font-size: 28px;
  position: relative;
}
.brand-mark span {
  position: absolute;
  right: 3px;
  bottom: -5px;
  color: #b18a4c;
}
.brand-sub {
  display: block;
  font-size: 7px;
  letter-spacing: 1.4px;
  font-weight: 500;
  opacity: 0.6;
}
.nav-caption {
  font-size: 10px;
  letter-spacing: 2px;
  color: #8eaaa5;
  padding: 0 15px;
  margin-bottom: 12px;
}
.nav-item {
  border: 0;
  background: none;
  color: #a9c2bd;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  padding: 13px 14px;
  margin: 5px 0;
  border-radius: 7px;
  font-weight: 500;
}
.nav-item.active {
  color: #fff;
  background: #31504b;
}
.nav-icon {
  font-size: 10px;
  opacity: 0.6;
  letter-spacing: 1px;
}
.nav-arrow {
  margin-left: auto;
  opacity: 0;
}
.nav-item.active .nav-arrow {
  opacity: 0.8;
}
.side-note {
  margin-top: auto;
  font-size: 10px;
  letter-spacing: 1px;
  color: #a7bdb3;
  padding: 24px 8px 0;
}
.side-note p {
  font-size: 11px;
  letter-spacing: 0;
  margin-top: 17px;
  color: #d1dfd8;
  line-height: 1.8;
}
.side-note small {
  letter-spacing: 0;
  opacity: 0.7;
}
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #a7ce8c;
  border-radius: 50%;
  margin-right: 7px;
}
.workspace {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  height: 73px;
  background: #fbfcf9;
  border-bottom: 1px solid var(--line);
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb span {
  margin: 0 13px;
  color: #a7b2ad;
}
.breadcrumb strong {
  color: #40544f;
  font-weight: 500;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 17px;
}
.language-label {
  font-size: 11px;
  color: #7d8984;
  display: flex;
  gap: 8px;
  align-items: center;
}
.language-label select {
  border: none;
  background: none;
  font-size: 12px;
  padding: 4px;
}
.connection {
  font-size: 10px;
  color: #798983;
}
.connection.ready:before {
  content: "";
  display: inline-block;
  background: #4e9a6c;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  margin-right: 6px;
}
main {
  padding: 36px 40px 28px;
  max-width: 1600px;
  margin: auto;
  min-height: calc(100vh - 135px);
}
footer {
  font-size: 10px;
  color: #84908b;
  padding: 20px 40px;
  border-top: 1px solid var(--line);
}
footer span {
  margin: 0 9px;
  color: #bcc7bf;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 27px;
}
.eyebrow {
  color: #7b8e84;
  letter-spacing: 2px;
  font-size: 9px;
  font-weight: 650;
  margin-bottom: 10px;
}
.page-heading p {
  margin-top: 10px;
  font-size: 12px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.block {
  display: block;
}
.grow {
  flex: 1;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 18px 21px;
}
.stat > span {
  display: block;
  color: #6b7b72;
  font-size: 11px;
}
.stat strong {
  display: block;
  font-size: 27px;
  line-height: 1.7;
  font-weight: 600;
  letter-spacing: -0.5px;
}
.stat small {
  color: #8a9790;
  font-size: 10px;
}
.pill {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  letter-spacing: 0.4px;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 4px;
  vertical-align: middle;
  line-height: 1.5;
}
.pill.mock {
  background: #e5ece1;
  color: #677b46;
  font-size: 9px;
}
.pill.outline {
  border: 1px solid #c7d2bd;
  color: #83906b;
  font-size: 10px;
}
.pill.teal {
  background: #e4f1ec;
  color: #27765f;
}
.pill.neutral {
  background: #f0f3f0;
  color: #7b8a7f;
}
.pill.amber {
  background: #faf1dd;
  color: #aa843c;
}
.pill.red {
  background: #fbece6;
  color: #b0624c;
}
.notice {
  background: #edf1e9;
  border: 1px solid #e0e6d9;
  color: #708063;
  font-size: 11px;
  padding: 12px 16px;
  border-radius: 6px;
  display: flex;
  gap: 13px;
  margin-bottom: 22px;
}
.notice strong {
  font-weight: 600;
  white-space: nowrap;
}
.notice.error-notice {
  background: #fff2e9;
  color: #ac5d42;
}
.filter-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 21px 0 19px;
}
.chip {
  font-size: 11px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: #7d8980;
}
.chip.active {
  background: var(--dark);
  border-color: var(--dark);
  color: white;
}
.dataset-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(400px, 1.7fr);
  gap: 23px;
  align-items: start;
}
.scenario-list {
  display: grid;
  gap: 9px;
  max-height: 770px;
  overflow: auto;
  padding-right: 5px;
}
.scenario-card {
  display: block;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 7px;
  padding: 16px 18px;
  color: inherit;
}
.scenario-card.selected {
  border: 1px solid #449e88;
  box-shadow: inset 3px 0 #449e88;
  background: #fafdfa;
}
.scenario-card > span {
  display: block;
}
.scenario-card small {
  display: block;
  font-size: 9px;
  color: #8b9a8d;
  margin-bottom: 8px;
}
.scenario-card strong {
  font-size: 14px;
  font-weight: 600;
  display: block;
  margin-bottom: 7px;
}
.scenario-teaser {
  font-size: 11px;
  color: #86918a;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 24px;
  margin-bottom: 21px;
  min-width: 0;
}
.panel.compact {
  padding: 15px 22px;
}
.scenario-detail {
  padding: 27px 29px;
}
.detail-top {
  display: flex;
  gap: 7px;
  margin-bottom: 22px;
}
.scenario-detail h2 {
  font-size: 23px;
  font-weight: 600;
}
.scenario-text {
  font-size: 14px;
  line-height: 2.1;
  margin-top: 18px;
  color: #475b52;
  white-space: pre-wrap;
}
.scenario-detail h3 {
  font-size: 11px;
  color: #70847a;
  letter-spacing: 0.5px;
  margin-top: 25px;
}
.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.option {
  border: 1px solid #e7ebe6;
  padding: 13px 14px;
  display: flex;
  gap: 12px;
  border-radius: 5px;
  background: #fbfcf9;
  align-items: center;
}
.option > span {
  width: 24px;
  height: 24px;
  border: 1px solid #cfdbcf;
  color: #76947f;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 11px;
  flex-shrink: 0;
}
.option p {
  font-size: 12px;
  color: #63776b;
}
.task-callout {
  background: #f1f6f3;
  border-left: 3px solid #80ad97;
  padding: 15px 17px;
  font-size: 12px;
  color: #557362;
  margin-top: 22px;
  border-radius: 0 5px 5px 0;
}
.task-callout small {
  font-size: 9px;
  color: #7b9b86;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 7px;
}
.inline-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.detail-footer {
  font-size: 9px;
  margin: 26px 0 20px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  color: #9aa59a;
}
.primary,
.secondary,
.subtle,
.link-button {
  border-radius: 5px;
  font-size: 12px;
  padding: 10px 17px;
  border: 1px solid transparent;
  line-height: 1.5;
}
.primary {
  background: var(--teal);
  color: white;
  font-weight: 550;
}
.primary:hover {
  background: #11695f;
}
.secondary {
  background: white;
  border-color: #d9e3dc;
  color: #607769;
}
.subtle {
  background: #f4f6f1;
  color: #71816f;
}
.link-button {
  background: none;
  border: 0;
  color: var(--teal);
  padding: 3px;
  font-size: 10px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
  font-size: 12px;
}
.field > span {
  color: #566e60;
  font-size: 11px;
  font-weight: 550;
}
.field input,
.field select,
.field textarea,
select,
input {
  border: 1px solid #dce4db;
  background: #fcfdfa;
  color: #385346;
  padding: 10px 12px;
  border-radius: 5px;
  min-width: 0;
}
textarea {
  resize: vertical;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.section-title {
  display: flex;
  gap: 13px;
  align-items: center;
  margin-bottom: 22px;
}
.section-title h2 {
  margin: 0;
}
.section-title p {
  margin-top: 5px;
  font-size: 11px;
}
.step-number {
  border: 1px solid #ccdccc;
  background: #eff5ec;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
  color: #7b9579;
}
.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
  margin-bottom: 23px;
}
.mode-option {
  border: 1px solid var(--line);
  padding: 15px;
  border-radius: 6px;
  background: #fbfcf9;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: start;
}
.mode-option small {
  display: block;
  width: 100%;
  color: var(--muted);
}
.mode-option strong {
  font-size: 12px;
  font-weight: 550;
}
.mode-option:has(input:checked) {
  border-color: #4f9b83;
  background: #f0f7f1;
}
.check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  margin: 9px 0;
}
.check input,
.mode-option input {
  accent-color: var(--teal);
}
.scenario-checks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 15px;
}
.scenario-checks strong {
  font-size: 10px;
  color: #8ca48c;
  margin-right: 5px;
}
.agent-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.agent-card {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 18px;
  min-width: 0;
}
.agent-card h3 {
  margin-top: 0;
}
.agent-card > .form-grid {
  gap: 9px;
}
.agent-card input {
  width: 100%;
}
.agent-card input[type="checkbox"] {
  width: auto;
}
.agent-card .form-grid.three {
  grid-template-columns: 1fr 1fr;
}
.agent-card > p {
  margin-bottom: 16px;
}
.facilitator {
  margin-top: 20px;
}
.facilitator .agent-card {
  margin-top: 18px;
}
.submit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 0 20px;
}
.submit-bar p {
  font-size: 11px;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 17px;
  flex-wrap: wrap;
}
.toolbar .field {
  margin-bottom: 0;
}
.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.group-meta {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 10px;
  color: #8c998c;
  margin: 18px 0 10px;
}
.group-meta code {
  font-size: 10px;
}
progress {
  width: 100%;
  height: 6px;
  accent-color: var(--teal);
  margin-bottom: 20px;
}
.monitor-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.monitor-columns .panel {
  padding: 20px;
}
.table-wrap {
  overflow: auto;
  margin-top: 15px;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 11px;
}
th {
  font-size: 10px;
  color: #8c998d;
  letter-spacing: 0.3px;
  font-weight: 500;
  background: #f7f9f5;
  white-space: nowrap;
  padding: 11px 12px;
}
td {
  padding: 13px 12px;
  border-bottom: 1px solid #edf0e9;
  vertical-align: top;
}
td p {
  font-size: 11px;
  min-width: 140px;
  max-width: 400px;
}
td small {
  font-size: 9px;
}
tr:last-child td {
  border-bottom: 0;
}
.empty {
  text-align: center;
  padding: 35px 15px;
  color: #a3b19e;
  font-size: 12px;
}
.empty-mark {
  font-size: 26px;
  display: block;
  color: #bbc9b4;
  margin-bottom: 9px;
}
.timeline {
  display: grid;
  gap: 23px;
}
.message {
  display: flex;
  gap: 13px;
  padding-bottom: 17px;
  border-bottom: 1px solid #eff1eb;
}
.avatar {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  background: #e8eee2;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-family: Georgia, serif;
  color: #7e9b75;
}
.message-heading {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}
.message-heading strong {
  font-size: 12px;
}
.message-heading small {
  margin-left: auto;
}
.message p {
  font-size: 13px;
  line-height: 1.9;
  white-space: pre-wrap;
}
.proposal {
  background: #fafbf7;
  border: 1px solid #e5ebde;
  border-radius: 6px;
  padding: 21px;
}
.proposal > p {
  line-height: 1.9;
  color: #607452;
  font-size: 13px;
  white-space: pre-wrap;
}
summary {
  cursor: pointer;
  font-size: 11px;
  color: #819579;
}
details {
  margin-top: 16px;
}
.json {
  font-size: 10px;
  background: #f5f7f2;
  color: #6b7e5b;
  padding: 16px;
  border-radius: 5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 550px;
  overflow: auto;
}
.audit-dialog {
  border: 1px solid var(--line);
  border-radius: 10px;
  max-width: 900px;
  width: 90vw;
  max-height: 90vh;
  padding: 25px;
}
.audit-dialog::backdrop {
  background: #18373688;
}
.audit-dialog h2 {
  margin-bottom: 15px;
}
.export-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 17px 0;
  gap: 15px;
}
.export-row strong {
  font-size: 12px;
}
.review-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 22px;
  margin-top: 20px;
}
.review-answer {
  padding: 18px;
  background: #f6f8f2;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.review-answer section + section {
  margin-top: 15px;
}
.review-answer p {
  margin-top: 6px;
  white-space: pre-wrap;
  line-height: 1.9;
}
.rubric-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.rubric-text {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.9;
  color: #74826b;
  overflow: auto;
}
.large-number {
  font-size: 28px;
  font-weight: 600;
}
#error {
  background: #fff0e7;
  color: #a35d43;
  border: 1px solid #f4d9c6;
  border-radius: 7px;
  padding: 12px 17px;
  margin: 20px 40px 0;
  font-size: 12px;
}
#error[hidden] {
  display: none;
}
@media (min-width: 1600px) {
  .dataset-grid {
    grid-template-columns: 350px 1fr;
  }
  .scenario-list {
    max-height: 900px;
  }
}
@media (max-width: 1150px) {
  .shell {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .sidebar {
    width: 180px;
    padding: 28px 12px;
  }
  .brand {
    font-size: 15px;
    gap: 8px;
  }
  .brand-sub {
    font-size: 6px;
  }
  .topbar {
    padding: 0 24px;
  }
  main {
    padding: 28px 24px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 15px;
  }
  .stat small {
    font-size: 9px;
  }
  .dataset-grid {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 15px;
  }
  .scenario-detail {
    padding: 22px;
  }
  .agent-grid {
    grid-template-columns: 1fr;
  }
  .agent-card .form-grid.three {
    grid-template-columns: repeat(3, 1fr);
  }
  .monitor-columns {
    grid-template-columns: 1fr;
  }
  .top-actions .pill {
    display: none;
  }
  .connection {
    font-size: 9px;
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    width: 100%;
    padding: 15px 18px;
  }
  .brand {
    margin: 0 0 13px;
  }
  .nav-caption,
  .side-note {
    display: none;
  }
  #navigation {
    display: flex;
    overflow: auto;
    gap: 5px;
  }
  .nav-item {
    padding: 8px 10px;
    white-space: nowrap;
    font-size: 11px;
    margin: 0;
    gap: 5px;
  }
  .nav-icon {
    display: none;
  }
  .nav-arrow {
    display: none;
  }
  .topbar {
    height: auto;
    min-height: 60px;
    padding: 12px 18px;
    flex-wrap: wrap;
  }
  .top-actions {
    gap: 8px;
  }
  .breadcrumb {
    font-size: 10px;
  }
  .topbar .connection {
    display: none;
  }
  main {
    padding: 25px 18px;
  }
  h1 {
    font-size: 24px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading > .pill {
    display: none;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .stat strong {
    font-size: 24px;
  }
  .dataset-grid {
    grid-template-columns: 1fr;
  }
  .scenario-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 235px;
  }
  .scenario-card {
    padding: 12px;
  }
  .scenario-card strong {
    font-size: 12px;
  }
  .scenario-card small {
    font-size: 8px;
  }
  .scenario-detail {
    padding: 22px;
  }
  .form-grid,
  .form-grid.three,
  .mode-grid,
  .review-grid {
    grid-template-columns: 1fr;
  }
  .scenario-checks {
    grid-template-columns: 1fr 1fr;
  }
  .agent-card .form-grid.three {
    grid-template-columns: 1fr 1fr;
  }
  .options {
    grid-template-columns: 1fr;
  }
  .notice {
    display: block;
  }
  .notice strong {
    display: block;
    margin-bottom: 5px;
  }
  .panel {
    padding: 20px;
  }
  .submit-bar,
  .export-row {
    align-items: flex-start;
    flex-direction: column;
  }
  footer {
    padding: 18px;
    font-size: 9px;
  }
  .toolbar .actions {
    margin-top: 9px;
  }
  .rubric-fields {
    grid-template-columns: 1fr;
  }
  .filter-row {
    gap: 5px;
  }
  .chip {
    font-size: 10px;
    padding: 6px 9px;
  }
  #error {
    margin: 15px 18px 0;
  }
  .scenario-text {
    font-size: 13px;
  }
}
/* v0.4 research views reuse the existing visual system. */
.research-members {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;}
.raw-audit {max-height:500px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;}
@media(max-width:900px){.research-members{grid-template-columns:1fr;}}
