:root {
  --primary: #1890ff;
  --primary-hover: #40a9ff;
  --success: #67c23a;
  --warning: #e6a23c;
  --danger: #f56c6c;
  --text: #303133;
  --body-text: #606266;
  --muted: #909399;
  --line: #dcdfe6;
  --soft-line: #ebeef5;
  --page: #f0f2f5;
  --surface: #ffffff;
  --sidebar: #304156;
  --sidebar-deep: #1f2d3d;
  --sidebar-hover: #263445;
  --tag-active: #42b983;
  font-family: Inter, 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--text);
  font-size: 14px;
}
button,
input {
  font: inherit;
}
button {
  font-weight: 400;
}
.hidden {
  display: none !important;
}
.muted {
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-content: center;
  padding: 24px;
  background: linear-gradient(135deg, #f7f9fc 0%, #eef3f8 100%);
}
.brand-mark {
  position: fixed;
  left: 34px;
  top: 28px;
  width: 42px;
  height: 42px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--sidebar);
  font-weight: 700;
}
.login-card {
  width: min(400px, calc(100vw - 32px));
  padding: 34px 36px;
  background: #fff;
  border: 1px solid var(--soft-line);
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(48, 65, 86, 0.1);
}
.eyebrow {
  color: var(--primary);
  font-size: 11px;
  letter-spacing: 0.16em;
  font-weight: 600;
  margin: 0 0 8px;
}
.login-card h1 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.35;
  font-weight: 500;
}
.login-card label {
  display: grid;
  gap: 7px;
  margin-top: 18px;
  color: var(--body-text);
  font-size: 13px;
}
.login-card input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  outline: 0;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.login-card input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.12);
}
.login-card button,
.primary {
  width: 100%;
  margin-top: 24px;
  padding: 10px 16px;
  color: #fff;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 4px;
  cursor: pointer;
}
.login-card button:hover,
.primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}
.login-card button:disabled {
  opacity: 0.65;
  cursor: wait;
}
.form-message {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 13px;
}
.form-message:not(:empty) {
  padding: 10px 12px;
  background: #fff2f0;
  border: 1px solid #ffccc7;
  border-radius: 4px;
}
.notice.error-notice {
  color: #a8071a;
  background: #fff2f0;
  border-color: #ffccc7;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
}
.app-shell > aside {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: 210px;
  display: flex;
  flex-direction: column;
  color: #bfcbd9;
  background: var(--sidebar);
  box-shadow: 1px 0 2px rgba(0, 0, 0, 0.08);
}
.aside-brand {
  min-height: 56px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #2b2f3a;
  color: #fff;
}
.aside-brand span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: var(--primary);
  font-weight: 700;
  font-size: 12px;
}
.aside-brand strong {
  font-size: 15px;
  font-weight: 500;
}
.app-shell aside nav {
  flex: 1;
  overflow: auto;
  padding: 8px 0;
  scrollbar-width: thin;
}
.nav-group {
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}
.nav-group-title {
  width: 100%;
  min-height: 42px;
  padding: 0 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #d7e2ef;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
}
.nav-group-title:hover {
  color: #fff;
  background: var(--sidebar-hover);
}
.nav-group-title span {
  color: #8492a6;
  transition: transform 0.18s;
}
.nav-group.open .nav-group-title span {
  transform: rotate(180deg);
}
.nav-children {
  display: none;
  background: var(--sidebar-deep);
}
.nav-group.open .nav-children {
  display: block;
}
.nav-item {
  width: 100%;
  min-height: 44px;
  padding: 0 26px;
  display: flex;
  align-items: center;
  color: #bfcbd9;
  background: transparent;
  border: 0;
  border-radius: 0;
  text-align: left;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}
