:root {
  font-family: Inter, "Microsoft YaHei", "PingFang SC", sans-serif;
  color: #253c33;
  background: #f7f7f2;
  font-synthesis: none;
  --ink: #1f4436;
  --muted: #718076;
  --line: #dde3d9;
  --paper: #fff;
  --green: #365f46;
  --soft: #eef2e8;
}
.figure-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.figure-grid figure {
  margin: 0;
}
.figure-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.figure-grid figcaption {
  font-size: 11px;
  color: var(--muted);
  margin: 5px 0 12px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  outline-offset: 3px;
}
button {
  cursor: pointer;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  padding: 9px 14px;
  transition: background 0.15s;
}
button:hover {
  background: #edf2e9;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.primary:hover {
  background: #345b47;
}
.quiet {
  background: transparent;
  border-color: transparent;
}
a {
  color: var(--green);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
header {
  height: 72px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: #fafaf7;
}
.brand {
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -1px;
}
.brand span {
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--muted);
  margin-left: 16px;
}
nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
}
.tag {
  font-size: 11px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 5px 10px;
  color: var(--muted);
}
main {
  display: flex;
  min-height: calc(100vh - 72px);
}
.rail {
  width: 204px;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  padding: 25px 14px;
  display: flex;
  flex-direction: column;
  background: #f1f3ec;
}
.rail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 0 10px;
  font-size: 13px;
}
.rail-head button {
  font-size: 20px;
  padding: 1px 9px;
}
.project-item {
  display: block;
  width: 100%;
  text-align: left;
  margin: 5px 0;
  padding: 13px 10px;
  background: none;
  border: 0;
  line-height: 1.5;
  font-size: 13px;
}
.project-item.active {
  background: #e1e9dc;
  font-weight: 600;
}
.project-item small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  margin-top: 3px;
}
.rail-note {
  font-size: 12px;
  line-height: 2;
  color: var(--muted);
  margin-top: auto;
  padding: 45px 10px 14px;
}
.connection {
  font-size: 11px;
  line-height: 1.7;
  padding: 0 10px;
  color: var(--muted);
}
.welcome {
  width: min(100%, 970px);
  margin: 0 auto;
  padding: 54px 65px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 16px;
}
h1 {
  font-size: 36px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.6px;
  margin: 0 0 16px;
}
.lead {
  color: var(--muted);
  line-height: 1.9;
  font-size: 14px;
  max-width: 600px;
}
.start-card {
  margin-top: 28px;
  background: #fff;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 25px #233c3306;
}
label {
  display: block;
  font-size: 12px;
  color: #52645a;
  line-height: 1.5;
  margin-bottom: 16px;
}
input,
textarea,
select {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcf8;
  padding: 10px;
  color: #233a30;
  margin-top: 7px;
  font-size: 13px;
  line-height: 1.6;
}
textarea {
  resize: vertical;
}
input:focus,
textarea:focus,
select:focus {
  border-color: #6d8b69;
  outline: 2px solid #e4edde;
}
.form-row {
  display: flex;
  gap: 16px;
}
.form-row > label {
  flex: 1;
  min-width: 0;
}
.form-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.form-foot span {
  font-size: 11px;
  color: var(--muted);
}
.welcome-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 25px;
  font-size: 11px;
  color: var(--muted);
}
#workbench {
  flex: 1;
  min-width: 0;
  padding: 28px;
}
.project-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 23px;
}
.project-head h1 {
  font-size: 24px;
  margin-bottom: 7px;
}
.project-head .eyebrow {
  margin-bottom: 8px;
}
.project-head p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  max-width: 760px;
  white-space: pre-wrap;
}
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(270px, 0.8fr) minmax(460px, 1.5fr);
  gap: 20px;
  align-items: start;
}
.discussion,
.canvas {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.discussion {
  position: sticky;
  top: 20px;
}
.section-label {
  padding: 19px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.section-label span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 5px;
}
.messages {
  height: calc(100vh - 435px);
  min-height: 270px;
  max-height: 620px;
  overflow: auto;
  padding: 20px;
}
.message {
  font-size: 12px;
  line-height: 1.9;
  margin-bottom: 22px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.message .who {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 7px;
}
.message.user {
  background: #eff3e9;
  padding: 12px;
  border-radius: 8px;
}
.message.error {
  color: #9c4e36;
}
.message button {
  font-size: 11px;
  margin-top: 12px;
}
.proposal {
  margin-top: 10px;
  border: 1px solid var(--line);
  padding: 10px;
  background: #f8faf5;
}
.discussion form {
  border-top: 1px solid var(--line);
  padding: 14px;
}
.discussion textarea {
  border: 0;
  background: #fafbf7;
  min-height: 76px;
  margin: 0;
}
.chat-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  gap: 8px;
}
.chat-foot span {
  font-size: 10px;
  color: var(--muted);
}
.chat-foot button {
  font-size: 12px;
}
.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  padding: 0 12px;
  gap: 5px;
}
.tabs button {
  border: 0;
  border-radius: 0;
  background: none;
  font-size: 12px;
  padding: 20px 10px;
  color: var(--muted);
}
.tabs button.active {
  border-bottom: 2px solid var(--green);
  color: var(--green);
  font-weight: 600;
}
.panel {
  padding: 22px;
}
.panel-intro {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
  margin: 0 0 20px;
}
.panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 8px;
}
.panel-top h2 {
  font-size: 15px;
  font-weight: 500;
  margin: 0;
}
.panel-top button {
  font-size: 11px;
}
.action {
  padding: 17px 0;
  border-top: 1px solid var(--line);
}
.action:first-of-type {
  border-top: 0;
}
.action-head {
  display: flex;
  gap: 12px;
  align-items: center;
}
.step-number {
  font-size: 12px;
  color: var(--muted);
  background: #eef2e9;
  border-radius: 50%;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
}
.action h3 {
  font-size: 14px;
  margin: 0;
  flex: 1;
}
.status {
  font-size: 10px;
  color: var(--muted);
  padding: 4px 7px;
  border-radius: 4px;
  background: #f2f3ed;
}
.status.succeeded {
  color: #44683b;
  background: #edf3e5;
}
.status.running,
.status.submitting,
.status.reconciling {
  color: #8c6721;
  background: #fbf1d9;
}
.status.failed,
.status.uncertain {
  color: #a4543d;
  background: #fbeddf;
}
.action p {
  font-size: 12px;
  line-height: 1.8;
  color: #617067;
  margin: 12px 0;
}
.action small {
  font-size: 10px;
  color: var(--muted);
}
.action-foot {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}
.action-foot button {
  font-size: 11px;
}
.warning {
  background: #faf3e5;
  border-left: 2px solid #bc9a56;
  color: #826b39;
  padding: 10px 12px;
  font-size: 11px;
  line-height: 1.8;
  margin: 12px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.empty {
  padding: 35px 15px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 2;
}
.result-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 17px;
  margin-bottom: 16px;
}
.result-card h3 {
  font-size: 15px;
  margin: 0 0 10px;
}
.result-card p {
  font-size: 12px;
  line-height: 1.9;
  white-space: pre-wrap;
}
.result-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.result-tools a,
.result-tools button {
  font-size: 11px;
}
.result-tools a {
  padding: 8px;
}
.body-text {
  font-size: 12px;
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 500px;
  overflow: auto;
  padding: 12px;
  background: #fafbf7;
}
.result-card details {
  font-size: 12px;
  margin: 14px 0;
}
.result-card summary {
  cursor: pointer;
  color: var(--green);
}
.source {
  font-size: 11px;
  overflow-wrap: anywhere;
  line-height: 1.8;
}
.option {
  padding: 14px;
  border: 1px solid var(--line);
  margin: 12px 0;
  border-radius: 7px;
}
.option.selected {
  border-color: #77986d;
  background: #f3f7ec;
}
.option h4 {
  margin: 0;
  font-size: 14px;
}
.option p {
  font-size: 12px;
}
.file-link {
  display: block;
  font-size: 11px;
  margin: 8px 0;
}
.outline-row {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-bottom: 12px;
}
.outline-row input {
  margin: 0;
  flex: 1;
}
.outline-row button {
  padding: 5px 9px;
  font-size: 12px;
}
.outline-row span {
  font-size: 11px;
  color: var(--muted);
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}
.toolbar button,
.toolbar a {
  font-size: 12px;
}
.toolbar a {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.history-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.history-item small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 5px;
}
.history-item pre {
  font-size: 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.small {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
}
.pill {
  font-size: 10px;
  background: var(--soft);
  padding: 4px 8px;
  border-radius: 20px;
  margin-right: 5px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 25px;
  width: min(700px, 94vw);
  max-height: 90vh;
  box-shadow: 0 25px 100px #19352830;
}
dialog::backdrop {
  background: #1d34284d;
  backdrop-filter: blur(2px);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.modal-head h2 {
  font-size: 20px;
  font-weight: 500;
  margin: 0;
}
.modal-head button {
  padding: 3px 9px;
  font-size: 20px;
}
#modalBody {
  font-size: 13px;
  line-height: 1.8;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0;
}
.check input {
  width: auto;
  margin-top: 4px;
}
.method-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 13px;
}
.method-card h3 {
  margin: 0;
  font-size: 15px;
}
.method-card p {
  font-size: 12px;
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 85vw;
  padding: 13px 20px;
  background: #263f33;
  color: white;
  border-radius: 8px;
  z-index: 100;
  font-size: 13px;
  display: none;
  white-space: pre-wrap;
}
#toast.error {
  background: #8c4836;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
