:root {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #253043;
  background: #f5f6f8;
  --blue: #245cc5;
  --blue-soft: #eaf0fd;
  --line: #dfe3e9;
  --muted: #5d6878;
  --surface: #fff;
  --focus: #89aff1;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 6px;
  padding: 7px 12px;
  cursor: pointer;
  transition: background 0.15s ease-out;
}
button:hover {
  background: #edf1f6;
}
button:active {
  background: #e2e8f0;
}
button:disabled {
  cursor: wait;
  color: var(--muted);
  background: #eef0f3;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
::selection {
  background: #cddfff;
  color: #17396f;
}
input,
select {
  border: 1px solid #cdd3dd;
  border-radius: 6px;
  background: var(--surface);
  padding: 8px 10px;
  min-width: 0;
  max-width: 100%;
  caret-color: var(--blue);
}
input::placeholder {
  color: #697486;
}
a {
  color: var(--blue);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  overflow-wrap: anywhere;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 27px;
  line-height: 1.3;
  letter-spacing: -0.025em;
  font-weight: 650;
}
h2 {
  font-size: 20px;
  line-height: 1.4;
  font-weight: 650;
}
h3 {
  font-size: 15px;
  font-weight: 650;
}
p {
  max-width: 75ch;
}
code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}
code {
  overflow-wrap: anywhere;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f3f5f8;
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 6px;
  line-height: 1.6;
  max-height: 400px;
  overflow: auto;
}
time,
.number {
  font-variant-numeric: tabular-nums;
}
.shell {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 27px 16px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #253043;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
  padding: 0 12px;
}
.brand-mark {
  display: block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--blue);
  border-radius: 5px;
  transform: rotate(-8deg);
}
.sidebar-caption {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 12px 28px;
}
nav {
  display: grid;
  gap: 5px;
}
.nav-item {
  text-align: left;
  border: 0;
  padding: 10px 14px;
  border-radius: 6px;
}
.nav-item.active {
  background: var(--blue-soft);
  color: #204fa8;
  font-weight: 650;
}
.sidebar-foot {
  margin-top: auto;
  padding: 20px 12px 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.sidebar-foot p {
  margin-top: 8px;
  font-size: 11px;
}
.connection-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #8993a3;
  border-radius: 50%;
  margin-right: 6px;
}
.connection-dot.connected {
  background: #27835c;
}
.workspace {
  min-width: 0;
}
.topbar {
  min-height: 68px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 32px;
}
.breadcrumb {
  color: var(--muted);
  white-space: nowrap;
}
.breadcrumb span:first-child {
  padding: 0 11px;
  color: #8993a3;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.count {
  font-size: 11px;
  min-width: 19px;
  display: inline-block;
  text-align: center;
  margin-left: 3px;
  background: #edf0f5;
  border-radius: 4px;
  color: #4e5c72;
}
main {
  padding: 32px;
  max-width: 1700px;
  margin: auto;
  outline: none;
}
.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
.page-heading p {
  margin-top: 8px;
  color: var(--muted);
}
.observed {
  font-size: 12px;
  text-align: right;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.search-label {
  max-width: 420px;
  flex: 1;
}
.search-label input {
  width: 100%;
}
.filter-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.filter-label select {
  max-width: 220px;
}
.notice {
  padding: 11px 14px;
  background: #fff6e8;
  color: #785115;
  border: 1px solid #e9d3ad;
  border-radius: 6px;
  margin-bottom: 20px;
  overflow-wrap: anywhere;
}
.notice.error {
  background: #fff1f0;
  border-color: #efcbc8;
  color: #963d37;
}
.empty {
  background: var(--surface);
  border: 1px dashed #cdd4df;
  border-radius: 8px;
  min-height: 230px;
  padding: 44px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 10px;
}
.empty h2 {
  font-size: 18px;
}
.empty p {
  color: var(--muted);
  max-width: 52ch;
}
.empty button {
  margin-top: 6px;
}
.section {
  margin-bottom: 28px;
}
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 12px;
}
.section-heading p {
  font-size: 12px;
  color: var(--muted);
}
.data-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.data-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.data-row:last-child {
  border-bottom: 0;
}
.data-row-main {
  min-width: 0;
}
.row-title {
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 0;
  text-align: left;
  font-weight: 600;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.row-title:hover {
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.row-meta {
  display: flex;
  gap: 5px 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  overflow-wrap: anywhere;
}
.row-description {
  color: var(--muted);
  font-size: 13px;
  margin-top: 7px;
  overflow-wrap: anywhere;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  line-height: 1.4;
  padding: 4px 7px;
  background: #eef1f5;
  color: #4e5a6d;
  border-radius: 4px;
  white-space: nowrap;
}
.badge.running,
.badge.ready {
  background: #eaf0fd;
  color: #2455a6;
}
.badge.completed,
.badge.pass,
.badge.verified {
  background: #e9f5ee;
  color: #236b49;
}
.badge.blocked,
.badge.fail,
.badge.terminated {
  background: #fff0ed;
  color: #a24631;
}
.badge.review,
.badge.pending,
.badge.paused {
  background: #fff3dc;
  color: #805b16;
}
.badge.unknown {
  color: #647084;
  background: #eef1f5;
}
.badge-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}
.fact {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.fact:nth-child(odd) {
  padding-right: 20px;
}
.fact dt {
  font-size: 12px;
  color: var(--muted);
}
.fact dd {
  margin: 3px 0 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.stats-table {
  border-collapse: collapse;
  width: 100%;
  background: var(--surface);
  font-size: 13px;
}
.stats-table th,
.stats-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  overflow-wrap: anywhere;
}
.stats-table th {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  background: #fafbfc;
}
.stats-table tr:last-child td {
  border-bottom: 0;
}
.stats-caption {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  overflow-wrap: anywhere;
}
.map-flow {
  display: grid;
  gap: 12px;
}
.map-node {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
  gap: 18px;
  background: var(--surface);
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.map-node h3 button {
  font-size: 15px;
}
.node-states {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}
.node-state span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 5px;
}
.node-state strong {
  font-size: 12px;
  font-weight: 500;
}
.node-state strong.yes {
  color: #236b49;
}
.node-state strong.no {
  color: #963d37;
}
.dependencies {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
  overflow-wrap: anywhere;
}
.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.primary:hover {
  background: #1b4ca7;
}
.link-button {
  border: 0;
  background: none;
  color: var(--blue);
  padding: 0;
  text-align: left;
}
.link-button:hover {
  background: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}
dialog {
  border: 0;
  border-radius: 10px;
  padding: 0;
  max-width: calc(100vw - 32px);
  box-shadow: 0 16px 60px rgb(0 0 0 / 18%);
  color: inherit;
}
dialog::backdrop {
  background: #202b3b55;
}
.session-form {
  padding: 25px;
  max-width: 480px;
}
.session-form > p {
  margin: 15px 0 22px;
  color: var(--muted);
  font-size: 13px;
}
.session-form > label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}
.session-form > input {
  width: 100%;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.dialog-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}
.icon-button {
  border: 0;
  background: #f0f3f7;
  font-size: 12px;
  white-space: nowrap;
}
.detail-dialog {
  width: 720px;
  height: 100dvh;
  max-height: 100dvh;
  max-width: 100vw;
  border-radius: 0;
  margin: 0 0 0 auto;
  position: fixed;
  inset: 0;
  overflow: hidden;
  display: none;
  flex-direction: column;
}
.detail-dialog[open] {
  display: flex;
}
.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 23px 26px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.detail-header h2 {
  overflow-wrap: anywhere;
}
.detail-header p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 7px;
  overflow-wrap: anywhere;
}
.detail-content {
  padding: 24px 26px 40px;
  overflow: auto;
  min-height: 0;
}
.detail-section {
  margin-bottom: 28px;
}
.detail-section h3 {
  margin-bottom: 11px;
}
.detail-section > .badge-group {
  justify-content: flex-start;
}
.detail-section .data-list {
  border-radius: 6px;
}
.detail-section .data-row {
  padding: 13px;
}
.text-block {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  color: #465369;
}
.evidence-list {
  display: grid;
  gap: 8px;
}
.evidence-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  background: #f5f7fa;
  padding: 11px 13px;
  border-radius: 6px;
}
.evidence-line > div {
  min-width: 0;
}
.evidence-line p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  overflow-wrap: anywhere;
}
.error-text {
  color: #963d37 !important;
}
.loading {
  padding: 38px 0;
  color: var(--muted);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  top: -60px;
  left: 15px;
  z-index: 20;
  background: white;
  padding: 10px 15px;
}
.skip-link:focus {
  top: 10px;
}
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-thumb {
  background: #c0c8d5;
  border: 2px solid #f5f6f8;
  border-radius: 6px;
}
::-webkit-scrollbar-track {
  background: #f5f6f8;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1000px) {
  .shell {
    grid-template-columns: 166px minmax(0, 1fr);
  }
  .sidebar {
    padding-left: 10px;
    padding-right: 10px;
  }
  .topbar {
    padding: 14px 22px;
  }
  main {
    padding: 26px 22px;
  }
  .map-node {
    grid-template-columns: 1fr;
  }
  .observed {
    max-width: 150px;
  }
  .node-states {
    max-width: 420px;
  }
}
@media (max-width: 650px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 15px 16px 9px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    font-size: 22px;
    padding: 0 2px;
  }
  .brand-mark {
    width: 18px;
    height: 18px;
  }
  .sidebar-caption,
  .sidebar-foot {
    display: none;
  }
  nav {
    display: flex;
    gap: 3px;
    margin-top: 14px;
    justify-content: space-between;
  }
  .nav-item {
    padding: 8px 10px;
    text-align: center;
    white-space: nowrap;
    font-size: 13px;
  }
  .topbar {
    padding: 11px 16px;
    min-height: 56px;
    gap: 8px;
  }
  .breadcrumb {
    display: none;
  }
  .topbar-actions {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
  }
  .topbar-actions button {
    font-size: 12px;
    padding: 6px 9px;
  }
  main {
    padding: 24px 16px;
  }
  .page-heading {
    display: block;
    margin-bottom: 20px;
  }
  .page-heading h1 {
    font-size: 24px;
  }
  .page-heading p {
    font-size: 13px;
  }
  .page-heading .observed {
    max-width: none;
    text-align: left;
    font-size: 11px;
    margin-top: 13px;
  }
  .toolbar {
    gap: 8px;
    align-items: stretch;
  }
  .search-label {
    min-width: 0;
  }
  .search-label input {
    font-size: 12px;
    padding: 9px;
  }
  .filter-label {
    gap: 5px;
    font-size: 12px;
  }
  .filter-label select {
    max-width: 112px;
    font-size: 12px;
    padding: 8px;
  }
  .data-row {
    padding: 15px 14px;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr);
  }
  .badge-group {
    justify-content: flex-start;
  }
  .row-meta {
    gap: 3px 10px;
  }
  .stats-table th,
  .stats-table td {
    padding: 10px;
    font-size: 12px;
  }
  .stats-table th:nth-child(3),
  .stats-table td:nth-child(3) {
    width: 37%;
  }
  .section-heading {
    align-items: flex-start;
  }
  .section-heading p {
    max-width: 145px;
    text-align: right;
  }
  .map-node {
    padding: 15px 14px;
    gap: 13px;
  }
  .node-states {
    gap: 6px;
  }
  .node-state span {
    font-size: 10px;
  }
  .detail-header {
    padding: 20px 18px;
  }
  .detail-content {
    padding: 21px 18px 35px;
  }
  .detail-header h2 {
    font-size: 19px;
  }
  .fact-grid {
    grid-template-columns: 1fr;
  }
  .fact:nth-child(odd) {
    padding-right: 0;
  }
  .evidence-line {
    display: block;
  }
  .evidence-line button {
    margin-top: 9px;
  }
  .session-form {
    padding: 22px;
  }
  .empty {
    padding: 32px 18px;
    min-height: 230px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
