body:has(.stream-interface) {
  background: #edf1f5;
}

body:has(.stream-interface) main {
  max-width: 1320px;
  padding: 18px 22px 48px;
}

body:has(.stream-interface) main > header {
  border: 0;
  margin: 0;
  padding: 0;
}

body:has(.stream-interface) nav {
  align-items: stretch;
  gap: 0;
  min-height: 48px;
  margin: 0 0 18px;
  padding: 0 14px;
  border: 1px solid #9eb0c3;
  background: #dbe5ef;
  box-shadow: inset 0 1px 0 #f8fbfd;
}

body:has(.stream-interface) nav .site-brand {
  display: flex;
  align-items: center;
  margin-right: 22px;
  padding: 0 12px 0 3px;
  border: 0;
  color: #112f57;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
}

body:has(.stream-interface) nav .site-brand span {
  margin-left: 5px;
  color: #1674bb;
}

body:has(.stream-interface) nav .nav-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
}

body:has(.stream-interface) nav .nav-cluster a {
  display: flex;
  align-items: center;
  border: 0;
  border-left: 1px solid #bdcad7;
  border-radius: 0;
  padding: 0 14px;
  color: #2b4967;
  font-size: 13px;
}

body:has(.stream-interface) nav .nav-cluster a:last-child {
  border-right: 1px solid #bdcad7;
}

body:has(.stream-interface) nav .nav-cluster a:hover {
  background: #edf3f8;
  text-decoration: none;
}

body:has(.stream-interface) nav .nav-cluster a.active {
  border-color: #2e6ba5;
  background: #3a78b4;
  color: #fff;
  box-shadow: inset 0 1px 0 #86b5df;
}

body:has(.stream-interface) nav .page-context,
body:has(.stream-interface) nav .service-status {
  display: flex;
  align-items: center;
  margin-left: auto;
  color: #4b6177;
  font: 700 10px/1 Consolas, "Courier New", monospace;
  letter-spacing: .7px;
}

.stream-interface {
  overflow: hidden;
  border: 1px solid #a8b8c7;
  background: #f8fafc;
  box-shadow: 0 2px 8px rgba(33, 59, 84, .12);
}

.stream-ribbon {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-bottom: 1px solid #a1b3c6;
  background: #e2eaf2;
}

.stream-ribbon p,
.stream-ribbon h1 {
  margin: 0;
}

.stream-ribbon p {
  color: #42617d;
  font: 700 10px/1 Consolas, "Courier New", monospace;
  letter-spacing: .8px;
}

.stream-ribbon h1 {
  margin-left: 12px;
  color: #173e69;
  font-size: 18px;
}

.stream-ribbon .stream-ribbon-state {
  margin-left: auto;
  color: #587087;
  font-size: 12px;
}

.stream-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, .5fr);
  gap: 0;
  border-bottom: 1px solid #c5d0db;
  background: #fff;
}

.stream-summary-copy {
  padding: 27px 30px 25px;
}

.stream-summary-copy h2 {
  margin: 0 0 10px;
  color: #173e69;
  font-size: 26px;
}

.stream-summary-copy p {
  max-width: 710px;
  color: #41566b;
  font-size: 14px;
}

.stream-endpoints {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 20px 23px;
  border-left: 1px solid #c5d0db;
  background: #eef3f7;
}

.stream-endpoint-link {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid #aabccc;
  background: #fdfefe;
  color: #1b4d7d;
}

.stream-endpoint-link:hover {
  border-color: #417fb8;
  background: #fff;
  text-decoration: none;
}

.stream-endpoint-link b {
  color: #17825d;
  font: 700 11px/1.6 Consolas, "Courier New", monospace;
}

.stream-endpoint-link code {
  color: #244b70;
  font-size: 11px;
}

.stream-content {
  padding: 20px;
}

.stream-preview-panel {
  border: 1px solid #aebdca;
  background: #dce6ee;
}

.stream-preview-toolbar {
  display: flex;
  align-items: center;
  min-height: 55px;
  padding: 9px 15px;
  border-bottom: 1px solid #9eb2c5;
  background: #e9f0f6;
}

.stream-preview-toolbar p,
.stream-preview-toolbar h2 {
  margin: 0;
}

.stream-preview-toolbar p {
  color: #50708e;
  font: 700 10px/1 Consolas, "Courier New", monospace;
  letter-spacing: .7px;
}

.stream-preview-toolbar h2 {
  margin-top: 5px;
  color: #244b72;
  font-size: 16px;
}

.stream-preview-toolbar > span {
  margin-left: auto;
  color: #5b7186;
  font: 700 11px/1 Consolas, "Courier New", monospace;
}

.stream-table-viewport {
  overflow: auto;
  padding: 16px;
  background: #101820;
}

.stream-table-viewport svg {
  display: block;
  width: 100%;
  height: auto;
  min-width: 650px;
  background: #101820;
}

.stream-minimal-flow {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 16px;
  padding: 11px 14px;
  border: 1px solid #b5c3cf;
  background: #f8fafc;
  color: #375b7c;
  font-size: 13px;
}

.stream-minimal-flow b {
  color: #2f78b5;
  font-size: 17px;
}

.stream-minimal-flow i {
  margin-left: auto;
  color: #748596;
  font-size: 11px;
  font-style: normal;
}

.stream-section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 10px;
}

.stream-section-head h2,
.stream-section-head p {
  margin: 0;
}

.stream-section-head h2 {
  color: #1d436b;
  font-size: 16px;
}