.nav-item::before {
  content: '';
  width: 5px;
  height: 5px;
  margin-right: 12px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.7;
}
.nav-item:hover {
  color: #fff;
  background: var(--sidebar-hover);
}
.nav-item.active {
  color: #409eff;
  background: var(--sidebar-deep);
}
.aside-foot {
  min-height: 44px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
}
.aside-foot i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}
.workspace {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  height: 56px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
}
.breadcrumb span::after {
  content: '/';
  margin-left: 9px;
  color: #c0c4cc;
}
.breadcrumb b {
  color: var(--text);
  font-weight: 400;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mode,
.quiet {
  min-height: 30px;
  padding: 6px 11px;
  color: var(--body-text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 12px;
}
.mode {
  background: #f4f4f5;
}
.quiet {
  cursor: pointer;
}
.quiet:hover {
  color: var(--primary);
  border-color: #b3d8ff;
  background: #ecf5ff;
}
.tags-view {
  position: sticky;
  top: 56px;
  z-index: 11;
  min-height: 34px;
  padding: 4px 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  background: #fff;
  border-bottom: 1px solid #d8dce5;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.view-tag {
  flex: none;
  height: 26px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--body-text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 12px;
  cursor: pointer;
}
.view-tag.active {
  color: #fff;
  background: var(--tag-active);
  border-color: var(--tag-active);
}
.view-tag.active::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
}
.tag-close {
  opacity: 0.75;
  font-size: 14px;
  line-height: 1;
}
main {
  width: 100%;
  padding: 20px;
}
.page-heading {
  min-height: 34px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.page-title {
  display: flex;
  align-items: center;
  gap: 9px;
}
.page-title h1 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 500;
}
.page-title button {
  width: 22px;
  height: 22px;
  padding: 0;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: #ecf5ff;
  border: 1px solid #91caff;
  border-radius: 50%;
  cursor: pointer;
  font-family: Georgia, serif;
  font-size: 14px;
  font-weight: 700;
}
.page-title button:hover {
  color: #fff;
  background: var(--primary);
}
.page-heading > span {
  color: var(--muted);
  font-size: 12px;
}
.notice {
  margin-bottom: 14px;
  padding: 10px 14px;
  color: #f56c6c;
  background: #fef0f0;
  border: 1px solid #fbc4c4;
  border-radius: 4px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.metric,
.panel {
  background: #fff;
  border: 1px solid var(--soft-line);
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 21, 41, 0.04);
}
.metric {
  position: relative;
  padding: 18px 20px;
  overflow: hidden;
}
.metric::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--primary);
}
.metric span {
  color: var(--muted);
  font-size: 12px;
}
.metric strong {
  display: block;
  margin-top: 9px;
  color: var(--text);
  font-size: 24px;
  line-height: 1.25;
  font-weight: 500;
}
.metric small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
}
.metric.alert::before {
  background: var(--danger);
}
.metric.alert strong {
  color: var(--danger);
}
.panel {
  margin-top: 16px;
  padding: 18px 20px;
}
.panel-head {
  min-height: 34px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.filter-bar {
  margin-bottom: 14px;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
  background: #fff;
  border: 1px solid var(--soft-line);
  border-radius: 4px;
}
.filter-bar label {
  display: grid;
  gap: 6px;
  color: var(--body-text);
  font-size: 12px;
}
.filter-bar input,
.filter-bar select {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  outline: 0;
}
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--primary);
}
.filter-actions {
  display: flex;
  gap: 8px;
}
.filter-actions button {
  min-height: 34px;
  padding: 0 15px;
  color: #fff;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 4px;
  cursor: pointer;
}
.filter-actions .quiet {
  margin: 0;
  color: var(--body-text);
  background: #fff;
  border-color: var(--line);
}
.create-button {
  min-height: 32px;
  padding: 0 14px;
  color: #fff;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 4px;
  cursor: pointer;
}
.create-button + .quiet {
  margin-left: 8px;
}
.status-control {
  display: flex;
  gap: 6px;
}
.status-control select,
.status-control button {
  height: 28px;
  padding: 0 8px;
  color: var(--body-text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 11px;
}
.operation-action {
  margin: 2px 5px 2px 0;
  padding: 5px 8px;
  color: var(--primary);
  background: #ecf5ff;
  border: 1px solid #b3d8ff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  white-space: nowrap;
}
.status-control button {
  color: var(--primary);
  border-color: #b3d8ff;
  cursor: pointer;
}
.panel h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}
.bar {
  appearance: none;
  width: 100%;
  height: 8px;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  background: #ebeef5;
}
.bar::-webkit-progress-bar {
  background: #ebeef5;
}
.bar::-webkit-progress-value,
.bar::-moz-progress-bar {
  background: var(--primary);
}
.table-wrap {
  width: 100%;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
}
table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}
th,
td {
  padding: 11px 12px;
  text-align: left;
  border-right: 1px solid var(--soft-line);
  border-bottom: 1px solid var(--soft-line);
  white-space: nowrap;
  font-size: 12px;
}
th:last-child,
td:last-child {
  border-right: 0;
}
tr:last-child td {
  border-bottom: 0;
}
th {
  color: var(--body-text);
  background: #f5f7fa;
  font-weight: 500;
}
td {
  color: var(--body-text);
}
tbody tr:hover {
  background: #f5f7fa;
}
tbody tr[data-id] {
  cursor: pointer;
}
.badge {
  display: inline-flex;
  padding: 2px 7px;
  color: var(--body-text);
  background: #f4f4f5;
  border: 1px solid #d3d4d6;
  border-radius: 4px;
  font-size: 11px;
}
.badge.P0,
.badge.FAILED {
  color: #f56c6c;
  background: #fef0f0;
  border-color: #fbc4c4;
}
.badge.P1,
.badge.UNKNOWN {
  color: #e6a23c;
  background: #fdf6ec;
  border-color: #f5dab1;
}
.badge.COMPLETED,
.badge.ACTIVE,
.badge.POSTED,
.badge.RESOLVED {
  color: #67c23a;
  background: #f0f9eb;
  border-color: #c2e7b0;
}
.page-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}
.page-foot button {
  padding: 8px 13px;
  color: var(--body-text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
}
.empty {
  padding: 48px 20px !important;
  color: var(--muted);
  text-align: center;
}

dialog {
  width: min(880px, calc(100vw - 32px));
  max-height: 85vh;
  padding: 0;
  overflow: auto;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.18);
}
dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}
.dialog-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.dialog-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
}
.dialog-head button {
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 22px;
  cursor: pointer;
}
.detail-grid {
  margin: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.detail-grid div {
  padding: 12px;
  border-right: 1px solid var(--soft-line);
  border-bottom: 1px solid var(--soft-line);
}
.detail-grid dt {
  color: var(--muted);
  font-size: 11px;
}
.detail-grid dd {
  margin: 5px 0 0;
  word-break: break-all;
  font-size: 12px;
}
.detail-section {
  padding: 0 18px 18px;
}
.detail-section h4 {
  font-size: 14px;
  font-weight: 500;
}
.page-info-dialog {
  width: min(720px, calc(100vw - 32px));
}
.page-info-content {
  padding: 18px;
  display: grid;
  gap: 12px;
}
.page-info-content section {
  padding: 14px 16px;
  background: #f7f9fc;
  border: 1px solid var(--soft-line);
  border-radius: 4px;
}
.page-info-content h4 {
  margin: 0 0 7px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}
.page-info-content p {
  margin: 0;
  color: var(--body-text);
  line-height: 1.75;
  font-size: 13px;
}
.page-info-content .risk-note {
  background: #fdf6ec;
  border-color: #f5dab1;
}

.test-center {
  display: grid;
  gap: 18px;
}
.self-guide {
  display: grid;
  gap: 16px;
}
.self-guide-tabs {
  position: sticky;
  top: 0;
  z-index: 5;
}
#self-guide-body {
  display: grid;
  gap: 16px;
}
.guide-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
  color: #17324d;
  background:
    radial-gradient(circle at 88% 15%, #bfe3ff 0 7%, transparent 7.5%),
    linear-gradient(120deg, #fff 12%, #edf7ff 100%);
  border: 1px solid #cfe4f8;
  border-radius: 14px;
}
.guide-hero.compact {
  align-items: flex-start;
}
.guide-hero > div:first-child {
  max-width: 850px;
}
.guide-hero span,
.protocol-head span {
  color: #1478ed;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.guide-hero h2 {
  margin: 6px 0 8px;
}
.guide-hero p,
.protocol-head p {
  margin: 0;
  color: #5f6f82;
  line-height: 1.7;
}
.guide-legend {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 9px 16px;
  flex: 0 0 auto;
  padding: 14px;
  background: #ffffffd9;
  border: 1px solid #dce9f5;
  border-radius: 10px;
}
.guide-legend span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #526173;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
}
.guide-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #8aa4bd;
}
.guide-legend .merchant {
  background: #6b87a5;
}
.guide-legend .core {
  background: #218bff;
}
.guide-legend .official {
  background: #20a779;
}
.guide-legend .fund {
  background: #e19a22;
}
.guide-swimlane {
  padding: 16px;
  overflow-x: auto;
  background: #f7faff;
  border: 1px solid #dce7f2;
  border-radius: 14px;
}
.lane-labels {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  min-width: 900px;
  margin-bottom: 10px;
  color: #6d7888;
  font-size: 11px;
  text-align: center;
}
.lane-labels b {
  padding: 7px;
  border-right: 1px dashed #d9e3ed;
}
.guide-flow-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 22px 12px;
  min-width: 900px;
  padding: 10px;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent calc(20% - 1px),
    #dfe8f133 calc(20% - 1px),
    #dfe8f133 20%
  );
}
.guide-flow-node {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 3px 9px;
  min-width: 0;
  min-height: 88px;
  padding: 12px;
  color: #26384c;
  text-align: left;
  background: #fff;
  border: 1px solid #d5e2ee;
  border-radius: 10px;
  box-shadow: 0 4px 14px #2c51700a;
}
.guide-flow-node:not(:nth-child(5)):not(:nth-child(10))::after {
  content: '→';
  position: absolute;
  right: -19px;
  top: 32px;
  color: #218bff;
  font-size: 20px;
}
.guide-flow-node:nth-child(6) {
  grid-column: 5;
  grid-row: 2;
}
.guide-flow-node:nth-child(7) {
  grid-column: 4;
  grid-row: 2;
}
.guide-flow-node:nth-child(8) {
  grid-column: 3;
  grid-row: 2;
}
.guide-flow-node:nth-child(9) {
  grid-column: 2;
  grid-row: 2;
}
.guide-flow-node:nth-child(10) {
  grid-column: 1;
  grid-row: 2;
}
.guide-flow-node:nth-child(n + 6):not(:nth-child(10))::after {
  content: '←';
  right: auto;
  left: -19px;
}
.guide-flow-node:nth-child(5)::before {
  content: '↓';
  position: absolute;
  right: 50%;
  bottom: -25px;
  color: #218bff;
  font-size: 20px;
}
.guide-flow-node b,
.decrypt-flow article b {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #1478ed;
  background: #e9f4ff;
  border-radius: 50%;
}
.guide-flow-node strong,
.guide-flow-node span {
  display: block;
  min-width: 0;
}
.guide-flow-node span {
  color: #718095;
  font-size: 11px;
}
.guide-flow-node.active {
  background: #eef7ff;
  border-color: #218bff;
  box-shadow: 0 0 0 3px #218bff18;
}
.guide-query-branch {
  display: flex;
  justify-content: center;
  min-width: 900px;
  margin-top: 10px;
}
.guide-query-branch button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  color: #725814;
  text-align: left;
  background: #fff8df;
  border-color: #edcf72;
}
.guide-query-branch b {
  font-size: 22px;
}
.guide-query-branch strong,
.guide-query-branch span {
  display: block;
}
.guide-step-detail {
  display: grid;
  grid-template-columns: 1.05fr repeat(3, 1fr);
  gap: 10px;
  padding: 14px;
  background: #17324d;
  border-radius: 12px;
}
.guide-step-detail > div,
.guide-step-detail article {
  min-width: 0;
  padding: 13px;
  background: #ffffff10;
  border: 1px solid #ffffff1f;
  border-radius: 9px;
}
.guide-step-detail span,
.guide-step-detail b {
  color: #83c3ff;
  font-size: 11px;
}
.guide-step-detail h3 {
  margin: 5px 0 8px;
  color: #fff;
}
.guide-step-detail strong,
.guide-step-detail p {
  color: #d9e9f7;
  line-height: 1.6;
}
.guide-step-detail p {
  margin: 7px 0 0;
  font-size: 12px;
}
.guide-state-rails,
.verification-funnel,
.mapping-table,
.decrypt-flow,
.fact-relations,
.fund-decisions,
.decision-tree,
.recovery-matrix,
.launch-checklist {
  padding: 16px;
  background: #fff;
  border: 1px solid #dfe7ef;
  border-radius: 12px;
}
.guide-state-rails h3,
.verification-funnel h3,
.mapping-table h3,
.decrypt-flow h3,
.fact-relations h3,
.fund-decisions h3,
.recovery-matrix h3,
.launch-checklist h3 {
  margin: 0 0 12px;
  font-size: 15px;
}
.guide-state-rails > div {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.guide-state-rails article {
  padding: 12px;
  background: #f7f9fc;
  border-top: 3px solid #8eacca;
  border-radius: 7px;
}
.guide-state-rails article b,
.guide-state-rails article span {
  display: block;
}
.guide-state-rails article span {
  margin-top: 6px;
  color: #657388;
  font-size: 11px;
  line-height: 1.6;
}
.guide-state-rails > p {
  margin: 12px 0 0;
  color: #725814;
  font-size: 12px;
}
.protocol-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  background: #f3f8ff;
  border: 1px solid #d6e6f5;
  border-left: 5px solid #218bff;
  border-radius: 12px;
}
.protocol-head.wechat {
  background: #f1fbf7;
  border-color: #cfeade;
  border-left-color: #20a779;
}
.protocol-head h2 {
  display: inline-block;
  margin: 4px 12px 0 0;
}
.protocol-head code {
  color: #526173;
}
.protocol-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.protocol-columns article {
  min-width: 0;
  padding: 15px;
  background: #fff;
  border: 1px solid #dfe7ef;
  border-radius: 10px;
}
.protocol-columns h3 {
  margin: 0 0 9px;
  font-size: 14px;
}
.protocol-columns pre,
.wechat-signature pre {
  overflow: auto;
  margin: 10px 0;
  padding: 12px;
  color: #e5f2ff;
  background: #17283b;
  border-radius: 8px;
  font-size: 11px;
  white-space: pre-wrap;
}
.protocol-columns p {
  margin: 8px 0 0;
  color: #66758a;
  font-size: 12px;
  line-height: 1.65;
}
.verification-funnel > div,
.decrypt-flow > div {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}
.verification-funnel span,
.decrypt-flow article {
  position: relative;
  min-width: 0;
  padding: 11px;
  color: #46566a;
  background: #f5f9fd;
  border: 1px solid #dbe6ef;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.5;
}
.verification-funnel span:not(:last-child)::after,
.decrypt-flow article:not(:last-child)::after {
  content: '→';
  position: absolute;
  right: -14px;
  top: 40%;
  color: #218bff;
  font-size: 17px;
}
.verification-funnel span b {
  display: block;
  margin-bottom: 5px;
  color: #1478ed;
}
.verification-funnel > p {
  margin: 11px 0 0;
  color: #875d12;
  font-size: 12px;
}
.mapping-table > div,
.recovery-matrix > div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
}
.mapping-table b,
.mapping-table span,
.recovery-matrix b,
.recovery-matrix span {
  min-width: 0;
  padding: 9px 11px;
  overflow-wrap: anywhere;
  border-right: 1px solid #e5ebf1;
  border-bottom: 1px solid #e5ebf1;
  font-size: 11px;
}
.mapping-table b,
.recovery-matrix b {
  color: #3a4b5f;
  background: #edf3f8;
}
.mapping-table span,
.recovery-matrix span {
  color: #647286;
}
.wechat-signature {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
  gap: 14px;
  padding: 16px;
  background: #fff;
  border: 1px solid #dfe7ef;
  border-radius: 12px;
}
.wechat-signature h3 {
  margin: 0;
  font-size: 15px;
}
.wechat-signature ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.wechat-signature li {
  padding: 12px;
  color: #59697d;
  background: #f3faf7;
  border: 1px solid #d8ebe2;
  border-radius: 8px;
  font-size: 12px;
}
.wechat-signature li b {
  display: block;
  color: #15966c;
}
.decrypt-flow article {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 4px 8px;
}
.decrypt-flow article strong,
.decrypt-flow article span {
  display: block;
}
.decrypt-flow article span {
  color: #69778a;
  font-size: 10px;
}
.fund-before-after {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: stretch;
}
.fund-before-after > article {
  padding: 17px;
  background: #fff;
  border: 1px solid #dfe7ef;
  border-radius: 12px;
}
.fund-before-after > i {
  align-self: center;
  color: #1478ed;
  font-style: normal;
  font-weight: 700;
  text-align: center;
}
.fund-before-after h3 {
  margin: 0 0 13px;
  font-size: 15px;
}
.fund-before-after p {
  margin: 11px 0 0;
  color: #68768a;
  font-size: 12px;
}
.ledger-entry {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 7px;
  padding: 10px;
  background: #f5f8fb;
  border-radius: 7px;
  font-size: 12px;
}
.ledger-entry b {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 7px;
  color: #1478ed;
  background: #e2f0ff;
  border-radius: 50%;
}
.fact-relations > div {
  display: flex;
  align-items: stretch;
  gap: 7px;
}
.fact-relations span {
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 54px;
  padding: 8px;
  color: #4f6073;
  text-align: center;
  background: #f4f8fc;
  border: 1px solid #dfe8f0;
  border-radius: 7px;
  font-size: 11px;
}
.fact-relations i {
  align-self: center;
  color: #218bff;
  font-style: normal;
}
.fund-decisions > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.fund-decisions article {
  padding: 12px;
  background: #f7f9fc;
  border-left: 3px solid #8ebce8;
  border-radius: 7px;
}
.fund-decisions b,
.fund-decisions span {
  display: block;
}
.fund-decisions span {
  margin-top: 5px;
  color: #66758a;
  font-size: 11px;
  line-height: 1.6;
}
.decision-root {
  max-width: 620px;
  margin: 0 auto 26px;
  padding: 14px;
  color: #fff;
  text-align: center;
  background: #173a5d;
  border-radius: 9px;
}
.decision-branches {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
}
.decision-branches::before {
  content: '';
  position: absolute;
  top: -17px;
  left: 25%;
  right: 25%;
  border-top: 2px solid #b9c9d8;
}
.decision-branches article {
  padding: 15px;
  background: #f0faf6;
  border: 1px solid #cce8dc;
  border-radius: 9px;
}
.decision-branches article.danger {
  background: #fff5f3;
  border-color: #f0c9c1;
}
.decision-branches article > b {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-right: 8px;
  color: #167a5b;
  background: #d8f1e8;
  border-radius: 50%;
}
.decision-branches .danger > b {
  color: #b53b2c;
  background: #ffe0db;
}
.decision-branches article div {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}
.decision-branches span {
  padding: 8px;
  color: #5f6e81;
  background: #fff;
  border-radius: 6px;
  font-size: 11px;
}
.launch-checklist > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.launch-checklist label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px;
  color: #526175;
  background: #f7f9fc;
  border-radius: 7px;
  font-size: 11px;
}
.launch-checklist input {
  margin: 1px 0 0;
}
.guide-shortcuts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding: 11px 13px;
  background: #f3f7fb;
  border: 1px solid #dfe7ef;
  border-radius: 10px;
}
.guide-shortcuts b {
  margin-right: 5px;
  color: #516074;
  font-size: 12px;
}
.guide-shortcuts button {
  padding: 6px 9px;
  color: #1478ed;
  background: #fff;
  border-color: #bfdbf7;
  font-size: 11px;
}
.test-tabs {
  display: flex;
  gap: 6px;
  overflow: auto;
  padding: 5px;
  background: #eef3f8;
  border-radius: 12px;
}
.test-tabs button {
  white-space: nowrap;
  border: 0;
  background: transparent;
  color: #566176;
  padding: 10px 18px;
  border-radius: 9px;
}
.test-tabs button.active {
  background: #fff;
  color: #1478ed;
  box-shadow: 0 3px 12px #263b5914;
}
.status-matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.status-matrix article {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid #e4e9f0;
  border-radius: 12px;
  padding: 16px;
}
.status-matrix b,
.step-strip b {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #eaf4ff;
  color: #1478ed;
}
.status-matrix h3 {
  margin: 2px 0 7px;
  font-size: 15px;
}
.status-matrix p,
.step-strip p {
  margin: 0;
  color: #667085;
  font-size: 13px;
}
.test-rule {
  padding: 13px 16px;
  background: #fff8e5;
  border-left: 4px solid #f0a000;
  border-radius: 8px;
}
.test-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 22px;
  background: linear-gradient(120deg, #fff, #f1f8ff);
  border: 1px solid #dfe9f5;
  border-radius: 14px;
}
.test-intro span {
  color: #1478ed;
  font-size: 12px;
  font-weight: 700;
}
.test-intro h2 {
  margin: 5px 0;
}
.test-intro p {
  margin: 0;
  color: #667085;
}
.test-intro code {
  background: #e7f2ff;
  color: #0969da;
  padding: 9px 12px;
  border-radius: 8px;
}
.step-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.step-strip article {
  position: relative;
  background: #fff;
  border: 1px solid #e4e9f0;
  border-radius: 12px;
  padding: 14px;
  min-height: 128px;
}
.step-strip h4 {
  margin: 10px 0 6px;
}
.step-strip i {
  position: absolute;
  right: -13px;
  top: 52px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #1478ed;
  color: #fff;
  font-style: normal;
}
.parameter-card {
  background: #fff;
  border: 1px solid #e4e9f0;
  border-radius: 12px;
  padding: 14px 18px;
}
.parameter-card summary {
  cursor: pointer;
  font-weight: 700;
}
.parameter-card pre {
  overflow: auto;
  background: #f6f8fa;
  padding: 14px;
  border-radius: 9px;
}
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  align-items: start;
}
.scenario-library-note {
  margin: 0;
  padding: 13px 16px;
  color: #38516f;
  background: #eef7ff;
  border-left: 4px solid #218bff;
  border-radius: 8px;
}
.scenario-card {
  min-width: 0;
  background: #fff;
  border: 1px solid #dce4ee;
  border-radius: 10px;
  overflow: hidden;
}
.scenario-card:has(.scenario-evidence[open]) {
  grid-column: 1 / -1;
}
.scenario-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #243047;
  padding: 13px;
  min-height: 86px;
}
.scenario-card-head > div:first-child strong,
.scenario-card-head > div:first-child small {
  display: block;
}
.scenario-card-head > div:first-child small {
  margin-top: 5px;
  color: #7b8494;
}
.scenario-actions {
  display: grid;
  gap: 6px;
  flex: 0 0 auto;
}
.scenario-actions button {
  white-space: nowrap;
  padding: 7px 10px;
  font-size: 12px;
}
.scenario-video-button {
  background: #fff;
  color: #1478ed;
  border-color: #8fc4ff;
}
.scenario-evidence {
  margin: 0;
  background: #fff;
  border: 0;
  border-top: 1px solid #dce4ee;
  border-radius: 0;
  overflow: hidden;
}
.scenario-evidence > summary {
  cursor: pointer;
  padding: 10px 12px;
  color: #1478ed;
  font-size: 13px;
  font-weight: 700;
}
.scenario-evidence[open] > summary {
  background: #f5faff;
  border-bottom: 1px solid #dce4ee;
}
.scenario-evidence-body {
  display: grid;
  gap: 18px;
  padding: 18px;
}
.evidence-overview,
.evidence-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
}
.scenario-video {
  min-width: 0;
  margin: 0;
}
.scenario-video video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #152033;
  border-radius: 10px;
}
.scenario-video figcaption {
  padding-top: 8px;
  color: #667085;
  font-size: 12px;
}
.request-facts,
.flow-explainer,
.evidence-bottom > section {
  min-width: 0;
  padding: 15px;
  background: #f8fafc;
  border: 1px solid #e4e9f0;
  border-radius: 10px;
}
.request-facts h3,
.flow-explainer h3,
.evidence-bottom h3 {
  margin: 0 0 10px;
  font-size: 15px;
}
.request-facts p {
  margin: 9px 0;
  color: #566176;
  font-size: 13px;
  line-height: 1.6;
}
.request-facts pre {
  margin: 8px 0;
  padding: 11px;
  overflow: auto;
  background: #172033;
  color: #eaf4ff;
  border-radius: 8px;
  font-size: 12px;
}
.request-facts code {
  display: block;
  overflow-wrap: anywhere;
  color: #0969da;
}
.request-facts .product-note {
  margin-top: 12px;
  padding: 9px 10px;
  background: #eaf4ff;
  border-radius: 7px;
  color: #38516f;
}
.wire-contract {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.branch-map {
  padding: 15px;
  background: #eef7ff;
  border: 1px solid #b9dcff;
  border-radius: 10px;
}
.branch-map h3 {
  margin: 0 0 10px;
  font-size: 15px;
}
.branch-map > div {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 10px;
}
.branch-map article {
  padding: 12px;
  background: #fff;
  border: 1px solid #d5e8fb;
  border-radius: 8px;
}
.branch-map article b,
.branch-map article span {
  display: block;
}
.branch-map article span {
  margin-top: 5px;
  color: #596579;
  font-size: 12px;
  line-height: 1.55;
}
.branch-map i {
  align-self: center;
  color: #1478ed;
  font-style: normal;
  font-weight: 700;
}
.record-map {
  padding: 15px;
  background: #f8fafc;
  border: 1px solid #e4e9f0;
  border-radius: 10px;
}
.record-map h3 {
  margin: 0 0 10px;
  font-size: 15px;
}
.record-map > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.record-map span {
  min-width: 0;
  padding: 10px;
  color: #596579;
  background: #fff;
  border: 1px solid #e4e9f0;
  border-radius: 8px;
  font-size: 12px;
}
.record-map b {
  display: block;
  margin-bottom: 4px;
  color: #1478ed;
  font-family: ui-monospace, monospace;
}
.wire-contract article {
  min-width: 0;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #e4e9f0;
  border-radius: 10px;
}
.wire-contract b {
  display: block;
  margin-bottom: 9px;
  color: #243047;
}
.wire-contract pre,
.actual-payloads pre {
  margin: 0;
  padding: 11px;
  overflow: auto;
  color: #dcecff;
  background: #172033;
  border-radius: 8px;
  font-size: 11px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.internal-orchestration {
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 9px;
  color: #667085;
}
.internal-orchestration summary {
  cursor: pointer;
  font-weight: 700;
}
.internal-orchestration code {
  display: block;
  margin-top: 10px;
}
.scenario-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.scenario-flow li {
  position: relative;
  min-width: 0;
  min-height: 116px;
  padding: 13px;
  background: #fff;
  border: 1px solid #dfe6ee;
  border-radius: 9px;
}
.scenario-flow li:not(:last-child)::after {
  content: '→';
  position: absolute;
  right: -19px;
  top: 45px;
  color: #218bff;
  font-size: 22px;
  font-weight: 700;
}
.scenario-flow li > b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-bottom: 9px;
  background: #eaf4ff;
  color: #1478ed;
  border-radius: 50%;
  font-size: 12px;
}
.scenario-flow li > strong,
.scenario-flow li > span {
  display: block;
}
.scenario-flow li > strong {
  color: #243047;
  font-size: 13px;
}
.scenario-flow li > span {
  margin-top: 5px;
  color: #667085;
  font-size: 11px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.scenario-state-table {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.scenario-state-table > span {
  min-width: 0;
  padding: 10px;
  background: #fff;
  border-radius: 8px;
}
.scenario-state-table b,
.scenario-state-table strong,
.scenario-state-table code {
  display: block;
}
.scenario-state-table b {
  color: #667085;
  font-size: 11px;
}
.scenario-state-table strong {
  margin: 5px 0;
  color: #243047;
  font-size: 13px;
}
.scenario-state-table code {
  color: #596579;
  font-size: 10px;
  overflow-wrap: anywhere;
}
.why-card {
  background: #fffaf0 !important;
  border-color: #f2d49a !important;
}
.why-card p {
  color: #5e5543;
  font-size: 13px;
  line-height: 1.65;
}
.why-card h4 {
  margin: 13px 0 7px;
  color: #6a582d;
}
.why-card p span {
  display: inline-block;
  margin: 3px 5px 3px 0;
  padding: 4px 7px;
  background: #fff;
  border: 1px solid #ead6aa;
  border-radius: 6px;
}
.test-result {
  background: #eef9f4;
  border: 1px solid #a8dfc4;
  border-radius: 12px;
  padding: 17px;
}
.test-result.error {
  background: #fff2f2;
  border-color: #f0b0b0;
}
.result-facts {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.live-chain {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.live-chain li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 2px 9px;
  padding: 11px;
  background: #fff;
  border: 1px solid #dce4ee;
  border-radius: 8px;
}
.live-chain b {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: #edf1f5;
  border-radius: 50%;
}
.live-chain small {
  color: #7b8494;
}
.live-chain .done,
.live-chain .active {
  border-color: #79b9ff;
  background: #f5faff;
}
.live-chain .done b,
.live-chain .active b {
  color: #fff;
  background: #218bff;
}
.actual-payloads {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.actual-payloads details {
  min-width: 0;
  padding: 10px;
  background: #fff;
  border: 1px solid #dce4ee;
  border-radius: 8px;
}
.actual-payloads summary {
  cursor: pointer;
  font-weight: 700;
}
.actual-payloads pre {
  margin-top: 9px;
}
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.result-facts span {
  background: #fff;
  padding: 10px;
  border-radius: 8px;
  color: #667085;
  font-size: 12px;
}
.result-facts strong {
  display: block;
  margin-top: 4px;
  color: #172033;
  overflow-wrap: anywhere;
}
@media (max-width: 1000px) {
  .guide-hero,
  .protocol-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .guide-step-detail,
  .protocol-columns,
  .wechat-signature,
  .fund-before-after {
    grid-template-columns: 1fr;
  }
  .fund-before-after > i {
    transform: rotate(90deg);
  }
  .guide-state-rails > div,
  .verification-funnel > div,
  .decrypt-flow > div,
  .fund-decisions > div,
  .launch-checklist > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .verification-funnel span::after,
  .decrypt-flow article::after {
    display: none;
  }
  .fact-relations > div {
    display: grid;
    grid-template-columns: 1fr;
  }
  .fact-relations i {
    justify-self: center;
    transform: rotate(90deg);
  }
  .status-matrix {
    grid-template-columns: 1fr;
  }
  .step-strip {
    grid-template-columns: 1fr;
  }
  .step-strip i {
    right: auto;
    left: 50%;
    top: auto;
    bottom: -17px;
    transform: rotate(90deg);
  }
  .scenario-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .evidence-overview,
  .evidence-bottom,
  .wire-contract,
  .branch-map > div {
    grid-template-columns: 1fr;
  }
  .branch-map i {
    justify-self: center;
  }
  .scenario-flow {
    grid-template-columns: 1fr;
  }
  .scenario-flow li {
    min-height: auto;
  }
  .scenario-flow li:not(:last-child)::after {
    content: '↓';
    right: auto;
    left: 50%;
    top: auto;
    bottom: -23px;
  }
  .scenario-state-table {
    grid-template-columns: repeat(2, 1fr);
  }
  .result-facts {
    grid-template-columns: repeat(2, 1fr);
  }
  .live-chain,
  .actual-payloads {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 620px) {
  .guide-legend,
  .guide-state-rails > div,
  .verification-funnel > div,
  .decrypt-flow > div,
  .fund-decisions > div,
  .launch-checklist > div,
  .decision-branches,
  .wechat-signature ol {
    grid-template-columns: 1fr;
  }
  .mapping-table,
  .recovery-matrix {
    overflow-x: auto;
  }
  .mapping-table > div,
  .recovery-matrix > div {
    min-width: 680px;
  }
}
.tutorial-gallery {
  background: #fff;
  border: 1px solid #e4e9f0;
  border-radius: 12px;
  padding: 14px 18px;
}
.tutorial-gallery summary {
  cursor: pointer;
  font-weight: 700;
}
.tutorial-gallery > div {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  margin-top: 14px;
}
.tutorial-gallery figure {
  min-width: min(680px, 85%);
  margin: 0;
}
.tutorial-gallery img {
  display: block;
  width: 100%;
  border: 1px solid #dfe5ed;
  border-radius: 10px;
}
.tutorial-gallery figcaption {
  padding: 8px 2px;
  color: #667085;
  font-size: 13px;
}
.page-info-content .risk-note h4 {
  color: #b88230;
}
.config-fields {
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.config-fields label {
  display: grid;
  gap: 6px;
  color: var(--body-text);
  font-size: 12px;
}
.config-fields input,
.config-fields select,
.config-fields textarea {
  width: 100%;
  min-height: 38px;
  padding: 9px 10px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  outline: 0;
}
.config-fields textarea {
  min-height: 110px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}
.config-fields input:focus,
.config-fields select:focus,
.config-fields textarea:focus {
  border-color: var(--primary);
}
.config-fields .wide-field {
  grid-column: 1 / -1;
}
.config-fields .check-field {
  display: flex;
  align-items: center;
  gap: 8px;
}
.config-fields .check-field input {
  width: 16px;
  min-height: 16px;
}
#config-form > .form-message {
  margin: 0 18px;
}
.dialog-actions {
  padding: 14px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--soft-line);
}
.dialog-actions .primary {
  width: auto;
  min-height: 34px;
  margin: 0;
  padding: 0 16px;
}

@media (max-width: 980px) {
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .page-heading > span {
    display: none;
  }
  .filter-bar {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}
@media (max-width: 720px) {
  .app-shell {
    grid-template-columns: 64px minmax(0, 1fr);
  }
  .app-shell > aside {
    width: 64px;
  }
  .workspace {
    grid-column: 2;
  }
  .aside-brand {
    padding: 0 16px;
  }
  .aside-brand strong,
  .aside-foot span {
    display: none;
  }
  .nav-item {
    min-height: 42px;
    padding: 0;
    justify-content: center;
    font-size: 0;
  }
  .nav-group-title {
    padding: 0;
    justify-content: center;
    font-size: 0;
  }
  .nav-group-title::before {
    content: '▦';
    font-size: 15px;
  }
  .nav-group-title span {
    display: none;
  }
  .nav-item::before {
    width: 8px;
    height: 8px;
    margin: 0;
  }
  .topbar {
    padding: 0 12px;
  }
  .breadcrumb span,
  .mode {
    display: none;
  }
  main {
    padding: 12px;
  }
  .metrics {
    grid-template-columns: 1fr;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .config-fields {
    grid-template-columns: 1fr;
  }
  .config-fields .wide-field {
    grid-column: auto;
  }
  .filter-bar {
    grid-template-columns: 1fr;
  }
  .scenario-grid,
  .live-chain,
  .actual-payloads,
  .scenario-state-table,
  .record-map > div {
    grid-template-columns: 1fr;
  }
  .scenario-card-head {
    align-items: stretch;
    flex-direction: column;
  }
  .scenario-actions {
    grid-template-columns: 1fr 1fr;
  }
}
