:root {
  color-scheme: light;
  --ink: #172832;
  --muted: #546870;
  --line: #cbd9d9;
  --teal: #006452;
  --paper: #f6f8f6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.45 Inter,system-ui,sans-serif;
}
header {
  background: #123a38;
  color: white;
  padding: 18px max(5%,calc((100vw - 1300px)/2));
  display: flex;
  align-items: center;
  gap: 22px;
  justify-content: space-between;
}
h1 {
  font-size: 21px;
  margin: 0;
}
h2 {
  font-size: 22px;
  margin: 0 0 16px;
}
h3 {
  font-size: 18px;
  margin: 0 0 12px;
}
main {
  max-width: 1340px;
  margin: 24px auto;
  padding: 0 3%;
}
.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
}
.card,article {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 16px;
}
label {
  display: block;
  color: var(--muted);
  font-size: 14px;
  margin: 12px 0 4px;
}
input,textarea,select,button {
  font: inherit;
  border: 1px solid #aebfbd;
  border-radius: 5px;
  padding: 8px;
  max-width: 100%;
}
input:not([type=file]),textarea,select {
  width: 100%;
}
textarea {
  min-height: 66px;
  resize: vertical;
}
button {
  background: var(--teal);
  color: white;
  cursor: pointer;
  margin-top: 8px;
  border-color: var(--teal);
}
button:disabled {
  opacity: .5;
  cursor: default;
}
summary {
  cursor: pointer;
  color: var(--teal);
}
.columns {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(320px,100%),1fr));
  gap: 16px;
}
.turn {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.role,small {
  font-size: 13px;
  color: var(--muted);
}
p,pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 5px 0 12px;
}
pre {
  max-height: 300px;
  overflow: auto;
  background: var(--paper);
  padding: 10px;
  font-size: 12px;
}
.reply {
  border-left: 3px solid #308471;
  padding-left: 10px;
}
#msg {
  color: #883c13;
  min-height: 1em;
}
.login {
  display: flex;
  align-items: center;
  gap: 8px;
}
.login input {
  width: 145px!important;
}
.login button {
  margin: 0;
}
.archive a {
  display: block;
  padding: 5px;
  color: var(--teal);
  overflow-wrap: anywhere;
}
.graph-open,.graph-close {
  background: white;
  color: var(--teal);
}
.graph-open {
  margin: 4px 0 10px;
}
#trace-graph {
  width: min(940px,94vw);
  max-height: 88vh;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
}
#trace-graph::backdrop {
  background: rgb(16 38 41 / 52%);
}
.graph-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.graph-header h2,.graph-header p,.graph-close {
  margin: 0;
}
#graph-meta,.step-meta {
  color: var(--muted);
  font-size: 14px;
}
.graph-layout {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) minmax(0, 3fr);
}
.graph-nav,#graph-detail {
  padding: 20px;
  max-height: 64vh;
  overflow: auto;
}
.graph-nav {
  background: var(--paper);
  border-right: 1px solid var(--line);
}
#graph-steps {
  margin: 0;
  padding: 0;
  list-style: none;
}
#graph-steps li {
  position: relative;
  padding: 0 0 10px 24px;
}
#graph-steps li:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 21px;
  bottom: -21px;
  border-left: 2px solid #9dbbb4;
}
.step-node {
  width: 100%;
  margin: 0;
  text-align: left;
  background: white;
  color: var(--ink);
  border-color: var(--line);
  overflow-wrap: anywhere;
}
.step-node::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 15px;
  width: 8px;
  height: 8px;
  background: white;
  border: 2px solid var(--teal);
  border-radius: 50%;
}
.step-node.endpoint::before {
  background: var(--teal);
}
.step-node.failure::before {
  background: #ad4131;
  border-color: #ad4131;
}
.step-node[aria-current] {
  background: #e4f2ee;
  border-color: var(--teal);
}
.step-label {
  display: block;
  font-weight: 600;
}
#graph-detail h4 {
  margin: 18px 0 4px;
  font-size: 14px;
}
#graph-detail pre {
  margin-top: 0;
}
@media(max-width:640px) {
  .graph-layout {grid-template-columns: minmax(0, 1fr);}
  .graph-nav {max-height: 30vh; border-right: 0; border-bottom: 1px solid var(--line);}
  #graph-detail {max-height: none;}
}
@media(max-width:800px) {
  .layout {
    grid-template-columns: 1fr;
  }
  header {
    flex-wrap: wrap;
  }
}