[hidden] {
  display: none !important;
}
@media (min-width: 1700px) {
  #workbench {
    padding: 38px;
  }
  .workspace-grid {
    grid-template-columns: 390px 1fr;
  }
}
@media (max-width: 1150px) {
  .rail {
    width: 160px;
  }
  .workspace-grid {
    grid-template-columns: 1fr;
  }
  .discussion {
    position: static;
  }
  .messages {
    height: 220px;
    min-height: 180px;
  }
  .welcome {
    padding: 40px;
  }
  .canvas {
    min-height: 400px;
  }
}
@media (max-width: 700px) {
  header {
    height: 60px;
    padding: 0 15px;
  }
  .brand {
    font-size: 23px;
  }
  .brand span {
    display: none;
  }
  nav {
    gap: 8px;
    font-size: 11px;
  }
  nav .tag {
    display: none;
  }
  main {
    display: block;
  }
  .rail {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 8px 12px;
    display: block;
  }
  .rail-head {
    display: inline-flex;
    gap: 15px;
    margin: 0;
  }
  .rail-note,
  .connection {
    display: none;
  }
  #projectList {
    display: flex;
    gap: 8px;
    overflow: auto;
  }
  .project-item {
    width: auto;
    min-width: 140px;
    font-size: 11px;
  }
  .welcome {
    padding: 35px 20px;
  }
  h1 {
    font-size: 28px;
  }
  .start-card {
    padding: 20px;
  }
  .form-row {
    gap: 10px;
  }
  .form-foot {
    align-items: flex-end;
  }
  .form-foot span {
    max-width: 130px;
  }
  .welcome-foot {
    font-size: 9px;
  }
  #workbench {
    padding: 20px 12px;
  }
  .project-head h1 {
    font-size: 21px;
  }
  .project-head p {
    max-width: 250px;
  }
  .workspace-grid {
    gap: 14px;
  }
  .panel {
    padding: 16px;
  }
  .tabs {
    padding: 0 5px;
  }
  .tabs button {
    font-size: 11px;
    padding: 15px 8px;
  }
  .outline-row {
    gap: 5px;
  }
  .outline-row input {
    min-width: 0;
  }
  .project-head button {
    font-size: 11px;
    white-space: nowrap;
  }
}