.stream-section-head p {
  color: #718294;
  font-size: 12px;
}

.stream-rule-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid #b3c2d0;
  border-left: 1px solid #b3c2d0;
  background: #fff;
}

.stream-rule {
  min-height: 118px;
  padding: 14px;
  border-right: 1px solid #b3c2d0;
  border-bottom: 1px solid #b3c2d0;
}

.stream-rule b {
  display: block;
  margin-bottom: 8px;
  color: #276da8;
  font: 700 11px/1 Consolas, "Courier New", monospace;
}

.stream-rule h3 {
  margin: 0 0 6px;
  color: #26415d;
  font-size: 14px;
}

.stream-rule p {
  color: #637589;
  font-size: 12px;
  line-height: 1.55;
}

.stream-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 24px 0;
  border: 1px solid #b1c0ce;
  background: #eaf0f5;
}

.stream-flow-step {
  position: relative;
  min-height: 108px;
  padding: 16px 18px;
  border-right: 1px solid #b1c0ce;
}

.stream-flow-step:last-child {
  border-right: 0;
}

.stream-flow-step:not(:last-child)::after {
  position: absolute;
  right: -6px;
  top: calc(50% - 6px);
  z-index: 1;
  width: 11px;
  height: 11px;
  border-top: 1px solid #6385a5;
  border-right: 1px solid #6385a5;
  background: #eaf0f5;
  content: "";
  transform: rotate(45deg);
}

.stream-flow-step span {
  display: block;
  margin-bottom: 9px;
  color: #527393;
  font: 700 10px/1 Consolas, "Courier New", monospace;
}

.stream-flow-step strong {
  display: block;
  color: #24496f;
  font-size: 14px;
}

.stream-flow-step p {
  margin-top: 7px;
  color: #657889;
  font-size: 12px;
  line-height: 1.5;
}

.stream-contract-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(330px, .7fr);
  gap: 20px;
  align-items: stretch;
}

.stream-field-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 12px;
}

.stream-field-table th,
.stream-field-table td {
  padding: 10px 11px;
  border: 1px solid #bdc9d5;
  text-align: left;
  vertical-align: top;
}

.stream-field-table th {
  color: #eaf4ff;
  background: #386f9e;
  font-size: 11px;
  font-weight: 700;
}

.stream-field-table td:first-child {
  width: 140px;
  color: #234a70;
  font-family: Consolas, "Courier New", monospace;
}

.stream-field-table td {
  color: #52687c;
  line-height: 1.55;
}

.stream-write-panel {
  border: 1px solid #aebdca;
  background: #e7eef4;
}

.stream-write-panel header {
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid #adbdca;
  background: #d8e4ee;
}

.stream-write-panel header h2,
.stream-write-panel header p {
  margin: 0;
}

.stream-write-panel header h2 {
  color: #244a70;
  font-size: 15px;
}

.stream-write-panel header p {
  margin-top: 4px;
  color: #677d91;
  font-size: 11px;
}

.stream-write-panel pre {
  margin: 0;
  border-radius: 0;
  background: #14283b;
  color: #dcecf8;
  font-size: 11px;
}

.stream-write-note {
  padding: 14px;
}

.stream-write-note p {
  color: #536b80;
  font-size: 12px;
}

.stream-write-note .future-route {
  display: block;
  margin-top: 10px;
  padding: 8px 9px;
  border-left: 3px solid #d38b20;
  background: #fff8e9;
  color: #805713;
  font-size: 11px;
}

@media (max-width: 900px) {
  .stream-summary,
  .stream-contract-layout {
    grid-template-columns: 1fr;
  }

  .stream-endpoints {
    border-top: 1px solid #c5d0db;
    border-left: 0;
  }

  .stream-rule-grid,
  .stream-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stream-flow-step:nth-child(2) {
    border-right: 0;
  }

  .stream-flow-step:nth-child(2)::after {
    display: none;
  }

  .stream-flow-step:nth-child(3) {
    border-top: 1px solid #b1c0ce;
  }
}

@media (max-width: 620px) {
  body:has(.stream-interface) main {
    padding: 10px 10px 28px;
  }

  body:has(.stream-interface) nav {
    padding: 0 8px;
  }

  body:has(.stream-interface) nav .site-brand {
    width: 100%;
    min-height: 41px;
  }

  body:has(.stream-interface) nav .nav-cluster a {
    min-height: 36px;
    padding: 0 8px;
    font-size: 12px;
  }

  body:has(.stream-interface) nav .service-status,
  body:has(.stream-interface) nav .page-context {
    display: none;
  }

  .stream-ribbon {
    padding: 0 12px;
  }

  .stream-ribbon .stream-ribbon-state {
    display: none;
  }

  .stream-summary-copy,
  .stream-content {
    padding: 18px 14px;
  }

  .stream-summary-copy h2 {
    font-size: 22px;
  }

  .stream-preview-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .stream-preview-toolbar > span {
    margin: 7px 0 0;
  }

  .stream-minimal-flow {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .stream-minimal-flow i {
    width: 100%;
    margin: 0;
  }

  .stream-rule-grid,
  .stream-flow {
    grid-template-columns: 1fr;
  }

  .stream-flow-step,
  .stream-flow-step:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid #b1c0ce;
  }

  .stream-flow-step:last-child {
    border-bottom: 0;
  }

  .stream-flow-step::after {
    display: none;
  }

  .stream-field-table th,
  .stream-field-table td {
    padding: 8px;
  }
}
